2020 day2/vhdl: don't simulate synthesized design by default
This commit is contained in:
parent
33fb12e53d
commit
3ab9f6bb2e
1 changed files with 13 additions and 12 deletions
|
@ -3,20 +3,21 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
INPUT=$1
|
INPUT=$1
|
||||||
|
MODE=${2:-}
|
||||||
GHDLFLAGS="--std=08 --workdir=workdir"
|
GHDLFLAGS="--std=08 --workdir=workdir"
|
||||||
|
|
||||||
mkdir -p workdir
|
mkdir -p workdir
|
||||||
|
|
||||||
ghdl remove $GHDLFLAGS
|
if [[ $MODE = "--synth" ]]; then
|
||||||
ghdl analyze $GHDLFLAGS parser.vhd verifier.vhd top.vhd sim.vhd
|
for step in 1 2; do
|
||||||
ghdl elab-run $GHDLFLAGS sim -gSTEP=1 < "$INPUT"
|
ghdl remove $GHDLFLAGS
|
||||||
ghdl elab-run $GHDLFLAGS sim -gSTEP=2 < "$INPUT"
|
ghdl synth $GHDLFLAGS -gCOUNTER_WIDTH=12 -gSTEP="$step" parser.vhd verifier.vhd top.vhd -e top > top_syn.vhd 2>/dev/null
|
||||||
|
ghdl analyze $GHDLFLAGS top_syn.vhd sim.vhd
|
||||||
echo "Synthesized: "
|
ghdl elab-run $GHDLFLAGS sim -gSTEP="$step" --ieee-asserts=disable < "$INPUT"
|
||||||
|
done
|
||||||
for step in 1 2; do
|
else
|
||||||
ghdl remove $GHDLFLAGS
|
ghdl remove $GHDLFLAGS
|
||||||
ghdl synth $GHDLFLAGS -gCOUNTER_WIDTH=12 -gSTEP="$step" parser.vhd verifier.vhd top.vhd -e top > top_syn.vhd
|
ghdl analyze $GHDLFLAGS parser.vhd verifier.vhd top.vhd sim.vhd
|
||||||
ghdl analyze $GHDLFLAGS top_syn.vhd sim.vhd
|
ghdl elab-run $GHDLFLAGS sim -gSTEP=1 < "$INPUT"
|
||||||
ghdl elab-run $GHDLFLAGS sim -gSTEP="$step" --ieee-asserts=disable < "$INPUT"
|
ghdl elab-run $GHDLFLAGS sim -gSTEP=2 < "$INPUT"
|
||||||
done
|
fi
|
||||||
|
|
Loading…
Reference in a new issue