CIRCT  19.0.0git
Public Member Functions | Public Attributes | List of all members
circt::hw::PortInfo Struct Reference

This holds the name, type, direction of a module's ports. More...

#include <PortImplementation.h>

Inheritance diagram for circt::hw::PortInfo:
Inheritance graph
[legend]
Collaboration diagram for circt::hw::PortInfo:
Collaboration graph
[legend]

Public Member Functions

StringRef getName () const
 
bool isInput () const
 
bool isOutput () const
 
bool isInOut () const
 
ssize_t getId () const
 Return a unique numeric identifier for this port. More...
 
InnerSymAttr getSym () const
 
void setSym (InnerSymAttr sym, MLIRContext *ctx)
 
StringRef getVerilogName () const
 

Public Attributes

size_t argNum = ~0U
 This is the argument index or the result index depending on the direction. More...
 
DictionaryAttr attrs = {}
 The optional symbol for this port. More...
 
LocationAttr loc = {}
 
- Public Attributes inherited from circt::hw::ModulePort
mlir::StringAttr name
 
mlir::Type type
 
Direction dir
 

Additional Inherited Members

- Public Types inherited from circt::hw::ModulePort
enum  Direction { Input , Output , InOut }
 

Detailed Description

This holds the name, type, direction of a module's ports.

Definition at line 24 of file PortImplementation.h.

Member Function Documentation

◆ getId()

ssize_t circt::hw::PortInfo::getId ( ) const
inline

Return a unique numeric identifier for this port.

Definition at line 40 of file PortImplementation.h.

References argNum, and isOutput().

◆ getName()

StringRef circt::hw::PortInfo::getName ( ) const
inline

Definition at line 34 of file PortImplementation.h.

References circt::hw::ModulePort::name.

Referenced by circt::msft::getValueName().

◆ getSym()

hw::InnerSymAttr hw::PortInfo::getSym ( ) const

Definition at line 25 of file HWOpInterfaces.cpp.

References attrs.

Referenced by circt::hw::operator<<().

◆ getVerilogName()

StringRef hw::PortInfo::getVerilogName ( ) const

Definition at line 46 of file HWOpInterfaces.cpp.

◆ isInOut()

bool circt::hw::PortInfo::isInOut ( ) const
inline

Definition at line 37 of file PortImplementation.h.

References circt::hw::ModulePort::dir, and InOut.

◆ isInput()

bool circt::hw::PortInfo::isInput ( ) const
inline

Definition at line 35 of file PortImplementation.h.

References circt::hw::ModulePort::dir, and Input.

◆ isOutput()

bool circt::hw::PortInfo::isOutput ( ) const
inline

Definition at line 36 of file PortImplementation.h.

References circt::hw::ModulePort::dir, and Output.

Referenced by getId().

◆ setSym()

void hw::PortInfo::setSym ( InnerSymAttr  sym,
MLIRContext *  ctx 
)

Definition at line 32 of file HWOpInterfaces.cpp.

References circt::calyx::direction::get().

Member Data Documentation

◆ argNum

size_t circt::hw::PortInfo::argNum = ~0U

This is the argument index or the result index depending on the direction.

"0" for an output means the first output, "0" for a in/inout means the first argument.

Definition at line 28 of file PortImplementation.h.

Referenced by getId(), and circt::hw::operator<<().

◆ attrs

DictionaryAttr circt::hw::PortInfo::attrs = {}

The optional symbol for this port.

Definition at line 31 of file PortImplementation.h.

Referenced by getSym(), and circt::hw::operator<<().

◆ loc

LocationAttr circt::hw::PortInfo::loc = {}

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