Cerata
A library to generate structural hardware designs
cerata::vhdl Namespace Reference

Contains everything related to the VHDL back-end. More...

Classes

struct  Arch
 Architecture generators. More...
 
struct  Block
 A block of code. More...
 
struct  Decl
 Declaration generators. More...
 
struct  Design
 A VHDL design that can generate code for a single file. More...
 
class  Identifier
 A VHDL Identifier convenience structure. More...
 
struct  Inst
 Functions to generate VHDL instantiation code. More...
 
struct  Line
 A line of code. More...
 
struct  MultiBlock
 A structure to hold multiple blocks. More...
 
struct  Range
 A VHDL range. More...
 
struct  Resolve
 Functions to resolve VHDL-specific problems with graphs. More...
 
class  Template
 Class to hold and modify a VHDL template file. More...
 
struct  trloc
 Structure to hold a template replacement string location. More...
 
class  VHDLOutputGenerator
 VHDL Output Generator. More...
 

Functions

Lineoperator<< (Line &lhs, const std::string &str)
 Append a part to a line.
 
Lineoperator<< (Line &lhs, const Line &rhs)
 Append all parts of a line to another line.
 
Lineoperator+= (Line &lhs, const std::string &str)
 Append a string to the last line part.
 
Blockoperator<< (Block &lhs, const Line &line)
 Append a line to a block.
 
Blockoperator<< (Block &lhs, const Block &rhs)
 Append the lines of a block to another block.
 
BlockPrepend (const std::string &lhs, Block *rhs, const std::string &sep="_")
 Prepend a string to every line of a block.
 
Blockoperator<< (Block &lhs, const std::string &rhs)
 Append a string to the last parts of all lines in a block.
 
Blockoperator<<= (Block &lhs, const std::string &rhs)
 Append a string to the last parts of all lines in a block, except the last one.
 
MultiBlockoperator<< (MultiBlock &lhs, const Block &rhs)
 Append a block to a multiblock.
 
MultiBlockoperator<< (MultiBlock &lhs, const Line &rhs)
 Append a line to a multiblock.
 
MultiBlockoperator<< (MultiBlock &lhs, const MultiBlock &rhs)
 Append a multiblock to a multiblock.
 
std::string ToString (const std::vector< Block > &blocks)
 Return a vector of blocks as a single string.
 
std::shared_ptr< Typevalid ()
 A stream ready-valid handshake "valid" signal.
 
std::shared_ptr< Typeready ()
 A stream ready-valid handshake "ready" signal.
 
std::string ToString (Port::Dir dir)
 Return a VHDL version of a terminator direction.
 
Port::Dir Reverse (Port::Dir dir)
 Reverse a terminator direction.
 
std::vector< FlatTypeFilterForVHDL (const std::vector< FlatType > &list)
 Filter abstract types from a list of flattened types. More...
 
std::shared_ptr< NodeGetWidth (const std::shared_ptr< Type > &type)
 Obtain the width of a primitive, synthesizable type. If it is not primitive, returns a Literal 0 node.
 
std::string ToString (Term::Dir dir)
 Return a VHDL version of a terminator direction.
 
Term::Dir Reverse (Term::Dir dir)
 Reverse a terminator direction.
 

Variables

constexpr char DEFAULT_SUBDIR [] = "vhdl"
 Default subdirectory for output generation.
 
constexpr char DEFAULT_LIBS []
 Default libraries to include. More...
 

Detailed Description

Contains everything related to the VHDL back-end.

Function Documentation

◆ FilterForVHDL()

std::vector< FlatType > cerata::vhdl::FilterForVHDL ( const std::vector< FlatType > &  list)

Filter abstract types from a list of flattened types.

Parameters
listThe list to filter
Returns
The filtered list

Definition at line 53 of file vhdl_types.cc.

Variable Documentation

◆ DEFAULT_LIBS

constexpr char cerata::vhdl::DEFAULT_LIBS[]
constexpr
Initial value:
=
"library ieee;\n"
"use ieee.std_logic_1164.all;\n"
"use ieee.numeric_std.all;\n"

Default libraries to include.

Definition at line 23 of file defaults.h.