Verilog to Routing - VPR
|
A class which writes post-synthesis netlists (Verilog and BLIF) and the SDF. More...
Public Member Functions | |
NetlistWriterVisitor (std::ostream &verilog_os, std::ostream &blif_os, std::ostream &sdf_os, std::shared_ptr< const AnalysisDelayCalculator > delay_calc) | |
NetlistWriterVisitor (NetlistWriterVisitor &other)=delete | |
NetlistWriterVisitor (NetlistWriterVisitor &&other)=delete | |
NetlistWriterVisitor & | operator= (NetlistWriterVisitor &rhs)=delete |
NetlistWriterVisitor & | operator= (NetlistWriterVisitor &&rhs)=delete |
![]() | |
virtual | ~NetlistVisitor ()=default |
void | start () |
void | visit_top (const char *top_level_name) |
void | visit_clb (ClusterBlockId blk_id, const t_pb *clb) |
void | visit_atom (const t_pb *atom) |
visit_atom is called on leaf pb nodes that map to a netlist element. More... | |
void | visit_route_through (const t_pb *atom) |
visit_route_through is called on leaf pb nodes that do not map to a netlist element. More... | |
void | visit_all (const t_pb_routes &top_pb_route, const t_pb *pb) |
visit_all is called on all t_pb nodes that are in use for any reason. More... | |
void | finish () |
Private Member Functions | |
void | visit_top_impl (const char *top_level_name) override |
void | visit_atom_impl (const t_pb *atom) override |
void | finish_impl () override |
void | print_verilog (int depth=0) |
Writes out the verilog netlist. More... | |
void | print_blif (int depth=0) |
Writes out the blif netlist. More... | |
void | print_sdf (int depth=0) |
Writes out the SDF. More... | |
std::string | make_inst_wire (AtomNetId atom_net_id, tatum::NodeId tnode_id, std::string inst_name, PortType port_type, int port_idx, int pin_idx) |
Returns the name of a wire connecting a primitive and global net. More... | |
std::string | make_io (const t_pb *atom, PortType dir) |
Returns the name of a circuit-level Input/Output. More... | |
std::shared_ptr< Instance > | make_lut_instance (const t_pb *atom) |
Returns an Instance object representing the LUT. More... | |
std::shared_ptr< Instance > | make_latch_instance (const t_pb *atom) |
Returns an Instance object representing the Latch. More... | |
std::shared_ptr< Instance > | make_ram_instance (const t_pb *atom) |
Returns an Instance object representing the RAM. More... | |
std::shared_ptr< Instance > | make_multiply_instance (const t_pb *atom) |
Returns an Instance object representing a Multiplier. More... | |
std::shared_ptr< Instance > | make_adder_instance (const t_pb *atom) |
Returns an Instance object representing an Adder. More... | |
std::shared_ptr< Instance > | make_blackbox_instance (const t_pb *atom) |
const t_pb_routes & | find_top_pb_route (const t_pb *curr) |
Returns the top level pb_route associated with the given pb. More... | |
const t_pb * | find_top_cb (const t_pb *curr) |
Returns the top complex block which contains the given pb. More... | |
tatum::NodeId | find_tnode (const t_pb *atom, int cluster_pin_idx) |
Returns the tnode ID of the given atom's connected cluster pin. More... | |
LogicVec | load_lut_mask (size_t num_inputs, const t_pb *atom) |
Returns a LogicVec representing the LUT mask of the given LUT atom. More... | |
std::vector< int > | determine_lut_permutation (size_t num_inputs, const t_pb *atom_pb) |
Helper function for load_lut_mask() which determines how the LUT inputs were permuted compared to the input BLIF. More... | |
bool | names_encodes_on_set (vtr::t_linked_vptr *names_row_ptr) |
Helper function for load_lut_mask() which determines if the names is encodeing the ON (returns true) or OFF (returns false) set. More... | |
LogicVec | names_row_to_logic_vec (const std::string names_row, size_t num_inputs, bool encoding_on_set) |
Helper function for load_lut_mask() More... | |
int | find_num_inputs (const t_pb *pb) |
Returns the total number of input pins on the given pb. More... | |
AtomNetId | find_atom_input_logical_net (const t_pb *atom, int atom_input_idx) |
Returns the logical net ID. More... | |
std::string | interconnect_name (std::string driver_wire, std::string sink_wire) |
Returns the name of the routing segment between two wires. More... | |
double | get_delay_ps (tatum::NodeId source_tnode, tatum::NodeId sink_tnode) |
Returns the delay in pico-seconds from source_tnode to sink_tnode. More... | |
Private Attributes | |
std::string | top_module_name_ |
std::vector< std::string > | inputs_ |
std::vector< std::string > | outputs_ |
std::vector< Assignment > | assignments_ |
std::vector< std::shared_ptr< Instance > > | cell_instances_ |
std::map< AtomNetId, std::pair< std::string, tatum::NodeId > > | logical_net_drivers_ |
std::map< AtomNetId, std::vector< std::pair< std::string, tatum::NodeId > > > | logical_net_sinks_ |
std::map< std::string, float > | logical_net_sink_delays_ |
std::ostream & | verilog_os_ |
std::ostream & | blif_os_ |
std::ostream & | sdf_os_ |
std::map< std::pair< ClusterBlockId, int >, tatum::NodeId > | pin_id_to_tnode_lookup_ |
std::shared_ptr< const AnalysisDelayCalculator > | delay_calc_ |
Additional Inherited Members | |
![]() | |
virtual void | start_impl () |
virtual void | visit_clb_impl (ClusterBlockId blk_id, const t_pb *clb) |
virtual void | visit_route_through_impl (const t_pb *atom) |
virtual void | visit_all_impl (const t_pb_routes &top_pb_route, const t_pb *pb) |
A class which writes post-synthesis netlists (Verilog and BLIF) and the SDF.
It implements the NetlistVisitor interface used by NetlistWalker (see netlist_walker.h)
|
inline |
verilog_os | Output stream for verilog netlist |
blif_os | Output stream for blif netlist |
sdf_os | Output stream for SDF |
|
delete |
|
delete |
|
inlineprivate |
Helper function for load_lut_mask() which determines how the LUT inputs were permuted compared to the input BLIF.
Since the LUT inputs may have been rotated from the input blif specification we need to figure out this permutation to reflect the physical implementation connectivity.
We return a permutation map (which is a list of swaps from index to index) which is then applied to do the rotation of the lutmask.
The net in the atom netlist which was originally connected to pin i, is connected to pin permute[i] in the implementation.
|
inlineprivate |
Returns the logical net ID.
|
inlineprivate |
Returns the total number of input pins on the given pb.
|
inlineprivate |
Returns the tnode ID of the given atom's connected cluster pin.
Returns the top complex block which contains the given pb.
|
inlineprivate |
Returns the top level pb_route associated with the given pb.
|
inlineoverrideprivatevirtual |
Reimplemented from NetlistVisitor.
|
inlineprivate |
Returns the delay in pico-seconds from source_tnode to sink_tnode.
|
inlineprivate |
Returns the name of the routing segment between two wires.
Returns a LogicVec representing the LUT mask of the given LUT atom.
|
inlineprivate |
Returns an Instance object representing an Adder.
|
inlineprivate |
|
inlineprivate |
Returns the name of a wire connecting a primitive and global net.
The wire is recorded and instantiated by the top level output routines.
< The instance pin index
atom_net_id | The id of the net in the atom netlist |
tnode_id | The tnode associated with the primitive pin |
inst_name | The name of the instance associated with the pin |
port_type | The port direction |
port_idx | The instance port index |
Returns the name of a circuit-level Input/Output.
The I/O is recorded and instantiated by the top level output routines
atom | The implementation primitive representing the I/O |
dir | The IO direction |
|
inlineprivate |
Returns an Instance object representing the Latch.
|
inlineprivate |
Returns an Instance object representing the LUT.
|
inlineprivate |
Returns an Instance object representing a Multiplier.
|
inlineprivate |
Returns an Instance object representing the RAM.
|
inlineprivate |
Helper function for load_lut_mask() which determines if the names is encodeing the ON (returns true) or OFF (returns false) set.
|
inlineprivate |
Helper function for load_lut_mask()
Converts the given names_row string to a LogicVec
|
delete |
|
delete |
|
inlineprivate |
Writes out the blif netlist.
|
inlineprivate |
Writes out the SDF.
|
inlineprivate |
Writes out the verilog netlist.
|
inlineoverrideprivatevirtual |
Reimplemented from NetlistVisitor.
|
inlineoverrideprivatevirtual |
Reimplemented from NetlistVisitor.
|
private |
Set of assignments (i.e. net-to-net connections)
|
private |
|
private |
Set of cell instances
|
private |
|
private |
Name of circuit inputs
|
private |
|
private |
|
private |
|
private |
Name of circuit outputs
|
private |
|
private |
|
private |
Name of the top level module (i.e. the circuit)
|
private |