V
vtb
Guest
Hello,
I have a problem with logic of case statement in vhdl. I wonder is the variable that selects the case condition can be changed within the statement. To clarify:
process(clk)
variable aaa: std_logic_vector(2 downto 0):="000";
case aaa is
when "000" =>
if () then
something
end if;
aaa := aaa+1;
when "001" =>
something
aaa := aaa+1;
when others =>
-- sequential statements
when others =>
-- sequential statements
end case ;
end process;
When I tried to synthesize a code with that algorithm, it displays an error. What is the problem here? Can't I change the variable within the case? Or the problem is about the if statement in the case?
If anyone can help, I'll appreciate it.
I have a problem with logic of case statement in vhdl. I wonder is the variable that selects the case condition can be changed within the statement. To clarify:
process(clk)
variable aaa: std_logic_vector(2 downto 0):="000";
case aaa is
when "000" =>
if () then
something
end if;
aaa := aaa+1;
when "001" =>
something
aaa := aaa+1;
when others =>
-- sequential statements
when others =>
-- sequential statements
end case ;
end process;
When I tried to synthesize a code with that algorithm, it displays an error. What is the problem here? Can't I change the variable within the case? Or the problem is about the if statement in the case?
If anyone can help, I'll appreciate it.