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

All request port functions & tools. More...

#include <math.h>
#include "globals.h"
Include dependency graph for request_ports.c:

Functions

void request_ports_init (void)
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_bimodal_random (long i, port_type s_p)
void request_port_bubble_oblivious (long i, port_type s_p)
void request_port_bubble_adaptive_smart (long i, port_type s_p)
void request_port_bubble_adaptive_shortest (long i, port_type s_p)
void request_port_bubble_adaptive_random (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)
bool_t check_rr_dim_o_r (packet_t *pkt, dim *d, way *w)
bool_t check_rr_dir_o_r (packet_t *pkt, dim *d, way *w)
bool_t preliminary_check_trees (long i, port_type s_p, bool_t fully_check)
void extract_packet_trees (long i, port_type injector)
bool_t check_restrictions_trees (long i, port_type s_p, port_type d_p)
void request_port_tree (long i, port_type s_p)
port_type min_queue_occupation (port_type first, port_type last)
bool_t check_rr_fattree_adaptive (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_adaptive (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_adaptive (packet_t *pkt, dim *d, way *w)
bool_t check_rr_slimtree_static (packet_t *pkt, dim *d, way *w)
void extract_packet_icube (long i, port_type injector)
bool_t preliminary_check_icube (long i, port_type s_p)
bool_t check_restrictions_icube (long i, port_type s_p, port_type d_p)
bool_t check_rr_icube_adaptive (packet_t *pkt, dim *d, way *w)
bool_t check_rr_icube_static (packet_t *pkt, dim *d, way *w)
void request_port_icube (long i, port_type s_p)
bool_t preliminary_check_icube_IB (long i, port_type s_p)
bool_t check_restrictions_icube_IB (long i, port_type s_p, port_type d_p)
bool_t check_rr_icube_static_IB (packet_t *pkt, dim *d, way *w)
void request_port_icube_IB (long i, port_type s_p)

Detailed Description

All request port functions & tools.

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

bool_t check_restrictions_icube ( long  i,
port_type  s_p,
port_type  d_p 
)

Checks VCT and bubble restriction.

The virtual cut-through restrictions (room for at least one packet in the destination) are always checked. The bubble restriction is only checked when chkbub is TRUE. It considers these scenarios: (1) If req_mode == OBLIVIOUS_REQ, meaning that several channels in parallel are being used in a oblivious mode. Then the bubble restriction is applied to all channels. (2) If (bub_adap) then a bubble is required to INJECT into the adaptive channels.

Parameters:
iThe node in which we are checking.
s_pSource port (The packet is currently here).
d_pDestination port (The room is checked here).
Returns:
TRUE if the restrictions are matched.
bool_t check_restrictions_icube_IB ( long  i,
port_type  s_p,
port_type  d_p 
)

Checks VCT restriction (for IB-based simul.).

The virtual cut-through restrictions (room for at least one packet in the destination) are always checked.

Parameters:
iThe node in which we are checking.
s_pSource port (The packet is currently here).
d_pDestination port (The room is checked here).
Returns:
TRUE if the restrictions are matched.
bool_t check_restrictions_trees ( long  i,
port_type  s_p,
port_type  d_p 
)

Checks VCT restriction.

The virtual cut-through restriction (room for at least one packet in the destination) is always checked.

Parameters:
iThe node in which we are checking.
s_pSource VC port (The packet is currently here).
d_pDestination VC port (The room is checked here).
Returns:
TRUE if the restrictions are matched.
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 extract_packet_icube ( long  i,
port_type  injector 
)

Extract the head packet from a transit queue.

If a packet is the cause of head-of-line blocking at a queue then removes it from the queue's head.

Parameters:
iThe node in which the extraction will be performed.
injectorThe injection queue which extract from.
void extract_packet_trees ( long  i,
port_type  injector 
)

Extract the head packet from a transit queue.

If a packet is the cause of head-of-line blocking at a queue then removes it from the queue's head.

Parameters:
iThe node in which the extraction will be performed.
injectorThe injection queue which extract from.
port_type min_queue_occupation ( port_type  first,
port_type  last 
)

Return the port whose neigbor's queue has more free space (more credits). To perform a better load-balancing there is a random selection between all the queues with the same amount of credits

Parameters:
firstThe first port to search in.
lastThe first port to not search in.
Returns:
The selected port.
bool_t preliminary_check_icube ( long  i,
port_type  s_p 
)

Checks if a port can be used.

Checks if a request of an output port is required or not. It returns FALSE if the queue is empty, the port is already assigned, or if the packet at the head of the queue has reached its final destination.

Parameters:
iThe node in which the checking is performed.
s_pThe port we are checking.
Returns:
TRUE if the packet can continue in this port, FALSE otherwise.
bool_t preliminary_check_icube_IB ( long  i,
port_type  s_p 
)

Checks if a port can be used (for IB-based simul.).

Checks if a request of an output port is required or not. It returns FALSE if the queue is empty, the port is already assigned, or if the packet at the head of the queue has reached its final destination.

Parameters:
iThe node in which the checking is performed.
s_pThe port we are checking.
Returns:
TRUE if the packet can continue in this port, FALSE otherwise.
bool_t preliminary_check_trees ( long  i,
port_type  s_p,
bool_t  fully_check 
)

Checks if a port can be used.

Checks if a request of an output port is required or not. It returns FALSE if the queue is empty, the port is already assigned, or if the packet at the head of the queue has reached its final destination.

Parameters:
iThe node in which the checking is performed.
s_pThe port we are checking.
fully_checkIf the direction matrix must be altered this must be TRUE.
Returns:
TRUE if the packet can continue in this port, FALSE otherwise.
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.