Verilog to Routing - VPR
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
BlifAllocCallback Struct Reference
Inheritance diagram for BlifAllocCallback:
Inheritance graph
[legend]
Collaboration diagram for BlifAllocCallback:
Collaboration graph
[legend]

Public Member Functions

 BlifAllocCallback (e_circuit_format blif_format, AtomNetlist &main_netlist, const std::string netlist_id, const t_model *user_models, const t_model *library_models)
 
void start_parse () override
 
void finish_parse () override
 
void begin_model (std::string model_name) override
 
void inputs (std::vector< std::string > input_names) override
 
void outputs (std::vector< std::string > output_names) override
 
void names (std::vector< std::string > nets, std::vector< std::vector< blifparse::LogicValue >> so_cover) override
 
void latch (std::string input, std::string output, blifparse::LatchType type, std::string control, blifparse::LogicValue init) override
 
void subckt (std::string subckt_model, std::vector< std::string > ports, std::vector< std::string > nets) override
 
void blackbox () override
 
void end_model () override
 
void conn (std::string src, std::string dst) override
 
void cname (std::string cell_name) override
 
void attr (std::string name, std::string value) override
 
void param (std::string name, std::string value) override
 
void filename (std::string fname) override
 
void lineno (int line_num) override
 
void parse_error (const int curr_lineno, const std::string &near_text, const std::string &msg) override
 
size_t determine_main_netlist_index ()
 

Static Public Attributes

static constexpr const char * OUTPAD_NAME_PREFIX = "out:"
 

Private Member Functions

const t_model * find_model (std::string name)
 
const t_model_ports * find_model_port (const t_model *blk_model, std::string port_name)
 
std::pair< std::string, int > split_index (const std::string &signal_name)
 Splits the index off a signal name and returns the base signal name (excluding the index) and the index as an integer. For example. More...
 
AtomNetlistcurr_model ()
 Retieves a reference to the currently active .model. More...
 
void set_curr_model_blackbox (bool val)
 
bool verify_blackbox_model (AtomNetlist &blif_model)
 
std::string unique_subckt_name ()
 Returns a different unique subck name each time it is called. More...
 
void set_curr_block (AtomBlockId blk)
 Sets the current block which is being processed. More...
 
AtomBlockId curr_block () const
 Gets the current block which is being processed. More...
 
void merge_conn_nets ()
 Merges all the recorded net pairs which need to be merged. More...
 

Private Attributes

bool ended_ = true
 
std::string filename_ = ""
 
int lineno_ = -1
 
std::vector< AtomNetlistblif_models_
 
std::vector< bool > blif_models_black_box_
 
AtomNetlistmain_netlist_
 
const std::string netlist_id_
 
const t_model * user_arch_models_ = nullptr
 
const t_model * library_arch_models_ = nullptr
 
size_t unique_subckt_name_counter_ = 0
 
AtomBlockId curr_block_
 
std::vector< std::pair< AtomNetId, AtomNetId > > curr_nets_to_merge_
 
e_circuit_format blif_format_ = e_circuit_format::BLIF
 

Constructor & Destructor Documentation

◆ BlifAllocCallback()

BlifAllocCallback::BlifAllocCallback ( e_circuit_format  blif_format,
AtomNetlist main_netlist,
const std::string  netlist_id,
const t_model *  user_models,
const t_model *  library_models 
)
inline

Member Function Documentation

◆ attr()

void BlifAllocCallback::attr ( std::string  name,
std::string  value 
)
inlineoverride

◆ begin_model()

void BlifAllocCallback::begin_model ( std::string  model_name)
inlineoverride

◆ blackbox()

void BlifAllocCallback::blackbox ( )
inlineoverride

◆ cname()

void BlifAllocCallback::cname ( std::string  cell_name)
inlineoverride

◆ conn()

void BlifAllocCallback::conn ( std::string  src,
std::string  dst 
)
inlineoverride

◆ curr_block()

AtomBlockId BlifAllocCallback::curr_block ( ) const
inlineprivate

Gets the current block which is being processed.

◆ curr_model()

AtomNetlist& BlifAllocCallback::curr_model ( )
inlineprivate

Retieves a reference to the currently active .model.

◆ determine_main_netlist_index()

size_t BlifAllocCallback::determine_main_netlist_index ( )
inline

◆ end_model()

void BlifAllocCallback::end_model ( )
inlineoverride

◆ filename()

