Project for EE5902
- Python 3.7
- matplotlib 3.3.2
- networkx 2.5
- numpy 1.19.1
- simulator.py
- single_pkt_test.py
- random_pkt_test.py
- constant_pkt_test.py
- router.py
- modxy_router.py
- a_router.py
- elra_router.py
- ca_router.py
- heatmap.py
- network_map.py
- packet.py
- packet_generator.py
- receiver.py
- sub_simulator_func.py
- README.md
use simulator.py to run
python3 simulator.py <optional parameters>
Observe the outputs on terminal or read the sim_data.txt, sim_summary.txt
The default parameters are used in the test. If you want more data, see parameters
--test_mode 0 --verbose 3 --algo_type 5
--test_mode 1 --verbose 3 --algo_type 5 --target_rate 10 --runs 5 --print_output False
varies the target_rate between 0-10
--test_mode 2 --verbose 3 --algo_type 5
--m
, type=int, default=4- number of rows
--n
, type=int, default=4- number of columns
--algo_type
, type=int, default=0- 0:basic XY,
- 1:modified XY,
- 2:Adaptive Routing,
- 3:ELRA,
- 4:CA router
- 5:all routers
--cycle_limit
, type=int, default=1000--load_cycles
, type=int. default=20- cycles to inject packets in test mode 2
--target_rate
, type=float, default=5- probability of sending spikes in test mode 1, low 0-10 high
--test_mode
, type=int, default=1- 0->single pkt test,
- 1->random pkt test,
- 2->congestion awareness test
--runs
, type=int, default=1- number of runs in random pkt test
--verbose
, type=int, default=0- 0->only num of pkt received per router
- 1-> L0 + average clk cycles
- 2-> L1 + all packet information
- 3-> L2 + heatmap
--print_output
, type=bool, default=True- Whether to print simulator output in terminal
--sim_data_path
, type=string, default="./sim_data.txt"- path to save the simulation data
--sim_summary_path
, type=string, default="./sim_summary.txt"- path to save the simulation data summary, for random pkt test