3D-ICE 3.0.0
Data Structures | Typedefs | Functions
thermal_data.h File Reference
#include "types.h"
#include "string_t.h"
#include "analysis.h"
#include "stack_element_list.h"
#include "system_matrix.h"
#include "thermal_grid.h"
#include "power_grid.h"
#include "dimensions.h"
#include "connection_list.h"
#include "slu_ddefs.h"

Go to the source code of this file.

Data Structures

struct  ThermalData_t
 Structure to collect data to run thermal simulations. More...
 

Typedefs

typedef struct ThermalData_t ThermalData_t
 

Functions

void thermal_data_init (ThermalData_t *tdata)
 
void update_number_of_cells (Dimensions_t *dimensions, StackElementList_t *stack_elements_list)
 
void get_cell_position (ChipDimension_t(*position_info)[4], CellIndex_t *layer_cell_record, CellIndex_t *layer_type_record, StackElementList_t *stack_elements_list, Dimensions_t *dimensions)
 
void get_minkowski_difference (ChipDimension_t *minkowski_diff, ChipDimension_t(*position_info)[4], int i_x, int i_y)
 
void get_connections_in_layer (CellIndex_t *layer_cell_record, CellIndex_t *layer_type_record, ChipDimension_t(*position_info_ptr)[4], Dimensions_t *dimensions)
 
void get_connections_between_layer (CellIndex_t *layer_cell_record, CellIndex_t *layer_type_record, ChipDimension_t(*position_info_ptr)[4], Dimensions_t *dimensions)
 
Error_t thermal_data_build (ThermalData_t *tdata, StackElementList_t *list, Dimensions_t *dimensions, Analysis_t *analysis)
 
void thermal_data_destroy (ThermalData_t *tdata)
 
void reset_thermal_state (ThermalData_t *tdata, Analysis_t *analysis)
 
SimResult_t emulate_step (ThermalData_t *tdata, Dimensions_t *dimensions, Analysis_t *analysis)
 
SimResult_t emulate_slot (ThermalData_t *tdata, Dimensions_t *dimensions, Analysis_t *analysis)
 
SimResult_t emulate_steady (ThermalData_t *tdata, Dimensions_t *dimensions, Analysis_t *analysis)
 
Error_t update_coolant_flow_rate (ThermalData_t *tdata, Dimensions_t *dimensions, Analysis_t *analysis, CoolantFR_t new_flow_rate)
 
