V
Valentin Tihomirov
Guest
1. Why this works only in architecture body?
A <= 0 when A = 9 else A + 1;
-- and this
with A select
A <= 0 when 9,
<= (A + 1) when others;
But not in clocked process? I have to write
A <= A + 1;
if A = 9 then
A <= 0;
end if;
2. In addition, I cannot force my compiler to analyze this
signal A: std_logic;
signal I: integer;
A <= (I = 10); -- how can I convert bool into std_logic?
I have to write
A <= '1' when (I = 10) else '0';
A <= 0 when A = 9 else A + 1;
-- and this
with A select
A <= 0 when 9,
<= (A + 1) when others;
But not in clocked process? I have to write
A <= A + 1;
if A = 9 then
A <= 0;
end if;
2. In addition, I cannot force my compiler to analyze this
signal A: std_logic;
signal I: integer;
A <= (I = 10); -- how can I convert bool into std_logic?
I have to write
A <= '1' when (I = 10) else '0';