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

Subversion Repositories ps2

[/] [ps2/] [tags/] [rel_9/] [sim/] [rtl_sim/] [run/] [run_ps2_sim.scr] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mihad
#!/bin/csh -f
2
 
3
#//////////////////////////////////////////////////////////////////////
4
#////                                                              ////
5
#////  run_ps2_sim.scr                                             ////
6
#////                                                              ////
7
#////  This file is part of the "ps2" project                      ////
8
#////  http://www.opencores.org/cores/ps2/                         ////
9
#////                                                              ////
10
#////  Author(s):                                                  ////
11
#////      - mihad@opencores.org                                   ////
12
#////      - Miha Dolenc                                           ////
13
#////                                                              ////
14
#////  All additional information is avaliable in the README.txt   ////
15
#////  file.                                                       ////
16
#////                                                              ////
17
#////                                                              ////
18
#//////////////////////////////////////////////////////////////////////
19
#////                                                              ////
20
#//// Copyright (C) 2000 Miha Dolenc, mihad@opencores.org          ////
21
#////                                                              ////
22
#//// This source file may be used and distributed without         ////
23
#//// restriction provided that this copyright statement is not    ////
24
#//// removed from the file and that any derivative work contains  ////
25
#//// the original copyright notice and the associated disclaimer. ////
26
#////                                                              ////
27
#//// This source file is free software; you can redistribute it   ////
28
#//// and/or modify it under the terms of the GNU Lesser General   ////
29
#//// Public License as published by the Free Software Foundation; ////
30
#//// either version 2.1 of the License, or (at your option) any   ////
31
#//// later version.                                               ////
32
#////                                                              ////
33
#//// This source is distributed in the hope that it will be       ////
34
#//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
#//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
#//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
#//// details.                                                     ////
38
#////                                                              ////
39
#//// You should have received a copy of the GNU Lesser General    ////
40
#//// Public License along with this source; if not, download it   ////
41
#//// from http://www.opencores.org/lgpl.shtml                     ////
42
#////                                                              ////
43
#//////////////////////////////////////////////////////////////////////
44
#//
45
#// CVS Revision History
46
#//
47
#// $Log: not supported by cvs2svn $
48 33 gorand
#// Revision 1.4  2003/07/01 12:34:04  mihad
49
#// Added an option to use constant values instead of RAM
50
#// in the translation table.
51
#//
52 23 mihad
#// Revision 1.3  2002/04/09 13:25:52  mihad
53
#// Added mouse interface and everything for its handling, cleaned up some unused code
54
#//
55 13 mihad
#// Revision 1.2  2002/02/20 15:20:11  mihad
56
#// Little/big endian changes incorporated
57
#//
58 6 mihad
#// Revision 1.1.1.1  2002/02/18 16:16:55  mihad
59
#// Initial project import - working
60 2 mihad
#//
61 6 mihad
#//
62 2 mihad
 
63 33 gorand
 
64 2 mihad
echo "-MESSAGES" > ./ncvlog.args
65
echo "-NOCOPYRIGHT" >> ./ncvlog.args
66
echo "-CDSLIB ../bin/cds.lib" >> ./ncvlog.args
67
echo "-HDLVAR ../bin/hdl.var" >> ./ncvlog.args
68
echo "-INCDIR ../../../bench/verilog" >> ./ncvlog.args
69
echo "-INCDIR ../../../rtl/verilog" >> ./ncvlog.args
70
echo '-DEFINE "PS2_NUM_OF_NORMAL_SCANCODES 85"' >> ./ncvlog.args
71
echo '-DEFINE "PS2_NUM_OF_EXTENDED_SCANCODES 38"' >> ./ncvlog.args
72 6 mihad
echo '-DEFINE "SIM"' >> ./ncvlog.args
73 2 mihad
 
74 13 mihad
set current_par = 0
75
set output_waveform = 0
76
set xilinx = 0
77 33 gorand
 
