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

#include <PortImplementation.h>

Collaboration diagram for circt::hw::ModulePortLookupInfo:
Collaboration graph
[legend]

Public Member Functions

FailureOr< unsigned > lookupPortIndex (const llvm::DenseMap< StringAttr, unsigned > &portMap, StringAttr name) const
 
 ModulePortLookupInfo (MLIRContext *ctx, const ModulePortInfo &portInfo)
 
 ModulePortLookupInfo (MLIRContext *ctx, const SmallVector< PortInfo > &portInfo)
 
FailureOr< unsigned > getInputPortIndex (StringAttr name) const
 
FailureOr< unsigned > getOutputPortIndex (StringAttr name) const
 
FailureOr< unsigned > getInputPortIndex (StringRef name) const
 
FailureOr< unsigned > getOutputPortIndex (StringRef name) const
 

Private Attributes

llvm::DenseMap< StringAttr, unsigned > inputPortMap
 
llvm::DenseMap< StringAttr, unsigned > outputPortMap
 
MLIRContext * ctx
 

Detailed Description

Definition at line 188 of file PortImplementation.h.

Constructor & Destructor Documentation

◆ ModulePortLookupInfo() [1/2]

circt::hw::ModulePortLookupInfo::ModulePortLookupInfo ( MLIRContext *  ctx,
const ModulePortInfo portInfo 
)
inlineexplicit

◆ ModulePortLookupInfo() [2/2]

circt::hw::ModulePortLookupInfo::ModulePortLookupInfo ( MLIRContext *  ctx,
const SmallVector< PortInfo > &  portInfo 
)
inlineexplicit

Definition at line 209 of file PortImplementation.h.

Member Function Documentation

◆ getInputPortIndex() [1/2]

FailureOr<unsigned> circt::hw::ModulePortLookupInfo::getInputPortIndex ( StringAttr  name) const
inline

Definition at line 214 of file PortImplementation.h.

References inputPortMap, and lookupPortIndex().

Referenced by getInputPortIndex().

◆ getInputPortIndex() [2/2]

FailureOr<unsigned> circt::hw::ModulePortLookupInfo::getInputPortIndex ( StringRef  name) const
inline

Definition at line 223 of file PortImplementation.h.

References ctx, circt::calyx::direction::get(), and getInputPortIndex().

◆ getOutputPortIndex() [1/2]

FailureOr<unsigned> circt::hw::ModulePortLookupInfo::getOutputPortIndex ( StringAttr  name) const
inline

Definition at line 219 of file PortImplementation.h.

References lookupPortIndex(), and outputPortMap.

Referenced by getOutputPortIndex().

◆ getOutputPortIndex() [2/2]

FailureOr<unsigned> circt::hw::ModulePortLookupInfo::getOutputPortIndex ( StringRef  name) const
inline

Definition at line 227 of file PortImplementation.h.

References ctx, circt::calyx::direction::get(), and getOutputPortIndex().

◆ lookupPortIndex()

FailureOr<unsigned> circt::hw::ModulePortLookupInfo::lookupPortIndex ( const llvm::DenseMap< StringAttr, unsigned > &  portMap,
StringAttr  name 
) const
inline

Definition at line 190 of file PortImplementation.h.

Referenced by getInputPortIndex(), and getOutputPortIndex().

Member Data Documentation

◆ ctx

MLIRContext* circt::hw::ModulePortLookupInfo::ctx
private

Definition at line 234 of file PortImplementation.h.

Referenced by getInputPortIndex(), and getOutputPortIndex().

◆ inputPortMap

llvm::DenseMap<StringAttr, unsigned> circt::hw::ModulePortLookupInfo::inputPortMap
private

Definition at line 232 of file PortImplementation.h.

Referenced by getInputPortIndex(), and ModulePortLookupInfo().

◆ outputPortMap

llvm::DenseMap<StringAttr, unsigned> circt::hw::ModulePortLookupInfo::outputPortMap
private

Definition at line 233 of file PortImplementation.h.

Referenced by getOutputPortIndex(), and ModulePortLookupInfo().


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