diff options
Diffstat (limited to 'testsuite/gna/issue2368/matchent1.vhdl')
-rw-r--r-- | testsuite/gna/issue2368/matchent1.vhdl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue2368/matchent1.vhdl b/testsuite/gna/issue2368/matchent1.vhdl new file mode 100644 index 000000000..5fe907965 --- /dev/null +++ b/testsuite/gna/issue2368/matchent1.vhdl @@ -0,0 +1,27 @@ +library ieee; +use ieee.numeric_std.all; + +entity MatchEnt is + port ( + A : in unsigned(4 downto 0); + B : in unsigned(4 downto 0); + XOUT : out unsigned(4 downto 0) + ); +end entity; + +architecture behavior of MatchEnt is +begin + tester : process (A, B) + begin + case A is + when to_unsigned(17, 5) => + XOUT <= A + 1; + when to_unsigned(21, 5) => + XOUT <= A + B; + when to_unsigned(34, 5) => + XOUT <= A - B; + when others => + XOUT <= resize(A * B, 5); + end case; + end process; +end architecture; |