waiting on vector change

A

Andy Peters

Guest
A funny thing is happening in my test bench.

Given an entity with a vector in the list of ports:

entity foo is
port (
in bar : std_logic_vector(7 downto 0);
... );
end entity foo;

and a greatly-simplified architecture

architecture bletch of foo is
begin
proc : process is
begin
wait on bar; -- wait for change
doSomething;
end process proc;
end architecture bletch;

The problem is that the wait is triggered when the vector bar changes
from all undriven ('UUUUUUUU') to some reasonable value. Then
doSomething is called, and then it goes back to waiting for bar to
change. The higher-level module that uses foo definitely changes bar
again, and I can see it change in foo, but the process proc is hung and
apparently doesn't see bar changing.

My assumption is that this should work but it doesn't. I'm using
ModelSim XE Starter 5.8c

Ideas?

thanks,
-a
 
Maybe bar changes during doSomething;
instead of during the wait. You only
have half of a handshake here.
Mike,
That's exactly it. I added a "Busy" flag that the logic must monitor
and know not to change bar until Busy goes away.
Thanks,
-a
 

Welcome to EDABoard.com

Sponsor

Back
Top