It appears that in a latch, the clock is being used as an enable line which dictates WHEN D should set Q.
ie
Q <= D when enable = '1' else Q; --latch
It appears that a flip flop, uses the rising edge of the clock to write. D will set Q when it sees a rising edge.
ie
Q <= D when clock = '1' and clock'event else Q; --flip-flop
---------
The below is Reblogged from here
No comments:
Post a Comment