3D-ICE 3.0.0
Data Structures | Typedefs | Functions
die.h File Reference
#include <stdio.h>
#include "types.h"
#include "string_t.h"
#include "floorplan.h"
#include "layer_list.h"

Go to the source code of this file.

Data Structures

struct  Die_t
 Structure used to store data about the dies that compose the 2D/3D stack. More...
 

Typedefs

typedef struct Die_t Die_t
 

Functions

void die_init (Die_t *die)
 
void die_copy (Die_t *dst, Die_t *src)
 
void die_destroy (Die_t *die)
 
Die_tdie_calloc (void)
 
Die_tdie_clone (Die_t *die)
 
void die_free (Die_t *die)
 
bool die_same_id (Die_t *die, Die_t *other)
 
void die_print (Die_t *die, FILE *stream, String_t prefix)
 

Typedef Documentation

◆ Die_t

typedef struct Die_t Die_t

Definition of the type Die_t

Definition at line 108 of file die.h.

Function Documentation

◆ die_calloc()

Die_t * die_calloc ( void  )

Allocates memory for a structure of type Die_t

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

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

Definition at line 92 of file die.c.

◆ die_clone()

Die_t * die_clone ( Die_t die)

Allocates memory for a new copy of the structure die

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

Definition at line 105 of file die.c.

◆ die_copy()

void die_copy ( Die_t dst,
Die_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 62 of file die.c.

◆ die_destroy()

void die_destroy ( Die_t die)

Destroys the content of the fields of the structure die

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

Parameters
diethe address of the structure to destroy

Definition at line 81 of file die.c.

◆ die_free()

void die_free ( Die_t die)

Frees the memory space pointed by die

The function destroys the structure die and then frees its memory. The pointer die must have been returned by a previous call to die_calloc or die_clone .

If die is NULL, no operation is performed.

Parameters
diethe pointer to free

Definition at line 122 of file die.c.

◆ die_init()

void die_init ( Die_t die)

Inits the fields of the die structure with default values

Parameters
diethe address of the structure to initalize

Definition at line 45 of file die.c.

◆ die_print()

void die_print ( Die_t die,
FILE *  stream,
String_t  prefix 
)

Prints the die declaration as it looks in the stack file

Parameters
diethe 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 142 of file die.c.

◆ die_same_id()

bool die_same_id ( Die_t die,
Die_t other 
)

Tests if two dies have the same Id

Parameters
diethe first die
otherthe second die
Returns
TRUE if die and other have the same Id
FALSE otherwise

Definition at line 135 of file die.c.