1 #ifndef CLUSTERED_NETLIST_H 2 #define CLUSTERED_NETLIST_H 113 #include "vpr_utils.h" 115 #include "vtr_util.h" 237 void clean_blocks_impl(
const vtr::vector_map<ClusterBlockId, ClusterBlockId>& block_id_map)
override;
238 void clean_ports_impl(
const vtr::vector_map<ClusterPortId, ClusterPortId>& port_id_map)
override;
239 void clean_pins_impl(
const vtr::vector_map<ClusterPinId, ClusterPinId>& pin_id_map)
override;
240 void clean_nets_impl(
const vtr::vector_map<ClusterNetId, ClusterNetId>& net_id_map)
override;
260 void rebuild_block_refs_impl(
const vtr::vector_map<ClusterPinId, ClusterPinId>& pin_id_map,
const vtr::vector_map<ClusterPortId, ClusterPortId>& port_id_map)
override;
261 void rebuild_port_refs_impl(
const vtr::vector_map<ClusterBlockId, ClusterBlockId>& block_id_map,
const vtr::vector_map<ClusterPinId, ClusterPinId>& pin_id_map)
override;
262 void rebuild_pin_refs_impl(
const vtr::vector_map<ClusterPortId, ClusterPortId>& port_id_map,
const vtr::vector_map<ClusterNetId, ClusterNetId>& net_id_map)
override;
278 vtr::vector_map<ClusterBlockId, t_logical_block_type_ptr>
block_types_;
int block_pin_net_index(const ClusterBlockId blk_id, const int pin_index) const
Returns the count on the net of the block attached.
Definition: clustered_netlist.cpp:41
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.
Definition: clustered_netlist.cpp:51
bool validate_block_sizes_impl(size_t num_blocks) const override
Definition: clustered_netlist.cpp:282
ClusterNetId create_net(const std::string name)
Create an empty, or return an existing net in the netlist.
Definition: clustered_netlist.cpp:167
void shrink_to_fit_impl() override
Shrinks internal data structures to required size to reduce memory consumption.
Definition: clustered_netlist.cpp:263
ClusteredNetlist(std::string name="", std::string id="")
Constructs a netlist.
Definition: clustered_netlist.cpp:11
vtr::StrongId< cluster_port_id_tag > ClusterPortId
A unique identifier for a port in the atom netlist.
Definition: clustered_netlist_fwd.h:26
void rebuild_block_refs_impl(const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map, const vtr::vector_map< ClusterPortId, ClusterPortId > &port_id_map) override
Definition: clustered_netlist.cpp:238
void remove_net_impl(const ClusterNetId net_id) override
Definition: clustered_netlist.cpp:212
This file defines the Netlist class, which stores the connectivity information of the components in a...
void remove_pin_impl(const ClusterPinId pin_id) override
Definition: clustered_netlist.cpp:208
bool block_contains_primary_output(const ClusterBlockId blk) const
Returns true if the specified block contains a primary output (e.g. BLIF .output primitive) ...
Definition: clustered_netlist.cpp:65
This is a core file that defines the major data types used by VPR.
void remove_block_impl(const ClusterBlockId blk_id) override
Removes a block from the netlist.
Definition: clustered_netlist.cpp:195
void rebuild_port_refs_impl(const vtr::vector_map< ClusterBlockId, ClusterBlockId > &block_id_map, const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map) override
Definition: clustered_netlist.cpp:249
void clean_ports_impl(const vtr::vector_map< ClusterPortId, ClusterPortId > &port_id_map) override
Definition: clustered_netlist.cpp:223
void set_net_is_ignored(ClusterNetId net_id, bool state)
Sets the flag in net_ignored_ = state.
Definition: clustered_netlist.cpp:183
bool net_is_global(const ClusterNetId id) const
Returns whether the net is global.
Definition: clustered_netlist.cpp:103
PinType pin_type(const ClusterPinId pin_id) const
Returns the type of the specified pin.
bool validate_pin_sizes_impl(size_t num_pins) const override
Definition: clustered_netlist.cpp:296
void clean_blocks_impl(const vtr::vector_map< ClusterBlockId, ClusterBlockId > &block_id_map) override
Removes invalid components and reorders them.
Definition: clustered_netlist.cpp:216
void set_net_is_global(ClusterNetId net_id, bool state)
Sets the flag in net_is_global_ = state.
Definition: clustered_netlist.cpp:189
void clean_nets_impl(const vtr::vector_map< ClusterNetId, ClusterNetId > &net_id_map) override
Definition: clustered_netlist.cpp:232
PortType
The type of a port in the Netlist.
Definition: netlist_fwd.h:19
vtr::vector_map< ClusterNetId, bool > net_is_ignored_
Definition: clustered_netlist.h:287
void remove_port_impl(const ClusterPortId port_id) override
Definition: clustered_netlist.cpp:204
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...
Definition: clustered_netlist.cpp:82
vtr::vector_map< ClusterBlockId, t_pb * > block_pbs_
Definition: clustered_netlist.h:277
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.
Definition: clustered_netlist.cpp:153
bool validate_net_sizes_impl(size_t num_nets) const override
Definition: clustered_netlist.cpp:303
ClusterPortId create_port(const ClusterBlockId blk_id, const std::string name, BitIndex width, PortType type)
Create or return an existing port in the netlist.
Definition: clustered_netlist.cpp:136
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...
Definition: clustered_netlist.cpp:76
PinType
Definition: netlist_fwd.h:25
A t_pb represents an instance of a clustered block.
Definition: vpr_types.h:288
Definition: clustered_netlist.h:120
vtr::StrongId< cluster_net_id_tag > ClusterNetId
A unique identifier for a net in the atom netlist.
Definition: clustered_netlist_fwd.h:23
Definition: netlist.h:446
vtr::vector_map< ClusterBlockId, t_logical_block_type_ptr > block_types_
Definition: clustered_netlist.h:278
void rebuild_pin_refs_impl(const vtr::vector_map< ClusterPortId, ClusterPortId > &port_id_map, const vtr::vector_map< ClusterNetId, ClusterNetId > &net_id_map) override
Definition: clustered_netlist.cpp:254
t_logical_block_type_ptr block_type(const ClusterBlockId id) const
Returns the type of CLB (Logic block, RAM, DSP, etc.)
Definition: clustered_netlist.cpp:25
bool validate_port_sizes_impl(size_t num_ports) const override
Definition: clustered_netlist.cpp:291
bool net_is_ignored(const ClusterNetId id) const
Returns whether the net is ignored i.e. not routed.
Definition: clustered_netlist.cpp:97
vtr::vector_map< ClusterBlockId, std::vector< ClusterPinId > > block_logical_pins_
Definition: clustered_netlist.h:279
bool block_contains_primary_input(const ClusterBlockId blk) const
Definition: clustered_netlist.cpp:58
vtr::vector_map< ClusterNetId, bool > net_is_global_
Definition: clustered_netlist.h:288
vtr::StrongId< cluster_block_id_tag > ClusterBlockId
A unique identifier for a block/primitive in the atom netlist.
Definition: clustered_netlist_fwd.h:17
vtr::vector_map< ClusterPinId, int > pin_logical_index_
Definition: clustered_netlist.h:282
unsigned BitIndex
Definition: atom_netlist_fwd.h:41
ClusterBlockId create_block(const char *name, t_pb *pb, t_logical_block_type_ptr type)
Create or return an existing block in the netlist.
Definition: clustered_netlist.cpp:114
void rebuild_net_refs_impl(const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map) override
Definition: clustered_netlist.cpp:259
vtr::StrongId< cluster_pin_id_tag > ClusterPinId
A unique identifier for a pin in the atom netlist.
Definition: clustered_netlist_fwd.h:29
void clean_pins_impl(const vtr::vector_map< ClusterPinId, ClusterPinId > &pin_id_map) override
Definition: clustered_netlist.cpp:227
t_pb * block_pb(const ClusterBlockId id) const
Returns the physical block.
Definition: clustered_netlist.cpp:19
ClusterNetId block_net(const ClusterBlockId blk_id, const int pin_index) const
Returns the net of the block attached to the specific pin index.
Definition: clustered_netlist.cpp:31