CkPttn 1.2.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
HierNetlist< graph_t > Class Template Reference

Hierarchical Netlist. More...

#include <HierNetlist.hpp>

Inheritance diagram for HierNetlist< graph_t >:
Inheritance graph
[legend]
Collaboration diagram for HierNetlist< graph_t >:
Collaboration graph
[legend]

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
 
- Public Types inherited from Netlist< graph_t >
using nodeview_t = typename graph_t::nodeview_t
 
using node_t = typename graph_t::node_t
 
using index_t = typename nodeview_t::key_type
 

Public Member Functions

 HierNetlist (graph_t gr, const nodeview_t &modules, const nodeview_t &nets)
 Constructs a new HierNetlist object.
 
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
 Returns the weight of the specified net.
 
- Public Member Functions inherited from Netlist< graph_t >
 Netlist (graph_t gr, const nodeview_t &modules, const nodeview_t &nets)
 Construct a new Netlist object.
 
 Netlist (graph_t gr, uint32_t numModules, uint32_t numNets)
 Construct a new Netlist object.
 
auto begin () const
 
auto end () const
 
auto number_of_modules () const -> size_t
 Get the number of modules.
 
auto number_of_nets () const -> size_t
 Get the number of nets.
 
auto number_of_nodes () const -> size_t
 Get the number of nodes.
 
auto get_max_degree () const -> size_t
 Get the max degree.
 
auto get_max_net_degree () const -> size_t
 Get the max net degree.
 
auto get_module_weight (const node_t &v) const -> unsigned int
 Get the module weight.
 
auto get_net_weight (const node_t &) const -> uint32_t
 Get the net weight.
 

Public Attributes

const Netlist< graph_t > * parent
 Pointer to the parent netlist in the hierarchy.
 
std::vector< node_tnode_up_map
 Mapping from this level's nodes to parent's nodes (upward)
 
std::vector< node_tnode_down_map
 Mapping from this level's nodes to children's nodes (downward)
 
py::dict< index_t, node_tcluster_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.
 
- Public Attributes inherited from Netlist< graph_t >
graph_t gr
 The underlying graph structure.
 
nodeview_t modules
 Node view for modules (circuit components)
 
nodeview_t nets
 Node view for nets (connections)
 
size_t num_modules {}
 Number of modules in the netlist.
 
size_t num_nets {}
 Number of nets in the netlist.
 
size_t num_pads {}
 Number of pads (I/O nodes)
 
size_t max_degree {}
 Maximum degree among all modules.
 
size_t max_net_degree {}
 Maximum degree among all nets.
 
std::vector< unsigned int > module_weight
 Weight for each module.
 
bool has_fixed_modules {}
 Flag indicating whether any modules have fixed positions.
 
py::set< node_tmodule_fixed
 Set of modules with fixed positions.
 

Detailed Description

template<typename graph_t>
class HierNetlist< graph_t >

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.

Template Parameters
graph_tThe graph type (e.g., xnetwork::SimpleGraph)

Member Typedef Documentation

◆ index_t

template<typename graph_t >
using HierNetlist< graph_t >::index_t = typename nodeview_t::key_type

◆ node_t

template<typename graph_t >
using HierNetlist< graph_t >::node_t = typename graph_t::node_t

◆ nodeview_t

template<typename graph_t >
using HierNetlist< graph_t >::nodeview_t = typename graph_t::nodeview_t

Constructor & Destructor Documentation

◆ HierNetlist()

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

Constructs a new HierNetlist object.

Parameters
[in]grThe graph object to be used for the HierNetlist.
[in]modulesThe nodeview of modules for the HierNetlist.
[in]netsThe nodeview of nets for the HierNetlist.

Member Function Documentation

◆ get_net_weight()

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

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.

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

◆ projection_down()

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

Projection down.

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

Parameters
[in]partThe part to be projected down.
[out]part_downThe projected part at the lower level.

◆ projection_up()

template<typename graph_t >
void HierNetlist< graph_t >::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
[in]partThe part to be projected up.
[out]part_upThe projected part at the higher level.

Member Data Documentation

◆ cluster_down_map

template<typename graph_t >
py::dict<index_t, node_t> HierNetlist< graph_t >::cluster_down_map

Mapping from cluster index to child nodes.

◆ net_weight

template<typename graph_t >
ShiftArray<std::vector<uint32_t> > HierNetlist< graph_t >::net_weight

Net weights for each net in the hierarchical netlist.

◆ node_down_map

template<typename graph_t >
std::vector<node_t> HierNetlist< graph_t >::node_down_map

Mapping from this level's nodes to children's nodes (downward)

◆ node_up_map

template<typename graph_t >
std::vector<node_t> HierNetlist< graph_t >::node_up_map

Mapping from this level's nodes to parent's nodes (upward)

◆ parent

template<typename graph_t >
const Netlist<graph_t>* HierNetlist< graph_t >::parent

Pointer to the parent netlist in the hierarchy.


The documentation for this class was generated from the following file: