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

Data generation module of FSIN. More...

#include "globals.h"
#include "packet.h"
#include "pattern.h"
#include <stdlib.h>
Include dependency graph for data_generation.c:

Defines

#define POP_SIZE   1

Functions

void read_population ()
void read_histogram ()
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_shortest_profitable (long i, long dest)
port_type select_input_port_dor_shortest (long i, long dest)
port_type select_input_port_lpath (long i, long dest)
void generate_phits (unsigned long packet, port_type iport)
void generate_pkt (long i)
void data_generation (long i)
void datagen_oneshot (bool_t reset)
void data_injection (long i)
void init_injection (void)

Variables

long pop [POP_SIZE]
 The population when using population based distributions. Should be implemented dinamically only when needed.
long * next_dest
 A list with all the destinations for a node (used in distribution patterns).

Detailed Description

Data generation module of FSIN.

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 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 datagen_oneshot ( bool_t  reset)

Performs the data generation when running in shotmode.

Parameters:
resetWhen TRUE, starts a new shot.
void generate_phits ( unsigned long  packet,
port_type  iport 
)

Generate all the phits of a packet and put them in the corresponding injection port.

Parameters:
packetThe packet to inject.
iportThe port in where inject to.
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 init_injection ( void  )

Initializes Injection.

Calculates all needed variables for injection & prepares all structures.

void read_histogram ( )

Reads the histogram from a file. EXPERIMENTAL

An histogram with the distance distribution that the simulation should follow. Allows feeding the simulation with user-defined distance distributions.

void read_population ( )

Reads the population from a file. EXPERIMENTAL

A population is a collection of distances at which the injected packets will be sent. Allows feeding the simulation with user-defined distance distributions.

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