INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
Defines | Functions | Variables
C:/cygwin/home/Javier/insee/src/globals.h File Reference

Declaration of all global variables & functions. More...

#include "packet.h"
#include "constants.h"
#include "literal.h"
#include "misc.h"
#include "phit.h"
#include "queue.h"
#include "event.h"
#include "router.h"
#include "pkt_mem.h"
#include "batch.h"
#include <math.h>
#include <time.h>
#include <limits.h>
Include dependency graph for globals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define packet_size_in_phits   pkt_len

Functions

void run_network_shotmode (void)
void run_network_batch (void)
void init_injection (void)
void data_generation (long i)
void data_injection (long i)
void datagen_oneshot (bool_t reset)
void generate_pkt (long i)
port_type select_input_port_shortest (long i, long dest)
port_type select_input_port_dor_only (long i, long dest)
port_type select_input_port_dor_shortest (long i, long dest)
port_type select_input_port_shortest_profitable (long i, long dest)
port_type select_input_port_lpath (long i, long dest)
void reserve (long i, port_type d_p, port_type s_p)
void arbitrate_init (void)
void arbitrate_cons_single (long i)
void arbitrate_cons_multiple (long i)
void arbitrate_direct (long i, port_type d_p)
void arbitrate_icube (long i, port_type d_p)
void arbitrate_trees (long i, port_type d_p)
port_type arbitrate_select_fifo (long i, port_type d_p, port_type first, port_type last)
port_type arbitrate_select_longest (long i, port_type d_p, port_type first, port_type last)
port_type arbitrate_select_round_robin (long i, port_type d_p, port_type first, port_type last)
port_type arbitrate_select_random (long i, port_type d_p, port_type first, port_type last)
port_type arbitrate_select_age (long i, port_type d_p, port_type first, port_type last)
void request_ports_init (void)
void request_port_bubble_oblivious (long i, port_type s_p)
void request_port_bubble_adaptive_random (long i, port_type s_p)
void request_port_bubble_adaptive_shortest (long i, port_type s_p)
void request_port_bubble_adaptive_smart (long i, port_type s_p)
void request_port_double_oblivious (long i, port_type s_p)
void request_port_double_adaptive (long i, port_type s_p)
void request_port_hexa_oblivious (long i, port_type s_p)
void request_port_hexa_adaptive (long i, port_type s_p)
void request_port_dally_trc (long i, port_type s_p)
void request_port_dally_basic (long i, port_type s_p)
void request_port_dally_improved (long i, port_type s_p)
void request_port_dally_adaptive (long i, port_type s_p)
void request_port_bimodal_random (long i, port_type s_p)
void request_port_tree (long i, port_type s_p)
void request_port_icube (long i, port_type s_p)
void request_port_icube_IB (long i, port_type s_p)
bool_t check_rr_dim_o_r (packet_t *pkt, dim *d_d, way *d_w)
bool_t check_rr_dir_o_r (packet_t *pkt, dim *d_d, way *d_w)
bool_t check_rr_fattree (packet_t *pkt, dim *d_d, way *d_w)
bool_t check_rr_fattree_adaptive (packet_t *pkt, dim *d, way *w)
bool_t check_rr_thintree_adaptive (packet_t *pkt, dim *d, way *w)
bool_t check_rr_slimtree_adaptive (packet_t *pkt, dim *d, way *w)
bool_t check_rr_icube_adaptive (packet_t *pkt, dim *d, way *w)
bool_t check_rr_icube_static_IB (packet_t *pkt, dim *d, way *w)
bool_t check_rr_fattree_static (packet_t *pkt, dim *d, way *w)
bool_t check_rr_thintree_static (packet_t *pkt, dim *d, way *w)
bool_t check_rr_slimtree_static (packet_t *pkt, dim *d, way *w)
bool_t check_rr_icube_static (packet_t *pkt, dim *d, way *w)
void phit_away (long, port_type, phit)
void consume_single (long i)
void consume_multiple (long i)
void advance (long n, long p)
void data_movement_direct (bool_t inject)
void data_movement_indirect (bool_t inject)
void init_functions (void)
void stats (long i)
void reset_stats (void)
void router_init (void)
void init_network (void)
void coords (long ad, long *cx, long *cy, long *cz)
void coords_icube (long ad, long *cx, long *cy, long *cz)
long torus_neighbor (long ad, dim wd, way ww)
long midimew_neighbor (long ad, dim wd, way ww)
long dtt_neighbor (long ad, dim wd, way ww)
routing_r torus_rr (long source, long destination)
routing_r torus_rr_unidir (long source, long destination)
routing_r mesh_rr (long source, long destination)
routing_r midimew_rr (long source, long destination)
routing_r dtt_rr (long source, long destination)
routing_r dtt_rr_unidir (long source, long destination)
routing_r icube_rr (long source, long destination)
routing_r icube_4mesh_rr (long source, long destination)
routing_r icube_1mesh_rr (long source, long destination)
routing_r fattree_rr_adapt (long source, long destination)
routing_r thintree_rr_adapt (long source, long destination)
routing_r slimtree_rr_adapt (long source, long destination)
void create_fattree ()
void create_slimtree ()
void create_thintree ()
void create_icube ()
void get_conf (long, char **)
void print_headers (void)
void print_partials (void)
void print_results (time_t, time_t)
void results_partial (void)
void save_batch_results ()
void print_batch_results (batch_t *b)
void print_batch_results_vast (batch_t *b)
void init_queue (queue *q)
void pkt_init ()
void free_pkt (unsigned long n)
unsigned long get_pkt ()
void read_trace ()
void run_network_trc ()
void init_event (event_q *q)
void ins_event (event_q *q, event i)
void do_event (event_q *q, event *i)
event head_event (event_q *q)
void rem_head_event (event_q *q)
bool_t event_empty (event_q *q)
void init_occur (event_l *l)
void ins_occur (event_l *l, event i)
bool_t occurred (event_l *l, event i)
void init_exd (long, long, long, long, long)
void run_network_exd (void)

Variables

long radix
 Radix of each router.
long ndim
long nstages
 Number of stages for indirect topologies.
