65 dst->FirstWallLength = src->FirstWallLength ;
66 dst->LastWallLength = src->LastWallLength ;
67 dst->WallLength = src->WallLength ;
68 dst->ChannelLength = src->ChannelLength ;
69 dst->Width = src->Width ;
70 dst->NHeights = src->NHeights ;
72 if (src->Heights == NULL)
83 if (dst->Heights == NULL)
85 fprintf (stderr,
"Malloc heights error\n") ;
90 memcpy (dst->Heights, src->Heights,
124 dst->NLayers = src->NLayers ;
125 dst->NRows = src->NRows ;
126 dst->NColumns = src->NColumns ;
127 dst->NCells = src->NCells ;
128 dst->NConnections = src->NConnections ;
156 dst->Length = src->Length ;
157 dst->Width = src->Width ;
183 non_uniform_cell_list_init(&dimensions->
Cell_list);
192 dst->NonUniform = src->NonUniform;
193 dst->Discr_X = src->Discr_X;
194 dst->Discr_Y = src->Discr_Y;
199 non_uniform_cell_list_copy(&dst->Cell_list, &src->Cell_list) ;
200 connection_list_copy(&dst->connections_list, &src->connections_list) ;
211 non_uniform_cell_list_destroy(&dimensions->
Cell_list);
223 if (dimensions != NULL)
234 if (dimensions == NULL)
251 if (dimensions == NULL)
274 "%s chip length %7.1f , width %7.1f ;\n",
278 "%s cell length %7.1f , width %7.1f ;\n",
286 FILE *file = fopen (
"xaxis.txt",
"w") ;
290 fprintf (stderr,
"Cannot create text file for x axis\n") ;
302 file = fopen (
"yaxis.txt",
"w") ;
306 fprintf (stderr,
"Cannot create text file for y axis\n") ;
334 CellIndex_t nlayers_except_channel = nlayers - nlayers_for_channel ;
338 switch (channel_model)
348 nlayers * nrows * ncolumns
351 2 * (nlayers - 1) * nrows * ncolumns
354 2 * nlayers * (nrows - 1) * ncolumns
357 2 * nlayers * nrows * (ncolumns - 1) ;
374 nlayers_except_channel * nrows * ncolumns
377 2 * nlayers_except_channel * nrows * ncolumns
380 2 * nlayers_except_channel * (nrows - 1) * ncolumns
383 2 * nlayers_except_channel * nrows * (ncolumns - 1)
389 nlayers_for_channel * nrows * ncolumns
392 2 * (nlayers_for_channel + num_channels) * nrows * ncolumns
395 tmp * num_channels * (nrows - 1) * ncolumns
405 fprintf (stderr,
"Error: unknown channel model %d\n", channel_model) ;
429 2 * nrows * ncolumns ;
488 "ERROR: column index %d is out of range\n", column_index) ;
503 if (column_index & 1)
522 if (row_index >
last_row (dimensions))
525 "ERROR: row index %d is out of range\n", row_index) ;
543 fprintf (stderr,
"ERROR: vector of heigths does not exist in memory\n") ;
553 "ERROR: layer index %d is out of range\n", layer_index) ;
626 return dimensions->
Cell.
Width * row_index ;
739 + row_index * hsink->
NColumns + column_index;
void cell_dimensions_copy(CellDimensions_t *dst, CellDimensions_t *src)
void dimensions_destroy(Dimensions_t *dimensions)
ChipDimension_t get_chip_length(Dimensions_t *dimensions)
CellIndex_t get_number_of_connections(Dimensions_t *dimensions)
CellDimension_t get_cell_height(Dimensions_t *dimensions, CellIndex_t layer_index)
void cell_dimensions_init(CellDimensions_t *celld)
ChipDimension_t get_cell_location_y(Dimensions_t *dimensions, CellIndex_t row_index)
void grid_dimensions_init(GridDimensions_t *gridd)
CellIndex_t get_number_of_layers(Dimensions_t *dimensions)
ChipDimension_t get_chip_width(Dimensions_t *dimensions)
ChipDimension_t get_cell_location_x(Dimensions_t *dimensions, CellIndex_t column_index)
void dimensions_print(Dimensions_t *dimensions, FILE *stream, String_t prefix)
CellIndex_t get_layer_cell_offset_from_spreader_coordinates(Dimensions_t *dimensions, struct HeatSink_t *hsink, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
void dimensions_init(Dimensions_t *dimensions)
CellIndex_t get_cell_offset_in_stack(Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
CellIndex_t get_spreader_cell_offset(Dimensions_t *dimensions, struct HeatSink_t *hsink, CellIndex_t row_index, CellIndex_t column_index)
CellIndex_t get_spreader_cell_offset_from_layer_coordinates(Dimensions_t *dimensions, struct HeatSink_t *hsink, CellIndex_t row_index, CellIndex_t column_index)
void dimensions_free(Dimensions_t *dimensions)
void grid_dimensions_copy(GridDimensions_t *dst, GridDimensions_t *src)
CellDimension_t get_cell_length(Dimensions_t *dimensions, CellIndex_t column_index)
CellDimension_t get_cell_width(Dimensions_t *dimensions, CellIndex_t row_index)
void cell_dimensions_destroy(CellDimensions_t *celld)
ChipDimension_t get_chip_area(Dimensions_t *dimensions)
void chip_dimensions_init(ChipDimensions_t *chipd)
Dimensions_t * dimensions_calloc(void)
CellIndex_t last_column(Dimensions_t *dimensions)
void dimensions_copy(Dimensions_t *dst, Dimensions_t *src)
CellIndex_t get_cell_offset_in_layer(Dimensions_t *dimensions, CellIndex_t row_index, CellIndex_t column_index)
void print_axes(Dimensions_t *dimensions)
ChipDimension_t get_cell_center_x(Dimensions_t *dimensions, CellIndex_t column_index)
void chip_dimensions_destroy(ChipDimensions_t *chipd)
CellIndex_t get_number_of_cells(Dimensions_t *dimensions)
void chip_dimensions_copy(ChipDimensions_t *dst, ChipDimensions_t *src)
ChipDimension_t get_cell_center_y(Dimensions_t *dimensions, CellIndex_t row_index)
void compute_number_of_connections(Dimensions_t *dimensions, Quantity_t num_channels, ChannelModel_t channel_model, struct HeatSink_t *topSink)
CellIndex_t last_layer(Dimensions_t *dimensions)
CellIndex_t get_number_of_rows(Dimensions_t *dimensions)
bool has_layer_underneath(Dimensions_t *dimensions, struct HeatSink_t *hsink, CellIndex_t row_index, CellIndex_t column_index)
CellIndex_t first_layer(Dimensions_t *dimensions)
CellIndex_t first_column(Dimensions_t *dimensions)
void grid_dimensions_destroy(GridDimensions_t *gridd)
Dimensions_t * dimensions_clone(Dimensions_t *dimensions)
CellIndex_t get_number_of_columns(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)
Structure that collects the dimensions of a thermal cell.
CellDimension_t LastWallLength
CellDimension_t * Heights
CellDimension_t ChannelLength
CellDimension_t FirstWallLength
CellDimension_t WallLength
Structure that collects the main dimensions of the IC.
Collections of all the structures that are needed for the thermal simulation.
ConnectionList_t connections_list
Non_uniform_cellList_t Cell_list
Structure that collects the dimensions of a 3d thermal grid of cells.
Structure used to store data about the heat dissipation through the top or bottom surfaces of the 2D/...
CellIndex_t NumColumnsBorder
HeatSinkModel_t SinkModel
CellIndex_t NumRowsBorder
@ 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_HEATSINK_TOP_PLUGGABLE
Top pluggable heat sink.
#define NUM_LAYERS_CHANNEL_2RM