A
Anand P Paralkar
Guest
Hi,
I want to use an aggregate ((en, inp)) as the selector expression of a
case statement as follows:
library ieee; use ieee.std_logic_1164.all;
entity passtrans is
port (inp, en : in std_logic;
outp : out std_logic);
end entity passtrans;
architecture behav of passtrans is
begin
process (inp, en) is
begin
case (en, inp) is --**Aggregate used in case selector expression**
when std_logic_vector'("H1") => outp <= 'H';
when others => outp <= 'W';
end case;
end process;
end architecture behav;
However, the compiler returns the following error:
case expression is not of the correct type
How do I use an aggregate in the selector expression of a case statement?
Thanks,
Anand
I want to use an aggregate ((en, inp)) as the selector expression of a
case statement as follows:
library ieee; use ieee.std_logic_1164.all;
entity passtrans is
port (inp, en : in std_logic;
outp : out std_logic);
end entity passtrans;
architecture behav of passtrans is
begin
process (inp, en) is
begin
case (en, inp) is --**Aggregate used in case selector expression**
when std_logic_vector'("H1") => outp <= 'H';
when others => outp <= 'W';
end case;
end process;
end architecture behav;
However, the compiler returns the following error:
case expression is not of the correct type
How do I use an aggregate in the selector expression of a case statement?
Thanks,
Anand