• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
          • Vl-module
          • Vl-vardecl
          • Vl-fundecl
          • Vl-interface
          • Vl-design
          • Vl-assign
          • Vl-modinst
          • Vl-gateinst
          • Vl-taskdecl
          • Vl-portdecl
          • Vl-commentmap
          • Vl-dpiimport
          • Vl-ansi-portdecl
          • Vl-package
          • Vl-paramdecl
          • Vl-dpiexport
          • Vl-plainarglist->exprs
          • Vl-class
          • Vl-taskdecllist->names
          • Vl-sort-blockitems-aux
          • Vl-fundecllist->names
          • Expressions-and-datatypes
            • Vl-atts
            • Vl-expr
            • Vl-datatype
              • Vl-datatype-p
              • Vl-usertype
              • Vl-struct
              • Vl-coredatatype-info
              • Vl-union
              • Vl-datatype->udims
              • Vl-datatype-update-dims
              • Vl-coretype
              • Vl-datatype->pdims
              • Vl-enum
              • Vl-maybe-datatype
              • Vl-datatype-case
              • Vl-datatype-update-udims
              • Vl-datatype-update-pdims
              • Vl-datatype-equiv
              • Vl-datatype-kind
              • Vl-coretypename->info
              • *vl-core-data-type-table*
              • *vl-plain-old-logic-type*
              • Vl-datatype-fix
              • Vl-datatype-count
              • *vl-plain-old-time-type*
              • *vl-plain-old-reg-type*
              • *vl-plain-old-realtime-type*
              • *vl-plain-old-real-type*
              • *vl-plain-old-integer-type*
            • New-expression-representation
            • Vl-paramargs
            • Vl-evatom
            • Vl-maybe-paramargs
            • Vl-evatomlist
            • Vl-call-namedargs
            • Vl-paramvaluelist
            • Vl-namedparamvaluelist
          • Vl-udp
          • Vl-port
          • Vl-genelement
          • Vl-clkdecl
          • Vl-parse-temps
          • Vl-bind
          • Vl-namedarg
          • Vl-exprdist
          • Vl-clkassign
          • Vl-range
          • Vl-propport
          • Vl-typedef
          • Vl-gatedelay
          • Vl-dimension
          • Vl-sequence
          • Vl-clkskew
          • Vl-program
          • Vl-gatestrength
          • Vl-property
          • Vl-config
          • Vl-always
          • Vl-import
          • Vl-repeateventcontrol
          • Vl-timeliteral
          • Vl-initial
          • Vl-eventcontrol
          • Vl-udpsymbol-p
          • Vl-final
          • Vl-maybe-clkskew
          • Vl-alias
          • Vl-maybe-nettypename
          • Vl-maybe-gatedelay
          • Vl-letdecl
          • Vl-direction-p
          • Vl-modelement
          • Vl-maybe-timeprecisiondecl
          • Vl-maybe-scopeid
          • Vl-maybe-gatestrength
          • Vl-maybe-direction
          • Vl-maybe-delayoreventcontrol
          • Vl-gclkdecl
          • Vl-fwdtypedef
          • Vl-maybe-udpsymbol-p
          • Vl-maybe-timeunitdecl
          • Vl-maybe-timeliteral
          • Vl-maybe-parse-temps
          • Vl-maybe-cstrength
          • Vl-arguments
          • Vl-maybe-module
          • Vl-maybe-design
          • Vl-covergroup
          • Vl-udpline
          • Vl-timeunitdecl
          • Vl-genvar
          • Vl-defaultdisable
          • Vl-context1
          • Vl-timeprecisiondecl
          • Vl-sort-blockitems
          • Vl-elabtask
          • Vl-udpedge
          • Vl-delaycontrol
          • Vl-context
          • Vl-modelement->loc
          • Vl-ctxelement
          • Vl-ctxelement->loc
          • Statements
          • Vl-interface->ifports
          • Vl-blockitem
          • Vl-vardecllist
          • Vl-module->ifports
          • Vl-lifetime-p
          • Vl-syntaxversion
          • Vl-nettypename-p
          • Vl-paramdecllist
          • Vl-modelementlist->genelements
          • Vl-importlist
          • Vl-gatetype-p
          • Vl-typedeflist
          • Vl-genelement->loc
          • Vl-cstrength-p
          • Vl-port->name
          • Vl-elabtask->loc
          • Vl-delayoreventcontrol
          • Vl-udpentry-p
          • Vl-portdecllist
          • Vl-port->loc
          • Property-expressions
          • Vl-taskdecllist
          • Vl-fundecllist
          • Vl-sequencelist
          • Vl-propertylist
          • Vl-portlist
          • Vl-dpiimportlist
          • Vl-dpiexportlist
          • Vl-classlist
          • Vl-arguments->args
          • Vl-alwaystype-p
          • Vl-modinstlist
          • Vl-importpart-p
          • Vl-importpart-fix
          • Vl-blockstmt-p
          • Vl-bindlist
          • Vl-initiallist
          • Vl-genvarlist
          • Vl-gclkdecllist
          • Vl-finallist
          • Vl-elabtasklist
          • Vl-defaultdisablelist
          • Vl-clkdecllist
          • Vl-cassertionlist
          • Vl-assignlist
          • Vl-assertionlist
          • Vl-alwayslist
          • Vl-aliaslist
          • Vl-udptable
          • Vl-udplist
          • Vl-udpentrylist
          • Vl-propportlist
          • Vl-programlist
          • Vl-packagelist
          • Vl-namedarglist
          • Vl-modulelist
          • Vl-modportlist
          • Vl-modport-portlist
          • Vl-letdecllist
          • Vl-interfacelist
          • Vl-gateinstlist
          • Vl-fwdtypedeflist
          • Vl-covergrouplist
          • Vl-configlist
          • Vl-clkassignlist
          • Vl-casekey-p
          • Vl-blockitemlist
          • Vl-ansi-portdecllist
          • Vl-regularportlist
          • Vl-paramdecllist-list
          • Vl-modelementlist
          • Vl-interfaceportlist
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Testing-utilities
    • Math
  • Expressions-and-datatypes

