Skip to content
Snippets Groups Projects
Commit c6d65b7c authored by Roberto Hexsel's avatar Roberto Hexsel
Browse files

changed run.sh so simulator may read from stdin

parent 9e086881
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ exit 1 ...@@ -36,7 +36,7 @@ exit 1
if [ ! -v tree ] ; then if [ ! -v tree ] ; then
# you must set the location of the cMIPS root directory in the variable tree # you must set the location of the cMIPS root directory in the variable tree
# tree=${HOME}/cMIPS # tree=${HOME}/cMIPS
# tree=${HOME}/cmips-code/cMIPS # tree=${HOME}/cmips/cMIPS
export tree="$(echo $PWD | sed -e 's:^\(/.*/cMIPS\)/.*:\1:')" export tree="$(echo $PWD | sed -e 's:^\(/.*/cMIPS\)/.*:\1:')"
fi fi
...@@ -59,7 +59,6 @@ if [ $pkg_vhd -nt $c_ld -o\ ...@@ -59,7 +59,6 @@ if [ $pkg_vhd -nt $c_ld -o\
"${bin}"/edMemory.sh -v || errorED || exit 1 "${bin}"/edMemory.sh -v || errorED || exit 1
fi fi
# cd "${obj}"
cd "${srcVHDL}" cd "${srcVHDL}"
...@@ -67,7 +66,7 @@ simulator=tb_cmips ...@@ -67,7 +66,7 @@ simulator=tb_cmips
pkg="packageWires.vhd packageMemory.vhd packageExcp.vhd" pkg="packageWires.vhd packageMemory.vhd packageExcp.vhd"
src="altera.vhd macnica.vhd aux.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd rom.vhd units.vhd io.vhd uart.vhd fpu.vhd pipestages.vhd exception.vhd core.vhd tb_cMIPS.vhd" src="aux.vhd altera.vhd macnica.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd rom.vhd units.vhd io.vhd uart.vhd fpu.vhd pipestages.vhd exception.vhd core.vhd tb_cMIPS.vhd"
# build simulator # build simulator
#ghdl --clean #ghdl --clean
...@@ -86,9 +85,9 @@ src="altera.vhd macnica.vhd aux.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd ...@@ -86,9 +85,9 @@ src="altera.vhd macnica.vhd aux.vhd memory.vhd cache.vhd instrcache.vhd ram.vhd
# NOTE: when you add a new sourcefile to this project, you must include it # NOTE: when you add a new sourcefile to this project, you must include it
# with "ghdl -i newFile.vhd" so that learns about it. It may be # with "ghdl -i newFile.vhd" so that ghdl learns about it. It may be
# a good idea to remove ./.last_import fo force a full rebuild. # a good idea to remove ./.last_import to force a full rebuild.
# Of course, newFile.vhd must be added to the $src variable. # Of course, newFile.vhd must be added to the $src variable (above).
# if never imported sources, do it now # if never imported sources, do it now
if [ ! -f .last_import ] ; then if [ ! -f .last_import ] ; then
......
...@@ -40,7 +40,7 @@ OPTIONS: ...@@ -40,7 +40,7 @@ OPTIONS:
-t T number of time-units to run (default ${length}) -t T number of time-units to run (default ${length})
-u U unit of time scale {m,u,n,p} (default ${unit}s) -u U unit of time scale {m,u,n,p} (default ${unit}s)
-n send simulator output do /dev/null, else to v_cMIPS.vcd -n send simulator output do /dev/null, else to v_cMIPS.vcd
-w invoke GTKWAVE -w invoke GTKWAVE -- stdin will not read input from keyboard
-v F gtkwave configuration file (e.g. pipe.sav, default v.sav) -v F gtkwave configuration file (e.g. pipe.sav, default v.sav)
EOF EOF
} }
...@@ -77,10 +77,19 @@ gfile=${gtkwconf%%.sav} ...@@ -77,10 +77,19 @@ gfile=${gtkwconf%%.sav}
sav="${tree}"/${gfile}.sav sav="${tree}"/${gfile}.sav
"${bin}"/build.sh &&\ "${bin}"/build.sh || ( usage ; exit 1)
"${simulator}" --ieee-asserts=disable --stop-time=${length}${unit}s \
--vcd=${visual}
# --wave=${visual%.vcd}.ghw options="--ieee-asserts=disable --stop-time=${length}${unit}s --vcd=${visual}"
if [ -v $WAVE ] ; then
exec "${simulator}" $options
test -v $WAVE || gtkwave -O /dev/null ${visual} ${sav} else
"${simulator}" $options || gtkwave -O /dev/null ${visual} ${sav}
fi
# --wave=${visual%.vcd}.ghw
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment