Loading [MathJax]/extensions/tex2jax.js
CIRCT 21.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
circt::firrtl::WidthQualifiedTypeTrait< ConcreteType > Class Template Reference

Trait for types which have a width. More...

#include <FIRRTLTypes.h>

Inheritance diagram for circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >:
Inheritance graph
[legend]
Collaboration diagram for circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >:
Collaboration graph
[legend]

Public Member Functions

std::optional< int32_t > getWidth () const
 Return an optional containing the width, if the width is known (or empty if width is unknown).
 
bool hasWidth () const
 Return true if this integer type has a known width.
 

Detailed Description

template<typename ConcreteType>
class circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >

Trait for types which have a width.

Users must implement:

++
/// Return the width if known, or -1 if unknown.
int32_t getWidthOrSentinel();

Definition at line 271 of file FIRRTLTypes.h.

Member Function Documentation

◆ getWidth()

template<typename ConcreteType >
std::optional< int32_t > circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >::getWidth ( ) const
inline

Return an optional containing the width, if the width is known (or empty if width is unknown).

Definition at line 276 of file FIRRTLTypes.h.

Referenced by circt::firrtl::getBitWidth(), isTypeAllowedForDPI(), and knownWidths().

◆ hasWidth()

template<typename ConcreteType >
bool circt::firrtl::WidthQualifiedTypeTrait< ConcreteType >::hasWidth ( ) const
inline

Return true if this integer type has a known width.

Definition at line 284 of file FIRRTLTypes.h.


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