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... | |
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.
ophidian::routing::grid_3d::grid_3d | ( | int | width, |
int | height, | ||
int | depth | ||
) |
Grid 2d constructor. Initializes the 2D routing grid.
width | number of gcells in the x direction. |
height | number of gcells in the y direction. |
depth | number of metal layers. Numbered from 0 to n-1 |
|
inline |
Returns the grid depth, i.e. number of layers.
|
inline |
Returns capacity of a given horizontal edge connecting gcells at coordinates x and x+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
|
inline |
Returns demand of a given horizontal edge connecting gcells at coordinates x and x+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
|
inline |
Returns the utilization gap of a given horizontal edge connecting gcells at coordinates x and x+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
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.
max_overflow | Reference to an integer that will contain the maximum edge overflow in the 3d grid. |
total_overflow | Reference to an integer that will contain the total edge overflow in the 3d grid. |
|
inline |
Returns capacity of a given vertical edge connecting gcells at coordinates y and y+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
|
inline |
Returns demand of a given vertical edge connecting gcells at coordinates y and y+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
|
inline |
Returns the utilization gap of a given vertical edge connecting gcells at coordinates y and y+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
|
inline |
Returns the grid height, i.e. number of gcells in the y coordinate.
|
inline |
Increment by 1 the demand of a given horizontal edge connecting gcells at coordinates x and x+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
|
inline |
Increment by 1 the demand of a given vertical edge connecting gcells at coordinates y and y+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
void ophidian::routing::grid_3d::reset_edge_demands | ( | ) |
Reset all edge demands to zero.
|
inline |
Set the capacity of a given horizontal edge connecting gcells at coordinates x and x+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
capacity | Capacity of the edge, i.e. number of routing tracks that can pass through the edge. |
|
inline |
Set the demand of a given horizontal edge connecting gcells at coordinates x and x+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
demand | Demand of the edge, i.e. number of routing tracks passing through the edge. |
|
inline |
Set the capacity of a given verticak edge connecting gcells at coordinates y and y+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
capacity | Capacity of the edge, i.e. number of routing tracks that can pass through the edge. |
|
inline |
Set the demand of a given vertical edge connecting gcells at coordinates y and y+1.
x | x coordinate. |
y | y coordinate. |
z | z coordinate, i.e. layer. |
demand | Demand of the edge, i.e. number of routing tracks passing through the edge. |
|
inline |
Returns the grid width, i.e. number of gcells in the x coordinate.