/RoutingSim

Simulator for multiprocessor interconnection networks.

Primary LanguageC++

# Routing Simulator
This is a flit-level simulator for a multiprocessor interconnection network arranged in a 2D torus.

It was originally created as a class assignment for benchmarking techniques for increasing the throughput for multiprocessor incerconnection networks.

This code is very much C with objects.

# Building

Building and testing can be done using the included Makefile.

To compile the program, run 'make' in the project directory.

To test (and build if necessary) the program, run 'make test' in the project directory. This will execute three commands, one for each given message pattern. Each pattern will be run 101 times for 1000 cycles each. Each test is unique in the chance of generating a packet during each cycle in each Packet Generator. Thus, each timestep each Packet Generator will separately choose to inject a packet or not with a chance equal to 1% times the test number (0 - 100) divided by the constant 12, so that saturation levels are not reached too soon since each packet is 16 flits. 

Alternately, testing can be done by running './RoutingSim [pattern [cycles [chance]]'. Specifying all 3 inputs will run a single instance of the simulator, executing the given number of cycles with the given pattern and injection chance (scaled as described above). Specifying less than the three inputs will run a full test of 100 different injection chances. Cycles defaults to 1000 and the message pattern defauls to uniform distribution.

In specifying the pattern from the command line you need to use these integer values:
Uniform Random = 0
Bit Reverse    = 1
Bit Complement = 2