diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-16 17:14:53 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-16 17:14:53 +0100 |
commit | 56a6d968b646f60d8c248b9838455431382081ea (patch) | |
tree | caacc116eb4808f6ba01111117bf53c91cbfefdd /testsuite/issue7/vector.vhdl | |
parent | ecf716c5510cd3b4f0006ba4ff074107e76d88ba (diff) | |
download | ghdl-yosys-plugin-56a6d968b646f60d8c248b9838455431382081ea.tar.gz ghdl-yosys-plugin-56a6d968b646f60d8c248b9838455431382081ea.tar.bz2 ghdl-yosys-plugin-56a6d968b646f60d8c248b9838455431382081ea.zip |
Testcase for issue #7
Diffstat (limited to 'testsuite/issue7/vector.vhdl')
-rw-r--r-- | testsuite/issue7/vector.vhdl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/issue7/vector.vhdl b/testsuite/issue7/vector.vhdl new file mode 100644 index 0000000..3ab2e24 --- /dev/null +++ b/testsuite/issue7/vector.vhdl @@ -0,0 +1,29 @@ +architecture synth of vector is + +signal v : std_logic_vector(7 downto 0); + +begin + + -- It works ok + --(led7, led6, led5, led4, led3, led2, led1, led0) <= std_logic_vector'("10101010"); + + -- It is assigned in reverse order (led7 should be MSB, but it is assigned + -- the lsb. led0 should be the lsb, but is assigned as the MSB) + v <= std_logic_vector'("10101010"); + led7 <= v(7); + led6 <= v(6); + led5 <= v(5); + led4 <= v(4); + led3 <= v(3); + led2 <= v(2); + led1 <= v(1); + led0 <= v(0); + +end synth; + +architecture ok of vector is + signal v : std_logic_vector(7 downto 0); +begin + -- It works ok + (led7, led6, led5, led4, led3, led2, led1, led0) <= std_logic_vector'("10101010"); +end ok; |