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

Subversion Repositories ethmac

[/] [ethmac/] [tags/] [rel_22/] [sim/] [rtl_sim/] [ncsim_sim/] [run/] [run_eth_sim_regr.scr] - Diff between revs 175 and 290

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 175 Rev 290
Line 1... Line 1...
#!/bin/csh -f
#!/bin/csh -f
 
 
set arg_num = $#; # number of arguments
set arg_num = $#argv; # number of arguments
 
 
# current iterration
# current iterration
set iter = 1;
set iter = 1;
# number of tests with DEFINES + test with user defined constants!
# number of tests with DEFINES + test with user defined constants!
set all_iterations = 3;
set all_iterations = 3;
 
# ATS (Automatic Test System) parameter, which causes displaying 'OK'
 
# if all testcases finish OK.
 
set ok = 1;
 
 
# Process argument
# Process argument
set arg_waves = 0;
set arg_waves = 0;
set arg_regression = 0;
set arg_regression = 0;
 
 
if ($arg_num == 0) then
if ($arg_num == 0) then
            echo "    Verification without any parameter !"
            echo "    Verification without any parameter !"
else
else
  if ($arg_num == 1) then
  if ($arg_num == 1) then
    if ($1 == "waves") then
    if (("$1" == "waves") | ("$1" == "-w")) then
            @ arg_waves = 1;
            @ arg_waves = 1;
            echo "    Verification with parameter : waves !"
            echo "    Verification with parameter : waves !"
    else
    else
      if ($1 == "regression") then
      if (("$1" == "regression") | ("$1" == "-r")) then
            @ arg_regression = 1;
            @ arg_regression = 1;
            echo "    Verification with parameter : regression !"
            echo "    Verification with parameter : regression !"
      else
      else
            echo "    Not correct parameter ( $1 )"
            echo "    Not correct parameter ( $1 )"
            echo "    Correct parameters are:"
            echo "    Correct parameters are:"
            echo "      - waves"
            echo "      'waves' or '-w'"
            echo "      - regression"
            echo "      'regression' or '-r'"
            exit
            exit
      endif
      endif
    endif
    endif
  else
  else
    if ($arg_num == 2) then
    if ($arg_num == 2) then
      if ($1 == "waves") then
      if (("$1" == "waves") | ("$1" == "-w")) then
            @ arg_waves = 1;
            @ arg_waves = 1;
        if ($2 == "regression") then
        if (("$2" == "regression") | ("$2" == "-r")) then
            @ arg_regression = 1;
            @ arg_regression = 1;
            echo "    Verification with parameter : waves, regression !"
            echo "    Verification with parameter : waves, regression !"
        else
        else
            echo "    Not correct parameter ( $2 )"
            echo "    Not correct parameter ( $2 )"
            echo "    Correct 2. parameter is:"
            echo "    Correct 2. parameter is:"
            echo "      - regression"
            echo "      'regression' or '-r'"
            exit
            exit
        endif
        endif
      else
      else
        if ($1 == "regression") then
        if (("$1" == "regression") | ("$1" == "-r")) then
            @ arg_regression = 1;
            @ arg_regression = 1;
          if ($2 == "waves") then
          if (("$2" == "waves") | ("$2" == "-w")) then
            @ arg_waves = 1;
            @ arg_waves = 1;
            echo "    Verification with parameter : waves, regression !"
            echo "    Verification with parameter : waves, regression !"
          else
          else
            echo "    Not correct parameter ( $2 )"
            echo "    Not correct parameter ( $2 )"
            echo "    Correct 2. parameter is:"
            echo "    Correct 2. parameter is:"
            echo "      - waves"
            echo "      'waves' or '-w'"
            exit
            exit
          endif
          endif
        else
        else
            echo "    Not correct parameter ( $1 )"
            echo "    Not correct parameter ( $1 )"
            echo "    Correct parameters are:"
            echo "    Correct parameters are:"
            echo "      - waves"
            echo "      'waves' or '-w'"
            echo "      - regression"
            echo "      'regression' or '-r'"
            exit
            exit
        endif
        endif
      endif
      endif
    else
    else
            echo "    Too many parameters ( $arg_num )"
            echo "    Too many parameters ( $arg_num )"
            echo "    Maximum number of parameters is 2:"
            echo "    Maximum number of parameters is 2:"
            echo "      - waves"
            echo "      'waves' or '-w'"
            echo "      - regression"
            echo "      'regression' or '-r'"
            exit
            exit
    endif
    endif
  endif
  endif
