Ophidian
 All Classes Namespaces Functions
Public Member Functions | List of all members
ophidian::routing::grid_3d Class Reference

Grid_3d class. More...

#include <grid_3d.h>

Public Member Functions

 grid_3d (int width, int height, int depth)
 Constructor. More...
 
int width ()
 Get grid width. More...
 
int height ()
 Get grid height. More...
 
int depth ()
 Get grid depth. More...
 
void reset_edge_demands ()
 Reset all edge demands to zero. More...
 
unsigned get_horizontal_edge_capacity (int x, int y, int z)
 Get capacity of a given horizontal edge. More...
 
unsigned get_vertical_edge_capacity (int x, int y, int z)
 Get capacity of a given vertical edge. More...
 
void set_horizontal_edge_capacity (int x, int y, int z, unsigned capacity)
 Set the capacity of a given horizontal edge. More...
 
void set_vertical_edge_capacity (int x, int y, int z, unsigned capacity)
 Set the capacity of a given vertical edge. More...
 
unsigned get_horizontal_edge_demand (int x, int y, int z)
 Get the demand of a given horizontal edge. More...
 
unsigned get_vertical_edge_demand (int x, int y, int z)
 Get the demand of a given vertical edge. More...
 
void set_horizontal_edge_demand (int x, int y, int z, unsigned demand)
 Set the demand of a given horizontal edge. More...
 
void set_vertical_edge_demand (int x, int y, int z, unsigned demand)
 Set the demand of a given vertical edge. More...
 
void increment_horizontal_edge_demand (int x, int y, int z)
 Increment the demand of a given horizontal edge. More...
 
void increment_vertical_edge_demand (int x, int y, int z)
 Increment the demand of a given vertical edge. More...
 
int get_horizontal_edge_utilization_gap (int x, int y, int z)
 Get the utilization gap of a given horizontal edge. More...
 
int get_vertical_edge_utilization_gap (int x, int y, int z)
 Get the utilization gap of a given vertical edge. More...
 
void get_max_and_total_edges_overflow (int &max_overflow, int &total_overflow)
 Get the maximum and total edge overflow in the 3d grid. More...
 

Detailed Description

This class provides the basic interface for manipulating a 3D routing grid including edges capacities and demands. It handles layers in horizontal and vertical directions. This version assumes that even layers are routed horizontally while odd layers are routed vertically. Layers are numbered from 0 to n-1. For a 2D routing, the user can use an unique layers and merge all the capacities in that layer.

Constructor & Destructor Documentation

ophidian::routing::grid_3d::grid_3d ( int  width,
int  height,
int  depth 
)

Grid 2d constructor. Initializes the 2D routing grid.

Parameters
widthnumber of gcells in the x direction.
heightnumber of gcells in the y direction.
depthnumber of metal layers. Numbered from 0 to n-1

Member Function Documentation

int ophidian::routing::grid_3d::depth ( )
inline

Returns the grid depth, i.e. number of layers.

Returns
Grid depth.
unsigned ophidian::routing::grid_3d::get_horizontal_edge_capacity ( int  x,
int  y,
int  z 
)
inline

Returns capacity of a given horizontal edge connecting gcells at coordinates x and x+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
Returns
Capacity of the horizontal edge.
unsigned ophidian::routing::grid_3d::get_horizontal_edge_demand ( int  x,
int  y,
int  z 
)
inline

Returns demand of a given horizontal edge connecting gcells at coordinates x and x+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
Returns
Demand of the horizontal edge.
int ophidian::routing::grid_3d::get_horizontal_edge_utilization_gap ( int  x,
int  y,
int  z 
)
inline

Returns the utilization gap of a given horizontal edge connecting gcells at coordinates x and x+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
Returns
Utilization gap of the edge, i.e. (capacity - demand).
void ophidian::routing::grid_3d::get_max_and_total_edges_overflow ( int &  max_overflow,
int &  total_overflow 
)

Returns the maximum and total edge overflow in the 3d grid.

Parameters
max_overflowReference to an integer that will contain the maximum edge overflow in the 3d grid.
total_overflowReference to an integer that will contain the total edge overflow in the 3d grid.
unsigned ophidian::routing::grid_3d::get_vertical_edge_capacity ( int  x,
int  y,
int  z 
)
inline

Returns capacity of a given vertical edge connecting gcells at coordinates y and y+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
Returns
Capacity of the vertical edge.
unsigned ophidian::routing::grid_3d::get_vertical_edge_demand ( int  x,
int  y,
int  z 
)
inline

Returns demand of a given vertical edge connecting gcells at coordinates y and y+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
Returns
Demand of the vertical edge.
int ophidian::routing::grid_3d::get_vertical_edge_utilization_gap ( int  x,
int  y,
int  z 
)
inline

Returns the utilization gap of a given vertical edge connecting gcells at coordinates y and y+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
Returns
Utilization gap of the edge, i.e. (capacity - demand).
int ophidian::routing::grid_3d::height ( )
inline

Returns the grid height, i.e. number of gcells in the y coordinate.

Returns
Grid height.
void ophidian::routing::grid_3d::increment_horizontal_edge_demand ( int  x,
int  y,
int  z 
)
inline

Increment by 1 the demand of a given horizontal edge connecting gcells at coordinates x and x+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
void ophidian::routing::grid_3d::increment_vertical_edge_demand ( int  x,
int  y,
int  z 
)
inline

Increment by 1 the demand of a given vertical edge connecting gcells at coordinates y and y+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
void ophidian::routing::grid_3d::reset_edge_demands ( )

Reset all edge demands to zero.

void ophidian::routing::grid_3d::set_horizontal_edge_capacity ( int  x,
int  y,
int  z,
unsigned  capacity 
)
inline

Set the capacity of a given horizontal edge connecting gcells at coordinates x and x+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
capacityCapacity of the edge, i.e. number of routing tracks that can pass through the edge.
void ophidian::routing::grid_3d::set_horizontal_edge_demand ( int  x,
int  y,
int  z,
unsigned  demand 
)
inline

Set the demand of a given horizontal edge connecting gcells at coordinates x and x+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
demandDemand of the edge, i.e. number of routing tracks passing through the edge.
void ophidian::routing::grid_3d::set_vertical_edge_capacity ( int  x,
int  y,
int  z,
unsigned  capacity 
)
inline

Set the capacity of a given verticak edge connecting gcells at coordinates y and y+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
capacityCapacity of the edge, i.e. number of routing tracks that can pass through the edge.
void ophidian::routing::grid_3d::set_vertical_edge_demand ( int  x,
int  y,
int  z,
unsigned  demand 
)
inline

Set the demand of a given vertical edge connecting gcells at coordinates y and y+1.

Parameters
xx coordinate.
yy coordinate.
zz coordinate, i.e. layer.
demandDemand of the edge, i.e. number of routing tracks passing through the edge.
int ophidian::routing::grid_3d::width ( )
inline

Returns the grid width, i.e. number of gcells in the x coordinate.

Returns
Grid width.

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