long stDown
 Number of links down in a slim/thin tree. It also refeers to the number of nodes attached to a switching element in fattree and indirect cube .
long stUp
 Number of links up in a slim tree.
long NUMNODES
 Total number of nodes.
long nprocs
 Total number nodes that are able to inject.
long n_ports
 Total number of ports in each router.
long r_seed
 Random Seed.
long nodes_x
 Nodes in dimension X.
long nodes_y
 Nodes in dimension Y.
long nodes_z
 Nodes in dimension Z.
long binj_cap
 Injection buffer capacity (in packets).
long ninj
 Number of injectors in each router.
routernetwork
 An array of routers containing the system.
long ** destinations
 Matrix containing map of source/destination pairs at consumption (destination).
long ** sources
 Matrix containing map of source/destination pairs at injection (source).
long * con_dst
 Histograms of distance at consumption (source).
long * inj_dst
 Histograms of distance at injection (source).
long max_dst
 Size of distance histograms.
long * source_ports
 Array that contains the source ports for the monitored node.
long * dest_ports
 Array that contains the destination ports for the monitored node.
long * port_utilization
 Array that contains the port utilization of the monitored node.
double sent_count
 Number of packets sent. (stats)
double injected_count
 Number of packets injected. (stats)
double rcvd_count
 Number of packets received. (stats)
double last_rcvd_count
 Number of packets received before the start of the present batch. (stats)
double dropped_count
 Number of packets dropped. (stats)
double transit_dropped_count
 Number of in-transit packets dropped. (stats)
double last_tran_drop_count
 Number of in-transit packets dropped before the start of the present batch. (stats)
long pnodes_x
 Nodes in dimension X of the submesh for icube placement.
long pnodes_y
 Nodes in dimension Y of the submesh for icube placement.
long pnodes_z
 Nodes in dimension Z of the submesh for icube placement.
long faults
 Number of broken links.
double msg_sent_count [3]
 Number of Message sent of each type. (bimodal stats)
double msg_injected_count [3]
 Number of Message injected of each type. (bimodal stats)
double msg_rcvd_count [3]
 Number of Message received of each type. (bimodal stats)
double msg_acum_delay [3]
 Accumulative delay of each message type. (bimodal stats)
double msg_acum_inj_delay [3]
 Accumulative injection delay of each message type. (bimodal stats)
long msg_max_delay [3]
 Maximum delay of each message type. (bimodal stats)
long msg_max_inj_delay [3]
 Maximum injection delay of each message type. (bimodal stats)
double msg_acum_sq_delay [3]
 Accumulative square delay of each message type. (bimodal stats)
double msg_acum_sq_inj_delay [3]
 Accumulative square injection delay of each message type. (bimodal stats)
long msglength
 The length of the long messages (in packets) for bimodal traffic.
double lm_prob
 Probability of inject a long message in bimodal traffic(in packets).
double lm_percent
 Probability of inject a long message in bimodal traffic(in messages).
long sim_clock
 Simulation clock.
long last_reset_time
 Time in which the last reset has been performed.
long bub_adap [2]
 Bubble to adaptive channels.
long bub_x
 Bubble to X Dimension Escape Channels. Usually equal to Y,Z.
long bub_y
 Bubble to Y Dimension Escape Channels. Usually equal to X,Z.
long bub_z
 Bubble to Z Dimension Escape Channels. Usually equal to X,Y.
topo_t topo
long plevel
long pheaders
long bheaders
long pinterval
 Interval to print information about the system state.
long extract
 Extract packets from head of the injection queue when they cannot be injected.
long monitored
 Monitored node.
double intransit_pr
 Priority given to in-transit traffic.
double inj_phit_count
 Number of phits sent. (stats)
double sent_phit_count
 Number of phits injected. (stats)
double rcvd_phit_count
 Number of phits received. (stats)
double dropped_phit_count
 Number of phits dropped. (stats)
long(* neighbor )(long ad, dim wd, way ww)
routing_r(* calc_rr )(long source, long destination)
void(* request_port )(long i, port_type s_p)
void(* arbitrate_cons )(long i)
port_type(* arbitrate_select )(long i, port_type d_p, port_type first, port_type last)
void(* consume )(long i)
bool_t(* check_rr )(packet_t *pkt, dim *d_d, way *d_w)
port_type(* select_input_port )(long i, long dest)
void(* data_movement )(bool_t inject)
void(* arbitrate )(long i, port_type d_p)
double load
 The provided injected load.
double trigger_rate
 Probability to trigger new packets when a packet is received.
long aload
 Provided load multiplied by RAND_MAX used in injection.
long lm_load
 Actual long message load multiplied by RAND_MAX used in bimodal injection.
long trigger
 Provided trigger_rate multiplied by RAND_MAX used in reactive traffic.
long trigger_max
 Maximum of packets triggered.
long trigger_min
 Minimum of packets triggered.
long trigger_dif
 Random interval == 1 + trigger_max - trigger_min.
double global_q_u
double global_q_u_current
vc_management_t vc_management
routing_t routing
traffic_pattern_t pattern
cons_mode_t cons_mode
arb_mode_t arb_mode
req_mode_t req_mode
inj_mode_t inj_mode
placement_t placement
long shift
 Number of places for shift placement.
long trace_nodes
 Number of tasks in the trace.
long trace_instances
 Number of instances of the trace to simulate.
char placefile [128]
bool_t drop_packets
 Drop packets that have no room in the injection queue.
bool_t parallel_injection
 Allows/Disallows the parallel injection (inject some packets in the same cycle & router).
bool_t shotmode
 Are the system running in shotmode.
long shotsize
 Size of each shot (in packets per node)
double global_cc
 Global congestion control. Percent of the system recurses used.
long timeout_upper_limit
 Timeout limit to enter in congested mode.
long timeout_lower_limit
 Timeout limit to leave congested mode.
long update_period
 Period taken to calculate the global ocupation.
long total_shot_size
 Number of packets in each shot.
batch_tbatch
 Array to save all the batchs' stats.
long samples
 Number of samples (batchs or shots) to take from the current Simulation.
long batch_time
 Sampling period.
double threshold
 Threshold to accept convergency.
long warm_up_period
 Number of 'oblivious' cycles until start convergency asurement simulation.
