Verilog to Routing - VPR
Public Types | Public Member Functions | Private Attributes | Friends
LatchInst Class Reference
Inheritance diagram for LatchInst:
Inheritance graph
[legend]
Collaboration diagram for LatchInst:
Collaboration graph
[legend]

Public Types

enum  Type {
  Type::RISING_EDGE, Type::FALLING_EDGE, Type::ACTIVE_HIGH, Type::ACTIVE_LOW,
  Type::ASYNCHRONOUS
}
 Types of latches (defined by BLIF) More...
 

Public Member Functions

 LatchInst (std::string inst_name, std::map< std::string, std::string > port_conns, Type type, vtr::LogicValue init_value, double tcq=std::numeric_limits< double >::quiet_NaN(), double tsu=std::numeric_limits< double >::quiet_NaN(), double thld=std::numeric_limits< double >::quiet_NaN())
 
void print_blif (std::ostream &os, size_t &, int depth=0) override
 Print the current instance in blif format. More...
 
void print_verilog (std::ostream &os, int depth=0) override
 Print the current instanse in Verilog, see print_blif() for argument descriptions. More...
 
void print_sdf (std::ostream &os, int depth=0) 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 instance_name_
 
std::map< std::string, std::string > port_connections_
 
Type type_
 
vtr::LogicValue initial_value_
 
double tcq_
 
double tsu_
 
double thld_
 

Friends

std::ostream & operator<< (std::ostream &os, const Type &type)
 
std::istream & operator>> (std::istream &is, Type &type)
 

Member Enumeration Documentation

◆ Type

enum LatchInst::Type
strong

Types of latches (defined by BLIF)

Enumerator
RISING_EDGE 
FALLING_EDGE 
ACTIVE_HIGH 
ACTIVE_LOW 
ASYNCHRONOUS 

Constructor & Destructor Documentation

◆ LatchInst()

LatchInst::LatchInst ( std::string  inst_name,
std::map< std::string, std::string >  port_conns,
Type  type,
vtr::LogicValue  init_value,
double  tcq = std::numeric_limits<double>::quiet_NaN(),
double  tsu = std::numeric_limits<double>::quiet_NaN(),
double  thld = std::numeric_limits<double>::quiet_NaN() 
)
inline
Parameters
inst_nameName of this instance
port_connsInstance's port-to-net connections
typeType of this latch
init_valueInitial value of the latch
tcqClock-to-Q delay
tsuSetup time
thldHold time

Member Function Documentation

◆ print_blif()

void LatchInst::print_blif ( std::ostream &  os,
size_t &  unconn_count,
int  depth = 0 
)
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 LatchInst::print_sdf ( std::ostream &  os,
int  depth = 0 
)
inlineoverridevirtual

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

Implements Instance.

◆ print_verilog()

void LatchInst::print_verilog ( std::ostream &  os,
int  depth = 0 
)
inlineoverridevirtual

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

Implements Instance.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Type type 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  is,
Type type 
)
friend

Field Documentation

◆ initial_value_

vtr::LogicValue LatchInst::initial_value_
private

◆ instance_name_

std::string LatchInst::instance_name_
private

◆ port_connections_

std::map<std::string, std::string> LatchInst::port_connections_
private

◆ tcq_

double LatchInst::tcq_
private

Clock delay + tcq

◆ thld_

double LatchInst::thld_
private

Hold time

◆ tsu_

double LatchInst::tsu_
private

Setup time

◆ type_

Type LatchInst::type_
private

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