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

Subversion Repositories ethmac

[/] [ethmac/] [tags/] [rel_14/] [sim/] [rtl_sim/] [ncsim_sim/] [run/] [run_eth_sim_regr.scr] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 172 mohor
#!/bin/csh -f
2
 
3
set arg_num = $#; # number of arguments
4
 
5
# current iterration
6
set iter = 1;
7
# number of tests with DEFINES + test with user defined constants!
8
set all_iterations = 3;
9
 
10
# Process argument
11
set arg_waves = 0;
12
set arg_regression = 0;
13
 
14
if ($arg_num == 0) then
15
            echo "    Verification without any parameter !"
16
else
17
  if ($arg_num == 1) then
18
    if ($1 == "waves") then
19
            @ arg_waves = 1;
20
            echo "    Verification with parameter : waves !"
21
    else
22
      if ($1 == "regression") then
23
            @ arg_regression = 1;
24
            echo "    Verification with parameter : regression !"
25
      else
26
            echo "    Not correct parameter ( $1 )"
27
            echo "    Correct parameters are:"
28
            echo "      - waves"
29
            echo "      - regression"
30
            exit
31
      endif
32
    endif
33
  else
34
    if ($arg_num == 2) then
35
      if ($1 == "waves") then
36
            @ arg_waves = 1;
37
        if ($2 == "regression") then
38
            @ arg_regression = 1;
39
            echo "    Verification with parameter : waves, regression !"
40
        else
41
            echo "    Not correct parameter ( $2 )"
42
            echo "    Correct 2. parameter is:"
43
            echo "      - regression"
44
            exit
45
        endif
46
      else
47
        if ($1 == "regression") then
48
            @ arg_regression = 1;
49
          if ($2 == "waves") then
50
            @ arg_waves = 1;
51
            echo "    Verification with parameter : waves, regression !"
52
          else
53
            echo "    Not correct parameter ( $2 )"
54
            echo "    Correct 2. parameter is:"
55
            echo "      - waves"
56
            exit
57
          endif
58
        else
59
            echo "    Not correct parameter ( $1 )"
60
            echo "    Correct parameters are:"
61
            echo "      - waves"
62
            echo "      - regression"
63
            exit
64
        endif
65
      endif
66
    else
67
            echo "    Too many parameters ( $arg_num )"
68
            echo "    Maximum number of parameters is 2:"
69
            echo "      - waves"
70
            echo "      - regression"
71
            exit
72
    endif
73
  endif
74
endif
75
 
76
echo ""
77
echo "<<<"
78
echo "<<< Ethernet MAC VERIFICATION "
79
echo "<<<"
80
 
81
# ITERATION LOOP
82
iteration:
83
 
84
echo ""
85
echo "<<<"
86
echo "<<< Iteration ${iter}"
87
echo "<<<"
88
 
89
if ($arg_regression == 1) then
90
  if ($iter <= $all_iterations) then
91
    if ($iter == 1) then
92
        echo "<<< Defines:"
93
        echo "\tEthernet with GENERIC RAM"
94
        echo "-DEFINE REGR" > ./defines.args
95
    endif
96
    if ($iter == 2) then
97
        echo "<<< Defines:"
98
        echo "\tEthernet with XILINX DISTRIBUTED RAM"
99
        echo "-DEFINE REGR -DEFINE ETH_FIFO_XILINX" > ./defines.args
100
    endif
101
    if ($iter == 3) then
102
        echo "<<< Defines:"
103
        echo "\tEthernet with XILINX BLOCK RAM"
104
        echo "-DEFINE REGR -DEFINE XILINX_RAMB4" > ./defines.args
105
    endif
106
  endif
107
endif
108
 
109
# Run NC-Verilog compiler
110
echo ""
111
echo "\t@@@"
112
echo "\t@@@ Compiling sources"
113
echo "\t@@@"
114
 