long warmed_up
 The cycle in wich warming are really finished.
long conv_period
 Convergency estimation sampling period.
long max_conv_time
 Maximum time for Convergency estimation.
long min_batch_size
 Minimum number of reception in a batch to save stats.
double acum_delay
 Accumulative delay. (stats)
double acum_inj_delay
 Accumulative injection delay. (stats)
long max_delay
 Maximum delay. (stats)
long max_inj_delay
 Maximum injection delay. (stats)
double acum_sq_delay
 Accumulative square delay. (stats)
double acum_sq_inj_delay
 Accumulative square injection delay. (stats)
double acum_hops
 Accumulative number of hops. (stats)
long nodes_per_switch
 The number of nodes attached to each switch.
long links_per_direction
 The number of parallel links in each direction.
long pkt_len
 Length of FSIN packets in phits.
long phit_size
 Size, in bytes, of a phit. Used in application-driven simulation for splitting mpi messages into packets.
long buffer_cap
 Transit buffer capacity (in packets).
long tr_ql
long inj_ql
dimport_coord_dim
 An array containig the dimension for each port.
wayport_coord_way
 An array containig the direction (way) for each port.
channelport_coord_channel
 An array containig the number of virtual channel for each port.
packet_tpkt_space
long pkt_max
char trcfile [128]
bool_t go_on
 While this is TRUE the simulation will go on!
long reseted
 Number of resets.
FILE * fp
 A pointer to a file. Used for several purposes.
char file [128]
port_type last_port_arb_con
void(* run_network )(void)
long nchan
 Number of Virtual Channels.
long nways
 Number of ways. (unidir. / bidir.)
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.
port_type p_inj_first
 The number of the first injection port.
port_type p_inj_last
 The number of the last injection port.
literal_t vc_l []
literal_t routing_l []
literal_t rmode_l []
literal_t atype_l []
literal_t ctype_l []
literal_t pattern_l []
literal_t topology_l []
literal_t injmode_l []
literal_t placement_l []
long sk_xy
 Skew from X to Y.
long sk_xz
 Skew from X to Z.
long sk_yx
 Skew from Y to X.
long sk_yz
 Skew from Y to Z.
long sk_zx
 Skew from Z to X.
long sk_zy
 Skew from Z to Y.
long fsin_cycle_relation
long simics_cycle_relation
long serv_addr
long num_periodos_espera
long num_executions
 Number of executions, appended to the output filename.

Detailed Description

Declaration of all global variables & functions.

FSIN Functional Simulator of Interconnection Networks Copyright (2003-2011) J. Miguel-Alonso, 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.


Function Documentation

void advance ( long  n,
long  p 
)

Advance packets.

Move a phit from an output port to the corresponding input port in the neighbour

Parameters:
nThe number of the node.
pThe physichal port id to advance.
void arbitrate_cons_multiple ( long  i)

Performs consumption of all phits that have arrived to a node.

For "multiple" consumption, all input ports can access to the consumption port.

Parameters:
iThe node in which the consumption is performed.
void arbitrate_cons_single ( long  i)

Performs consumption of a single phit.

For "single" consumption, the consumption port (just one) is arbitrated just like any other one.

Parameters:
iThe node in which the consumption is performed.
void arbitrate_direct ( long  i,
port_type  d_p 
)

Main arbitration function for direct topologies. Implements the virtual function arbitrate.

An output port can be assigned to an input port in a range [first, last) If IPR allows it, all input ports (transit + injection) are in the range [0, p_con). If not, we check the range of transit ports [0, p_inj_first) and, later, if not assignment has been done, we check the range of injection ports [p_inj_first, <p_con). NOTE that the last port in the range is NOT included in the arbitration. Actual selection is done by arbitrate_select(), which make take different values: arbitrate_select_fifo(), etc.

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
See also:
arbitrate
arbitrate_select
arbitrate_select_fifo
arbitrate_select_longest
arbitrate_select_round_robin
arbitrate_select_random
arbitrate_select_age
void arbitrate_icube ( long  i,
port_type  d_p 
)

Main arbitration function for the indirect cube . Implements the virtual function arbitrate.

This functions will only check those ports that make sense: the NIC when arbitrating a consumption port, the injection ports when arbitrating a NIC, all the transit ports when arbitrating a switch. NOTE that the transit ports can be affected by the Intransit Priority Restriction. In that case, ports that are connected to the NICS are checked in a second round.

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
See also:
arbitrate
arbitrate_select
arbitrate_select_fifo
arbitrate_select_longest
arbitrate_select_round_robin
arbitrate_select_random
arbitrate_select_age
void arbitrate_init ( void  )

Initialization of the structures needed to perform arbitration.

port_type arbitrate_select_age ( long  i,
port_type  d_p,
port_type  first,
port_type  last 
)

Select the port containing the first injected packet.

Given a range of input-injection ports, select the one with the oldest packet, measured since it was injected.

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
firstThe first port for looking to.
lastThe next port from the last to looking to. This port is not included.
Returns:
The selected port, or NULL_PORT if there isnt anyone.
See also:
arbitrate
port_type arbitrate_select_fifo ( long  i,
port_type  d_p,
port_type  first,
port_type  last 
)

Select the port that requested the port first of all the given ports.

Given a range of input-injection ports, select the one that requested the output port first Time of request is stored in network[i].p[d_p].req[s_p].

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
firstThe first port for looking to.
lastThe next port from the last to looking to. This port is not included.
Returns:
The selected port, or NULL_PORT if there isnt anyone.
See also:
arbitrate
arbitrate_select
port_type arbitrate_select_longest ( long  i,
port_type  d_p,
port_type  first,
port_type  last 
)

Select the port with the biggest queue length.

Given a range of input-injection ports, select the one whose queue occupation is longer. We take a look to the queues in a round-robin fashion, starting with the last lucky input port (network[i].p[d_p].ri), if several ports have the same occupation, the first visited will be the selected one.

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
firstThe first port for looking to.
lastThe next port from the last to looking to. This port is not included.
Returns:
The selected port, or NULL_PORT if there isnt anyone.
See also:
arbitrate
arbitrate_select
port_type arbitrate_select_random ( long  i,
port_type  d_p,
port_type  first,
port_type  last 
)

