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.
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(node_
t v) const -> unsigned int -> auto - Get the module weight.
-
void set_module_weight(node_
t v, unsigned int weight) - Set the weight of a module.
-
auto get_net_weight(const node_
t&) const -> uint32_t -> auto - Get the net weight.
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 in | The graph representing the netlist. |
| modules in | The module nodes in the netlist. |
| nets in | 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>
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(node_ t v) const -> unsigned int
Get the module weight.
| Parameters | |
|---|---|
| v in | The module node |
| Returns | unsigned int The weight of the module |
template<typename graph_ t _1>
void Netlist<_1>:: set_module_weight(node_ t v,
unsigned int weight)
Set the weight of a module.
| Parameters | |
|---|---|
| v in | The module node index |
| weight in | The weight to assign to 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 |
|---|