streetHawkk
Newbie level 5
Hi Friends,
I have a scenario where i want to increment b only for a certain condition of a. Will the below code create a latch. Is this a good way to avoid creation of a latch for such a scenario.
Please comment.
I have a scenario where i want to increment b only for a certain condition of a. Will the below code create a latch. Is this a good way to avoid creation of a latch for such a scenario.
Please comment.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 b_proc: process(clk) begin if(clk'event and clk='1') then if(a > 1) then b <= b+1; else b <= b end if; end if; end process;