OpenCores
URL https://opencores.org/ocsvn/8051/8051/trunk

Subversion Repositories 8051

[/] [8051/] [tags/] [rel0/] [sim/] [rtl_sim/] [run/] [run] - Blame information for rev 186

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 simont
#!/bin/csh -f
2
 
3
set iter = 1;
4
set failed = 0;
5
set all_tests = 0;
6
 
7
 
8
set tests=(testall lcall negcnt gcd int2bin cast divmul fib sort sqroot div16u xram_m timer_test counter_test interrupt_test serial_test r_bank)
9
 
10
 
11
# Prepare all .args files
12
iteration:
13
echo ""
14
echo ""
15
echo " preparing files"
16
echo ""
17
 
18
ncprep -f make > ../out/ncprep.out
19
 
20
if (`tail -1 ../out/ncprep.out | grep Failed` != "") then
21
  echo ""
22
  cat ../out/ncprep.out
23
  exit
24
endif
25
 
26
# Run NC-Verilog compiler
27
echo ""
28
echo "\t@@@"
29
echo "\t@@@ Compiling sources"
30
echo "\t@@@"
31
 
32
ncvlog -NOCOPYRIGHT -f ncvlog.args > ../out/ncvlog.out
33
if ($status != 0) then
34
  echo "\t@@@ FAILED"
35
  echo ""
36
  cat ../out/ncvlog.out
37
  exit
38
else
39
  echo "\t@@@ Passed"
40
endif
41
 
42
# Run the NC-Verilog elaborator (build the design hierarchy)
43
echo ""
44
echo "\t@@@"
45
echo "\t@@@ Building design hierarchy (elaboration)"
46
echo "\t@@@"
47
ncelab -NOTIMINGCHECKS -NOCOPYRIGHT -f ncelab.args > ../out/ncelab.out
48
if ($status != 0) then
49
  echo "\t@@@ FAILED"
50
  echo ""
51
  cat ../out/ncelab.out
52
  exit
53
else
54
  echo "\t@@@ Passed"
55
endif
56
 
57
# Run the NC-Verilog simulator (simulate the design)
58
set i = 0;
59
foreach test ($tests)
60
        @ i += 1;
61
        echo ""
62
        echo "\t###"
63
        echo "\t### Running test ${i}: ${test}"
64
        echo "\t###"
65
 
66
        cp ../src/${test}.in ../src/oc8051_rom.in
67
        cp ../src/${test}.vec ../src/oc8051_test.vec
68
        ncsim -NOCOPYRIGHT -f ncsim.args > ../out/ncsim.out
69
        if ($status != 0) then
70
          cat ../out/ncsim.out
71
          exit
72
        else if (`tail -4 ../out/ncsim.out | grep Done` == "") then
73
          echo "\t### FAILED"
74
        else
75
          echo "\t### Passed"
76
        endif
77
        mv ../out/ncsim.out ../out/${test}.out
78
        mv verilog.dump ../out/wave/${test}.dump
79
end
80
 
81
rm cds.lib hdl.var RUN_NC
82
rm nc*
83
rm -r INCA_libs
84
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.