Vl-datatype

Representation of a SystemVerilog variable datatype, e.g., logic [7:0][3:0], string, mystruct_t [3:0], etc.

This is a tagged union type, introduced by deftagsum.

Member Tags → Types
:vl-coretype → vl-coretype
A built-in SystemVerilog datatype like integer, string, void, etc., or an array of such a type.
:vl-struct → vl-struct
A SystemVerilog struct datatype, or an array of structs.
:vl-union → vl-union
A SystemVerilog union datatype, or an array of unions.
:vl-enum → vl-enum
A SystemVerilog enum datatype, or an array of enums.
:vl-usertype → vl-usertype
Represents a reference to some user-defined SystemVerilog datatype.

Introduction

A vl-datatype may represent a SystemVerilog variable datatype such as logic [3:0], integer, string, struct { ...}, mybus_t, etc. It may also represent arrays of such types with packed and/or unpacked dimensions.

Some higher-level functions for working with datatypes are found in mlib; see in particular datatype-tools.

Note about the word ``type.'' The Verilog-2005 and SystemVerilog-2012 standards sometimes use the word ``type'' to refer to other things. In particular:

  • For historical reasons, the standards sometimes refer to the ``type'' of an expression when they really mean something more like its signedness. Signedness is captured by vl-datatype, but there are some nuances; see vl-datatype-arithclass, vl-exprsign, and portdecl-sign.
  • Net and port declarations can have a notion of a ``net type'' such as wire, wor, supply1, etc., which govern how multiple assignments to the net are resolved. This information is not part of a vl-datatype. See vl-vardecl for additional discussion.

Note that we do not yet implement some of the more advanced SystemVerilog datatypes, including at least the following:

data_type ::= ...
  | 'virtual' [ 'interface' ] interface_identifier [ parameter_value_assignment ] [ '.' modport_identifier ]
  | class_type
  | type_reference

Subtopics

Vl-datatype-p
Recognizer for vl-datatype structures.
Vl-usertype
Represents a reference to some user-defined SystemVerilog datatype.
Vl-struct
A SystemVerilog struct datatype, or an array of structs.
Vl-coredatatype-info
Structure to store properties of a coretype.
Vl-union
A SystemVerilog union datatype, or an array of unions.
Vl-datatype->udims
Get the unpacked dimensions from any datatype.
Vl-datatype-update-dims
Update the dimensions of any datatype, no matter its kind.
Vl-coretype
A built-in SystemVerilog datatype like integer, string, void, etc., or an array of such a type.
Vl-datatype->pdims
Get the packed dimensions from any datatype.
Vl-enum
A SystemVerilog enum datatype, or an array of enums.
Vl-maybe-datatype
Option type; vl-datatype or nil.
Vl-datatype-case
Case macro for the different kinds of vl-datatype structures.
Vl-datatype-update-udims
Vl-datatype-update-pdims
Vl-datatype-equiv
Basic equivalence relation for vl-datatype structures.
Vl-datatype-kind
Get the kind (tag) of a vl-datatype structure.
Vl-coretypename->info
Find the properties (vl-coredatatype-info structure) for a coretype.
*vl-core-data-type-table*
Table giving properties of the various Verilog core types.
*vl-plain-old-logic-type*
The vl-datatype for a plain wire or logic variable.
Vl-datatype-fix
Fixing function for vl-datatype structures.
Vl-datatype-count
Measure for recurring over vl-datatype structures.
*vl-plain-old-time-type*
The vl-datatype for a plain time variable.
*vl-plain-old-reg-type*
The vl-datatype for a plain reg variable.
*vl-plain-old-realtime-type*
The vl-datatype for a plain realtime variable.
*vl-plain-old-real-type*
The vl-datatype for a plain real variable.
*vl-plain-old-integer-type*
The vl-datatype for a plain integer variable.