CIRCT  20.0.0git
Public Member Functions | Static Public Attributes | List of all members
esiaccel.codegen.CppGenerator Class Reference
Inheritance diagram for esiaccel.codegen.CppGenerator:
Inheritance graph
[legend]
Collaboration diagram for esiaccel.codegen.CppGenerator:
Collaboration graph
[legend]

Public Member Functions

str get_type_str (self, types.ESIType type)
 
str get_consts_str (self, ModuleInfo module_info)
 
def write_modules (self, Path output_dir, str system_name)
 
def write_type (self, TextIO hdr, types.ESIType type)
 
def write_types (self, Path output_dir, str system_name)
 
def generate (self, Path output_dir, str system_name)
 
- Public Member Functions inherited from esiaccel.codegen.Generator
def __init__ (self, AcceleratorConnection conn)
 

Static Public Attributes

string language = "C++"
 
 int_width_support = set([8, 16, 32, 64])
 

Additional Inherited Members

- Public Attributes inherited from esiaccel.codegen.Generator
 manifest
 

Detailed Description

Generate C++ headers from an ESI manifest.

Definition at line 33 of file codegen.py.

Member Function Documentation

◆ generate()

def esiaccel.codegen.CppGenerator.generate (   self,
Path  output_dir,
str  system_name 
)

◆ get_consts_str()

str esiaccel.codegen.CppGenerator.get_consts_str (   self,
ModuleInfo  module_info 
)
Get the C++ code for a constant in a module.

Definition at line 54 of file codegen.py.

◆ get_type_str()

str esiaccel.codegen.CppGenerator.get_type_str (   self,
types.ESIType  type 
)
Get the textual code for the storage class of a type.

Examples: uint32_t, int64_t, CustomStruct.

Definition at line 41 of file codegen.py.

References esiaccel.codegen.CppGenerator.int_width_support.

◆ write_modules()

def esiaccel.codegen.CppGenerator.write_modules (   self,
Path  output_dir,
str  system_name 
)
Write the C++ header. One for each module in the manifest.

Definition at line 63 of file codegen.py.

References esiaccel.accelerator.AcceleratorConnection.manifest(), and esiaccel.codegen.Generator.manifest.

Referenced by esiaccel.codegen.CppGenerator.generate().

◆ write_type()

def esiaccel.codegen.CppGenerator.write_type (   self,
TextIO  hdr,
types.ESIType  type 
)

Definition at line 84 of file codegen.py.

Referenced by esiaccel.codegen.CppGenerator.write_types().

◆ write_types()

def esiaccel.codegen.CppGenerator.write_types (   self,
Path  output_dir,
str  system_name 
)

Member Data Documentation

◆ int_width_support

esiaccel.codegen.CppGenerator.int_width_support = set([8, 16, 32, 64])
static

Definition at line 39 of file codegen.py.

Referenced by esiaccel.codegen.CppGenerator.get_type_str().

◆ language

string esiaccel.codegen.CppGenerator.language = "C++"
static

Definition at line 36 of file codegen.py.


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