115
# creating .args file for ncvlog and adding main parameters
116
echo "-cdslib ../bin/cds.lib" > ./ncvlog.args
117
echo "-hdlvar ../bin/hdl.var" >> ./ncvlog.args
118
echo "-logfile ../log/ncvlog.log" >> ./ncvlog.args
119
echo "-update" >> ./ncvlog.args
120
echo "-messages" >> ./ncvlog.args
121 175 mohor
echo "-INCDIR ../../../../bench/verilog" >> ./ncvlog.args
122
echo "-INCDIR ../../../../rtl/verilog" >> ./ncvlog.args
123 172 mohor
echo "-DEFINE SIM" >> ./ncvlog.args
124
# adding defines to .args file
125
if ($arg_regression == 1) then
126
    cat ./defines.args >> ./ncvlog.args
127
endif
128
# adding RTL and Sim files to .args file
129
cat ../bin/rtl_file_list.lst >> ./ncvlog.args
130
cat ../bin/sim_file_list.lst >> ./ncvlog.args
131
# adding device dependent files to .args file
132
cat ../bin/xilinx_file_list.lst >> ./ncvlog.args
133
 
134
ncvlog -file ./ncvlog.args# > /dev/null;
135
echo ""
136
 
137
 
138
# Run the NC-Verilog elaborator (build the design hierarchy)
139
echo ""
140
echo "\t@@@"
141
echo "\t@@@ Building design hierarchy (elaboration)"
142
echo "\t@@@"
143
ncelab -file ../bin/ncelab_xilinx.args# > /dev/null;
144
echo ""
145
 
146
 
147
# Run the NC-Verilog simulator (simulate the design)
148
echo ""
149
echo "\t###"
150
echo "\t### Running tests (this takes a long time!)"
151
echo "\t###"
152
 
153
# creating ncsim.args file for ncsim and adding main parameters
154
echo "-cdslib ../bin/cds.lib" > ./ncsim.args
155
echo "-hdlvar ../bin/hdl.var" >> ./ncsim.args
156
echo "-logfile ../log/ncsim.log" >> ./ncsim.args
157
echo "-messages" >> ./ncsim.args
158
if ($arg_waves == 1) then
159
  echo "-input ../bin/ncsim_waves.rc" >> ./ncsim.args
160
else
161
  echo "-input ../bin/ncsim.rc" >> ./ncsim.args
162
endif
163
echo "worklib.ethernet:fun" >> ./ncsim.args
164
 
165
ncsim -file ./ncsim.args# > /dev/null
166
if ($status != 0) then
167
  echo ""
168
  echo "TESTS couldn't start due to Errors!"
169
  echo ""
170
  exit
171
else
172
  if ($arg_regression == 1) then
173
    if ($arg_waves == 1) then
174
      mv ../out/waves.shm ../out/i${iter}_waves.shm
175
    endif
176
    mv ../log/eth_tb.log ../log/i${iter}_eth_tb.log
177
    mv ../log/eth_tb_phy.log ../log/i${iter}_eth_tb_phy.log
178
    mv ../log/eth_tb_memory.log ../log/i${iter}_eth_tb_memory.log
179
    mv ../log/eth_tb_host.log ../log/i${iter}_eth_tb_host.log
180
    mv ../log/eth_tb_wb_s_mon.log ../log/i${iter}_eth_tb_wb_s_mon.log
181
    mv ../log/eth_tb_wb_m_mon.log ../log/i${iter}_eth_tb_wb_m_mon.log
182
  endif
183
endif
184
echo ""
185
 
186
@ iter += 1;
187
 
188
if (($arg_regression == 1) && ($iter <= $all_iterations)) then
189
    goto iteration
190
else
191
#   rm ./defines.args
192
    echo ""
193
    echo "<<<"
194
    echo "<<< End of VERIFICATION"
195
    echo "<<<"
196
    echo "<<<"
197
    echo "<<< -------------------------------------------------"
198
    echo "<<<"
199
endif
200
 

powered by: WebSVN 2.1.0

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