streetHawkk
Newbie level 5
- Joined
- May 14, 2012
- Messages
- 8
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,359
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;