endif
endif
 
 
Line 160... Line 163...
else
else
  echo "-input ../bin/ncsim.rc" >> ./ncsim.args
  echo "-input ../bin/ncsim.rc" >> ./ncsim.args
endif
endif
echo "worklib.ethernet:fun" >> ./ncsim.args
echo "worklib.ethernet:fun" >> ./ncsim.args
 
 
ncsim -file ./ncsim.args# > /dev/null
#ncsim -file ./ncsim.args# > /dev/null
if ($status != 0) then
#if ($status != 0) then
  echo ""
  echo ""
  echo "TESTS couldn't start due to Errors!"
#  echo "TESTS couldn't start due to Errors!"
  echo ""
  echo ""
  exit
#  exit
else
#else
  if ($arg_regression == 1) then
  if ($arg_regression == 1) then
    if ($arg_waves == 1) then
    if ($arg_waves == 1) then
      mv ../out/waves.shm ../out/i${iter}_waves.shm
      mv ../out/waves.shm ../out/i${iter}_waves.shm
    endif
    endif
 
    # For ATS - counting all 'FAILED' words
 
    set FAIL_COUNT = `grep -c "FAILED" ../log/eth_tb.log`
 
    if ($FAIL_COUNT != 0) then
 
        # Test didn't pass!!!
 
        @ ok = 0;
 
    endif
 
    # Move 'log' files
    mv ../log/eth_tb.log ../log/i${iter}_eth_tb.log
    mv ../log/eth_tb.log ../log/i${iter}_eth_tb.log
    mv ../log/eth_tb_phy.log ../log/i${iter}_eth_tb_phy.log
    mv ../log/eth_tb_phy.log ../log/i${iter}_eth_tb_phy.log
    mv ../log/eth_tb_memory.log ../log/i${iter}_eth_tb_memory.log
    mv ../log/eth_tb_memory.log ../log/i${iter}_eth_tb_memory.log
    mv ../log/eth_tb_host.log ../log/i${iter}_eth_tb_host.log
    mv ../log/eth_tb_host.log ../log/i${iter}_eth_tb_host.log
    mv ../log/eth_tb_wb_s_mon.log ../log/i${iter}_eth_tb_wb_s_mon.log
    mv ../log/eth_tb_wb_s_mon.log ../log/i${iter}_eth_tb_wb_s_mon.log
    mv ../log/eth_tb_wb_m_mon.log ../log/i${iter}_eth_tb_wb_m_mon.log
    mv ../log/eth_tb_wb_m_mon.log ../log/i${iter}_eth_tb_wb_m_mon.log
  endif
  endif
endif
#endif
echo ""
echo ""
 
 
@ iter += 1;
@ iter += 1;
 
 
if (($arg_regression == 1) && ($iter <= $all_iterations)) then
if (($arg_regression == 1) && ($iter <= $all_iterations)) then
Line 194... Line 204...
    echo "<<< End of VERIFICATION"
    echo "<<< End of VERIFICATION"
    echo "<<<"
    echo "<<<"
    echo "<<<"
    echo "<<<"
    echo "<<< -------------------------------------------------"
    echo "<<< -------------------------------------------------"
    echo "<<<"
    echo "<<<"
 
    # For ATS - displaying 'OK' when tests pass successfuly
 
    echo " "
 
    echo "Simulation finished:"
 
    if ($ok == 1) then
 
        echo "OK"
 
    else
 
        echo "FAILED"
 
    endif
endif
endif
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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