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

Declaration of FSIN functions to perform arbitration. More...

#include "globals.h"
Include dependency graph for arbitrate.c:

Functions

void arbitrate_init (void)
void reserve (long i, port_type d_p, port_type s_p)
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)

Variables

port_type last_port_arb_con

Detailed Description

Declaration of FSIN functions to perform arbitration.

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.


Function Documentation

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
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.

Variable Documentation

Last port to check when arbitrating the consumption port.