93 fprintf (stderr,
"Cannot malloc source vector\n") ;
106 Non_uniform_cellListNode_t* cell_tmp = dimensions->
Cell_list.Last;
107 CellIndex_t layer_info = cell_tmp->Data.layer_info;
108 for(; cell_tmp != NULL && layer_info == cell_tmp->Data.layer_info; cell_tmp=cell_tmp->Prev)
110 cell_num_top_layer++;
111 layer_info = cell_tmp->Data.layer_info;
128 layer_info = cell_tmp->Data.layer_info;
129 for(; cell_tmp != NULL && layer_info == cell_tmp->Data.layer_info; cell_tmp=cell_tmp->Next)
131 cell_num_bottom_layer++;
132 layer_info = cell_tmp->Data.layer_info;
189 while (lindex != pgrid->
NLayers)
225 StackElementList_t *list,
229 StackElementListNode_t *stkeln ;
231 for (stkeln = stack_element_list_end (list) ;
233 stkeln = stack_element_list_prev (stkeln))
235 StackElement_t *stack_element = stack_element_list_data (stkeln) ;
239 switch (stack_element->
SEType)
244 LayerListNode_t *lnd ;
248 lnd = layer_list_prev (lnd))
314 fprintf (stderr,
"WARNING: unset channel model\n") ;
321 "WARNING: unknown channel model %d\n",
332 fprintf (stderr,
"Error! Found stack element with unset type\n") ;
337 fprintf (stderr,
"Error! Unknown stack element type %d\n", stack_element->
SEType) ;
351 for( Non_uniform_cellListNode_t* i_cell = dimensions->
Cell_list.First; i_cell != NULL; i_cell = i_cell->Next)
353 if (i_cell->Data.layer_info >= dimensions->
Grid.
NLayers)
366 row <=
last_row (dimensions) ; row++)
371 *tmp++ =
get_capacity (tgrid, dimensions, layer, row, column) ;
375 StackElement_t *bmost = stack_element_list_data (stack_element_list_end (list)) ;
376 StackElement_t *tmost = stack_element_list_data (stack_element_list_begin (list)) ;
402 for( Non_uniform_cellListNode_t* cell_tmp = dimensions->
Cell_list.First;
404 cell_tmp=cell_tmp->Next)
406 if (cell_tmp->Data.layer_info == last_layer_index)
413 * cell_tmp->Data.length
414 * cell_tmp->Data.width
431 row <=
last_row (dimensions) ; row++)
460 fprintf (stderr,
"Unknown top heatsink model\n") ;
481 fprintf (stderr,
"Top and bottom sink on the same layer ! not handled yed\n") ;
490 Non_uniform_cellListNode_t* cell_tmp = dimensions->
Cell_list.First;
491 for(
CellIndex_t layer_info = cell_tmp->Data.layer_info;
492 cell_tmp != NULL && layer_info == cell_tmp->Data.layer_info;
493 cell_tmp=cell_tmp->Next)
500 * cell_tmp->Data.length
501 * cell_tmp->Data.width
510 row <=
last_row (dimensions) ; row++)
539 for (ccounter = 0u, sources = pgrid->
Sources ;
540 ccounter != pgrid->
NCells ;
541 ccounter++, sources++)
548 Non_uniform_cellListNode_t* cell_node = dimensions->
Cell_list.First;
563 FloorplanElementListNode_t *flpeln ;
565 for (flpeln = floorplan_element_list_begin (&floorplan->
ElementsList) ;
567 flpeln = floorplan_element_list_next (flpeln))
580 *(sources_temp) += floorplan->
Bpowers [ index ] / cell_per_element;
602 Non_uniform_cellListNode_t* cell_node_tmp;
603 for (cell_node_tmp = cell_node;
604 cell_node_tmp != NULL; cell_node_tmp = cell_node_tmp->Next)
616 Non_uniform_cellListNode_t* cell_node_tmp;
617 for (cell_node_tmp = cell_node;
618 cell_node_tmp != NULL; cell_node_tmp = cell_node_tmp->Next)
627 FloorplanElementListNode_t *flpeln ;
629 for (flpeln = floorplan_element_list_begin (&floorplan->ElementsList) ;
631 flpeln = floorplan_element_list_next (flpeln))
644 *(sources_temp) += floorplan->Bpowers [ index ] / cell_per_element;
658 Non_uniform_cellListNode_t* cell_node_tmp;
659 for (cell_node_tmp = cell_node;
660 cell_node_tmp != NULL; cell_node_tmp = cell_node_tmp->Next)
672 Non_uniform_cellListNode_t* cell_node_tmp;
673 for (cell_node_tmp = cell_node;
674 cell_node_tmp != NULL; cell_node_tmp = cell_node_tmp->Next)
684 FloorplanElementListNode_t *flpeln ;
686 for (flpeln = floorplan_element_list_begin (&floorplan->ElementsList) ;
688 flpeln = floorplan_element_list_next (flpeln))
701 *(sources_temp) += floorplan->Bpowers [ index ] / cell_per_element;
742 fprintf (stderr,
"ERROR: unset layer type\n") ;
747 fprintf (stderr,
"ERROR: unknown layer type in non-uniform grid scenario %d\n",
755 for ( ; cell_node != NULL; cell_node = cell_node->Next)
757 if (cell_node->Data.layer_info != layer)
767 for (layer = 0u, sources = pgrid->
Sources ;
904 fprintf (stderr,
"ERROR: unset layer type\n") ;
910 fprintf (stderr,
"ERROR: unknown layer type %d\n",
933 for (layer = 0u, sources = pgrid->
Sources ;
986 fprintf (stderr,
"ERROR: unset layer type\n") ;
992 fprintf (stderr,
"ERROR: unknown layer type %d\n",
1006 for (layer = 0u ; layer != pgrid->
NLayers ; layer++)
1043 fprintf (stderr,
"ERROR: unset layer type\n") ;
1049 fprintf (stderr,
"ERROR: unknown layer type %d\n",
Cconv_t get_convective_term(Channel_t *channel, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
CellDimension_t get_cell_height(Dimensions_t *dimensions, CellIndex_t layer_index)
CellIndex_t get_number_of_layers(Dimensions_t *dimensions)
CellIndex_t last_column(Dimensions_t *dimensions)
CellIndex_t get_number_of_cells(Dimensions_t *dimensions)
CellIndex_t last_layer(Dimensions_t *dimensions)
CellIndex_t first_layer(Dimensions_t *dimensions)
CellIndex_t first_column(Dimensions_t *dimensions)
CellIndex_t get_layer_area(Dimensions_t *dimensions)
CellIndex_t first_row(Dimensions_t *dimensions)
CellIndex_t last_row(Dimensions_t *dimensions)
Error_t fill_sources_floorplan(Floorplan_t *floorplan, Source_t *sources)
Error_t insert_power_values_floorplan(Floorplan_t *floorplan, PowersQueue_t *pvalues)
Capacity_t get_spreader_capacity(HeatSink_t *hsink)
SolidTC_t get_thermal_conductivity(Layer_t *layer, CellIndex_t row_index, CellIndex_t column_index, Dimensions_t *dimensions)
#define IS_CHANNEL_COLUMN(channel_model, column)
void power_grid_fill(PowerGrid_t *pgrid, ThermalGrid_t *tgrid, StackElementList_t *list, Dimensions_t *dimensions)
Error_t insert_power_values(PowerGrid_t *pgrid, PowersQueue_t *pvalues)
void update_channel_sources(PowerGrid_t *pgrid, Dimensions_t *dimensions)
Error_t power_grid_build(PowerGrid_t *pgrid, Dimensions_t *dimensions)
Error_t update_source_vector(PowerGrid_t *pgrid, Dimensions_t *dimensions)
void power_grid_init(PowerGrid_t *pgrid)
void power_grid_destroy(PowerGrid_t *pgrid)
bool is_empty_powers_queue(PowersQueue_t *pqueue)
Power_t get_from_powers_queue(PowersQueue_t *pqueue)
ChannelModel_t ChannelModel
CellIndex_t SourceLayerOffset
Collections of all the structures that are needed for the thermal simulation.
Non_uniform_cellList_t Cell_list
Structure containing information about a floorplan element.
PowersQueue_t * PowerValues
ICElementList_t ICElements
The floorplan representing the IC as a set of floorplan elements.
FloorplanElementList_t ElementsList
Temperature_t AmbientTemperature
HeatSinkModel_t SinkModel
Structure used to store data about the power sources.
StackLayerType_t * LayersTypeProfile
HeatSink_t * BottomHeatSink
Floorplan_t ** FloorplansProfile
SolidTC_t * HeatSinkBottomTcs
Capacity_t * CellsCapacities
SolidTC_t * HeatSinkTopTcs
A First In - First Out circular queue to store power values.
Structure used to store data about the stack element that compose the 2D/3D stack.
StackElementType_t SEType
Structure used to store data about the thermal cells / RC nodes.
Capacity_t get_capacity(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Conductance_t get_conductance_top(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Capacity_t get_capacity_non_uniform(ThermalGrid_t *tgrid, Dimensions_t *dimensions, Non_uniform_cellListNode_t *i_cell)
Conductance_t get_conductance_bottom(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
@ TDICE_SUCCESS
The function returns with success.
@ TDICE_FAILURE
The function retuerns with a generic error.
@ TDICE_LAYER_CHANNEL_2RM
@ TDICE_LAYER_CHANNEL_4RM
@ TDICE_LAYER_SOURCE_CONNECTED_TO_SPREADER
@ TDICE_LAYER_SOLID_CONNECTED_TO_AMBIENT
@ TDICE_LAYER_SOLID_CONNECTED_TO_SPREADER
@ TDICE_LAYER_SOURCE_CONNECTED_TO_PCB
@ TDICE_LAYER_PINFINS_STAGGERED
@ TDICE_LAYER_SOLID_CONNECTED_TO_PCB
@ TDICE_LAYER_SOURCE_CONNECTED_TO_AMBIENT
@ TDICE_LAYER_PINFINS_INLINE
@ TDICE_LAYER_BOTTOM_WALL
@ TDICE_LAYER_VWALL_CHANNEL
@ TDICE_LAYER_VWALL_PINFINS
@ TDICE_CHANNEL_MODEL_PF_INLINE
Inline pin fins - 2 Resistors model.
@ TDICE_CHANNEL_MODEL_PF_STAGGERED
Staggered pin fins - 2 Resistors model.
@ TDICE_CHANNEL_MODEL_NONE
Undefined type.
@ TDICE_CHANNEL_MODEL_MC_4RM
Microchannel - 4 Resistors model.
@ TDICE_CHANNEL_MODEL_MC_2RM
Microchannel - 2 Resistors model.
@ TDICE_STACK_ELEMENT_NONE
Undefined type.
@ TDICE_STACK_ELEMENT_LAYER
Layer.
@ TDICE_STACK_ELEMENT_CHANNEL
Channel.
@ TDICE_STACK_ELEMENT_DIE
Die.
@ TDICE_HEATSINK_TOP
Top heat sink (top-most layer)
@ TDICE_HEATSINK_TOP_PLUGGABLE
Top pluggable heat sink.