W
Weng Tianxiang
Hi,
I have a question about when to generate a latch.
In Example_1 and Exmaple_2, I don't think it will generate a latch. I
don't know why.
Example_1: process(RESET, CLK)
Begin
If RESET = ‘1’ then
StateA <= S0;
Elsif CLK’event = ‘1’ and CLK = ‘1’ then
If SINI = ‘1’ then
StateA <= S0;
Elsif E2 = ‘1’ then
null; -- missing a signal assignment statement
-- I suppose it will not generate a latch, why?
Elsif StateA = S1 then
StateA <= S3;
Else
StateA <= StateA_NS;
End if;
End if;
End process;
Example_2: process(…)
Begin
Case StateA is
...; -- no signal assignement statements are missing
End case;
End process;
Weng
I have a question about when to generate a latch.
In Example_1 and Exmaple_2, I don't think it will generate a latch. I
don't know why.
Example_1: process(RESET, CLK)
Begin
If RESET = ‘1’ then
StateA <= S0;
Elsif CLK’event = ‘1’ and CLK = ‘1’ then
If SINI = ‘1’ then
StateA <= S0;
Elsif E2 = ‘1’ then
null; -- missing a signal assignment statement
-- I suppose it will not generate a latch, why?
Elsif StateA = S1 then
StateA <= S3;
Else
StateA <= StateA_NS;
End if;
End if;
End process;
Example_2: process(…)
Begin
Case StateA is
...; -- no signal assignement statements are missing
End case;
End process;
Weng