Commit 11c1bf18 authored by Roberto Hexsel's avatar Roberto Hexsel

fixed build/compile scripts for simulation/synthesis versions

parent f5884ddc
......@@ -54,6 +54,7 @@ exit 1
if [ $# = 0 ] ; then usage ; exit 1 ; fi
miffile=false
pacMem_changed=false
verbose=false
names=false
unset mem_map
......@@ -86,8 +87,10 @@ while true ; do
;;
-n) names=true
;;
-mif | -m | -syn ) miffile=true
-mif | -syn ) miffile=true
;;
-new ) pacMem_changed=true
;;
-x) set -x
;;
*) inp=${1%.s}
......@@ -118,7 +121,9 @@ else
fi
if [ $pkg_vhd -nt $c_ld -o $pkg_vhd -nt $c_s ] ; then
if [ $pacMem_changed -o\
$pkg_vhd -nt $c_ld -o\
$pkg_vhd -nt $c_s ] ; then
"${bin}"/edMemory.sh -v || errorED || exit 1
fi
......
......@@ -43,18 +43,22 @@ usage: $0 [options]
OPTIONS:
-h Show this message
-syn Compile for Macnica's board, else for simulation
-new Automagically update all addresses (packageMemory.vhd changed)
-x turn on "set -x"
EOF
}
synth=false
pacMem_changed=false
while true ; do
case "$1" in
-h) usage ; exit 1
;;
-mif | -syn ) synth=true
-syn | -mif ) synth=true
;;
-new ) pacMem_changed=true
;;
-x) set -x
;;
......@@ -85,7 +89,7 @@ c_s="${include}"/cMIPS.s
c_h="${include}"/cMIPS.h
if [ $synth = tree ] ; then
if [ $synth = true ] ; then
pkg_vhd="$srcVHDL/packageMemory_fpga.vhd"
(cd $srcVHDL ; ln -s -f packageMemory_fpga.vhd packageMemory.vhd)
else
......@@ -100,6 +104,9 @@ if [ $pkg_vhd -nt $c_ld -o\
"${bin}"/edMemory.sh -v || errorED || exit 1
fi
if [ $pacMem_changed ] ; then
"${bin}"/edMemory.sh -v || errorED || exit 1
fi
cd "${srcVHDL}"
......
......@@ -37,6 +37,7 @@ OPTIONS:
-W Pass -Wall on to GCC
-mif Generate output file ROM.mif for Altera's FPGAs
-syn Compile for synthesis, else for simulation
-new Automagically update all addresses (packageMemory.vhd changed)
EOF
}
......@@ -57,6 +58,7 @@ if [ $# = 0 ] ; then usage ; exit 1 ; fi
miffile=false
synth=false
pacMem_changed=false
verbose=false
names=true
unset memory_map
......@@ -87,6 +89,8 @@ while true ; do
-mif | -syn ) synth=true
miffile=true
;;
-new ) pacMem_changed=true
;;
-x) set -x
;;
*) inp=${1%.c}
......@@ -128,7 +132,8 @@ else
(cd $srcVHDL ; ln -s -f packageMemory_simu.vhd packageMemory.vhd)
fi
if [ $pkg_vhd -nt $c_h -o\
if [ $pacMem_changed -o\
$pkg_vhd -nt $c_h -o\
$pkg_vhd -nt $c_ld -o\
$pkg_vhd -nt $c_s ] ; then
"${bin}"/edMemory.sh -v || errorED || exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment