CIRCT  18.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
circt::moore::PackedDim Class Reference

A packed dimension. More...

#include <MooreTypes.h>

Inheritance diagram for circt::moore::PackedDim:
Inheritance graph
[legend]
Collaboration diagram for circt::moore::PackedDim:
Collaboration graph
[legend]

Public Member Functions

PackedType getInner () const
 Get the element type of the dimension. This is the x in x[a:b]. More...
 
void format (llvm::raw_ostream &os) const
 Format this type in SystemVerilog syntax. More...
 
void formatDim (llvm::raw_ostream &os) const
 Format just the dimension part, [...]. More...
 
PackedType resolved () const
 Resolve one level of name or type reference indirection. More...
 
PackedType fullyResolved () const
 Resolve all name or type reference indirections. More...
 
std::optional< RangegetRange () const
 Get the dimension's range, or None if it is unsized. More...
 
std::optional< unsigned > getSize () const
 Get the dimension's size, or None if it is unsized. More...
 
- Public Member Functions inherited from circt::moore::PackedType
PackedType resolved () const
 Resolve one level of name or type reference indirection. More...
 
PackedType fullyResolved () const
 Resolve all name or type reference indirections. More...
 
Domain getDomain () const
 Get the value domain of this type. More...
 
Sign getSign () const
 Get the sign for this type. More...
 
std::optional< unsigned > getBitSize () const
 Get the size of this type in bits. More...
 
void format (llvm::raw_ostream &os) const
 Format this type in SystemVerilog syntax into an output stream. More...
 
- Public Member Functions inherited from circt::moore::UnpackedType
UnpackedType resolved () const
 Resolve one level of name or type reference indirection. More...
 
UnpackedType fullyResolved () const
 Resolve all name or type reference indirections. More...
 
Domain getDomain () const
 Get the value domain of this type. More...
 
Sign getSign () const
 Get the sign for this type. More...
 
std::optional< unsigned > getBitSize () const
 Get the size of this type in bits. More...
 
SimpleBitVectorType getSimpleBitVectorOrNull () const
 Get this type as a simple bit vector, if it is one. More...
 
bool isSimpleBitVector () const
 Check whether this is a simple bit vector type. More...
 
SimpleBitVectorType getSimpleBitVector () const
 Get this type as a simple bit vector. More...
 
SimpleBitVectorType castToSimpleBitVectorOrNull () const
 Cast this type to a simple bit vector. More...
 
bool isCastableToSimpleBitVector () const
 Check whether this type can be cast to a simple bit vector type. More...
 
SimpleBitVectorType castToSimpleBitVector () const
 Cast this type to a simple bit vector. More...
 
void format (llvm::raw_ostream &os, llvm::function_ref< void(llvm::raw_ostream &os)> around={}) const
 Format this type in SystemVerilog syntax into an output stream. More...
 
void format (llvm::raw_ostream &os, StringRef around) const
 
template<typename... Args>
std::string toString (Args... args) const
 Format this type in SystemVerilog syntax into a string. More...
 

Static Public Member Functions

static bool classof (Type type)
 
- Static Public Member Functions inherited from circt::moore::PackedType
static bool classof (Type type)
 
- Static Public Member Functions inherited from circt::moore::UnpackedType
static bool classof (Type type)
 

Protected Member Functions

const detail::DimStoragegetImpl () const
 

Detailed Description

A packed dimension.

Definition at line 782 of file MooreTypes.h.

Member Function Documentation

◆ classof()

static bool circt::moore::PackedDim::classof ( Type  type)
inlinestatic

Definition at line 784 of file MooreTypes.h.

◆ format()

void PackedDim::format ( llvm::raw_ostream &  os) const

Format this type in SystemVerilog syntax.

Useful to present the type back to the user in diagnostics.

Definition at line 733 of file MooreTypes.cpp.

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

◆ formatDim()

void PackedDim::formatDim ( llvm::raw_ostream &  os) const

Format just the dimension part, [...].

Definition at line 751 of file MooreTypes.cpp.

◆ fullyResolved()

PackedType PackedDim::fullyResolved ( ) const

Resolve all name or type reference indirections.

See PackedType::fullyResolved.

Definition at line 763 of file MooreTypes.cpp.

References circt::moore::detail::DimStorage::fullyResolved, and getImpl().

◆ getImpl()

const detail::DimStorage * PackedDim::getImpl ( ) const
protected

Definition at line 777 of file MooreTypes.cpp.

Referenced by fullyResolved(), getInner(), and resolved().

◆ getInner()

PackedType PackedDim::getInner ( ) const

Get the element type of the dimension. This is the x in x[a:b].

Definition at line 729 of file MooreTypes.cpp.

References getImpl(), and circt::moore::detail::DimStorage::inner.

◆ getRange()

std::optional< Range > PackedDim::getRange ( ) const

Get the dimension's range, or None if it is unsized.

Definition at line 767 of file MooreTypes.cpp.

Referenced by getSize().

◆ getSize()

std::optional< unsigned > PackedDim::getSize ( ) const

Get the dimension's size, or None if it is unsized.

Definition at line 773 of file MooreTypes.cpp.

References getRange().

◆ resolved()

PackedType PackedDim::resolved ( ) const

Resolve one level of name or type reference indirection.

See PackedType::resolved.

Definition at line 759 of file MooreTypes.cpp.

References getImpl(), and circt::moore::detail::DimStorage::resolved.


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