aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx/tests/test_dsp48a1_model.sh
blob: a14a78e72670a8d3ce34991d7ee385a6f5c6596c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
set -ex
if [ -z $ISE_DIR ]; then
	ISE_DIR=/opt/Xilinx/ISE/14.7
fi
sed 's/DSP48A1/MARKER1/; s/DSP48A/DSP48A_UUT/; s/MARKER1/DSP48A1_UUT/; /module DSP48A_UUT/,/endmodule/ p; /module DSP48A1_UUT/,/endmodule/ p; d;' < ../cells_sim.v > test_dsp48a1_model_uut.v
if [ ! -f "test_dsp48a1_model_ref.v" ]; then
	cp $ISE_DIR/ISE_DS/ISE/verilog/src/unisims/DSP48A1.v test_dsp48a1_model_ref.v
fi
if [ ! -f "test_dsp48a_model_ref.v" ]; then
	cp $ISE_DIR/ISE_DS/ISE/verilog/src/unisims/DSP48A.v test_dsp48a_model_ref.v
fi
for tb in mult_allreg mult_noreg mult_inreg
do
	iverilog -s $tb -s glbl -o test_dsp48a1_model test_dsp48a1_model.v test_dsp48a1_model_uut.v test_dsp48a1_model_ref.v test_dsp48a_model_ref.v $ISE_DIR/ISE_DS/ISE/verilog/src/glbl.v
	vvp -N ./test_dsp48a1_model
done
the file COPYING. If not, write to the Free -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. with Ada.Text_IO; package body Simple_IO is procedure Put (S : String) is begin Ada.Text_IO.Put (S); end Put; procedure Put (C : Character) is begin Ada.Text_IO.Put (C); end Put; procedure Put_Line (S : String) is begin Ada.Text_IO.Put_Line (S); end Put_Line; procedure New_Line is begin Ada.Text_IO.New_Line; end New_Line; procedure Put_Err (S : String) is begin Ada.Text_IO.Put (Ada.Text_IO.Standard_Error, S); end Put_Err; procedure Put_Err (C : Character) is begin Ada.Text_IO.Put (Ada.Text_IO.Standard_Error, C); end Put_Err; procedure Put_Line_Err (S : String) is begin Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, S); end Put_Line_Err; procedure New_Line_Err is begin Ada.Text_IO.New_Line (Ada.Text_IO.Standard_Error); end New_Line_Err; end Simple_IO;