CIRCT  19.0.0git
Namespaces | Classes | Enumerations | Functions
circt::moore Namespace Reference

Namespaces

 detail
 

Classes

struct  Range
 The [a:b] part in a vector/array type such as logic [a:b]. More...
 
struct  SimpleBitVectorType
 A simple bit vector type. More...
 
class  SVType
 Base class for all SystemVerilog types in the Moore dialect. More...
 
class  UnpackedType
 An unpacked SystemVerilog type. More...
 
class  PackedType
 A packed SystemVerilog type. More...
 
class  VoidType
 The void type. More...
 
class  StringType
 The string type. More...
 
class  ChandleType
 The chandle type. More...
 
class  EventType
 The event type. More...
 
class  IntType
 An integer vector or atom type. More...
 
class  RealType
 A real type. More...
 
class  IndirectTypeBase
 Common base class for name and type reference indirections. More...
 
class  NamedTypeBase
 A named type. More...
 
class  RefTypeBase
 A type reference. More...
 
class  PackedIndirectType
 A packed type indirection. See IndirectTypeBase for details. More...
 
class  UnpackedIndirectType
 An unpacked type indirection. See IndirectTypeBase for details. More...
 
class  PackedNamedType
 A packed named type. See NamedTypeBase for details. More...
 
class  UnpackedNamedType
 An unpacked named type. See NamedTypeBase for details. More...
 
class  PackedRefType
 A packed named type. See NamedTypeBase for details. More...
 
class  UnpackedRefType
 An unpacked named type. See NamedTypeBase for details. More...
 
class  PackedDim
 A packed dimension. More...
 
class  PackedUnsizedDim
 A packed unsized dimension, like []. More...
 
class  PackedRangeDim
 A packed range dimension, like [a:b]. More...
 
class  UnpackedDim
 An unpacked dimension. More...
 
class  UnpackedUnsizedDim
 An unpacked unsized dimension, like []. More...
 
class  UnpackedArrayDim
 An unpacked array dimension, like [a]. More...
 
class  UnpackedRangeDim
 An unpacked range dimension, like [a:b]. More...
 
class  UnpackedAssocDim
 An unpacked associative dimension, like [T] or [*]. More...
 
class  UnpackedQueueDim
 An unpacked queue dimension with optional bound, like [$] or [$:a]. More...
 
class  EnumType
 An enum type. More...
 
struct  StructMember
 A member of a struct. More...
 
struct  Struct
 A struct. More...
 
class  PackedStructType
 A packed struct. More...
 
class  UnpackedStructType
 An unpacked struct. More...
 

Enumerations

enum class  Domain { TwoValued , FourValued }
 The number of values each bit of a type can assume. More...
 
enum class  Sign { Unsigned , Signed }
 Whether a type is signed or unsigned. More...
 
enum class  RangeDir { Up , Down }
 Which side is greater in a range [a:b]. More...
 
enum class  StructKind { Struct , Union , TaggedUnion }
 Whether a struct is a struct, union, or union tagged. More...
 

Functions

StringRef getKeywordFromSign (const Sign &sign)
 Map a Sign to the corresponding keyword. More...
 
std::optional< SigngetSignFromKeyword (StringRef keyword)
 Map the keywords unsigned and signed to the corresponding Sign. More...
 
template<typename Os >
Os & operator<< (Os &os, const Sign &sign)
 
llvm::hash_code hash_value (const Range &x)
 
template<typename Os >
Os & operator<< (Os &os, const Range &range)
 
llvm::hash_code hash_value (const SimpleBitVectorType &x)
 
template<typename Os >
Os & operator<< (Os &os, const SimpleBitVectorType &type)
 
template<typename Ty , std::enable_if_t< std::is_base_of< UnpackedType, Ty >::value, bool > = true>
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, Ty type)
 
StringRef getMnemonicFromStructKind (StructKind kind)
 Map a StructKind to the corresponding mnemonic. More...
 
std::optional< StructKindgetStructKindFromMnemonic (StringRef mnemonic)
 Map a mnemonic to the corresponding StructKind. More...
 
