template<typename graph_t>
Netlist struct

Represents a netlist, which is implemented using a graph-like data structure.

The Netlist struct contains various properties and data structures to represent the netlist, including:

  • gr: The underlying graph-like data structure used to represent the netlist.
  • modules: A view of the module nodes in the graph.
  • nets: A view of the net nodes in the graph.
  • num_modules: The number of module nodes in the netlist.
  • num_nets: The number of net nodes in the netlist.
  • num_pads: The number of pad nodes in the netlist.
  • max_degree: The maximum degree of any node in the netlist.
  • max_net_degree: The maximum degree of any net node in the netlist.
  • module_weight: A vector of weights for each module node.
  • has_fixed_modules: A flag indicating whether the netlist has any fixed module nodes.
  • module_fixed: A set of fixed module nodes.

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

Netlist(graph_t gr, const nodeview_t& modules, const nodeview_t& nets)
Constructs a new Netlist object.
Netlist(graph_t gr, uint32_t numModules, uint32_t numNets)
Construct a new Netlist object.

Public functions

auto begin() const -> auto
Returns an iterator to the beginning of the modules nodeview.
auto end() const -> auto
Returns an iterator to the end of the modules nodeview.
auto number_of_modules() const -> size_t -> auto
Get the number of modules in the netlist.
auto number_of_nets() const -> size_t -> auto
Get the number of nets in the netlist.
auto number_of_nodes() const -> size_t -> auto
Get the number of nodes in the netlist graph.
auto get_max_degree() const -> size_t -> auto
Get the maximum degree of any node in the netlist.
auto get_max_net_degree() const -> size_t -> auto
Get the max net degree.
auto get_module_weight(const node_t& v) const -> unsigned int -> auto
Get the module weight.
auto get_net_weight(const node_t&) const -> uint32_t -> auto
Get the net weight.

Public variables

graph_t gr
nodeview_t modules
nodeview_t nets
size_t num_modules
size_t num_nets
size_t num_pads
size_t max_degree
size_t max_net_degree
std::vector<unsigned int> module_weight
bool has_fixed_modules
py::set<node_t> module_fixed

Function documentation

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

Constructs a new Netlist object.

Parameters
gr The graph representing the netlist.
modules The module nodes in the netlist.
nets The net nodes in the netlist.

Constructs a Netlist object from the given graph, module nodes, and net nodes.

This constructor initializes a Netlist object with the provided graph, module nodes, and net nodes.

The constructor initializes the Netlist object with the provided graph, modules, and nets. It also calculates the maximum degree of the modules and nets, and sets flags indicating whether the modules have fixed positions.

template<typename graph_t _1>
Netlist<_1>::Netlist(graph_t gr, uint32_t numModules, uint32_t numNets)

Construct a new Netlist object.

Parameters
gr in The graph representing the netlist.
numModules in The number of modules in the netlist.
numNets in The number of nets in the netlist.

template<typename graph_t _1>
auto Netlist<_1>::number_of_modules() const -> size_t

Get the number of modules in the netlist.

Returns The number of modules in the netlist.

template<typename graph_t _1>
auto Netlist<_1>::number_of_nets() const -> size_t

Get the number of nets in the netlist.

Returns The number of nets in the netlist.

template<typename graph_t _1>
auto Netlist<_1>::number_of_nodes() const -> size_t

Get the number of nodes in the netlist graph.

Returns The number of nodes in the netlist graph.

template<typename graph_t _1>
auto Netlist<_1>::get_max_degree() const -> size_t

Get the maximum degree of any node in the netlist.

Returns The maximum degree of any node in the netlist.

template<typename graph_t _1>
auto Netlist<_1>::get_max_net_degree() const -> size_t

Get the max net degree.

Returns size_t The maximum degree of any net in the netlist.

template<typename graph_t _1>
auto Netlist<_1>::get_module_weight(const node_t& v) const -> unsigned int

Get the module weight.

Parameters
in The module node
Returns unsigned int The weight of the module

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

Get the net weight.

Returns uint32_t The weight of the net