CIRCT 24.0.0git
Loading...
Searching...
No Matches
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:
Collaboration diagram for circt::hw::PortInfo:

Public Member Functions

StringRef getName () const
bool isInput () const
bool isOutput () const
ssize_t getId () const
 Return a unique numeric identifier for this port.
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.
DictionaryAttr attrs = {}
 The optional symbol for this port.
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 }

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 39 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.

◆ 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.

References attrs, and circt::hw::ModulePort::name.

◆ isInput()

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

◆ isOutput()

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

Definition at line 36 of file PortImplementation.h.

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

Referenced by getId().

◆ setSym()

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

Definition at line 32 of file HWOpInterfaces.cpp.

References attrs.

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(), getMachinePortInfo(), and circt::hw::operator<<().

◆ attrs

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

◆ loc

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

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