diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-15 07:37:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-15 07:37:52 +0200 |
commit | d941c8f65bbbb90f97c17e26b5610624c2198b10 (patch) | |
tree | 59f5a31839273b345e2eba52f15c3dc073ccba45 /testsuite/examples/dff/testsuite.sh | |
parent | 81bb4346368e4769251e66ec0e43e2d1d17c2c45 (diff) | |
download | ghdl-yosys-plugin-d941c8f65bbbb90f97c17e26b5610624c2198b10.tar.gz ghdl-yosys-plugin-d941c8f65bbbb90f97c17e26b5610624c2198b10.tar.bz2 ghdl-yosys-plugin-d941c8f65bbbb90f97c17e26b5610624c2198b10.zip |
Add tests/examples for dff (both pos and neg edge).
Diffstat (limited to 'testsuite/examples/dff/testsuite.sh')
-rwxr-xr-x | testsuite/examples/dff/testsuite.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/examples/dff/testsuite.sh b/testsuite/examples/dff/testsuite.sh new file mode 100755 index 0000000..aceef4e --- /dev/null +++ b/testsuite/examples/dff/testsuite.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +topdir=../.. +. $topdir/testenv.sh + +run_yosys -q -p "ghdl negdff.vhdl -e; write_ilang negdff.ilang" +fgrep -q "cell \$dff" negdff.ilang +fgrep -q "CLK_POLARITY 0" negdff.ilang +fgrep -q "WIDTH 1" negdff.ilang + +run_yosys -q -p "ghdl dff.vhdl -e; write_ilang dff.ilang" +fgrep -q "CLK_POLARITY 1" dff.ilang +fgrep -q "WIDTH 1" dff.ilang + +run_yosys -q -p "ghdl adff.vhdl -e; opt; write_ilang adff.ilang" +fgrep -q 'cell $adff' adff.ilang +fgrep -q 'ARST_POLARITY 1' adff.ilang +fgrep -q "ARST_VALUE 1'1" adff.ilang +fgrep -q 'CLK_POLARITY 1' adff.ilang +fgrep -q 'WIDTH 1' adff.ilang + +run_yosys -q -p "ghdl negadff.vhdl -e; write_ilang negadff.ilang" +fgrep -q 'cell $adff' negadff.ilang +fgrep -q 'ARST_POLARITY 1' negadff.ilang +fgrep -q "ARST_VALUE 1'0" negadff.ilang +fgrep -q 'CLK_POLARITY 0' negadff.ilang +fgrep -q 'WIDTH 1' negadff.ilang + +clean +echo OK |