template<typename Os >
Os & operator<< (Os &os, const StructKind &kind)
 
llvm::hash_code hash_value (const StructMember &x)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const Struct &strukt)
 

Enumeration Type Documentation

◆ Domain

enum circt::moore::Domain
strong

The number of values each bit of a type can assume.

Enumerator
TwoValued 

Two-valued types such as bit or int.

FourValued 

Four-valued types such as logic or integer.

Definition at line 27 of file MooreTypes.h.

◆ RangeDir

Which side is greater in a range [a:b].

Enumerator
Up 

a < b

Down 

a >= b

Definition at line 54 of file MooreTypes.h.

◆ Sign

enum circt::moore::Sign
strong

Whether a type is signed or unsigned.

Enumerator
Unsigned 

An unsigned type.

Signed 

A signed type.

Definition at line 35 of file MooreTypes.h.

◆ StructKind

Whether a struct is a struct, union, or union tagged.

Enumerator
Struct 

A struct.

Union 

A union.

TaggedUnion 

A union tagged.

Definition at line 1073 of file MooreTypes.h.

Function Documentation

◆ getKeywordFromSign()

StringRef circt::moore::getKeywordFromSign ( const Sign sign)

Map a Sign to the corresponding keyword.

Definition at line 51 of file MooreTypes.cpp.

References Signed, and Unsigned.

Referenced by customTypePrinter(), and operator<<().

◆ getMnemonicFromStructKind()

StringRef circt::moore::getMnemonicFromStructKind ( StructKind  kind)

Map a StructKind to the corresponding mnemonic.

Definition at line 1009 of file MooreTypes.cpp.

References Struct, TaggedUnion, and Union.

Referenced by customTypePrinter().

◆ getSignFromKeyword()

std::optional< Sign > circt::moore::getSignFromKeyword ( StringRef  keyword)

Map the keywords unsigned and signed to the corresponding Sign.

Definition at line 61 of file MooreTypes.cpp.

References Signed, and Unsigned.

Referenced by customTypeParser().

◆ getStructKindFromMnemonic()

std::optional< StructKind > circt::moore::getStructKindFromMnemonic ( StringRef  mnemonic)

Map a mnemonic to the corresponding StructKind.

Definition at line 1021 of file MooreTypes.cpp.

References Struct, TaggedUnion, and Union.

Referenced by customTypeParser().

◆ hash_value() [1/3]

llvm::hash_code circt::moore::hash_value ( const Range x)
inline

◆ hash_value() [2/3]

llvm::hash_code circt::moore::hash_value ( const SimpleBitVectorType x)
inline

◆ hash_value() [3/3]

llvm::hash_code circt::moore::hash_value ( const StructMember x)
inline

◆ operator<<() [1/6]

llvm::raw_ostream& circt::moore::operator<< ( llvm::raw_ostream &  os,
const Struct strukt 
)
inline

Definition at line 1149 of file MooreTypes.h.

References circt::moore::Struct::format().

◆ operator<<() [2/6]

template<typename Ty , std::enable_if_t< std::is_base_of< UnpackedType, Ty >::value, bool > = true>
llvm::raw_ostream& circt::moore::operator<< ( llvm::raw_ostream &  os,
Ty  type 
)

Definition at line 377 of file MooreTypes.h.

◆ operator<<() [3/6]

template<typename Os >
Os& circt::moore::operator<< ( Os &  os,
const Range range 
)

Definition at line 121 of file MooreTypes.h.

References circt::moore::Range::left(), and circt::moore::Range::right().

◆ operator<<() [4/6]

template<typename Os >
Os& circt::moore::operator<< ( Os &  os,
const Sign sign 
)

Definition at line 48 of file MooreTypes.h.

References getKeywordFromSign().

◆ operator<<() [5/6]

template<typename Os >
Os& circt::moore::operator<< ( Os &  os,
const SimpleBitVectorType type 
)

◆ operator<<() [6/6]

template<typename Os >
Os& circt::moore::operator<< ( Os &  os,
const StructKind kind 
)

Definition at line 1088 of file MooreTypes.h.