template<typename graph_t>
HierNetlist class

Hierarchical Netlist.

HierNetlist extends the Netlist class to support multi-level partitioning algorithms. It maintains additional mappings and weights for hierarchical (coarsening) representations of the netlist during the partitioning process.

Base classes

template<typename graph_t>
struct Netlist<graph_t>
Netlist data structure.

Public types

using nodeview_t = typename graph_t::nodeview_t
using node_t = typename graph_t::node_t
using index_t = typename nodeview_t::key_type

Constructors, destructors, conversion operators

HierNetlist(graph_t gr, const nodeview_t& modules, const nodeview_t& nets)
Constructs a new HierNetlist object.

Public functions

void projection_down(std::span<const std::uint8_t> part, std::span<std::uint8_t> part_down) const
Projection down.
void projection_up(std::span<const std::uint8_t> part, std::span<std::uint8_t> part_up) const
Projects a part up to a higher level of the hierarchy.
auto get_net_weight(const node_t& net) const -> uint32_t -> auto
Returns the weight of the specified net.

Public variables

const Netlist<graph_t>* parent
Pointer to the parent netlist in the hierarchy.
std::vector<node_t> node_up_map
Mapping from this level's nodes to parent's nodes (upward)
std::vector<node_t> node_down_map
Mapping from this level's nodes to children's nodes (downward)
py::dict<index_t, node_t> cluster_down_map
Mapping from cluster index to child nodes.
ShiftArray<std::vector<uint32_t>> net_weight
Net weights for each net in the hierarchical netlist.

Function documentation

template<typename graph_t _1>
HierNetlist<_1>::HierNetlist(graph_t gr, const nodeview_t& modules, const nodeview_t& nets)

Constructs a new HierNetlist object.

Parameters
gr in The graph object to be used for the HierNetlist.
modules in The nodeview of modules for the HierNetlist.
nets in The nodeview of nets for the HierNetlist.

template<typename graph_t _1>
void HierNetlist<_1>::projection_down(std::span<const std::uint8_t> part, std::span<std::uint8_t> part_down) const

Projection down.

Parameters
part in The part to be projected down.
part_down out The projected part at the lower level.

Projects a part down to a lower level of the hierarchy.

template<typename graph_t _1>
void HierNetlist<_1>::projection_up(std::span<const std::uint8_t> part, std::span<std::uint8_t> part_up) const

Projects a part up to a higher level of the hierarchy.

Parameters
part in The part to be projected up.
part_up out The projected part at the higher level.

template<typename graph_t _1>
auto HierNetlist<_1>::get_net_weight(const node_t& net) const -> uint32_t

Returns the weight of the specified net.

Parameters
net The net for which to retrieve the weight.
Returns The weight of the specified net.

If the net_weight array is empty, the default net weight of 1 is returned. Otherwise, the weight of the specified net is returned from the net_weight array.