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

This holds the name and type that describes the module's ports. More...

#include <FIRRTLOpInterfaces.h>

Collaboration diagram for circt::firrtl::PortInfo:
Collaboration graph
[legend]

Public Member Functions

StringRef getName () const
 
bool isOutput () const
 Return true if this is a simple output-only port. More...
 
bool isInput () const
 Return true if this is a simple input-only port. More...
 
bool isInOut () const
 Return true if this is an inout port. More...
 
 PortInfo (StringAttr name, Type type, Direction dir, StringAttr symName={}, std::optional< Location > location={}, std::optional< AnnotationSet > annos={})
 Default constructors. More...
 
 PortInfo (StringAttr name, Type type, Direction dir, hw::InnerSymAttr sym, Location loc, AnnotationSet annos)
 

Public Attributes

StringAttr name
 
Type type
 
Direction direction
 
hw::InnerSymAttr sym = {}
 
Location loc = UnknownLoc::get(type.getContext())
 
AnnotationSet annotations = AnnotationSet(type.getContext())
 

Detailed Description

This holds the name and type that describes the module's ports.

Definition at line 41 of file FIRRTLOpInterfaces.h.

Constructor & Destructor Documentation

◆ PortInfo() [1/2]

circt::firrtl::PortInfo::PortInfo ( StringAttr  name,
Type  type,
Direction  dir,
StringAttr  symName = {},
std::optional< Location >  location = {},
std::optional< AnnotationSet annos = {} 
)
inline

Default constructors.

Definition at line 65 of file FIRRTLOpInterfaces.h.

◆ PortInfo() [2/2]

circt::firrtl::PortInfo::PortInfo ( StringAttr  name,
Type  type,
Direction  dir,
hw::InnerSymAttr  sym,
Location  loc,
AnnotationSet  annos 
)
inline

Definition at line 76 of file FIRRTLOpInterfaces.h.

Member Function Documentation

◆ getName()

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

Definition at line 49 of file FIRRTLOpInterfaces.h.

References name.

◆ isInOut()

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

Return true if this is an inout port.

This will be true if the port contains either bi-directional signals or analog types. Non-HW types (e.g., ref types) are never considered InOut.

Definition at line 62 of file FIRRTLOpInterfaces.h.

References circt::firrtl::isTypeInOut(), and type.

Referenced by isInput(), and isOutput().

◆ isInput()

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

Return true if this is a simple input-only port.

If you want the direction of the port, use the direction parameter.

Definition at line 57 of file FIRRTLOpInterfaces.h.

References direction, circt::firrtl::In, and isInOut().

◆ isOutput()

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

Return true if this is a simple output-only port.

If you want the direction of the port, use the direction parameter.

Definition at line 53 of file FIRRTLOpInterfaces.h.

References direction, isInOut(), and circt::firrtl::Out.

Member Data Documentation

◆ annotations

AnnotationSet circt::firrtl::PortInfo::annotations = AnnotationSet(type.getContext())

Definition at line 47 of file FIRRTLOpInterfaces.h.

◆ direction

Direction circt::firrtl::PortInfo::direction

Definition at line 44 of file FIRRTLOpInterfaces.h.

Referenced by isInput(), and isOutput().

◆ loc

Location circt::firrtl::PortInfo::loc = UnknownLoc::get(type.getContext())

Definition at line 46 of file FIRRTLOpInterfaces.h.

Referenced by computeLoweringImpl().

◆ name

StringAttr circt::firrtl::PortInfo::name

Definition at line 42 of file FIRRTLOpInterfaces.h.

Referenced by computeLoweringImpl(), and getName().

◆ sym

hw::InnerSymAttr circt::firrtl::PortInfo::sym = {}

Definition at line 45 of file FIRRTLOpInterfaces.h.

Referenced by computeLoweringImpl().

◆ type

Type circt::firrtl::PortInfo::type

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