mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 06:53:48 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
29 lines
612 B
VHDL
29 lines
612 B
VHDL
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
|
|
entity foo_entity is
|
|
|
|
port(
|
|
data_i : in std_logic_vector(1 downto 0);
|
|
data_o, data_o2, data_o3 : out std_logic_vector(3 downto 0)
|
|
);
|
|
|
|
end foo_entity;
|
|
|
|
architecture behaviour of foo_entity is
|
|
|
|
begin
|
|
|
|
data_o <= "0001" when ( data_i="00" ) else
|
|
"0010" when ( data_i="01" ) else
|
|
"0100" when ( data_i="10" ) else
|
|
"1000";
|
|
|
|
-- test cases without the final 'else' statement
|
|
data_o2 <= "0101" when ( data_i="01" );
|
|
|
|
data_o3 <= "1100" when ( data_i="10" ) else
|
|
"0011" when ( data_i="01" );
|
|
|
|
end behaviour;
|