82 while (lindex != tgrid->
NLayers)
103 while (lindex != tgrid->
NLayers)
119 StackElementListNode_t *stkeln ;
120 bool has_4RM_layers =
false;
122 for (stkeln = stack_element_list_end (list) ;
124 stkeln = stack_element_list_prev (stkeln))
126 StackElement_t *stack_element = stack_element_list_data (stkeln) ;
130 switch (stack_element->
SEType)
135 LayerListNode_t *lnd ;
139 lnd = layer_list_prev (lnd))
191 has_4RM_layers =
true;
224 fprintf (stderr,
"WARNING: unset channel model\n") ;
231 "WARNING: unknown channel model %d\n",
241 fprintf (stderr,
"Error! Found stack element with unset type\n") ;
246 fprintf (stderr,
"Error! Unknown stack element type %d\n", stack_element->
SEType) ;
251 StackElement_t *bmost = stack_element_list_data (stack_element_list_end (list)) ;
252 StackElement_t *tmost = stack_element_list_data (stack_element_list_begin (list)) ;
275 fprintf (stderr,
"Error: 4RM layers and top pluggable heat sink"
276 " are not supported together, use the 2RM model"
292 fprintf (stderr,
"Unknown top heatsink model\n") ;
313 fprintf (stderr,
"Top and bottom sink on the same layer ! not handled yed\n") ;
329 Non_uniform_cellListNode_t* i_cell
333 if (layer_index >= tgrid->
NLayers)
354 * i_cell->Data.length
360 if (i_cell->Data.isChannel)
363 * i_cell->Data.length
373 * i_cell->Data.length
384 * i_cell->Data.length
396 * i_cell->Data.length
408 fprintf (stderr,
"ERROR: unset layer type\n") ;
413 fprintf (stderr,
"ERROR: Not supported layer type in Non-uniform grid scenario %d\n",
433 if (layer_index > tgrid->
NLayers)
436 "ERROR: layer index %d is out of range\n", layer_index) ;
453 row_index, column_index,
473 row_index, column_index,
495 row_index, column_index,
510 fprintf (stderr,
"ERROR: unset layer type\n") ;
516 fprintf (stderr,
"ERROR: unknown layer type %d\n",
528 ConnectionListNode_t* i_cell,
529 Non_uniform_cellListNode_t* node,
530 int16_t direction_note
549 if (layer_index != 0 && layer_index != dimensions->
Grid.
NLayers-1 )
550 cell_height = cell_height/2.0;
552 * i_cell->Data.value) / cell_height ;
556 assert(layer_index ==
last_layer (dimensions));
564 * i_cell->Data.value) / (
get_cell_height (dimensions, layer_index)/2.0) ;
573 * i_cell->Data.value) / (
get_cell_height (dimensions, layer_index)/2.0) ;
577 if (node->Data.isChannel)
578 if (direction_note == 1)
587 * i_cell->Data.value )
592 if (direction_note == 1)
600 * i_cell->Data.value ;
605 * i_cell->Data.value ;
625 fprintf (stderr,
"ERROR: unset layer type\n") ;
631 fprintf (stderr,
"ERROR: unknown layer type %d\n",
645 Non_uniform_cellListNode_t* node,
668 / ( node->Data.width / 2.0) ;
672 if (node->Data.isChannel)
676 (tgrid->
Channel, dimensions, layer_index, 0, 0) ;
686 / (node->Data.width / 2.0) ;
699 (tgrid->
Channel, dimensions, layer_index, length_value) ;
709 / (length_value / 2.0)
720 fprintf (stderr,
"ERROR: unset layer type\n") ;
726 fprintf (stderr,
"ERROR: unknown layer type %d\n",
739 ConnectionListNode_t* i_cell,
740 Non_uniform_cellListNode_t* node
773 / (node->Data.length / 2.0) ;
777 if (node->Data.isChannel)
791 / (node->Data.length / 2.0) ;
805 fprintf (stderr,
"ERROR: unset layer type\n") ;
811 fprintf (stderr,
"ERROR: unknown layer type %d\n",
823 ConnectionListNode_t* i_cell,
830 Non_uniform_cellListNode_t* node1 = dimensions->
Cell_list.First;
831 Non_uniform_cellListNode_t* node2 = dimensions->
Cell_list.First;
842 if(i_cell->Data.direction == 0)
844 int16_t direction_note;
845 if (node1->Data.layer_info < node2->Data.layer_info)
863 else if(i_cell->Data.direction == 1)
869 else if(i_cell->Data.direction == 2)
872 if (node1->Data.left_y < node2->Data.left_y)
881 if (node2->Data.isChannel == 1)
896 fprintf (stderr,
"ERROR: wrong direction of the connection\n") ;
912 if (layer_index > tgrid->
NLayers)
915 "ERROR: layer index %d is out of range\n", layer_index) ;
932 row_index, column_index,
942 row_index, column_index,
954 row_index, column_index,
965 row_index, column_index,
972 assert(layer_index ==
last_layer (dimensions));
978 row_index, column_index,
988 row_index, column_index,
1000 row_index, column_index,
1021 row_index, column_index,
1050 row_index, column_index,
1065 fprintf (stderr,
"ERROR: unset layer type\n") ;
1071 fprintf (stderr,
"ERROR: unknown layer type %d\n",
1089 if (layer_index > tgrid->
NLayers)
1092 "ERROR: layer index %d is out of range\n", layer_index) ;
1106 else if (layer_index ==
last_layer (dimensions))
1109 row_index, column_index,
1119 row_index, column_index,
1132 row_index, column_index,
1144 row_index, column_index,
1155 row_index, column_index,
1173 row_index, column_index,
1202 row_index, column_index,
1217 fprintf (stderr,
"ERROR: unset layer type\n") ;
1223 fprintf (stderr,
"ERROR: unknown layer type %d\n",
1241 if (layer_index > tgrid->
NLayers)
1244 "ERROR: layer index %d is out of range\n", layer_index) ;
1261 row_index, column_index,
1274 (tgrid->
Channel, dimensions, layer_index, row_index, column_index) ;
1279 row_index, column_index,
1292 (tgrid->
Channel, dimensions, layer_index, row_index, column_index) ;
1297 row_index, column_index,
1313 fprintf (stderr,
"ERROR: unset layer type\n") ;
1319 fprintf (stderr,
"ERROR: unknown layer type %d\n",
1337 if (layer_index > tgrid->
NLayers)
1340 "ERROR: layer index %d is out of range\n", layer_index) ;
1357 row_index, column_index,
1370 (tgrid->
Channel, dimensions, layer_index, row_index, column_index) ;
1375 row_index, column_index,
1388 (tgrid->
Channel, dimensions, layer_index, row_index, column_index) ;
1393 row_index, column_index,
1409 fprintf (stderr,
"ERROR: unset layer type\n") ;
1415 fprintf (stderr,
"ERROR: unknown layer type %d\n",
1433 if (layer_index > tgrid->
NLayers)
1436 "ERROR: layer index %d is out of range\n", layer_index) ;
1453 row_index, column_index,
1471 row_index, column_index,
1490 fprintf (stderr,
"ERROR: unset layer type\n") ;
1496 fprintf (stderr,
"ERROR: unknown layer type %d\n",
1514 if (layer_index > tgrid->
NLayers)
1517 "ERROR: layer index %d is out of range\n", layer_index) ;
1534 row_index, column_index,
1552 row_index, column_index,
1571 fprintf (stderr,
"ERROR: unset layer type\n") ;
1577 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)
Cconv_t get_convective_term_nonuniform(Channel_t *channel, Dimensions_t *dimensions, CellIndex_t layer_index, ChipDimension_t cell_length)
CellDimension_t get_cell_height(Dimensions_t *dimensions, CellIndex_t layer_index)
CellIndex_t get_number_of_layers(Dimensions_t *dimensions)
CellDimension_t get_cell_length(Dimensions_t *dimensions, CellIndex_t column_index)
CellDimension_t get_cell_width(Dimensions_t *dimensions, CellIndex_t row_index)
CellIndex_t last_layer(Dimensions_t *dimensions)
CellIndex_t first_layer(Dimensions_t *dimensions)
Conductance_t get_spreader_conductance_north_south(HeatSink_t *hsink)
Capacity_t get_spreader_capacity(HeatSink_t *hsink)
Conductance_t get_spreader_conductance_east_west(HeatSink_t *hsink)
Conductance_t get_spreader_conductance_top_bottom_nonuniform(HeatSink_t *hsink, ChipDimension_t area)
void layer_destroy(Layer_t *layer)
SolidTC_t get_thermal_conductivity(Layer_t *layer, CellIndex_t row_index, CellIndex_t column_index, Dimensions_t *dimensions)
void layer_copy(Layer_t *dst, Layer_t *src)
SolidVHC_t get_volumetric_heat_capacity(Layer_t *layer, CellIndex_t row_index, CellIndex_t column_index, Dimensions_t *dimensions)
void layer_init(Layer_t *layer)
#define EFFECTIVE_HTC_PF_STAGGERED(darcy_velocity)
#define IS_CHANNEL_COLUMN(channel_model, column)
#define EFFECTIVE_HTC_PF_INLINE(darcy_velocity)
void material_copy(Material_t *dst, Material_t *src)
void string_copy(String_t *dst, String_t *src)
ChannelModel_t ChannelModel
ChannelDimension_t Porosity
DarcyVelocity_t DarcyVelocity
CellIndex_t SourceLayerOffset
Collections of all the structures that are needed for the thermal simulation.
Non_uniform_cellList_t Cell_list
Structure used to store data about the heat dissipation through the top or bottom surfaces of the 2D/...
HeatSinkModel_t SinkModel
Structure used to store data about the layers that compose the 2D/3D stack.
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.
StackLayerType_t * LayersTypeProfile
HeatSink_t * BottomHeatSink
Conductance_t get_conductance_non_uniform(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ConnectionListNode_t *i_cell, CellIndex_t node1_index, CellIndex_t node2_index, Conductance_t *sign_note)
Capacity_t get_capacity(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Error_t thermal_grid_build(ThermalGrid_t *tgrid, Dimensions_t *dimensions)
Conductance_t get_conductance_south(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Conductance_t get_conductance_east(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)
Error_t thermal_grid_fill(ThermalGrid_t *tgrid, StackElementList_t *list)
Conductance_t get_conductance_non_uniform_y(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ChipDimension_t value, Non_uniform_cellListNode_t *node, Conductance_t direction_note)
Conductance_t get_conductance_north(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
void thermal_grid_destroy(ThermalGrid_t *tgrid)
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)
void thermal_grid_init(ThermalGrid_t *tgrid)
Conductance_t get_conductance_non_uniform_x(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ConnectionListNode_t *i_cell, Non_uniform_cellListNode_t *node)
Conductance_t get_conductance_west(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Conductance_t get_conductance_non_uniform_z(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ConnectionListNode_t *i_cell, Non_uniform_cellListNode_t *node, int16_t direction_note)
@ 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.