INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
|
Router management functions. More...
Functions | |
void | router_init (void) |
void | init_ports (long i) |
void | coords (long ad, long *cx, long *cy, long *cz) |
void | coords_icube (long ad, long *cx, long *cy, long *cz) |
void | init_network (void) |
Variables | |
port_type | p_inj_first |
The number of the first injection port. | |
port_type | p_inj_last |
The number of the last injection port. | |
port_type | p_con |
The number of the consumption port. | |
port_type | p_drop |
The number of the dropping port, for dropping in-transit traffic. |
Router management functions.
FSIN Functional Simulator of Interconnection Networks Copyright (2003-2011) J. Miguel-Alonso, A. Gonzalez, J. Navaridas
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
void coords | ( | long | ad, |
long * | cx, | ||
long * | cy, | ||
long * | cz | ||
) |
Calculates the coordinates of a node (X, Y, Z)
Each node have stored their own coordinates because they are used often.
ad | Address of the node. |
cx | Coordinate X is returned here. |
cy | Coordinate Y is returned here. |
cz | Coordinate Z is returned here. |
void coords_icube | ( | long | ad, |
long * | cx, | ||
long * | cy, | ||
long * | cz | ||
) |
Calculates the coordinates of a node (X, Y, Z) in a icube.
Each node have stored their own coordinates because they are used often.
ad | Address of the node. |
cx | Coordinate X is returned here. |
cy | Coordinate Y is returned here. |
cz | Coordinate Z is returned here. |
void init_network | ( | void | ) |
Initializes the network.
Gives the initial values to the simulation depending on the topology.
void init_ports | ( | long | i | ) |
Initializes transit and injection ports of a node.
All port's structures (queues, arbitration, requesting, ...) are prepared for transit and injection ports of the given router.
i | The node whose ports must be initilized. |
void router_init | ( | void | ) |
Initializes all the routers in the network.
Prepares all structures needed for the simulation (routers & all their stuff for requesting, arbitring & stating). Event queues & occurred list are initilized here if compiled with the TRACE_SUPPORT != 0 .