3D-ICE 3.0.0
|
#include <stdio.h>
#include "types.h"
#include "string_t.h"
#include "dimensions.h"
#include "ic_element_list.h"
#include "powers_queue.h"
Go to the source code of this file.
Data Structures | |
struct | FloorplanElement_t |
Structure containing information about a floorplan element. More... | |
Typedefs | |
typedef struct FloorplanElement_t | FloorplanElement_t |
typedef struct FloorplanElement_t FloorplanElement_t |
Definition of the type FloorplanElement_t
Definition at line 97 of file floorplan_element.h.
FloorplanElement_t * floorplan_element_calloc | ( | void | ) |
Allocates memory for a structure of type FloorplanElement_t
The content of the new structure is set to default values calling floorplan_element_init
NULL
if the memory allocation fails Definition at line 93 of file floorplan_element.c.
FloorplanElement_t * floorplan_element_clone | ( | FloorplanElement_t * | flpel | ) |
Allocates memory for a new copy of the structure flpel
flpel | the address of the structure to clone |
NULL
if the memory allocation fails NULL
if the parameter flpel is NULL
Definition at line 108 of file floorplan_element.c.
void floorplan_element_copy | ( | FloorplanElement_t * | dst, |
FloorplanElement_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 60 of file floorplan_element.c.
void floorplan_element_destroy | ( | FloorplanElement_t * | flpel | ) |
Destroys the content of the fields of the structure flpel
The function releases any dynamic memory used by the structure and resets its state calling floorplan_element_init .
flpel | the address of the structure to destroy |
Definition at line 80 of file floorplan_element.c.
void floorplan_element_free | ( | FloorplanElement_t * | flpel | ) |
Frees the memory space pointed by flpel
The function destroys the structure flpel and then frees its memory. The pointer flpel must have been returned by a previous call to floorplan_element_calloc or floorplan_element_clone .
If flpel is NULL
, no operation is performed.
flpel | the pointer to free |
Definition at line 125 of file floorplan_element.c.
void floorplan_element_init | ( | FloorplanElement_t * | flpel | ) |
Inits the fields of the flpel structure with default values
flpel | the address of the structure to initalize |
Definition at line 46 of file floorplan_element.c.
void floorplan_element_print | ( | FloorplanElement_t * | flpel, |
FILE * | stream, | ||
String_t | prefix | ||
) |
Prints the floorplan element structure as it looks in the floorplan file
flpel | 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 149 of file floorplan_element.c.
bool floorplan_element_same_id | ( | FloorplanElement_t * | flpel, |
FloorplanElement_t * | other | ||
) |
Tests if two floorplan elements have the same Id
flpel | the first floorplan element |
other | the second floorplan element |
TRUE
if flpel and other have the same Id FALSE
otherwise Definition at line 138 of file floorplan_element.c.
Temperature_t get_avg_temperature_floorplan_element | ( | FloorplanElement_t * | flpel, |
Dimensions_t * | dimensions, | ||
Temperature_t * | temperatures | ||
) |
Returns the average temperature of the floorplan element
flpel | pointer to the floorplan element |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where flpel is placed |
Definition at line 268 of file floorplan_element.c.
Temperature_t get_gradient_temperature_floorplan_element | ( | FloorplanElement_t * | flpel, |
Dimensions_t * | dimensions, | ||
Temperature_t * | temperatures | ||
) |
Returns the gradient temperature of the floorplan element
flpel | pointer to the floorplan element |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where flpel is placed |
Definition at line 294 of file floorplan_element.c.
Temperature_t get_max_temperature_floorplan_element | ( | FloorplanElement_t * | flpel, |
Dimensions_t * | dimensions, | ||
Temperature_t * | temperatures | ||
) |
Returns the maximum temperature of the floorplan element
flpel | pointer to the floorplan element |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where the floorplan element is placed |
Definition at line 192 of file floorplan_element.c.
Temperature_t get_min_temperature_floorplan_element | ( | FloorplanElement_t * | flpel, |
Dimensions_t * | dimensions, | ||
Temperature_t * | temperatures | ||
) |
Returns the minimum temperature of the floorplan element
flpel | pointer to the floorplan element |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where the floorplan element is placed |
Definition at line 230 of file floorplan_element.c.
Error_t insert_power_values_floorplan_element | ( | FloorplanElement_t * | flpel, |
PowersQueue_t * | pvalues | ||
) |
Moves one power value from pvalues into flpel
The queue pvalues must contain at least one power value
flpel | pointer to the floorplan element |
pvalues | pointer to the list of power values |
TDICE_FAILURE
if the queue pvalues is empty TDICE_SUCCESS
otherwise Definition at line 175 of file floorplan_element.c.