|
| ClusteredNetlist (std::string name="", std::string id="") |
| Constructs a netlist. More...
|
|
t_pb * | block_pb (const ClusterBlockId id) const |
| Returns the physical block. More...
|
|
t_logical_block_type_ptr | block_type (const ClusterBlockId id) const |
| Returns the type of CLB (Logic block, RAM, DSP, etc.) More...
|
|
ClusterNetId | block_net (const ClusterBlockId blk_id, const int pin_index) const |
| Returns the net of the block attached to the specific pin index. More...
|
|
int | block_pin_net_index (const ClusterBlockId blk_id, const int pin_index) const |
| Returns the count on the net of the block attached. More...
|
|
ClusterPinId | block_pin (const ClusterBlockId blk, const int logical_pin_index) const |
| Returns the logical pin Id associated with the specified block and logical pin index. More...
|
|
bool | block_contains_primary_input (const ClusterBlockId blk) const |
|
bool | block_contains_primary_output (const ClusterBlockId blk) const |
| Returns true if the specified block contains a primary output (e.g. BLIF .output primitive) More...
|
|
int | pin_logical_index (const ClusterPinId pin_id) const |
| Returns the logical pin index (i.e. pin index on the t_logical_block_type) of the cluster pin. More...
|
|
int | net_pin_logical_index (const ClusterNetId net_id, int net_pin_index) const |
| Finds the net_index'th net pin (e.g. the 6th pin of the net) and returns the logical pin index (i.e. pin index on the t_logical_block_type) of the block to which the pin belongs. More...
|
|
bool | net_is_ignored (const ClusterNetId id) const |
| Returns whether the net is ignored i.e. not routed. More...
|
|
bool | net_is_global (const ClusterNetId id) const |
| Returns whether the net is global. More...
|
|
ClusterBlockId | create_block (const char *name, t_pb *pb, t_logical_block_type_ptr type) |
| Create or return an existing block in the netlist. More...
|
|
ClusterPortId | create_port (const ClusterBlockId blk_id, const std::string name, BitIndex width, PortType type) |
| Create or return an existing port in the netlist. More...
|
|
ClusterPinId | create_pin (const ClusterPortId port_id, BitIndex port_bit, const ClusterNetId net_id, const PinType pin_type, int pin_index, bool is_const=false) |
| Create or return an existing pin in the netlist. More...
|
|
ClusterNetId | create_net (const std::string name) |
| Create an empty, or return an existing net in the netlist. More...
|
|
void | set_net_is_ignored (ClusterNetId net_id, bool state) |
| Sets the flag in net_ignored_ = state. More...
|
|
void | set_net_is_global (ClusterNetId net_id, bool state) |
| Sets the flag in net_is_global_ = state. More...
|
|
| Netlist (std::string name="", std::string id="") |
|
virtual | ~Netlist () |
|
const std::string & | netlist_name () const |
| Retrieve the name of the netlist. More...
|
|
const std::string & | netlist_id () const |
| Retrieve the unique identifier for this netlist This is typically a secure digest of the input file. More...
|
|
bool | verify () const |
| Sanity check for internal consistency (throws an exception on failure) More...
|
|
bool | is_dirty () const |
| Returns true if the netlist has invalid entries due to modifications (e.g. from remove_*() calls) More...
|
|
bool | is_compressed () const |
| Returns true if the netlist has no invalid entries due to modifications (e.g. from remove_*() calls) More...
|
|
void | print_stats () const |
| Item counts and container info (for debugging) More...
|
|
const std::string & | block_name (const ClusterBlockId blk_id) const |
| Returns the name of the specified block. More...
|
|
bool | block_is_combinational (const ClusterBlockId blk_id) const |
| Returns true if the block is purely combinational (i.e. no input clocks and not a primary input. More...
|
|
attr_range | block_attrs (const ClusterBlockId blk_id) const |
| Returns a range of all attributes associated with the specified block. More...
|
|
param_range | block_params (const ClusterBlockId blk_id) const |
| Returns a range of all parameters associated with the specified block. More...
|
|
pin_range | block_pins (const ClusterBlockId blk_id) const |
| Returns a range of all pins associated with the specified block. More...
|
|
pin_range | block_input_pins (const ClusterBlockId blk_id) const |
| Returns a range of all input pins associated with the specified block. More...
|
|
pin_range | block_output_pins (const ClusterBlockId blk_id) const |
| Returns a range of all output pins associated with the specified block. More...
|
|
pin_range | block_clock_pins (const ClusterBlockId blk_id) const |
| Returns a range of all clock pins associated with the specified block. More...
|
|
port_range | block_ports (const ClusterBlockId blk_id) const |
| Returns a range of all ports associated with the specified block. More...
|
|
port_range | block_input_ports (const ClusterBlockId blk_id) const |
| Returns a range consisting of the input ports associated with the specified block. More...
|
|
port_range | block_output_ports (const ClusterBlockId blk_id) const |
| Returns a range consisting of the output ports associated with the specified block. More...
|
|
port_range | block_clock_ports (const ClusterBlockId blk_id) const |
| Returns a range consisting of the input clock ports associated with the specified block. More...
|
|
void | remove_block (const ClusterBlockId blk_id) |
| Removes a block from the netlist. This will also remove the associated ports and pins. More...
|
|
const std::string & | port_name (const ClusterPortId port_id) const |
| Returns the name of the specified port. More...
|
|
ClusterBlockId | port_block (const ClusterPortId port_id) const |
| Returns the block associated with the specified port. More...
|
|
pin_range | port_pins (const ClusterPortId port_id) const |
| Returns the set of valid pins associated with the port. More...
|
|
ClusterPinId | port_pin (const ClusterPortId port_id, const BitIndex port_bit) const |
| Returns the pin (potentially invalid) associated with the specified port and port bit index. More...
|
|
ClusterNetId | port_net (const ClusterPortId port_id, const BitIndex port_bit) const |
| Returns the net (potentially invalid) associated with the specified port and port bit index. More...
|
|
BitIndex | port_width (const ClusterPortId port_id) const |
| Returns the width (number of bits) in the specified port. More...
|
|
PortType | port_type (const ClusterPortId port_id) const |
| Returns the type of the specified port. More...
|
|
void | remove_port (const ClusterPortId port_id) |
| Removes a port from the netlist. More...
|
|
std::string | pin_name (const ClusterPinId pin_id) const |
| Returns the constructed name (derived from block and port) for the specified pin. More...
|
|
PinType | pin_type (const ClusterPinId pin_id) const |
| Returns the type of the specified pin. More...
|
|
ClusterNetId | pin_net (const ClusterPinId pin_id) const |
| Returns the net associated with the specified pin. More...
|
|
int | pin_net_index (const ClusterPinId pin_id) const |
| Returns the index of the specified pin within it's connected net. More...
|
|
ClusterPortId | pin_port (const ClusterPinId pin_id) const |
| Returns the port associated with the specified pin. More...
|
|
BitIndex | pin_port_bit (const ClusterPinId pin_id) const |
| Returns the port bit index associated with the specified pin. More...
|
|
ClusterBlockId | pin_block (const ClusterPinId pin_id) const |
| Returns the block associated with the specified pin. More...
|
|
PortType | pin_port_type (const ClusterPinId pin_id) const |
| Returns the port type associated with the specified pin. More...
|
|
bool | pin_is_constant (const ClusterPinId pin_id) const |
| Returns true if the pin is a constant (i.e. its value never changes) More...
|
|
void | remove_pin (const ClusterPinId pin_id) |
| Removes a pin from the netlist. More...
|
|
const std::string & | net_name (const ClusterNetId net_id) const |
| Returns the name of the specified net. More...
|
|
pin_range | net_pins (const ClusterNetId net_id) const |
| Returns a range consisting of all the pins in the net (driver and sinks) More...
|
|
ClusterPinId | net_pin (const ClusterNetId net_id, int net_pin_index) const |
| Returns the net_pin_index'th pin of the specified net. More...
|
|
ClusterBlockId | net_pin_block (const ClusterNetId net_id, int net_pin_index) const |
| Returns the block associated with the net_pin_index'th pin of the specified net. More...
|
|
ClusterPinId | net_driver (const ClusterNetId net_id) const |
| Returns the (potentially invalid) net driver pin. More...
|
|
ClusterBlockId | net_driver_block (const ClusterNetId net_id) const |
| Returns the (potentially invalid) net driver block. More...
|
|
pin_range | net_sinks (const ClusterNetId net_id) const |
| Returns a (potentially empty) range consisting of net's sink pins. More...
|
|
bool | net_is_constant (const ClusterNetId net_id) const |
| Returns true if the net is driven by a constant pin (i.e. its value never changes) More...
|
|
void | remove_net (const ClusterNetId net_id) |
| Removes a net from the netlist. More...
|
|
void | remove_net_pin (const ClusterNetId net_id, const ClusterPinId pin_id) |
| Removes a connection betwen a net and pin. More...
|
|
block_range | blocks () const |
| Returns a range consisting of all blocks in the netlist. More...
|
|
port_range | ports () const |
| Returns a range consisting of all ports in the netlist. More...
|
|
net_range | nets () const |
| Returns a range consisting of all nets in the netlist. More...
|
|
pin_range | pins () const |
| Returns a range consisting of all pins in the netlist. More...
|
|
bool | valid_block_id (ClusterBlockId block_id) const |
|
bool | valid_port_id (ClusterPortId port_id) const |
|
bool | valid_port_bit (ClusterPortId port_id, BitIndex port_bit) const |
|
bool | valid_pin_id (ClusterPinId pin_id) const |
|
bool | valid_net_id (ClusterNetId net_id) const |
|
ClusterBlockId | find_block (const std::string &name) const |
| Returns the BlockId of the specified block or BlockId::INVALID() if not found. More...
|
|
ClusterPortId | find_port (const ClusterBlockId blk_id, const std::string &name) const |
| Returns the PortId of the specifed port if it exists or PortId::INVALID() if not. More...
|
|
ClusterNetId | find_net (const std::string &name) const |
| Returns the NetId of the specified net or NetId::INVALID() if not found. More...
|
|
ClusterPinId | find_pin (const ClusterPortId port_id, BitIndex port_bit) const |
| Returns the PinId of the specified pin or PinId::INVALID() if not found. More...
|
|
ClusterPinId | find_pin (const std::string name) const |
| Returns the PinId of the specified pin or PinId::INVALID() if not found. More...
|
|
void | set_pin_net (const ClusterPinId pin, PinType pin_type, const ClusterNetId net) |
| Add the specified pin to the specified net as pin_type. More...
|
|
void | set_pin_is_constant (const ClusterPinId pin_id, const bool value) |
| Mark a pin as being a constant generator. More...
|
|
void | set_block_name (const ClusterBlockId blk_id, const std::string new_name) |
| Re-name a block. More...
|
|
void | set_block_attr (const ClusterBlockId blk_id, const std::string &name, const std::string &value) |
| Set a block attribute. More...
|
|
void | set_block_param (const ClusterBlockId blk_id, const std::string &name, const std::string &value) |
| Set a block parameter. More...
|
|
void | merge_nets (const ClusterNetId driver_net, const ClusterNetId sink_net) |
| Merges sink_net into driver_net. More...
|
|
IdRemapper | remove_and_compress () |
| Wrapper for remove_unused() & compress() More...
|
|
void | remove_unused () |
| This should be called after completing a series of netlist modifications (e.g. removing blocks/ports/pins/nets). More...
|
|
IdRemapper | compress () |
| Compresses the netlist, removing any invalid and/or unreferenced blocks/ports/pins/nets. More...
|
|
|
typedef vtr::vector_map< ClusterBlockId, ClusterBlockId >::const_iterator | block_iterator |
|
typedef std::unordered_map< std::string, std::string >::const_iterator | attr_iterator |
|
typedef std::unordered_map< std::string, std::string >::const_iterator | param_iterator |
|
typedef vtr::vector_map< ClusterNetId, ClusterNetId >::const_iterator | net_iterator |
|
typedef vtr::vector_map< ClusterPinId, ClusterPinId >::const_iterator | pin_iterator |
|
typedef vtr::vector_map< ClusterPortId, ClusterPortId >::const_iterator | port_iterator |
|
typedef vtr::Range< block_iterator > | block_range |
|
typedef vtr::Range< attr_iterator > | attr_range |
|
typedef vtr::Range< param_iterator > | param_range |
|
typedef vtr::Range< net_iterator > | net_range |
|
typedef vtr::Range< pin_iterator > | pin_range |
|
typedef vtr::Range< port_iterator > | port_range |
|
typedef NetlistIdRemapper< ClusterBlockId, ClusterPortId, ClusterPinId, ClusterNetId > | IdRemapper |
|
typedef vtr::StrongId< string_id_tag > | StringId |
| A unique identifier for a string in the netlist. More...
|
|
ClusterBlockId | find_block (const StringId name_id) const |
| Returns the BlockId of the specifed block if it exists or BlockId::INVALID() if not. More...
|
|
ClusterNetId | find_net (const StringId name_id) const |
| Returns the NetId of the specifed port if it exists or NetId::INVALID() if not. More...
|
|
ClusterBlockId | create_block (const std::string name) |
| Create or return an existing block in the netlist. More...
|
|
ClusterPortId | create_port (const ClusterBlockId blk_id, const std::string name, BitIndex width, PortType type) |
| Create or return an existing port in the netlist. More...
|
|
ClusterPinId | create_pin (const ClusterPortId port_id, BitIndex port_bit, const ClusterNetId net_id, const PinType pin_type, bool is_const=false) |
| Create or return an existing pin in the netlist. More...
|
|
ClusterNetId | create_net (const std::string name) |
| Create an empty, or return an existing net in the netlist. More...
|
|
ClusterNetId | add_net (const std::string name, ClusterPinId driver, std::vector< ClusterPinId > sinks) |
| Create a completely specified net from specified driver and sinks. More...
|
|
StringId | find_string (const std::string &str) const |
| Returns the StringId of the specifed string if it exists or StringId::INVALID() if not. More...
|
|
StringId | create_string (const std::string &str) |
| Create or return the ID of the specified string. More...
|
|
int | associate_pin_with_net (const ClusterPinId pin_id, const PinType type, const ClusterNetId net_id) |
| Updates net cross-references for the specified pin. More...
|
|
void | associate_pin_with_port (const ClusterPinId pin_id, const ClusterPortId port_id) |
| Updates port cross-references for the specified pin. More...
|
|
void | associate_pin_with_block (const ClusterPinId pin_id, const PortType type, const ClusterBlockId blk_id) |
| Updates block cross-references for the specified pin. More...
|
|
void | associate_port_with_block (const ClusterPortId port_id, const PortType type, const ClusterBlockId blk_id) |
| Updates block cross-references for the specified port. More...
|
|
IdRemapper | build_id_maps () |
| Builds the new mappings from old to new IDs. More...
|
|
void | clean_blocks (const vtr::vector_map< ClusterBlockId, ClusterBlockId > &block_id_map) |
| Removes invalid and reorders blocks. More...
|
|
void | clean_ports (const vtr::vector_map< ClusterPortId, ClusterPortId > &port_id_map) |
| Removes invalid and reorders ports. More...
|
|
void | clean_pins (const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map) |
| Removes invalid and reorders pins. More...
|
|
void | clean_nets (const vtr::vector_map< ClusterNetId, ClusterNetId > &net_id_map) |
| Removes invalid and reorders nets. More...
|
|
void | rebuild_lookups () |
| Re-builds fast look-ups. More...
|
|
void | rebuild_block_refs (const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map, const vtr::vector_map< ClusterPortId, ClusterPortId > &port_id_map) |
| Re-builds cross-references held by blocks. More...
|
|
void | rebuild_port_refs (const vtr::vector_map< ClusterBlockId, ClusterBlockId > &block_id_map, const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map) |
| Re-builds cross-references held by ports. More...
|
|
void | rebuild_pin_refs (const vtr::vector_map< ClusterPortId, ClusterPortId > &port_id_map, const vtr::vector_map< ClusterNetId, ClusterNetId > &net_id_map) |
| Re-builds cross-references held by pins. More...
|
|
void | rebuild_net_refs (const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map) |
| Re-builds cross-references held by nets. More...
|
|
void | shrink_to_fit () |
|
bool | verify_sizes () const |
|
bool | validate_block_sizes () const |
|
bool | validate_port_sizes () const |
|
bool | validate_pin_sizes () const |
|
bool | validate_net_sizes () const |
|
bool | validate_string_sizes () const |
|
bool | verify_refs () const |
|
bool | validate_block_port_refs () const |
|
bool | validate_block_pin_refs () const |
|
bool | validate_port_pin_refs () const |
|
bool | validate_net_pin_refs () const |
|
bool | validate_string_refs () const |
|
bool | verify_block_invariants () const |
| Verify that block invariants hold (i.e. logical consistency) More...
|
|
bool | verify_lookups () const |
| Verify that fast-lookups are consistent with internal data structures. More...
|
|
bool | valid_string_id (StringId string_id) const |
| Validates that the specified ID is valid in the current netlist state. More...
|
|
static constexpr int | INVALID_INDEX |
|
static constexpr int | NET_DRIVER_INDEX |
|