3D-ICE 3.0.0
Data Structures | Typedefs | Functions
inspection_point.h File Reference
#include <stdio.h>
#include "types.h"
#include "string_t.h"
#include "dimensions.h"
#include "floorplan_element.h"
#include "stack_element.h"
#include "network_message.h"

Go to the source code of this file.

Data Structures

struct  InspectionPoint_t
 Structure containing info about the output to be printed while simulating. More...
 

Typedefs

typedef struct InspectionPoint_t InspectionPoint_t
 

Functions

void inspection_point_init (InspectionPoint_t *ipoint)
 
void inspection_point_copy (InspectionPoint_t *dst, InspectionPoint_t *src)
 
void inspection_point_destroy (InspectionPoint_t *ipoint)
 
InspectionPoint_tinspection_point_calloc (void)
 
InspectionPoint_tinspection_point_clone (InspectionPoint_t *ipoint)
 
void inspection_point_free (InspectionPoint_t *ipoint)
 
bool inspection_point_same_filename (InspectionPoint_t *ipoint, InspectionPoint_t *other)
 
void inspection_point_print (InspectionPoint_t *ipoint, FILE *stream, String_t prefix)
 
void align_tcell (InspectionPoint_t *ipoint, ChipDimension_t xval, ChipDimension_t yval, Dimensions_t *dimensions)
 
bool is_inspection_point (InspectionPoint_t *ipoint, OutputType_t type, OutputQuantity_t quantity)
 
Error_t generate_inspection_point_header (InspectionPoint_t *ipoint, Dimensions_t *dimensions, String_t prefix)
 
Error_t generate_inspection_point_output (InspectionPoint_t *ipoint, Dimensions_t *dimensions, Temperature_t *temperatures, Source_t *sources, Time_t current_time)
 
void fill_message_inspection_point (InspectionPoint_t *ipoint, OutputQuantity_t output_quantity, Dimensions_t *dimensions, Temperature_t *temperatures, Source_t *sources, NetworkMessage_t *message)
 

Typedef Documentation

◆ InspectionPoint_t

definition of the type InspectionPoint_t

Definition at line 123 of file inspection_point.h.

Function Documentation

◆ align_tcell()

void align_tcell ( InspectionPoint_t ipoint,
ChipDimension_t  xval,
ChipDimension_t  yval,
Dimensions_t dimensions 
)

Aligns the Tcell inspection point to the grid of thermal cells

The function computes the values ActualXval, ActualYval, RowIndex and ColumnIndex while XVal and YVal are set to xval and yval

Parameters
ipointthe pointer to the Tcell inspection point to align
xvalthe requested X coordinate of the cell
yvalthe requested Y coordinate of the cell
dimensionsthe address of the dimension structure

Definition at line 266 of file inspection_point.c.

◆ fill_message_inspection_point()

void fill_message_inspection_point ( InspectionPoint_t ipoint,
OutputQuantity_t  output_quantity,
Dimensions_t dimensions,
Temperature_t temperatures,
Source_t sources,
NetworkMessage_t message 
)

Fills a message with the output implemented by the inspection point

Parameters
ipointthe address of the InspectionPoint structure
output_quantitythe quantity to report (max, min, avg)
dimensionsthe address of the dimension structure
temperaturespointer to the first element of the temparature array
sourcespointer to the first element of the source array
messagethe message to fill

Definition at line 855 of file inspection_point.c.

◆ generate_inspection_point_header()

Error_t generate_inspection_point_header ( InspectionPoint_t ipoint,
Dimensions_t dimensions,
String_t  prefix 
)

Generates the file in which a particular inspection point will be printed

Parameters
ipointthe address of the InspectionPoint structure
dimensionsthe address of the dimension structure
prefixstring to be printed as suffix for every line in the header
Returns
FIXME

Definition at line 349 of file inspection_point.c.

◆ generate_inspection_point_output()

Error_t generate_inspection_point_output ( InspectionPoint_t ipoint,
Dimensions_t dimensions,
Temperature_t temperatures,
Source_t sources,
Time_t  current_time 
)

Generates the output implemented by the inspection point

Parameters
ipointthe address of the InspectionPoint structure
dimensionsthe address of the dimension structure
temperaturespointer to the first element of the temparature array
sourcespointer to the first element of the source array
current_timetime instant of the measurement
Returns
FIXME

Definition at line 570 of file inspection_point.c.

◆ inspection_point_calloc()

InspectionPoint_t * inspection_point_calloc ( void  )

Allocates memory for a structure of type InspectionPoint_t

The content of the new structure is set to default values calling inspection_point_init

Returns
the pointer to the new structure
NULL if the memory allocation fails

Definition at line 94 of file inspection_point.c.

◆ inspection_point_clone()

InspectionPoint_t * inspection_point_clone ( InspectionPoint_t ipoint)

Allocates memory for a new copy of the structure ipoint

Parameters
ipointthe address of the structure to clone
Returns
a pointer to a new structure
NULL if the memory allocation fails
NULL if the parameter ipoint is NULL

Definition at line 109 of file inspection_point.c.

◆ inspection_point_copy()

void inspection_point_copy ( InspectionPoint_t dst,
InspectionPoint_t src 
)

Copies the structure src into dst , as an assignement

The function destroys the content of dst and then makes the copy

Parameters
dstthe address of the left term sructure (destination)
srcthe address of the right term structure (source)

Definition at line 64 of file inspection_point.c.

◆ inspection_point_destroy()

void inspection_point_destroy ( InspectionPoint_t ipoint)

Destroys the content of the fields of the structure ipoint

The function releases any dynamic memory used by the structure and resets its state calling inspection_point_init .

Parameters
ipointthe address of the structure to destroy

Definition at line 85 of file inspection_point.c.

◆ inspection_point_free()

void inspection_point_free ( InspectionPoint_t ipoint)

Frees the memory space pointed by ipoint

The function destroys the structure ipoint and then frees its memory. The pointer ipoint must have been returned by a previous call to inspection_point_calloc or inspection_point_clone .

If ipoint is NULL, no operation is performed.

Parameters
ipointthe pointer to free

Definition at line 126 of file inspection_point.c.

◆ inspection_point_init()

void inspection_point_init ( InspectionPoint_t ipoint)

Inits the fields of the ipoint structure with default values

Parameters
ipointthe address of the structure to initalize

Definition at line 45 of file inspection_point.c.

◆ inspection_point_print()

void inspection_point_print ( InspectionPoint_t ipoint,
FILE *  stream,
String_t  prefix 
)

Prints the insection point declaration as it looks in the stack file

Parameters
ipointthe address of the structure to print
streamthe output stream (must be already open)
prefixa string to be printed as prefix at the beginning of each line

Definition at line 150 of file inspection_point.c.

◆ inspection_point_same_filename()

bool inspection_point_same_filename ( InspectionPoint_t ipoint,
InspectionPoint_t other 
)

Tests if two insection points generates he output into the same file

Parameters
ipointthe first inspection point
otherthe second inspection point
Returns
TRUE if ipoint and other have the same FileName
FALSE otherwise

Definition at line 139 of file inspection_point.c.

◆ is_inspection_point()

bool is_inspection_point ( InspectionPoint_t ipoint,
OutputType_t  type,
OutputQuantity_t  quantity 
)

Checks if the inspection point has a specific set up

Parameters
ipointthe address of the InspectionPoint structure
typethe type of the inspection point (tcell, tmap, ...)
quantitythe quantity to be measured (max, min, avg)
Returns
true if ipoint has type type and quantity quantity, false otherwise

Definition at line 310 of file inspection_point.c.