Temperature_t get_cell_temperature (ThermalData_t *tdata, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
 
Error_t print_thermal_map (ThermalData_t *tdata, StackElementList_t *list, Dimensions_t *dimensions, String_t stack_element_id, String_t file_name)
 

Typedef Documentation

◆ ThermalData_t

typedef struct ThermalData_t ThermalData_t

Definition of the type ThermalData_t

Definition at line 107 of file thermal_data.h.

Function Documentation

◆ emulate_slot()

SimResult_t emulate_slot ( ThermalData_t tdata,
Dimensions_t dimensions,
Analysis_t analysis 
)

Simulates a time slot

Parameters
tdatathe address of the ThermalData to fill
dimensionsthe dimensions of the IC
analysisthe address of the Analysis structure
Returns
TDICE_WRONG_CONFIG if the parameters refers to a steady state simulation
TDICE_SOLVER_ERROR if the SLU functions report an error in the structure of the system matrix.
TDICE_END_OF_SIMULATION if power values are over.
TDICE_SLOT_DONE the slot has been simulated correclty

Definition at line 1262 of file thermal_data.c.

◆ emulate_steady()

SimResult_t emulate_steady ( ThermalData_t tdata,
Dimensions_t dimensions,
Analysis_t analysis 
)

Execute steady state simulation

Parameters
tdatathe address of the ThermalData to fill
dimensionsthe dimensions of the IC
analysisthe address of the Analysis structure
Returns
TDICE_WRONG_CONFIG if the parameters refers to a transient simulation
TDICE_SOLVER_ERROR if the SLU functions report an error in the structure of the system matrix.
TDICE_END_OF_SIMULATION if no power values are given or if the simulation suceeded

Definition at line 1283 of file thermal_data.c.

◆ emulate_step()

SimResult_t emulate_step ( ThermalData_t tdata,
Dimensions_t dimensions,
Analysis_t analysis 
)

Simulates a time step

Parameters
tdatathe address of the ThermalData to fill
dimensionsthe dimensions of the IC
analysisthe address of the Analysis structure
Returns
TDICE_WRONG_CONFIG if the parameters refers to a steady state simulation
TDICE_SOLVER_ERROR if the SLU functions report an error in the structure of the system matrix.
TDICE_END_OF_SIMULATION if power values are over.
TDICE_STEP_DONE if the time step has been simulated correclty
TDICE_SLOT_DONE if the time step has been simulated correclty and the slot has been completed

Definition at line 1210 of file thermal_data.c.

◆ get_cell_position()

void get_cell_position ( ChipDimension_t(*)  position_info[4],
CellIndex_t layer_cell_record,
CellIndex_t layer_type_record,
StackElementList_t *  stack_elements_list,
Dimensions_t dimensions 
)

Get cell position for each cell and sace info to arrays position_info and layer_cell_record

Parameters
position_infoposition info contains "left_x, left_y, right_x, right_y" for each thermal cell
layer_cell_recordthe vector contains the end index of each layer in the position_info
layer_type_recordthe vector contains the layer type information of each layer in the position_info
stack_elements_listthe list of stack element (bottom first)
dimensionsthe dimensions of the IC

Definition at line 154 of file thermal_data.c.

◆ get_cell_temperature()

Temperature_t get_cell_temperature ( ThermalData_t tdata,
Dimensions_t dimensions,
CellIndex_t  layer_index,
CellIndex_t  row_index,
CellIndex_t  column_index 
)

Returns the temperature of a thermal cell (L, R, C )

Coordinates of the cell must be within the ranges

Parameters
tdataaddress of the ThermalData structure
dimensionsthe dimensions of the IC
layer_indexthe index L of the thermal cell
row_indexthe index R of the thermal cell
column_indexthe index C of the thermal cell
Returns
0 if the thermal cell (L, R, C ) does not exist
the temperature of the thermal cell (L, R, C )

Definition at line 1358 of file thermal_data.c.

◆ get_connections_between_layer()

void get_connections_between_layer ( CellIndex_t layer_cell_record,
CellIndex_t layer_type_record,
ChipDimension_t(*)  position_info_ptr[4],
Dimensions_t dimensions 
)

Get connections between layers (from bottom to top)

Parameters
layer_cell_recordthe vector contains the end index of each layer in the position_info
layer_type_recordthe vector contains the layer type information of each layer in the position_info
position_info_ptrposition info contains "left_x, left_y, right_x, right_y" for each thermal cell
dimensionsthe dimensions of the IC

Definition at line 733 of file thermal_data.c.

◆ get_connections_in_layer()

void get_connections_in_layer ( CellIndex_t layer_cell_record,
CellIndex_t layer_type_record,
ChipDimension_t(*)  position_info_ptr[4],
Dimensions_t dimensions 
)

get connections of each grid in the same layer

Parameters
layer_cell_recordthe vector contains the end index of each layer in the position_info
layer_type_recordthe vector contains the layer type information of each layer in the position_info
position_info_ptrposition info contains "left_x, left_y, right_x, right_y" for each thermal cell
dimensionsthe dimensions of the IC

Definition at line 660 of file thermal_data.c.

◆ get_minkowski_difference()

void get_minkowski_difference ( ChipDimension_t minkowski_diff,
ChipDimension_t(*)  position_info[4],
int  i_x,
int  i_y 
)

Get the Minkowski difference between two cells

Parameters
minkowski_diffthe vector contains the minkowski difference information
position_infoposition info contains "left_x, left_y, right_x, right_y" for each thermal cell
i_xthe index of the one cell
i_ythe index of the other cell

Definition at line 629 of file thermal_data.c.

◆ print_thermal_map()

Error_t print_thermal_map ( ThermalData_t tdata,
StackElementList_t *  list,
Dimensions_t dimensions,
String_t  stack_element_id,
String_t  file_name 
)

Generate a text file with the thermal map of a stack element

Parameters
tdataaddress of the ThermalData structure
listthe list of stack element (bottom first)
dimensionsthe dimensions of the IC
stack_element_idthe id of the stack element as it appears in the stack file
file_namethe path of the file to be generated
Returns
TDICE_FAILURE if the file cannot be opened or if the stack element stack_element_id does not exist
TDICE_SUCCESS otherwise

Definition at line 1382 of file thermal_data.c.

◆ reset_thermal_state()

void reset_thermal_state ( ThermalData_t tdata,
Analysis_t analysis 
)

Reset the thermal state to the initial temperature

Parameters
tdatathe address of the ThermalData structure to reset
analysisthe address of the Analysis structure related to tdata

Definition at line 1045 of file thermal_data.c.

◆ thermal_data_build()

Error_t thermal_data_build ( ThermalData_t tdata,
StackElementList_t *  list,
Dimensions_t dimensions,
Analysis_t analysis 
)

Allocs and initialize memory and prepares the LU factorization

Parameters
tdatathe address of the ThermalData to fill
listthe list of stack element (bottom first)
dimensionsthe dimensions of the IC
analysisthe address of the Analysis structure
Returns
TDICE_FAILURE if the memory allocation fails or the syatem matrix cannot be split in A=LU.
TDICE_SUCCESS otherwise

Definition at line 876 of file thermal_data.c.

◆ thermal_data_destroy()

void thermal_data_destroy ( ThermalData_t tdata)

Destroys the content of the fields of the structure tdata

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

Parameters
tdatathe address of the structure to destroy

Definition at line 1029 of file thermal_data.c.

◆ thermal_data_init()

void thermal_data_init ( ThermalData_t tdata)

Inits the fields of the tdata structure with default values

Parameters
tdatathe address of the structure to initalize

Definition at line 54 of file thermal_data.c.

◆ update_coolant_flow_rate()

Error_t update_coolant_flow_rate ( ThermalData_t tdata,
Dimensions_t dimensions,
Analysis_t analysis,
CoolantFR_t  new_flow_rate 
)

Update the flow rate

Sets the new value in the Channel structure, re-fill the system matrix A and then execute the factorization A=LU again. If tdata succeeds then the source vector will be upadted with the new inlet source value.

Parameters
tdataaddress of the ThermalData structure
dimensionsthe dimensions of the IC
analysisaddress of the Analisys structure
new_flow_ratethe new flow rate (in ml/min)
Returns
TDICE_FAILURE if the syatem matrix cannot be split in A=LU.
TDICE_SUCCESS otherwise

Definition at line 1331 of file thermal_data.c.

◆ update_number_of_cells()

void update_number_of_cells ( Dimensions_t dimensions,
StackElementList_t *  stack_elements_list 
)

Update the number of cells in the non-uniform grid scenario

Parameters
dimensionsthe dimensions of the IC
stack_elements_listthe list of stack element (bottom first)

Definition at line 69 of file thermal_data.c.