|
3D-ICE 3.0.0
|
#include <stdio.h>#include "types.h"#include "string_t.h"#include "dimensions.h"#include "floorplan_matrix.h"#include "floorplan_element_list.h"#include "powers_queue.h"Go to the source code of this file.
Data Structures | |
| struct | Floorplan_t |
| The floorplan representing the IC as a set of floorplan elements. More... | |
Typedefs | |
| typedef struct Floorplan_t | Floorplan_t |
| typedef struct Floorplan_t Floorplan_t |
Definition of the type Floorplan_t
Definition at line 95 of file floorplan.h.
| Error_t fill_floorplan | ( | Floorplan_t * | floorplan, |
| Dimensions_t * | dimensions, | ||
| String_t | file_name | ||
| ) |
Parses the floorplan file and fills the floorplan structure
| floorplan | the floorplan structure to fill |
| dimensions | pointer to the structure storing the dimensions of the stack |
| file_name | path to the floorplan file to parse |
TDICE_FAILURE if the file cannot be opened or if the parsing of the floorplan fails TDICE_FAILURE otherwise Definition at line 170 of file floorplan.c.
| Error_t fill_sources_floorplan | ( | Floorplan_t * | floorplan, |
| Source_t * | sources | ||
| ) |
Fills the source vector corresponding to a floorplan
| floorplan | pointer to the floorplan placed on the source layer |
| sources | pointer to the location of the source vector that corresponds to the South-West thermal cell of the layer where the floorplan is placed |
TDICE_SUCCESS if the source vector has been filled correctly TDICE_FAILURE if it not possible to fill the source vector (at least one floorplan element with no power values in its queue) Definition at line 267 of file floorplan.c.
| Floorplan_t * floorplan_calloc | ( | void | ) |
Allocates memory for a structure of type Floorplan_t
The content of the new structure is set to default values calling floorplan_init
NULL if the memory allocation fails Definition at line 109 of file floorplan.c.
| Floorplan_t * floorplan_clone | ( | Floorplan_t * | floorplan | ) |
Allocates memory for a new copy of the structure floorplan
| floorplan | the address of the structure to clone |
NULL if the memory allocation fails NULL if the parameter floorplan is NULL Definition at line 122 of file floorplan.c.
| void floorplan_copy | ( | Floorplan_t * | dst, |
| Floorplan_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.c.
| void floorplan_destroy | ( | Floorplan_t * | floorplan | ) |
Destroys the content of the fields of the structure floorplan
The function releases any dynamic memory used by the structure and resets its state calling florplan_init .
| floorplan | the address of the structure to destroy |
Definition at line 93 of file floorplan.c.
| void floorplan_free | ( | Floorplan_t * | floorplan | ) |
Frees the memory space pointed by floorplan
The function destroys the structure floorplan and then frees its memory. The pointer floorplan must have been returned by a previous call to floorplan_calloc or floorplan_clone .
If floorplan is NULL, no operation is performed.
| floorplan | the pointer to free |
Definition at line 139 of file floorplan.c.
| void floorplan_init | ( | Floorplan_t * | floorplan | ) |
Inits the fields of the floorplan structure with default values
| floorplan | the address of the structure to initalize |
Definition at line 47 of file floorplan.c.
| void floorplan_print | ( | Floorplan_t * | floorplan, |
| FILE * | stream, | ||
| String_t | prefix | ||
| ) |
Prints the structure of the floorplan as it looks in the floorplan file
| floorplan | 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 152 of file floorplan.c.
| Temperature_t * get_all_avg_temperatures_floorplan | ( | Floorplan_t * | floorplan, |
| Dimensions_t * | dimensions, | ||
| Temperature_t * | temperatures, | ||
| Quantity_t * | n_floorplan_elements, | ||
| Temperature_t * | avg_temperatures | ||
| ) |
Returns the average temperature of each floorplan element in the given floorplan
| floorplan | pointer to the floorplan |
| dimensions | pointer to the structure storing the dimensions |
| temperatures | pointer to the temperature of the first thermal cell in the layer where floorplan is placed |
| n_floorplan_elements | (OUT) the number of floorplan elements |
| avg_temperatures | (IN/OUT) addres to the memory where temperatures will be written into. |
NULL. NULL Definition at line 405 of file floorplan.c.
| Temperature_t * get_all_gradient_temperatures_floorplan | ( | Floorplan_t * | floorplan, |
| Dimensions_t * | dimensions, | ||
| Temperature_t * | temperatures, | ||
| Quantity_t * | n_floorplan_elements, | ||
| Temperature_t * | gradient_temperatures | ||
| ) |
Returns the gradient temperature of each floorplan element in the given floorplan
| floorplan | pointer to the floorplan |
| dimensions | pointer to the structure storing the dimensions |
| temperatures | pointer to the temperature of the first thermal cell in the layer where floorplan is placed |
| n_floorplan_elements | (OUT) the number of floorplan elements |
| gradient_temperatures | (IN/OUT) addres to the memory where temperatures will be written into. |
NULL. NULL Definition at line 446 of file floorplan.c.
| Temperature_t * get_all_max_temperatures_floorplan | ( | Floorplan_t * | floorplan, |
| Dimensions_t * | dimensions, | ||
| Temperature_t * | temperatures, | ||
| Quantity_t * | n_floorplan_elements, | ||
| Temperature_t * | max_temperatures | ||
| ) |
Returns the maximum temperature of each floorplan element in the given floorplan
| floorplan | pointer to the floorplan |
| dimensions | pointer to the structure storing the dimensions |
| temperatures | pointer to the temperature of the first thermal cell in the layer where floorplan is placed |
| n_floorplan_elements | (OUT) the number of floorplan elements |
| max_temperatures | (IN/OUT) addres to the memory where temperatures will be written into. |
NULL. NULL Definition at line 325 of file floorplan.c.
| Temperature_t * get_all_min_temperatures_floorplan | ( | Floorplan_t * | floorplan, |
| Dimensions_t * | dimensions, | ||
| Temperature_t * | temperatures, | ||
| Quantity_t * | n_floorplan_elements, | ||
| Temperature_t * | min_temperatures | ||
| ) |
Returns the minimum temperature of each floorplan element in the given floorplan
| floorplan | pointer to the floorplan |
| dimensions | pointer to the structure storing the dimensions |
| temperatures | pointer to the temperature of the first thermal cell in the layer where floorplan is placed |
| n_floorplan_elements | (OUT) the number of floorplan elements |
| min_temperatures | (IN/OUT) addres to the memory where temperatures will be written into. |
NULL. NULL Definition at line 365 of file floorplan.c.
| FloorplanElement_t * get_floorplan_element | ( | Floorplan_t * | floorplan, |
| String_t | floorplan_element_id | ||
| ) |
Returns a pointer to a floorplan element in the floorplan
| floorplan | address of the floorplan |
| floorplan_element_id | id of the floorplan element as in the floorplan file |
NULL if floorplan_element_id does not exist Definition at line 244 of file floorplan.c.
| Quantity_t get_number_of_floorplan_elements_floorplan | ( | Floorplan_t * | floorplan | ) |
Returns the total number of floorplan elements in the floorplan
| floorplan | address of the Floorplan structure |
Definition at line 237 of file floorplan.c.
| Error_t insert_power_values_floorplan | ( | Floorplan_t * | floorplan, |
| PowersQueue_t * | pvalues | ||
| ) |
Inserts power values from pvaluse into each floorplan element
The queue pvalues must contain at least as many power values as floorplan elements in floorplan . Floorplan elements are considered in the same order as they appear in the floorplan file: the first element popped from pvalues (a fifo queue) goes to the first floorplan element in the flp file, the second to the second, etc ...
| floorplan | pointer to the floorplan |
| pvalues | pointer to the list of power values |
TDICE_FAILURE if the queue pvalues does not contain enough power values TDICE_SUCCESS otherwise Definition at line 297 of file floorplan.c.