Random selection of a port.

Given a range of input-injection ports, select one of them randomly.

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
firstThe first port for looking to.
lastThe next port from the last to looking to. This port is not included.
Returns:
The selected port, or NULL_PORT if there isnt anyone.
See also:
arbitrate
port_type arbitrate_select_round_robin ( long  i,
port_type  d_p,
port_type  first,
port_type  last 
)

Select the next occupied port using round-robin.

Given a range of input-injection ports, select one in a round-robin fashion. The last used is stored in network[i].p[d_p].ri

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
firstThe first port for looking to.
lastThe next port from the last to looking to. This port is not included.
Returns:
The selected port, or NULL_PORT if there isnt anyone.
See also:
arbitrate
arbitrate_select
void arbitrate_trees ( long  i,
port_type  d_p 
)

Main arbitration function for the trees. Implements the virtual function arbitrate.

This functions will only check those ports that make sense: the NIC when arbitrating a consumption port, the injection ports when arbitrating a NIC, all the transit ports when arbitrating a switch.

Parameters:
iThe node in which the arbitration is performed.
d_pThe destination port for wich the arbitration is performed.
See also:
arbitrate
arbitrate_select
arbitrate_select_fifo
arbitrate_select_longest
arbitrate_select_round_robin
arbitrate_select_random
arbitrate_select_age
bool_t check_rr_dim_o_r ( packet_t pkt,
dim d,
way w 
)

Routes using Dimesion order routing.

Checks a routing record and indicates the direction/way of choice, following the dimension order routing algorithm. (order: x+ x- y+ y- z+ z-)

Parameters:
pktThe packet to route.
dThe desired dimesion is returned here.
wThe elected direction (way) is returned here.
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_dir_o_r ( packet_t pkt,
dim d,
way w 
)

Routes using Direction order routing.

Checks a routing record and indicates the direction/way of choice, following the direction order routing algorithm. (order: x+ y+ z+ x- y- z-)

Parameters:
pktThe packet to route.
dThe selected dimesion is returned here.
wThe chosen direction (way) is returned here.
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_fattree_adaptive ( packet_t pkt,
dim d,
way w 
)

Routes in a fattree.

Adaptive routing in fattrees.

Parameters:
pktThe packet to route.
dThe desired port is returned here.
wThe elected direction (way) is returned here (always UP).
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_fattree_static ( packet_t pkt,
dim d,
way w 
)

Routes in a fattree.

Static routing in fattrees. Upward path depends on the source. Downward path depends on the destination(as always).

Parameters:
pktThe packet to route.
dThe desired port is returned here.
wThe elected direction (way) is returned here (always UP).
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_icube_adaptive ( packet_t pkt,
dim d,
way w 
)

Fully adaptive routing in a icube using Virtual channels.

Each physical has an ESCAPE (Bubble) subchannel plus 'nchan-1' adaptive VC. Adaptive routing selects between all the profitable VC in all physical links. Checks a routing record and indicates the direction/way of choice, following the less congested channel, but using minimal paths. It chooses the profitable channel with more credits.

Parameters:
pktThe packet to route.
dThe desired dimesion is returned here.
wThe elected direction (way) is returned here.
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_icube_static ( packet_t pkt,
dim d,
way w 
)

Routes using dimesion order routing in a icube (adaptive between parallel links).

Checks a routing record and indicates the direction/way of choice, following the dimension order routing algorithm. (order: x+ x- y+ y- z+ z-). It also chooses the physichal channel with more credits. Bubble is used to avoid deadlock.

Parameters:
pktThe packet to route.
dThe desired dimesion is returned here.
wThe elected direction (way) is returned here.
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_icube_static_IB ( packet_t pkt,
dim d,
way w 
)

Routes using dimesion order routing in an indirect cube split into independent meshes (for IB-based simul.)

Checks a routing record and indicates the direction/way of choice, following the dimension order routing algorithm. (order: x+ x- y+ y- z+ z-). Mesh + DOR is used to avoid deadlock.

Parameters:
pktThe packet to route.
dThe desired dimesion is returned here.
wThe elected direction (way) is returned here.
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_slimtree_adaptive ( packet_t pkt,
dim d,
way w 
)

Routes in a slimtree.

Adaptive routing in slimtrees.

Parameters:
pktThe packet to route.
dThe desired port is returned here.
wThe elected direction (way) is returned here (always UP).
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_slimtree_static ( packet_t pkt,
dim d,
way w 
)

Routes in a slimtree.

Static routing in slimtrees. Not implemented yet

Parameters:
pktThe packet to route.
dThe desired port is returned here.
wThe elected direction (way) is returned here (always UP).
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
bool_t check_rr_thintree_adaptive ( packet_t pkt,
dim d,
way w 
)

Routes in a thintree.

Adaptive routing in thintrees.

Parameters:
pktThe packet to route.
dThe desired port is returned here.
wThe elected direction (way) is returned here (always UP).
Returns:
TRUE if the phit has reached its final destination.
See also:
init_functions
check_rr
bool_t check_rr_thintree_static ( packet_t pkt,
dim d,
way w 
)

Routes in a thintree.

Static routing in thintrees. Upward path depends on the source. Downward path depends on the destination(as always).

Parameters:
pktThe packet to route.
dThe desired port is returned here.
wThe elected direction (way) is returned here (always UP).
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
check_rr
void consume_multiple ( long  i)

Consume one/many phits.

This is the "multiple" version, meaning that in a cycle it is possible to consume phits from all VCs.

Parameters:
iThe number of the node in which the consumption is performed.
void consume_single ( long  i)

Consume a single phit.

This "Single" version is used when there is a single consumption port, shared among all the VCs. Arbitration is required.

Parameters:
iThe number of the node in which the consumption is performed.
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.

Parameters:
adAddress of the node.
cxCoordinate X is returned here.
cyCoordinate Y is returned here.
czCoordinate Z is returned here.
See also:
router.rcoord
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.

Parameters:
adAddress of the node.
cxCoordinate X is returned here.
cyCoordinate Y is returned here.
czCoordinate Z is returned here.
See also:
router.rcoord
void create_fattree ( )

