10#include <netlistx/netlist.hpp>
11#include <py2cpp/dict.hpp>
12#include <py2cpp/set.hpp>
16#include <xnetwork/classes/graph.hpp>
38 using node_t =
typename graph_t::node_t;
39 using index_t =
typename nodeview_t::key_type;
71 std::span<std::uint8_t> part_down)
const;
79 void projection_up(std::span<const std::uint8_t> part, std::span<std::uint8_t> part_up)
const;
91 return this->net_weight.empty() ? 1U : this->net_weight[net];
102template <
typename graph_t>
ShiftArray container with shifted index access.
Hierarchical Netlist.
Definition HierNetlist.hpp:35
typename nodeview_t::key_type index_t
Definition HierNetlist.hpp:39
HierNetlist(graph_t gr, const nodeview_t &modules, const nodeview_t &nets)
Constructs a new HierNetlist object.
Definition HierNetlist.hpp:103
typename graph_t::node_t node_t
Definition HierNetlist.hpp:38
void projection_down(std::span< const std::uint8_t > part, std::span< std::uint8_t > part_down) const
Projection down.
ShiftArray< std::vector< uint32_t > > net_weight
Net weights for each net in the hierarchical netlist.
Definition HierNetlist.hpp:51
auto get_net_weight(const node_t &net) const -> uint32_t
Returns the weight of the specified net.
Definition HierNetlist.hpp:90
const Netlist< graph_t > * parent
Pointer to the parent netlist in the hierarchy.
Definition HierNetlist.hpp:43
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.
std::vector< node_t > node_up_map
Mapping from this level's nodes to parent's nodes (upward)
Definition HierNetlist.hpp:45
py::dict< index_t, node_t > cluster_down_map
Mapping from cluster index to child nodes.
Definition HierNetlist.hpp:49
typename graph_t::nodeview_t nodeview_t
Definition HierNetlist.hpp:37
std::vector< node_t > node_down_map
Mapping from this level's nodes to children's nodes (downward)
Definition HierNetlist.hpp:47
Shift Array container with shifted index access.
Definition array_like.hpp:47
xnetwork::SimpleGraph graph_t
Definition netlist.hpp:197
Netlist data structure.
Definition netlist.hpp:31
nodeview_t modules
Node view for modules (circuit components)
Definition netlist.hpp:40
graph_t gr
The underlying graph structure.
Definition netlist.hpp:38
nodeview_t nets
Node view for nets (connections)
Definition netlist.hpp:42