![]() |
|
|
|
#1 |
|
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 Andy Peters |
|
|
|
|
#2 |
|
Posts: n/a
|
Andy Peters wrote:
> 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. You don't appear to have included enough code. Either you need a sensitivity list, or you need an inifinite wait in the process. Otherwise, Modelsim should give you an error when you attempt to compile that. Do you have a sensitivity list that includes bar? Duane Clark |
|
|
|
#3 |
|
Posts: n/a
|
Duane Clark wrote:
> > You don't appear to have included enough code. Either you need a > sensitivity list, or you need an inifinite wait in the process. > Otherwise, Modelsim should give you an error when you attempt to compile > that. Do you have a sensitivity list that includes bar? Hmm.. my bad. Any wait is okay, so ignore that, sorry. Duane Clark |
|
|
|
#4 |
|
Posts: n/a
|
Andy Peters wrote:
> 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. Maybe bar changes during doSomething; instead of during the wait. You only have half of a handshake here. -- Mike Treseler Mike Treseler |
|
|
|
#5 |
|
Posts: n/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 Andy Peters |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| YOU HAVE MONEY UNCLAIMED WAITING FOR YOU--9 OUT OF 10 AMERICANS HAVE UNCLAIMED MONEY!!!! | your-money | DVD Video | 0 | 02-06-2006 12:47 AM |
| Here's one I have been waiting for --- "MATINEE" Anyone Else?? | Film Buff | DVD Video | 2 | 11-09-2004 08:15 PM |
| What I am waiting for on DVD!! | Film Buff | DVD Video | 50 | 09-02-2004 02:08 PM |
| The DVD box set I'm waiting for... | Joseph Vitale | DVD Video | 9 | 11-02-2003 09:23 PM |
| Air: Eating Sleeping Waiting and Playing | BC | DVD Video | 3 | 07-02-2003 06:22 PM |