78 13 mihad
while ( $current_par < $# )
79
    @ current_par = $current_par + 1
80
    switch ( $argv[$current_par] )
81 23 mihad
    case 'xilinx':
82 13 mihad
        echo '-DEFINE "XILINX"' >> ./ncvlog.args
83
        @ xilinx = 1
84
        breaksw
85 23 mihad
    case 'wave':
86 13 mihad
        @ output_waveform = 1
87
        breaksw
88
    default:
89
        echo 'Unknown option "'$argv[$current_par]'"!'
90
        exit
91
        breaksw
92
    endsw
93
end
94 2 mihad
 
95
echo "-LOGFILE ../log/ncvlog.log" >> ./ncvlog.args
96
 
97
foreach filename ( `cat ../bin/rtl_file_list` )
98
    echo "../../../rtl/verilog/"$filename >> ./ncvlog.args
99
end
100
 
101
foreach filename ( `cat ../bin/sim_file_list` )
102
    echo "../../../bench/verilog/"$filename >> ./ncvlog.args
103
end
104
 
105 13 mihad
if ( $xilinx ) then
106
    foreach filename ( `cat ../bin/xilinx_file_list` )
107
        echo "../../../../xilinx_blocks/"$filename >> ./ncvlog.args
108
    end
109 2 mihad
endif
110
 
111
ncvlog -f ./ncvlog.args
112
 
113
echo "-MESSAGES" > ./ncelab.args
114
echo "-NOCOPYRIGHT" >> ./ncelab.args
115
echo "-CDSLIB ../bin/cds.lib" >> ./ncelab.args
116
echo "-HDLVAR ../bin/hdl.var" >> ./ncelab.args
117
echo "-LOGFILE ../log/ncelab.log" >> ./ncelab.args
118
echo "-SNAPSHOT worklib.ps2_test_bench:rtl" >> ./ncelab.args
119
echo "-ACCESS +RWC" >> ./ncelab.args
120
echo "worklib.ps2_test_bench" >> ./ncelab.args
121
 
122 13 mihad
if ( $xilinx ) then
123
    echo "worklib.glbl" >> ./ncelab.args
124 2 mihad
endif
125
 
126
ncelab -f ./ncelab.args
127
 
128
echo "-MESSAGES" > ./ncsim.args
129
echo "-NOCOPYRIGHT" >> ./ncsim.args
130
echo "-CDSLIB ../bin/cds.lib"  >> ./ncsim.args
131
echo "-HDLVAR ../bin/hdl.var"  >> ./ncsim.args
132
echo "-INPUT ./ncsim.tcl" >> ./ncsim.args
133
echo "-LOGFILE ../log/ncsim.log" >> ./ncsim.args
134
echo "worklib.ps2_test_bench:rtl" >> ./ncsim.args
135
 
136 13 mihad
if ( $output_waveform ) then
137
    echo "database -open waves -shm -into ../out/waves.shm" > ./ncsim.tcl
138
    echo "probe -create -database waves ps2_test_bench -shm -all -depth all" >> ./ncsim.tcl
139
    echo "run"  >> ./ncsim.tcl
140
else
141
    echo "run"  > ./ncsim.tcl
142
endif
143
 
144 2 mihad
echo "quit" >> ./ncsim.tcl
145
 
146
ncsim -f ./ncsim.args
147 33 gorand
 
148
set exit_line_nb = `sed -n '/exit/=' < ../log/ncsim.log`
149
 
150
#echo "$exit_line_nb"
151
 
152
set dead_line_nb = 0
153
 
154
if ( $exit_line_nb ) then
155
 
156
  @ dead_line_nb = $exit_line_nb - 1
157
  set exit_line=`sed -n $exit_line_nb's/exit/&/gp' < ../log/ncsim.log`
158
  set dead_line=`sed -n $dead_line_nb's/report/&/gp' < ../log/ncsim.log`
159
 
160
  echo "$dead_line"
161
  echo "$exit_line"
162
 
163
  echo "TEST: ps2"
164
  if ( "$dead_line" == "report (deaddead)" ) then
165
    if ( "$exit_line" == "exit (00000000)"   ) then
166
      echo "STATUS: passed"  #|tee -a ../log/run_sim.log 2>&1
167
    else
168
      echo "STATUS: failed"  #|tee -a ../log/run_sim.log 2>&1
169
    endif
170
  else
171
    echo "STATUS: failed"
172
  endif
173
 
174
endif
175
 
176
exit
177
 
178
 
179
 

powered by: WebSVN 2.1.0

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