Creates a fat tree topology.

This function defines all the links between the elements in the network.

void create_icube ( )

Creates an indirect cube topology.

This function links all the elements within the network.

void create_slimtree ( )

Creates a slim tree topology.

This function defines all the links between the elements in the network.

void create_thintree ( )

Creates a thin tree topology.

This function defines all the links between the elements in the network.

void data_generation ( long  i)

Generates data when allowed.

Injection may be stopped by the global congestion control, by the parameter mpackets in fsin.conf, or by the shot mode when a burst is finished.

Parameters:
iThe node in which the data must be generated.
void data_injection ( long  i)

Moves data from an injection buffer to an injection queue.

Performs data movement from an injection buffer, which is used for data transmision between the router and its node processor(s), to the injection port which takes part in the router logic.

Parameters:
iThe node in which the injection is performed.
void data_movement_direct ( bool_t  inject)

Performs the movement of the data in a direct topology.

Parameters:
injectIf TRUE new data generation is performed.
See also:
init_functions
data_movement
void data_movement_indirect ( bool_t  inject)

Performs the movement of the data in an indirect topology.

Parameters:
injectIf TRUE new data generation is performed.
See also:
init_functions
data_movement
void datagen_oneshot ( bool_t  reset)

Performs the data generation when running in shotmode.

Parameters:
resetWhen TRUE, starts a new shot.
void do_event ( event_q *  q,
event *  i 
)

Uses the first event in the queue.

Takes an event an increases its packet count. When it reaches the length of the event, this is erased from the queue.

Parameters:
qA pointer to a queue.
iA pointer to the event to do.
long dtt_neighbor ( long  ad,
dim  wd,
way  ww 
)

Gets a neighbor in a given direction.

Parameters:
adA node address.
wdA dimension (X,Y or Z).
wwA way (UP or DOWN).
Returns:
The address of the neighbor in that dimension and way; only valid for ttorus
routing_r dtt_rr ( long  source,
long  destination 
)

Generates the routing record for a twisted torus.

This function considers three cases according to the different options of the target dimension of the skews. Z dimension will act as default in case no skew (torus) is considered.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
routing_r dtt_rr_unidir ( long  source,
long  destination 
)

Generates the routing record for an unidirectional twisted torus.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
bool_t event_empty ( event_q *  q)

Is a queue empty?.

Parameters:
qA pointer to the queue.
Returns:
TRUE if the queue is empty FALSE in other case.
routing_r fattree_rr_adapt ( long  source,
long  destination 
)

Generates the routing record for a k-ary n-tree.

This function allows adaptive routing because no route is defined here.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
void free_pkt ( unsigned long  n)

Frees a packet.

Add the packet id. to the free packets

Parameters:
nThe id of the packet to free.
void generate_pkt ( long  i)

Generate a packet to inject.

If there is no packet saved then generates a packet using the defined pattern. Then try to inject the generated packet & if it cannot be injected and packet dropped is not allowed, save the packet and try to use it later.

See also:
generate_phits
Parameters:
iThe node in which the injection is performed.
void get_conf ( long  argn,
char **  args 
)

Get the configuration for the simulation.

First take default values for the simulation. Second take the values from the file 'fsin.conf'. Finally take the command line arguments.

Parameters:
argnThe number of arguments.
argsThe arguments taken from the command line.
unsigned long get_pkt ( )

Get a free packet.

Returns:
The id of the last used free packet.
event head_event ( event_q *  q)

Looks at the first event in a queue.

Parameters:
qA pointer to the queue.
Returns:
The first event in the queue (without using nor modifying it).
routing_r icube_1mesh_rr ( long  source,
long  destination 
)

Generates the routing record for an indirect cube using static routing (no Bubble). Deadlock is avoided by considering a collection of isolated meshes and using DOR in each of them. All the meshes have their origin in node (0,0).

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
routing_r icube_4mesh_rr ( long  source,
long  destination 
)

Generates the routing record for an indirect cube using static routing (no Bubble). Deadlock is avoided by considering four isolated meshes and using DOR in each of them. Origins are in nodes (0,0) (X/2, 0) (0, Y/2) and (X/2, Y/2) repectively for each of the meshes. Routing selects the mesh with shorter distance.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
routing_r icube_rr ( long  source,
long  destination 
)

Generates the routing record for an indirect cube using adaptive routing.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
void init_event ( event_q *  q)

Initializes an event queue.

Parameters:
qa pointer to the queue to be initialized.
void init_exd ( long  fsin_cycles,
long  simics_cycles,
long  packet_size,
long  simics_hosts_port,
long  periodos 
)

Funcion de inicializacion para la Simulacion conducida por la ejecucion Parametros: long fsin_cycle_relation: relacion de ciclos entre Simics y FSIN, los ciclos que correra FSIN, por defecto es 10 long simics_cycle_relation: relacion de ciclos entre Simics y FSIN, los ciclos que correra Simics, por defecto es 1000 long packet_size_in_phits: tamao en phits del paquete, un phit son 4 bytes (configurable), por defecto es 32, es pkt_len long serv_addr: puerto de escucha de nuevas conexiones de SIMICS hosts, por defecto es 8082 long num_periodos_espera: retardo de interconexion que se introducira en el hosts destino. Medido en ciclos SIMICS, por defecto es 0

void init_functions ( void  )

Initialization of functions.

Instances the virtual functions to the ones required for the simulation

See also:
run_network
neighbor
calc_rr
check_rr
request_port
consume
arbitrate_cons
arbitrate_select
select_input_port
data_movement
void init_injection ( void  )

Initializes Injection.

Calculates all needed variables for injection & prepares all structures.

void init_network ( void  )

Initializes the network.

Gives the initial values to the simulation depending on the topology.

void init_occur ( event_l *  l)

Initializes all ocurred events lists.

There is only one list in each router.

Parameters:
lA pointer to the list to be initialized.
void init_queue ( queue q)

Initializes a queue.

Making it empty.

Parameters:
qThe queue to initialize.
void ins_event ( event_q *  q,
event  i 
)

Adds an event to a queue.

Parameters:
qa pointer to a queue.
ithe event to be added to q.
void ins_occur ( event_l *  l,
event  i 
)

