CIRCT  20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface Struct Reference

A YAML-serializable representation of an interface. More...

Collaboration diagram for llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface:
Collaboration graph
[legend]

Public Member Functions

 Interface (IO &io, sv::InterfaceOp &op)
 Construct an Interface from an sv::InterfaceOp. More...
 
 Interface (IO &io)
 A no-argument constructor is necessary to work with LLVM's YAML library. More...
 
sv::InterfaceOp denormalize (IO &)
 This cannot be denormalized back to an interface op. More...
 

Public Attributes

StringRef name
 The name of the interface. More...
 
std::vector< DescribedSignal > fields
 All ground or vectors that make up the interface. More...
 
std::vector< DescribedInstance > instances
 Instantiations of other interfaces. More...
 

Detailed Description

A YAML-serializable representation of an interface.

This consists of fields (vector or ground types) and nested interfaces.

Definition at line 300 of file GrandCentral.cpp.

Constructor & Destructor Documentation

◆ Interface() [1/2]

llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface::Interface ( IO &  io,
sv::InterfaceOp &  op 
)
inline

Construct an Interface from an sv::InterfaceOp.

This is tuned to "parse" the structure of an interface that the Grand Central pass generates. The structure of Fields and Instances is documented below.

A field will look like the following. The verbatim description is optional:

sv.verbatim "// <description>" {
  firrtl.grandcentral.yaml.type = "description",
  symbols = []}
sv.interface.signal @<name> : <type>

An interface instanctiation will look like the following. The verbatim description is optional.

sv.verbatim "// <description>" {
  firrtl.grandcentral.type = "description",
  symbols = []}
sv.verbatim "<name> <symbol>();" {
  firrtl.grandcentral.yaml.name = "<name>",
  firrtl.grandcentral.yaml.dimensions = [<first dimension>, ...],
  firrtl.grandcentral.yaml.symbol = @<symbol>,
  firrtl.grandcentral.yaml.type = "instance",
  symbols = []}

Definition at line 336 of file GrandCentral.cpp.

◆ Interface() [2/2]

llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface::Interface ( IO &  io)
inline

A no-argument constructor is necessary to work with LLVM's YAML library.

Definition at line 383 of file GrandCentral.cpp.

Member Function Documentation

◆ denormalize()

sv::InterfaceOp llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface::denormalize ( IO &  )
inline

This cannot be denormalized back to an interface op.

Definition at line 386 of file GrandCentral.cpp.

Member Data Documentation

◆ fields

std::vector<DescribedSignal> llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface::fields

◆ instances

std::vector<DescribedInstance> llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface::instances

Instantiations of other interfaces.

Definition at line 308 of file GrandCentral.cpp.

◆ name

StringRef llvm::yaml::MappingContextTraits< sv::InterfaceOp, Context >::Interface::name

The name of the interface.

Definition at line 302 of file GrandCentral.cpp.


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