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

Subversion Repositories gpio

[/] [gpio/] [trunk/] [sim/] [rtl_sim/] [run/] [run_sim_gpio] - Blame information for rev 50

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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