Inserts an event's occurrence in an event list.

If the event is in the list, then its count is increased. Otherwise a new event is created in the occurred event list.

Parameters:
lA pointer to a list.
iThe event to be added.
routing_r mesh_rr ( long  source,
long  destination 
)

Generates the routing record for a mesh.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
long midimew_neighbor ( long  ad,
dim  wd,
way  ww 
)

Obtains a neighbor node in midimew topology (only 2D).

Parameters:
adA node address.
wdA dimension (X or Y).
wwA way (UP or DOWN).
Returns:
The address of the neighbor in that direction and way; only valid for midimew
routing_r midimew_rr ( long  source,
long  destination 
)

Generates the routing record for a midimew.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
bool_t occurred ( event_l *  l,
event  i 
)

Has an event completely occurred?.

If it has totally occurred, this is, the event is in the list and its count is equal to its length, then it is deleted from the list.

Parameters:
la pointer to a list.
ithe event we are seeking for.
Returns:
TRUE if the event has been occurred, elseway FALSE
void phit_away ( long  i,
port_type  s_p,
phit  ph 
)

A phit has arrived to destination & is consumed.

Gets all kind of statistics, and print the corresponding traces. "old" version, simpler: does not interact with TrGen, just collects statistics.

Parameters:
iThe node in which the consumption is performed.
s_pThe input port in wich the phit is.
phThe arrived phit.
void pkt_init ( )

Initiates the memory allocation & the free packets structure.

In pkt_space we allocate all the space needed for packet contain. This way our Memory needs are always the same and we must not alloc and free memory each time we use a packet.

void print_batch_results ( batch_t b)

Print the results of a batch in a Comma Separated Value format (dense).

Print all batch's stats in CSV format. The stats shown are: cycles taken, average distance, injected load, Accepted load, packet sent count, received packet count, dropped packet count, average delay, delay standard deviation, maximun delay, average injection delay, injection delay standard deviation, maximun injection delay.

Parameters:
ba pointer to the batch to print
void print_batch_results_vast ( batch_t b)

Print the results of a batch in an Human Readable Style (not very dense).

Print all batch's stats in HR style. The stats shown are: cycles taken, average distance, injected load, Accepted load, packet sent count, received packet count, dropped packet count, average delay, delay standard deviation, maximun delay, average injection delay, injection delay standard deviation, maximun injection delay.

Not actually in use, but may be useful.

Parameters:
ba pointer to the batch to print
void print_headers ( void  )

Print headers at simulation start.

See also:
pheaders.
void print_partials ( void  )

Print partial stats at runtime.

Besides write the evolution of the monitored node in the '.mon' file.

See also:
pheaders.
file.
void print_results ( time_t  start_time,
time_t  end_time 
)

Prints the final summary & results.

Prints the final summary that contains all the simulation parameters. Prints the results of each batch

See also:
bheaders.
plevel
file.
void read_trace ( )

The trace reader dispatcher selects the format type and calls to the correct trace read.

The selection reads the first character in the file. This could be: '#' for dimemas, 'c', 's' or 'r' for fsin trc, and '-' for alog (in complete trace the header is "-1", or in filtered trace could be "-101" / "-102"). This is a very naive decision, so we probably have to change this, but for the moment it works.

See also:
read_dimemas
read_fsin_trc
read_alog
void rem_head_event ( event_q *  q)

Deletes the first event in a queue.

Parameters:
qA pointer to the queue.
void request_port_bimodal_random ( long  i,
port_type  s_p 
)

Request port for bimodal traffic.

Bubble adaptive random for short messages. Escape channel for long messages.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_bubble_adaptive_random ( long  i,
port_type  s_p 
)

Random Adaptive port request.

It tries to continue in the same dim/way in an adaptive VC. If not possible, then jump to another random adaptive VCs. If no adaptive, profitable dim is found, go to ESCAPE VC.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_bubble_adaptive_shortest ( long  i,
port_type  s_p 
)

Shortest Adaptive port request.

If packet cannot continue in the same virtual channel, it tries to go to the adaptive VC with most space in its queue. If no adaptive, profitable dim is found due to a congestion control mechanism, then go to ESCAPE VC.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_bubble_adaptive_smart ( long  i,
port_type  s_p 
)

Smart Adaptive port request.

At injection time, the packet is injected to a random channel. It tries to continue in the same dim/way in an adaptive VC. If not possible, then jump to another, profitable dim, still using adaptive VCs. If no adaptive, profitable dim is found, go to ESCAPE VC.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_bubble_oblivious ( long  i,
port_type  s_p 
)

Requests an output port using oblivious (DOR) routing.

It is possible to have several oblivious channels in parallel. A static selection of channel is done at injection time. After that, the same VC is used all the time.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_dally_adaptive ( long  i,
port_type  s_p 
)

Request a port using the dally algorithm + some VCs.

Adaptive port request. Channels 0 and 1 are the Escape channels, following the Dally algorithm request_port_dally_improved

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_dally_basic ( long  i,
port_type  s_p 
)

Request a port using oblivious dally algorithm.

Oblivious port request, using virtual channels 0 and 1.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_dally_improved ( long  i,
port_type  s_p 
)

Request a port using an improved dally algorithm.

Oblivious port request, using virtual channels 0 and 1. Implements an optimization described in Duato's book to better use both VCs

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_dally_trc ( long  i,
port_type  s_p 
)

Request a port using dally trc mechanism.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_double_adaptive ( long  i,
port_type  s_p 
)

Requests an output port using bubble double adaptive routing.

Routes equal to bubble double but we are able to change our channel when the bubble restriction allows us.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_double_oblivious ( long  i,
port_type  s_p 
)

Requests an output port using bubble double oblivious routing.

We have ndim escape channels. Each one using DOR routing in different order of dimensions. For example for ndim=2 XY & YX. We decide de channel when we inject & we cannot change it.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_hexa_adaptive ( long  i,
port_type  s_p 
)

Requests an output port using bubble hexa??? adaptive routing.

Equal to bubble hexa oblivious routing but packets can move to another channel when matchs bubble restriction.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_hexa_oblivious ( long  i,
port_type  s_p 
)

