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

Subversion Repositories ps2

[/] [ps2/] [tags/] [rel_12/] [sim/] [rtl_sim/] [run/] [run_sim] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 gorand
#!/bin/csh -f
2
 
3
set current_par = 0
4
set output_waveform = 0
5
while ( $current_par < $# )
6 37 gorand
    @ current_par = $current_par + 1
7
    case wave:
8 35 gorand
        @ output_waveform = 1
9
        breaksw
10
    default:
11
        echo 'Unknown option "'$argv[$current_par]'"!'
12
        exit
13
        breaksw
14
    endsw
15
end
16
 
17 37 gorand
echo "-CDSLIB ../bin/cds.lib"          > ncvlog.args
18
echo "-HDLVAR ../bin/hdl.var"         >> ncvlog.args
19
echo "-MESSAGES"                      >> ncvlog.args
20
echo "-INCDIR ../../../bench/verilog" >> ncvlog.args
21
echo "-INCDIR ../../../rtl/verilog"   >> ncvlog.args
22
echo "-NOCOPYRIGHT"                   >> ncvlog.args
23
echo "-LOGFILE ../log/ncvlog.log"     >> ncvlog.args
24
echo '-DEFINE "PS2_NUM_OF_NORMAL_SCANCODES 85"' >> ./ncvlog.args
25
echo '-DEFINE "PS2_NUM_OF_EXTENDED_SCANCODES 38"' >> ./ncvlog.args
26
echo '-DEFINE "SIM"' >> ./ncvlog.args
27 35 gorand
 
28 37 gorand
 
29 35 gorand
foreach filename ( `cat ../bin/rtl_file_list` )
30 37 gorand
    echo "../../../rtl/verilog/"$filename >> ncvlog.args
31 35 gorand
end
32
 
33
foreach filename ( `cat ../bin/sim_file_list` )
34 37 gorand
    echo "../../../bench/verilog/"$filename >> ncvlog.args
35 35 gorand
end
36
 
37 37 gorand
ncvlog -f ncvlog.args
38 35 gorand
 
39 37 gorand
echo "-MESSAGES"                             > ncelab.args
40
echo "-NOCOPYRIGHT"                         >> ncelab.args
41
echo "-CDSLIB ../bin/cds.lib"               >> ncelab.args
42
echo "-HDLVAR ../bin/hdl.var"               >> ncelab.args
43
echo "-LOGFILE ../log/ncelab.log"           >> ncelab.args
44
echo "-TIMESCALE 1ns/100ps"                 >> ncelab.args
45
echo "-SNAPSHOT worklib.ps2_test_bench:rtl" >> ncelab.args
46
echo "-NO_TCHK_MSG"                         >> ncelab.args
47
echo "-ACCESS +RWC"                         >> ncelab.args
48
echo "worklib.ps2_test_bench"               >> ncelab.args
49 35 gorand
 
50 37 gorand
ncelab -f ncelab.args
51 35 gorand
 
52 37 gorand
echo "-MESSAGES"                   > ncsim.args
53
echo "-NOCOPYRIGHT"               >> ncsim.args
54
echo "-CDSLIB ../bin/cds.lib"     >> ncsim.args
55
echo "-HDLVAR ../bin/hdl.var"     >> ncsim.args
56
echo "-INPUT ncsim.tcl"           >> ncsim.args
57
echo "-LOGFILE ../log/ncsim.log"  >> ncsim.args
58
echo "worklib.ps2_test_bench:rtl" >> ncsim.args
59 35 gorand
 
60
if ( $output_waveform ) then
61 37 gorand
    echo "database -open waves -shm -into ../out/waves.shm"             > ./ncsim.tcl
62 35 gorand
    echo "probe -create -database waves ps2_test_bench -shm -all -depth all" >> ./ncsim.tcl
63 37 gorand
    echo "run"                                                         >> ./ncsim.tcl
64 35 gorand
else
65
    echo "run"  > ./ncsim.tcl
66
endif
67
 
68 37 gorand
echo "quit" >> ncsim.tcl
69 35 gorand
 
70 37 gorand
ncsim -LICQUEUE -f ./ncsim.args
71 35 gorand
 
72
set exit_line_nb = `sed -n '/exit/=' < ../log/ncsim.log`
73
 
74
#echo "$exit_line_nb"
75
 
76
set dead_line_nb = 0
77
 
78
if ( $exit_line_nb ) then
79
 
80
  @ dead_line_nb = $exit_line_nb - 1
81
  set exit_line=`sed -n $exit_line_nb's/exit/&/gp' < ../log/ncsim.log`
82
  set dead_line=`sed -n $dead_line_nb's/report/&/gp' < ../log/ncsim.log`
83
 
84
  echo "$dead_line"
85
  echo "$exit_line"
86
 
87
  echo "TEST: ps2"
88
  if ( "$dead_line" == "report (deaddead)" ) then
89
    if ( "$exit_line" == "exit (00000000)"   ) then
90
      echo "STATUS: passed"  #|tee -a ../log/run_sim.log 2>&1
91
    else
92
      echo "STATUS: failed"  #|tee -a ../log/run_sim.log 2>&1
93
    endif
94
  else
95
    echo "STATUS: failed"
96
  endif
97
 
98
endif
99
 

powered by: WebSVN 2.1.0

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