Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - waiting on vector change

 
Thread Tools Search this Thread
Old 05-10-2005, 12:47 AM   #1
Default waiting on vector change


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
  Reply With Quote
Old 05-10-2005, 01:24 AM   #2
Duane Clark
 
Posts: n/a
Default Re: waiting on vector change
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
  Reply With Quote
Old 05-10-2005, 02:00 AM   #3
Duane Clark
 
Posts: n/a
Default Re: waiting on vector change
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
  Reply With Quote
Old 05-10-2005, 02:33 AM   #4
Mike Treseler
 
Posts: n/a
Default Re: waiting on vector change
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
  Reply With Quote
Old 05-10-2005, 05:48 PM   #5
Andy Peters
 
Posts: n/a
Default Re: waiting on vector change
> 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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46