Requests an output port using bubble hexa??? oblivious routing.

Equal to bubble double routing but with all the possible dimension orders XY XZ YX YZ ZX ZY. The packets aren't allowed to move to another channel.

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_icube ( long  i,
port_type  s_p 
)

Requests an output port in an indirect cube .

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_icube_IB ( long  i,
port_type  s_p 
)

Requests an output port in an indirect cube (for IB-based simul.)

Parameters:
iThe node in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_port_tree ( long  i,
port_type  s_p 
)

Requests an output port in a tree (fattree, thintree and slimtree).

When going upward: adapts. When going downward: obeys the routing record (except slimtree that can adapt).

Parameters:
iThe switch in which the request is performed.
s_pThe source (input) port which is requesting the output port.
See also:
init_functions
request_port
void request_ports_init ( void  )

Prepare arrays mt and candidates.

mt[ dim * nways | way ] stores a list of boolean values, indicating all profitable directions for a given input. When bidirectional links this means that the array is like the next: [ X+ X- Y+ Y- .... ] in mesh-like topologies. [ 0^ 0v 1^ 1v .... ] in tree-like topologies.

candidates extends that list, and contains all profitable output ports for a given input.

See also:
mt.
candidates.
void reserve ( long  i,
port_type  d_p,
port_type  s_p 
)

Tries to reserve an output port.

An output port has selected the input port (s_p) that will be connected to an output port (d_p) at node i.

Parameters:
iThe node in which the reservation is performed.
d_pThe reserved destination port.
s_pThe source port which is reserving.
void reset_stats ( void  )

Resets the stats of the simulation.

Histograms, maps & long messages stats are only cleared when the convergency phase are finished.

void results_partial ( void  )

Print partial results.

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 .

void run_network_batch ( void  )

Run the simulation taking stats for some batches.

The simulation are split in three phases: Warm-up, Convergency assurement & Stationary state.

See also:
warm_up()
convergency()
stationary()
void run_network_exd ( void  )

Run the simulation in Execution driven mode.

Main function for execution driven simulation using SIMICS.

void run_network_shotmode ( void  )

Run the simulation in shotmode.

The simulation runs for samples shots and takes stats for each one.

void run_network_trc ( )

Runs simulation using a trace file as workload.

In this mode, simulation are running until all the events in the nodes queues are done. It prints partial results each pinterval simulation cycles & calculates global queues states for global congestion control.

See also:
read_trace()
init_functions
run_network
void save_batch_results ( )

Save the current batch's stats.

Save the current stats in the reseted position of the batch array. The stats saved are: cycles taken, average distance, injected load, Accepted load, packet sent count, received packet count, dropped packet count, average delay, delay standard deviation, maximun delay, average injection delay, injection delay standard deviation, maximun injection delay.

port_type select_input_port_dor_only ( long  i,
long  dest 
)

Select an injection queue using strict DOR prerouting.

When using DIMENSION_ORDER_ROUTING most packets are injectec in X+ or X-

Parameters:
iThe node in which the injection is performed.
destThe destination node.
Returns:
The port in which inject.
See also:
select_input_port
port_type select_input_port_dor_shortest ( long  i,
long  dest 
)

Select an injection queue using DOR prerouting and if not possible in the shortest port.

It uses select_input_port_dor but, if the corresponding injector is full, it tries to inject in the port with shortest injection+buffer utilization.

Parameters:
iThe node in which the injection is performed.
destThe destination node.
Returns:
The port in which inject.
See also:
select_input_port
port_type select_input_port_lpath ( long  i,
long  dest 
)

Select an injection queue using the packet's routing record.

Select the injector for the direction in which the packet has the highest number of hops.

Parameters:
iThe node in which the injection is performed.
destThe destination node.
Returns:
The port in which inject.
See also:
select_input_port
port_type select_input_port_shortest ( long  i,
long  dest 
)

Select the shortest injection queue.

Selects the port with SHORTEST injection + buffer utilization.

Parameters:
iThe node in which the injection is performed.
destThe destination node. Actually not used in this function.
Returns:
The port in which inject.
See also:
select_input_port
port_type select_input_port_shortest_profitable ( long  i,
long  dest 
)

Select an injection queue using the packet's routing record.

Taking into consideration all the possible profitable dim/way options, it injects in that with shortest injection+buffer utilization

Parameters:
iThe node in which the injection is performed.
destThe destination node.
Returns:
The port in which inject.
See also:
select_input_port
routing_r slimtree_rr_adapt ( long  source,
long  destination 
)

Generates the routing record for a slimtree.

This function allows adaptive routing because no route is defined here.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
void stats ( long  i)

Collects queue occupancy histogram stats.

Parameters:
iThe node to collect from.
routing_r thintree_rr_adapt ( long  source,
long  destination 
)

Generates the routing record for a thin tree.

This function allows adaptive routing because no route is defined here.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
long torus_neighbor ( long  ad,
dim  wd,
way  ww 
)

Obtains a neighbor node in torus & mesh topologies.

Given a node address "ad", a direction "wd" (X,Y or Z) and a way "ww" (UP or DOWN) returns the address of the neighbor in that direction and way; only valid for torus but usable also for mesh.

Parameters:
adA node address.
wdA dimension (X,Y or Z).
wwA way (UP or DOWN).
Returns:
The address of the neighbor in that direction.
routing_r torus_rr ( long  source,
long  destination 
)

Generates the routing record for a torus.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
routing_r torus_rr_unidir ( long  source,
long  destination 
)

Generates the routing record for an unidirectional torus.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.

Variable Documentation

Id of the router arbitration mechanism.

See also:
arb_mode_t
atype_l
void(* arbitrate)(long i, port_type d_p)

'Virtual' Function that performs the arbitration of the output ports.

Parameters:
injectIt is TRUE if the injection has to be performed.
See also:
init_functions
arbitrate_direct
arbitrate_icube
arbitrate_trees
void(* arbitrate_cons)(long i)

'Virtual' Function that arbritates the consumption of the arriven packets.

Parameters:
iThe node in which the consumption is performed.
See also:
init_functions
cons_mode
arbitrate_cons_single
arbitrate_cons_multiple

