3D-ICE 3.0.0
|
#include <stdio.h>
#include "types.h"
#include "string_t.h"
#include "channel.h"
#include "heat_sink.h"
#include "die.h"
#include "dimensions.h"
#include "layer.h"
Go to the source code of this file.
Data Structures | |
union | StackElement_p |
A union of pointers to types that can be an instance of a StackElement. More... | |
struct | StackElement_t |
Structure used to store data about the stack element that compose the 2D/3D stack. More... | |
Typedefs | |
typedef union StackElement_p | StackElement_p |
typedef struct StackElement_t | StackElement_t |
Functions | |
void | stack_element_init (StackElement_t *stkel) |
void | stack_element_copy (StackElement_t *dst, StackElement_t *src) |
void | stack_element_destroy (StackElement_t *stkel) |
StackElement_t * | stack_element_calloc (void) |
StackElement_t * | stack_element_clone (StackElement_t *stkel) |
void | stack_element_free (StackElement_t *stkel) |
bool | stack_element_same_id (StackElement_t *stkel, StackElement_t *other) |
void | stack_element_print (StackElement_t *stkel, FILE *stream, String_t prefix) |
CellIndex_t | get_source_layer_offset (StackElement_t *stkel) |
void | stack_element_print_thermal_map (StackElement_t *stkel, Dimensions_t *dimensions, Temperature_t *temperatures, FILE *stream) |
void | stack_element_print_power_map (StackElement_t *stkel, Dimensions_t *dimensions, Source_t *sources, FILE *stream) |
Quantity_t | get_number_of_floorplan_elements_stack_element (StackElement_t *stkel) |
typedef union StackElement_p StackElement_p |
Definition of the type StackElement_p
Definition at line 79 of file stack_element.h.
typedef struct StackElement_t StackElement_t |
Definition of the type StackElement_t
Definition at line 128 of file stack_element.h.
Quantity_t get_number_of_floorplan_elements_stack_element | ( | StackElement_t * | stkel | ) |
Returns the total number of floorplan elements
stkel | address of the StackElement structure |
Definition at line 350 of file stack_element.c.
CellIndex_t get_source_layer_offset | ( | StackElement_t * | stkel | ) |
Returns the offset of the source layer of the stack element within the stack
stkel | pointer to the stack element |
Definition at line 212 of file stack_element.c.
StackElement_t * stack_element_calloc | ( | void | ) |
Allocates memory for a structure of type StackElement_t
The content of the new structure is set to default values calling stack_element_init
NULL
if the memory allocation fails Definition at line 113 of file stack_element.c.
StackElement_t * stack_element_clone | ( | StackElement_t * | stkel | ) |
Allocates memory for a new copy of the structure stkel
stkel | the address of the structure to clone |
NULL
if the memory allocation fails NULL
if the parameter stkel is NULL
Definition at line 126 of file stack_element.c.
void stack_element_copy | ( | StackElement_t * | dst, |
StackElement_t * | src | ||
) |
Copies the structure src into dst , as an assignement
The function destroys the content of dst and then makes the copy
dst | the address of the left term sructure (destination) |
src | the address of the right term structure (source) |
Definition at line 63 of file stack_element.c.
void stack_element_destroy | ( | StackElement_t * | stkel | ) |
Destroys the content of the fields of the structure stkel
The function releases any dynamic memory used by the structure and resets its state calling stac_element_init .
stkel | the address of the structure to destroy |
Definition at line 93 of file stack_element.c.
void stack_element_free | ( | StackElement_t * | stkel | ) |
Frees the memory space pointed by stkel
The function destroys the structure stkel and then frees its memory. The pointer stkel must have been returned by a previous call to stack_element_calloc or stack_element_clone .
If stkel is NULL
, no operation is performed.
stkel | the pointer to free |
Definition at line 143 of file stack_element.c.
void stack_element_init | ( | StackElement_t * | stkel | ) |
Inits the fields of the stkel structure with default values
stkel | the address of the structure to initalize |
Definition at line 45 of file stack_element.c.
void stack_element_print | ( | StackElement_t * | stkel, |
FILE * | stream, | ||
String_t | prefix | ||
) |
Prints the stack element declaration as it looks in the stack file
stkel | the address of the structure to print |
stream | the output stream (must be already open) |
prefix | a string to be printed as prefix at the beginning of each line |
Definition at line 163 of file stack_element.c.
void stack_element_print_power_map | ( | StackElement_t * | stkel, |
Dimensions_t * | dimensions, | ||
Source_t * | sources, | ||
FILE * | stream | ||
) |
Prints a matrix of source values as the power map of the stack element
stkel | pointer to the stack element to print |
dimensions | pointer to the structure storing the dimensions |
sources | pointer to the first element of the source array |
stream | the reference to the (already opened) stream |
Definition at line 290 of file stack_element.c.
void stack_element_print_thermal_map | ( | StackElement_t * | stkel, |
Dimensions_t * | dimensions, | ||
Temperature_t * | temperatures, | ||
FILE * | stream | ||
) |
Prints a matrix of temperatures as the thermal map of the stack element
stkel | pointer to the stack element to print |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the first element of the temparature array |
stream | the reference to the (already opened) stream |
Definition at line 229 of file stack_element.c.
bool stack_element_same_id | ( | StackElement_t * | stkel, |
StackElement_t * | other | ||
) |
Tests if two stack elements have the same Id
stkel | the first stack element |
other | the second stack element |
TRUE
if stkel and other have the same Id FALSE
otherwise Definition at line 156 of file stack_element.c.