diff options
Diffstat (limited to 'testsuite/synth/synth38/tb_modulo_test.vhdl')
-rw-r--r-- | testsuite/synth/synth38/tb_modulo_test.vhdl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/synth/synth38/tb_modulo_test.vhdl b/testsuite/synth/synth38/tb_modulo_test.vhdl new file mode 100644 index 000000000..0395be47a --- /dev/null +++ b/testsuite/synth/synth38/tb_modulo_test.vhdl @@ -0,0 +1,31 @@ +entity tb_modulo_test is +end tb_modulo_test; + +library ieee; +use ieee.std_logic_1164.all; + +architecture behav of tb_modulo_test is + signal a, b, c : integer := 0; +begin + dut: entity work.modulo_test + port map (a, b, c); + + process + begin + a <= 7; + wait for 1 ns; + assert b = 7 severity failure; + assert c = 7 severity failure; + + a <= 8; + wait for 1 ns; + assert b = 0 severity failure; + assert c = 0 severity failure; + + a <= -7; + wait for 1 ns; + assert b = 1 severity failure; + assert c = -7 severity failure; + wait; + end process; +end behav; |