URL
https://opencores.org/ocsvn/s1_core/s1_core/trunk
[/] [s1_core/] [trunk/] [tools/] [bin/] [s1_sim_build] - Diff between revs 111 and 113
Show entire file |
Details |
Blame |
View Log
Rev 111 |
Rev 113 |
Line 1... |
Line 1... |
#!/bin/bash
|
#!/bin/bash
|
|
|
set -e
|
simulator=$1
|
if ( (test $# != 1) || ((test $1 != "icarus") && (test $1 != "vcs")) ) then
|
if ! [ "$simulator" == "icarus" ] && ! [ "$simulator" == "vcs" ]; then
|
echo "Usage: $0 {icarus|vcs}"
|
echo "Usage: $0 {icarus|vcs}"
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
test_var S1_ROOT
|
test_var S1_ROOT
|
|
|
echo -e "Building design and testbench using $1"
|
echo -e "Building design and testbench using $simulator"
|
mkdir -p $S1_ROOT/run/sim/$1
|
mkdir -p $S1_ROOT/run/sim/$simulator
|
cd $S1_ROOT/run/sim/$1
|
cd $S1_ROOT/run/sim/$simulator
|
rm -rf *
|
rm -rf *
|
|
|
if(test $1 == "icarus") then
|
if [ "$simulator" == "icarus" ]; then
|
iverilog -o testbench -c$FILELIST_ICARUS
|
iverilog -D CMP_CLK_PERIOD=1 -g2012 -o testbench -c$FILELIST_ICARUS
|
fi
|
fi
|
|
|
if(test $1 == "vcs") then
|
if [ "$simulator" == "vcs" ]; then
|
vcs +cli -line -timescale=1ns/100ps -f $FILELIST_VCS
|
vcs +cli -line -timescale=1ns/100ps -f $FILELIST_VCS
|
mv -f simv testbench
|
mv -f simv testbench
|
mv -f simv.daidir testbench.daidir
|
mv -f simv.daidir testbench.daidir
|
fi
|
fi
|
|
|
echo -e "Build with $1 done!"
|
echo -e "Build with $simulator done!"
|
|
|
|
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.