INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
|
Declaration of FSIN functions to perform arbitration. More...
#include "globals.h"
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 |
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.
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.
i | The 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.
i | The 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.
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
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.
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
void arbitrate_init | ( | void | ) |
Initialization of the structures needed to perform arbitration.
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.
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
first | The first port for looking to. |
last | The next port from the last to looking to. This port is not included. |
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].
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
first | The first port for looking to. |
last | The next port from the last to looking to. This port is not included. |
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.
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
first | The first port for looking to. |
last | The next port from the last to looking to. This port is not included. |
Random selection of a port.
Given a range of input-injection ports, select one of them randomly.
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
first | The first port for looking to. |
last | The next port from the last to looking to. This port is not included. |
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
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
first | The first port for looking to. |
last | The next port from the last to looking to. This port is not included. |
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.
i | The node in which the arbitration is performed. |
d_p | The destination port for wich the arbitration is performed. |
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.
i | The node in which the reservation is performed. |
d_p | The reserved destination port. |
s_p | The source port which is reserving. |
Last port to check when arbitrating the consumption port.