|
| AtomNetlist (std::string name="", std::string id="") |
| Constructs a netlist. More...
|
|
AtomBlockType | block_type (const AtomBlockId id) const |
| Returns the type of the specified block. More...
|
|
const t_model * | block_model (const AtomBlockId id) const |
| Returns the model associated with the block. More...
|
|
const TruthTable & | block_truth_table (const AtomBlockId id) const |
| Returns the truth table associated with the block. More...
|
|
const t_model_ports * | port_model (const AtomPortId id) const |
| Returns the model port of the specified port or nullptr if not. More...
|
|
AtomPortId | find_atom_port (const AtomBlockId blk_id, const t_model_ports *model_port) const |
| Returns the AtomPortId of the specifed port if it exists or AtomPortId::INVALID() if not. More...
|
|
AtomBlockId | find_atom_pin_driver (const AtomBlockId blk_id, const t_model_ports *model_port, const BitIndex port_bit) const |
| Returns the AtomBlockId of the atom driving the specified pin if it exists or AtomBlockId::INVALID() if not. More...
|
|
std::unordered_set< std::string > | net_aliases (const std::string net_name) const |
| Returns the a set of aliases relative to the net name. More...
|
|
AtomBlockId | create_block (const std::string name, const t_model *model, const TruthTable truth_table=TruthTable()) |
| Create or return an existing block in the netlist. More...
|
|
AtomPortId | create_port (const AtomBlockId blk_id, const t_model_ports *model_port) |
| Create or return an existing port in the netlist. More...
|
|
AtomPinId | create_pin (const AtomPortId port_id, BitIndex port_bit, const AtomNetId net_id, const PinType pin_type, bool is_const=false) |
| Create or return an existing pin in the netlist. More...
|
|
AtomNetId | create_net (const std::string name) |
| Create an empty, or return an existing net in the netlist. More...
|
|
AtomNetId | add_net (const std::string name, AtomPinId driver, std::vector< AtomPinId > sinks) |
| Create a completely specified net from specified driver and sinks. More...
|
|
void | add_net_alias (const std::string net_name, std::string alias_net_name) |
| Adds a value to the net aliases set for a given net name in the net_aliases_map. 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 AtomBlockId blk_id) const |
| Returns the name of the specified block. More...
|
|
bool | block_is_combinational (const AtomBlockId 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 AtomBlockId blk_id) const |
| Returns a range of all attributes associated with the specified block. More...
|
|
param_range | block_params (const AtomBlockId blk_id) const |
| Returns a range of all parameters associated with the specified block. More...
|
|
pin_range | block_pins (const AtomBlockId blk_id) const |
| Returns a range of all pins associated with the specified block. More...
|
|
pin_range | block_input_pins (const AtomBlockId blk_id) const |
| Returns a range of all input pins associated with the specified block. More...
|
|
pin_range | block_output_pins (const AtomBlockId blk_id) const |
| Returns a range of all output pins associated with the specified block. More...
|
|
pin_range | block_clock_pins (const AtomBlockId blk_id) const |
| Returns a range of all clock pins associated with the specified block. More...
|
|
port_range | block_ports (const AtomBlockId blk_id) const |
| Returns a range of all ports associated with the specified block. More...
|
|
port_range | block_input_ports (const AtomBlockId blk_id) const |
| Returns a range consisting of the input ports associated with the specified block. More...
|
|
port_range | block_output_ports (const AtomBlockId blk_id) const |
| Returns a range consisting of the output ports associated with the specified block. More...
|
|
port_range | block_clock_ports (const AtomBlockId blk_id) const |
| Returns a range consisting of the input clock ports associated with the specified block. More...
|
|
void | remove_block (const AtomBlockId blk_id) |
| Removes a block from the netlist. This will also remove the associated ports and pins. More...
|
|
const std::string & | port_name (const AtomPortId port_id) const |
| Returns the name of the specified port. More...
|
|
AtomBlockId | port_block (const AtomPortId port_id) const |
| Returns the block associated with the specified port. More...
|
|
pin_range | port_pins (const AtomPortId port_id) const |
| Returns the set of valid pins associated with the port. More...
|
|
AtomPinId | port_pin (const AtomPortId port_id, const BitIndex port_bit) const |
| Returns the pin (potentially invalid) associated with the specified port and port bit index. More...
|
|
AtomNetId | port_net (const AtomPortId 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 AtomPortId port_id) const |
| Returns the width (number of bits) in the specified port. More...
|
|
PortType | port_type (const AtomPortId port_id) const |
| Returns the type of the specified port. More...
|
|
void | remove_port (const AtomPortId port_id) |
| Removes a port from the netlist. More...
|
|
std::string | pin_name (const AtomPinId pin_id) const |
| Returns the constructed name (derived from block and port) for the specified pin. More...
|
|
PinType | pin_type (const AtomPinId pin_id) const |
| Returns the type of the specified pin. More...
|
|
AtomNetId | pin_net (const AtomPinId pin_id) const |
| Returns the net associated with the specified pin. More...
|
|
int | pin_net_index (const AtomPinId pin_id) const |
| Returns the index of the specified pin within it's connected net. More...
|
|
AtomPortId | pin_port (const AtomPinId pin_id) const |
| Returns the port associated with the specified pin. More...
|
|
BitIndex | pin_port_bit (const AtomPinId pin_id) const |
| Returns the port bit index associated with the specified pin. More...
|
|
AtomBlockId | pin_block (const AtomPinId pin_id) const |
| Returns the block associated with the specified pin. More...
|
|
PortType | pin_port_type (const AtomPinId pin_id) const |
| Returns the port type associated with the specified pin. More...
|
|
bool | pin_is_constant (const AtomPinId pin_id) const |
| Returns true if the pin is a constant (i.e. its value never changes) More...
|
|
void | remove_pin (const AtomPinId pin_id) |
| Removes a pin from the netlist. More...
|
|
const std::string & | net_name (const AtomNetId net_id) const |
| Returns the name of the specified net. More...
|
|
pin_range | net_pins (const AtomNetId net_id) const |
| Returns a range consisting of all the pins in the net (driver and sinks) More...
|
|
AtomPinId | net_pin (const AtomNetId net_id, int net_pin_index) const |
| Returns the net_pin_index'th pin of the specified net. More...
|
|
AtomBlockId | net_pin_block (const AtomNetId net_id, int net_pin_index) const |
| Returns the block associated with the net_pin_index'th pin of the specified net. More...
|
|
AtomPinId | net_driver (const AtomNetId net_id) const |
| Returns the (potentially invalid) net driver pin. More...
|
|
AtomBlockId | net_driver_block (const AtomNetId net_id) const |
| Returns the (potentially invalid) net driver block. More...
|
|
pin_range | net_sinks (const AtomNetId net_id) const |
| Returns a (potentially empty) range consisting of net's sink pins. More...
|
|
bool | net_is_constant (const AtomNetId 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 AtomNetId net_id) |
| Removes a net from the netlist. More...
|
|
void | remove_net_pin (const AtomNetId net_id, const AtomPinId 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 (AtomBlockId block_id) const |
|
bool | valid_port_id (AtomPortId port_id) const |
|
bool | valid_port_bit (AtomPortId port_id, BitIndex port_bit) const |
|
bool | valid_pin_id (AtomPinId pin_id) const |
|
bool | valid_net_id (AtomNetId net_id) const |
|
AtomBlockId | find_block (const std::string &name) const |
| Returns the BlockId of the specified block or BlockId::INVALID() if not found. More...
|
|
AtomPortId | find_port (const AtomBlockId blk_id, const std::string &name) const |
| Returns the PortId of the specifed port if it exists or PortId::INVALID() if not. More...
|
|
AtomNetId | find_net (const std::string &name) const |
| Returns the NetId of the specified net or NetId::INVALID() if not found. More...
|
|
AtomPinId | find_pin (const AtomPortId port_id, BitIndex port_bit) const |
| Returns the PinId of the specified pin or PinId::INVALID() if not found. More...
|
|
AtomPinId | 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 AtomPinId pin, PinType pin_type, const AtomNetId net) |
| Add the specified pin to the specified net as pin_type. More...
|
|
void | set_pin_is_constant (const AtomPinId pin_id, const bool value) |
| Mark a pin as being a constant generator. More...
|
|
void | set_block_name (const AtomBlockId blk_id, const std::string new_name) |
| Re-name a block. More...
|
|
void | set_block_attr (const AtomBlockId blk_id, const std::string &name, const std::string &value) |
| Set a block attribute. More...
|
|
void | set_block_param (const AtomBlockId blk_id, const std::string &name, const std::string &value) |
| Set a block parameter. More...
|
|
void | merge_nets (const AtomNetId driver_net, const AtomNetId 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::StrongId< string_id_tag > | StringId |
| A unique identifier for a string in the netlist. More...
|
|
AtomBlockId | find_block (const StringId name_id) const |
| Returns the BlockId of the specifed block if it exists or BlockId::INVALID() if not. More...
|
|
AtomNetId | find_net (const StringId name_id) const |
| Returns the NetId of the specifed port if it exists or NetId::INVALID() if not. More...
|
|
AtomBlockId | create_block (const std::string name) |
| Create or return an existing block in the netlist. More...
|
|
AtomPortId | create_port (const AtomBlockId blk_id, const std::string name, BitIndex width, PortType type) |
| Create or return an existing port in the netlist. More...
|
|
AtomPinId | create_pin (const AtomPortId port_id, BitIndex port_bit, const AtomNetId net_id, const PinType pin_type, bool is_const=false) |
| Create or return an existing pin in the netlist. More...
|
|
AtomNetId | create_net (const std::string name) |
| Create an empty, or return an existing net in the netlist. More...
|
|
AtomNetId | add_net (const std::string name, AtomPinId driver, std::vector< AtomPinId > 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 AtomPinId pin_id, const PinType type, const AtomNetId net_id) |
| Updates net cross-references for the specified pin. More...
|
|
void | associate_pin_with_port (const AtomPinId pin_id, const AtomPortId port_id) |
| Updates port cross-references for the specified pin. More...
|
|
void | associate_pin_with_block (const AtomPinId pin_id, const PortType type, const AtomBlockId blk_id) |
| Updates block cross-references for the specified pin. More...
|
|
void | associate_port_with_block (const AtomPortId port_id, const PortType type, const AtomBlockId 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< AtomBlockId, AtomBlockId > &block_id_map) |
| Removes invalid and reorders blocks. More...
|
|
void | clean_ports (const vtr::vector_map< AtomPortId, AtomPortId > &port_id_map) |
| Removes invalid and reorders ports. More...
|
|
void | clean_pins (const vtr::vector_map< AtomPinId, AtomPinId > &pin_id_map) |
| Removes invalid and reorders pins. More...
|
|
void | clean_nets (const vtr::vector_map< AtomNetId, AtomNetId > &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< AtomPinId, AtomPinId > &pin_id_map, const vtr::vector_map< AtomPortId, AtomPortId > &port_id_map) |
| Re-builds cross-references held by blocks. More...
|
|
void | rebuild_port_refs (const vtr::vector_map< AtomBlockId, AtomBlockId > &block_id_map, const vtr::vector_map< AtomPinId, AtomPinId > &pin_id_map) |
| Re-builds cross-references held by ports. More...
|
|
void | rebuild_pin_refs (const vtr::vector_map< AtomPortId, AtomPortId > &port_id_map, const vtr::vector_map< AtomNetId, AtomNetId > &net_id_map) |
| Re-builds cross-references held by pins. More...
|
|
void | rebuild_net_refs (const vtr::vector_map< AtomPinId, AtomPinId > &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 |
|