'Virtual' Function that arbitrates the selection of an input port for an output port.

Parameters:
iThe node in which the consumption is performed.
d_pThe destination port to arbitrate for.
firstThe first input port that can use this output.
lastThe next of the last input port that can use this input.
Returns:
The selected port or NULL_PORT if there is no one.
See also:
init_functions
arb_mode
arbitrate
arbitrate_select_round_robin
arbitrate_select_fifo
arbitrate_select_longest
arbitrate_select_random
arbitrate_select_age

All the arbitration modes are specified here.

See also:
literal.c
long bheaders

Batch headers. A Bitmap to know what batch stats are printed in final summary. 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 2048 + 4096 BatchTime AvDistance InjLoad AccLoad PacketSent PacketRcvd PacketDrop AvgDelay StDevDelay MaxDelay InjAvgDel InjStDvDel InjMaxDel

routing_r(* calc_rr)(long source, long destination)

'Virtual' Function that calculates packet routing record.

Parameters:
sourceThe source node of the packet.
destinationThe destination node of the packet.
Returns:
The routing record needed to go from source to destination.
See also:
init_functions
topo
mesh_rr
midimew_rr
torus_rr
torus_rr_unidir
dtt_rr
dtt_rr_unidir
bool_t(* check_rr)(packet_t *pkt, dim *d_d, way *d_w)

'Virtual' Function that routes a packet.

Parameters:
pktThe packet to route.
d_dThe destination dimension is returned here.
d_wThe destination way is returned here.
Returns:
TRUE if the phit has reached its final destination
See also:
init_functions
routing
check_rr_dim_o_r
check_rr_dir_o_r
check_rr_fattree_static
check_rr_fattree_adaptive
check_rr_slimtree_static
check_rr_slimtree_adaptive
check_rr_thintree_static
check_rr_thintree_adaptive
check_rr_icube_static
check_rr_icube_adaptive
check_rr_icube_static_IB

Id of the consumption mode.

See also:
cons_mode_t
ctype_l
void(* consume)(long i)

'Virtual' Function that performs consumption.

Parameters:
iThe node in which the consumption is performed.
See also:
init_functions
cons_mode
consume_single
consume_multiple

All the consumption modes are specified here.

See also:
literal.c
void(* data_movement)(bool_t inject)

'Virtual' Function that performs the traffic movement in the network.

Parameters:
injectIt is TRUE if the injection has to be performed.
See also:
init_functions
data_movement_direct
data_movement_indirect
char file[128]

The output file name.

It will be appended one extension for each out: .mon for monitored node. .map for channel mapping. .hst for queue occupation histograms.

double global_q_u

The global queue occupation.

This is the value shown to the nodes and is updated every update_period cycles with the value of global_q_u_current.

See also:
update_period
global_q_u_current

The global queue occupation.

This value is calculated each cycle.

See also:
update_period
global_q_u_current

Id of the injection mode.

See also:
inj_mode_t
injmode_l
long inj_ql

Injection queue length (in phits).

Equel to binj_cap multiplied by pkt_len.

See also:
binj_cap.
pkt_len.

All the injection modes are specified here.

See also:
literal.c

Last port to check when arbitrating the consumption port.

long(* neighbor)(long ad, dim wd, way ww)

'Virtual' Function that performs the search of a neighbor node. Only used by direct topologies.

Parameters:
adA node address.
wdA dimension (X,Y or Z).
wwA way (UP or DOWN).
Returns:
The address of the neighbor in that direction and way.
See also:
topo
torus_neighbor
midimew_neighbor
torus_neighbor
dtt_neighbor

The traffic pattern Id.

See also:
traffic_pattern_t.
pattern_l.

All the traffic patterns are specified here.

See also:
literal.c
long pheaders

Partial headers. A Bitmap to know what system stats are shown. 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 clock inj_load cons_load av_delay delay_dev max_delay inj_delay i_d_dev i_dev_max netw. ocup queue_ocup

long pkt_max

The maximum number of packets allowed.

Normally is the number of nodes multiplied by the maximun capacity of each router.

Structure in wich all the packets are stored.

It is created and allocated when stating simulation, and it must be not modify later. It is used in heap mode, so we try to use the last free packet to favor spatial locality.

See also:
pkt_init

Id of the placement strategy.

See also:
placement_t
placement_l

All the placement strategies are specified here.

See also:
literal.c
long plevel

Print level - bitmap. 0 = Just final summary 1 = Source/destination Map 2 = port utilization Map 4 = Distance Histogram 8 = Histogram of port utilization 16 = Packet-level traces 32 = Phit-level traces 64 = Monitored node

Id of the request port mechanism.

See also:
req_mode_t
r_mode_l
void(* request_port)(long i, port_type s_p)

All the port requesting modes are specified here.

See also:
literal.c

Id of the routing used in DOR (Dimension or Direction) and in Multistage networks.

See also:
routing_t
routing_l

All the routing arbitration modes are specified here.

See also:
literal.c
void(* run_network)(void)

'Virtual' Function that runs the simulation.

See also:
init_functions
run_network_shotmode
run_network_trc
run_network_batch
run_network_exd
port_type(* select_input_port)(long i, long dest)

'Virtual' Function that performs the selection of the injection ports.

Parameters:
iThe node in wich the injection is performed.
destThe destination of the packet.
Returns:
The injection port to insert the packet.
See also:
init_functions
select_input_port_shortest
select_input_port_dor_only
select_input_port_dor_shortest
select_input_port_shortest_profitable
select_input_port_lpath

The topology Id.

See also:
topo_t.
topology_l.

All the topologies allowed are specified here.

See also:
literal.c
long tr_ql

Transit queue length (in phits).

Equal to buffer_cap multiplied by pkt_len.

See also:
buffer_cap.
pkt_len.
char trcfile[128]

The name of a file containing a trace for trace driven.

If the file is in .alog format & only will be considered message sending an reception (events -101 & -102). If the file is a dimemas trace only point to point operations and cpu intervals are considered. The FSIN trace format is also allowed.

All the Virtual channel managements are specified here.

See also:
literal.c

Id of the Virtual Channel management mechanism.

See also:
vc_management_t
vc_l