![]() |
|
|
|
#1 |
|
logitech wrote:
> Can I do this: > if (flag = '1') then > flag <= '0'; You can do it, but it may not do what you expect, because the value of flag is still '1' until the end of the process. (which often means the next clock cycle) If I use a process variable instead of a signal I would get an immediate update: if flag_v = '1' then flag_v := '0'; end if -- flag value is '0' below here .... But for internal nodes, this is the same as just saying: flag_v := '0'; I use boolean variable handshakes like this frequently in single process entities. Note that when I update such a flag, the code below will see it on the the same clock tick, but code above won't see it until next tick. -- Mike Treseler Mike Treseler |
|
|