void BlifAllocCallback::filename ( std::string  fname)
inlineoverride

◆ find_model()

const t_model* BlifAllocCallback::find_model ( std::string  name)
inlineprivate

◆ find_model_port()

const t_model_ports* BlifAllocCallback::find_model_port ( const t_model *  blk_model,
std::string  port_name 
)
inlineprivate

◆ finish_parse()

void BlifAllocCallback::finish_parse ( )
inlineoverride

◆ inputs()

void BlifAllocCallback::inputs ( std::vector< std::string >  input_names)
inlineoverride

◆ latch()

void BlifAllocCallback::latch ( std::string  input,
std::string  output,
blifparse::LatchType  type,
std::string  control,
blifparse::LogicValue  init 
)
inlineoverride

◆ lineno()

void BlifAllocCallback::lineno ( int  line_num)
inlineoverride

◆ merge_conn_nets()

void BlifAllocCallback::merge_conn_nets ( )
inlineprivate

Merges all the recorded net pairs which need to be merged.

This should only be called at the end of a .model to ensure that all the associated driver/sink pins have been delcared and connected to their nets

◆ names()

void BlifAllocCallback::names ( std::vector< std::string >  nets,
std::vector< std::vector< blifparse::LogicValue >>  so_cover 
)
inlineoverride

◆ outputs()

void BlifAllocCallback::outputs ( std::vector< std::string >  output_names)
inlineoverride

◆ param()

void BlifAllocCallback::param ( std::string  name,
std::string  value 
)
inlineoverride

◆ parse_error()

void BlifAllocCallback::parse_error ( const int  curr_lineno,
const std::string &  near_text,
const std::string &  msg 
)
inlineoverride

◆ set_curr_block()

void BlifAllocCallback::set_curr_block ( AtomBlockId  blk)
inlineprivate

Sets the current block which is being processed.

Used to determine which block a .cname, .param, .attr apply to

◆ set_curr_model_blackbox()

void BlifAllocCallback::set_curr_model_blackbox ( bool  val)
inlineprivate

◆ split_index()

std::pair<std::string, int> BlifAllocCallback::split_index ( const std::string &  signal_name)
inlineprivate

Splits the index off a signal name and returns the base signal name (excluding the index) and the index as an integer. For example.

"my_signal_name[2]" -> "my_signal_name", 2

◆ start_parse()

void BlifAllocCallback::start_parse ( )
inlineoverride

◆ subckt()

void BlifAllocCallback::subckt ( std::string  subckt_model,
std::vector< std::string >  ports,
std::vector< std::string >  nets 
)
inlineoverride

◆ unique_subckt_name()

std::string BlifAllocCallback::unique_subckt_name ( )
inlineprivate

Returns a different unique subck name each time it is called.

◆ verify_blackbox_model()

bool BlifAllocCallback::verify_blackbox_model ( AtomNetlist blif_model)
inlineprivate

Field Documentation

◆ blif_format_

e_circuit_format BlifAllocCallback::blif_format_ = e_circuit_format::BLIF
private

◆ blif_models_

std::vector<AtomNetlist> BlifAllocCallback::blif_models_
private

◆ blif_models_black_box_

std::vector<bool> BlifAllocCallback::blif_models_black_box_
private

◆ curr_block_

AtomBlockId BlifAllocCallback::curr_block_
private

◆ curr_nets_to_merge_

std::vector<std::pair<AtomNetId, AtomNetId> > BlifAllocCallback::curr_nets_to_merge_
private

◆ ended_

bool BlifAllocCallback::ended_ = true
private

◆ filename_

std::string BlifAllocCallback::filename_ = ""
private

◆ library_arch_models_

const t_model* BlifAllocCallback::library_arch_models_ = nullptr
private

◆ lineno_

int BlifAllocCallback::lineno_ = -1
private

◆ main_netlist_

AtomNetlist& BlifAllocCallback::main_netlist_
private

User object we fill

◆ netlist_id_

const std::string BlifAllocCallback::netlist_id_
private

Unique identifier based on the contents of the blif file

◆ OUTPAD_NAME_PREFIX

constexpr const char* BlifAllocCallback::OUTPAD_NAME_PREFIX = "out:"
static

◆ unique_subckt_name_counter_

size_t BlifAllocCallback::unique_subckt_name_counter_ = 0
private

◆ user_arch_models_

const t_model* BlifAllocCallback::user_arch_models_ = nullptr
private

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