3D-ICE 3.0.0
Data Structures | Typedefs | Functions
power_grid.h File Reference
#include "types.h"
#include "channel.h"
#include "heat_sink.h"
#include "floorplan.h"
#include "thermal_grid.h"
#include "stack_element_list.h"
#include "powers_queue.h"
#include "dimensions.h"

Go to the source code of this file.

Data Structures

struct  PowerGrid_t
 Structure used to store data about the power sources. More...
 

Typedefs

typedef struct PowerGrid_t PowerGrid_t
 

Functions

void power_grid_init (PowerGrid_t *pgrid)
 
Error_t power_grid_build (PowerGrid_t *pgrid, Dimensions_t *dimensions)
 
void power_grid_destroy (PowerGrid_t *pgrid)
 
void power_grid_fill (PowerGrid_t *pgrid, ThermalGrid_t *tgrid, StackElementList_t *list, Dimensions_t *dimensions)
 
Error_t update_source_vector (PowerGrid_t *pgrid, Dimensions_t *dimensions)
 
void update_channel_sources (PowerGrid_t *pgrid, Dimensions_t *dimensions)
 
Error_t insert_power_values (PowerGrid_t *pgrid, PowersQueue_t *pvalues)
 

Typedef Documentation

◆ PowerGrid_t

typedef struct PowerGrid_t PowerGrid_t

Definition of the type PowerGrid_t

Definition at line 134 of file power_grid.h.

Function Documentation

◆ insert_power_values()

Error_t insert_power_values ( PowerGrid_t pgrid,
PowersQueue_t pvalues 
)

Inserts one power values from a power queue into each floorplan element in the entire stack

The queue pvalues must contain at least as many power values as the number of floorplan elements in the entire stack. pvalues is a FIFO queue and, whithin the stack, elements are counted from the bottom (the last element declared in the stack section of the stack description file). If the stack has two dies A (bottom) and B (top) and A has a floorplan with n elements while B has m elements, then pvalues must contain at least nm elements. The first n power values will be given to A and the remaining will be assigned to B

Parameters
pgridaddress of the PowerGrid structure
pvaluespointer to the list of power values
Returns
TDICE_FAILURE if the queue pvalues does not contain enough power values
TDICE_SUCCESS otherwise

Definition at line 1002 of file power_grid.c.

◆ power_grid_build()

Error_t power_grid_build ( PowerGrid_t pgrid,
Dimensions_t dimensions 
)

Allocs internal memory to store power grid information

Parameters
pgridpointer to the power grid structure
dimensionspointer to the structure storing the dimensions
Returns
TDICE_ERROR if the memory allocation fails
TDICE_SUCCESS otherwise

Definition at line 64 of file power_grid.c.

◆ power_grid_destroy()

void power_grid_destroy ( PowerGrid_t pgrid)

Destroys the content of the fields of the structure pgrid

The function releases any dynamic memory used by the structure and resets its state calling power_grid_init .

Parameters
pgridthe address of the structure to destroy

Definition at line 202 of file power_grid.c.

◆ power_grid_fill()

void power_grid_fill ( PowerGrid_t pgrid,
ThermalGrid_t tgrid,
StackElementList_t *  list,
Dimensions_t dimensions 
)

Fills a power grid

Parameters
pgridpointer to the power grid
tgridpointer to the ThermalGrid structure
listpointer to the list of stack elements
dimensionspointer to the structure storing the dimensions

Definition at line 221 of file power_grid.c.

◆ power_grid_init()

void power_grid_init ( PowerGrid_t pgrid)

Inits the fields of the pgrid structure with default values

Parameters
pgridthe address of the structure to initalize

Definition at line 46 of file power_grid.c.

◆ update_channel_sources()

void update_channel_sources ( PowerGrid_t pgrid,
Dimensions_t dimensions 
)

Update channel sources

Parameters
pgridaddress of the PowerGrid structure storing the sources
dimensionsthe dimensions of the IC

Definition at line 928 of file power_grid.c.

◆ update_source_vector()

Error_t update_source_vector ( PowerGrid_t pgrid,
Dimensions_t dimensions 
)

Update the source vector

Parameters
pgridaddress of the PowerGrid structure storing the sources
dimensionsthe dimensions of the IC
Returns
TDICE_SUCCESS if the source vector has been updated
TDICE_FAILURE if it not possible to fill the source vector (at least one floorplan element with no power values in its queue)

Definition at line 527 of file power_grid.c.