template<typename graph_t>
HierNetlist class

HierNetlist.

HierNetlist is implemented by xnetwork::Graph, which is a networkx-like graph.

Base classes

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

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(gsl::span<const std::uint8_t> part, gsl::span<std::uint8_t> part_down) const
Projection down.
void projection_up(gsl::span<const std::uint8_t> part, gsl::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
std::vector<node_t> node_up_map
std::vector<node_t> node_down_map
py::dict<index_t, node_t> cluster_down_map
ShiftArray<std::vector<uint32_t>> net_weight

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(gsl::span<const std::uint8_t> part, gsl::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(gsl::span<const std::uint8_t> part, gsl::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.