#!/bin/bash

for N in {2..16}
do
    for M in {2..16}
    do

	echo "========================================="
	echo "Simulating $N x $M Crossbar configuration"
	echo "========================================="

	vlogcomp -work work ${XILINX}/verilog/src/glbl.v
	vlogcomp -i ../.. -work work -d N_DIMENSION=5 -d M_DIMENSION=5 ../../../lib/control/axi_crossbar_tb.v
	vlogcomp -work work ../../../lib/control/axi_crossbar.v
	vlogcomp -work work ../../../lib/control/axi_slave_mux.v
	vlogcomp -work work ../../../lib/control/axi_forwarding_cam.v
	vlogcomp -work work ../../../lib/control/setting_reg.v
	vlogcomp -work work ../../../lib/fifo/monitor_axi_fifo.v
	vlogcomp -work work ../../../lib/fifo/axi_fifo_short.v



	fuse work.axi_crossbar_tb work.glbl -L unisims_ver -L xilinxcorelib_ver -o axi_crossbar_tb.exe

# run the simulation scrip
	./axi_crossbar_tb.exe  -tclbatch simcmds.tcl #-gui
    done
done

