Verilog to Routing - VPR
Public Member Functions | Private Attributes
LutInst Class Reference

An instance representing a Look-Up Table. More...

Inheritance diagram for LutInst:
Inheritance graph
[legend]
Collaboration diagram for LutInst:
Collaboration graph
[legend]

Public Member Functions

 LutInst (size_t lut_size, LogicVec lut_mask, std::string inst_name, std::map< std::string, std::vector< std::string >> port_conns, std::vector< Arc > timing_arc_values)
 
const std::vector< Arc > & timing_arcs ()
 
std::string instance_name ()
 
std::string type ()
 
void print_verilog (std::ostream &os, int depth) override
 Print the current instanse in Verilog, see print_blif() for argument descriptions. More...
 
void print_blif (std::ostream &os, size_t &unconn_count, int depth) override
 Print the current instance in blif format. More...
 
void print_sdf (std::ostream &os, int depth) override
 Print the current instanse in SDF, see print_blif() for argument descriptions. More...
 
- Public Member Functions inherited from Instance
virtual ~Instance ()=default
 

Private Attributes

std::string type_
 
size_t lut_size_
 
LogicVec lut_mask_
 
std::string inst_name_
 
std::map< std::string, std::vector< std::string > > port_conns_
 
std::vector< Arctiming_arcs_
 

Detailed Description

An instance representing a Look-Up Table.

Constructor & Destructor Documentation

◆ LutInst()

LutInst::LutInst ( size_t  lut_size,
LogicVec  lut_mask,
std::string  inst_name,
std::map< std::string, std::vector< std::string >>  port_conns,
std::vector< Arc timing_arc_values 
)
inline

< Public methods

Parameters
lut_sizeThe LUT size
lut_maskThe LUT mask representing the logic function
inst_nameThe name of this instance
port_connsThe port connections of this instance. Key: port name, Value: connected nets
timing_arc_valuesThe timing arcs of this instance

Member Function Documentation

◆ instance_name()

std::string LutInst::instance_name ( )
inline

◆ print_blif()

void LutInst::print_blif ( std::ostream &  os,
size_t &  unconn_count,
int  depth 
)
inlineoverridevirtual

Print the current instance in blif format.

Parameters
osThe output stream to print to
unconn_countThe current count of unconnected nets. BLIF has limitations requiring unconnected nets to be used to represent unconnected ports. To allow unique naming of these nets unconn_count is used to uniquify these names. Whenever creating an unconnected net (and using unconn_count to uniquify its name in the file) unconn_count should be incremented.
depthCurrent indentation depth. This is used to figure-out how much indentation should be applied. This is purely for cosmetic formatting. Use indent() for generating consistent indentation.

Implements Instance.

◆ print_sdf()

void LutInst::print_sdf ( std::ostream &  os,
int  depth 
)
inlineoverridevirtual

Print the current instanse in SDF, see print_blif() for argument descriptions.

Implements Instance.

◆ print_verilog()

void LutInst::print_verilog ( std::ostream &  os,
int  depth 
)
inlineoverridevirtual

Print the current instanse in Verilog, see print_blif() for argument descriptions.

Implements Instance.

◆ timing_arcs()

const std::vector<Arc>& LutInst::timing_arcs ( )
inline

◆ type()

std::string LutInst::type ( )
inline

Field Documentation

◆ inst_name_

std::string LutInst::inst_name_
private

◆ lut_mask_

LogicVec LutInst::lut_mask_
private

◆ lut_size_

size_t LutInst::lut_size_
private

◆ port_conns_

std::map<std::string, std::vector<std::string> > LutInst::port_conns_
private

◆ timing_arcs_

std::vector<Arc> LutInst::timing_arcs_
private

◆ type_

std::string LutInst::type_
private

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