CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::moore::UnpackedType Class Reference

An unpacked SystemVerilog type. More...

#include <MooreTypes.h>

Inheritance diagram for circt::moore::UnpackedType:
Collaboration diagram for circt::moore::UnpackedType:

Public Member Functions

Domain getDomain () const
 Get the value domain of this type.
std::optional< unsigned > getBitSize () const
 Get the size of this type in bits.
void print (mlir::AsmPrinter &odsPrinter) const

Static Public Member Functions

static bool classof (Type type)
static Type parse (mlir::AsmParser &odsParser)

Detailed Description

An unpacked SystemVerilog type.

Unpacked types are a second level of types in SystemVerilog. They extend a core unpacked type with a variety of unpacked dimensions, depending on which syntactic construct generated the type (variable or otherwise). The core unpacked types are:

  • Packed types
  • Non-integer types: shortreal, real, realtime
  • Unpacked structs and unions
  • string, chandle, event
  • Virtual interfaces
  • Class types
  • Covergroups
  • Unpacked named types
  • Unpacked type references

The unpacked dimensions are:

  • Unsized ([])
  • Arrays ([x])
  • Ranges ([x:y])
  • Associative ([T] or [*])
  • Queues ([$] or [$:x])

Definition at line 103 of file MooreTypes.h.

Member Function Documentation

◆ classof()

bool circt::moore::UnpackedType::classof ( Type type)
inlinestatic

Definition at line 105 of file MooreTypes.h.

◆ getBitSize()

std::optional< unsigned > UnpackedType::getBitSize ( ) const

Get the size of this type in bits.

Returns None if any of the type's dimensions is unsized, associative, or a queue, or the core type itself has no known size.

Definition at line 76 of file MooreTypes.cpp.

References circt::moore::f32.

◆ getDomain()

Domain UnpackedType::getDomain ( ) const

Get the value domain of this type.

Definition at line 61 of file MooreTypes.cpp.

References circt::moore::FourValued, and circt::moore::TwoValued.

◆ parse()

Type UnpackedType::parse ( mlir::AsmParser & odsParser)
static

Definition at line 111 of file MooreTypes.cpp.

References parseMooreType().

◆ print()

void UnpackedType::print ( mlir::AsmPrinter & odsPrinter) const

Definition at line 118 of file MooreTypes.cpp.

References printMooreType().


The documentation for this class was generated from the following files: