Re: Showing my ignorance of VHDL again...

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


Quoted text here. Click to load it

No.
You can wait UNTIL an expression has a value of true or
you can wait ON a signal_id for *any* value change.

Quoted text here. Click to load it


Consider View, Source
and setting some breakpoints.
Run/step code and watch the signals.

Either the wait is in a different process
or ARM_Bus_Start is not true at the right time.

  -- Mike Treseler


Re: Showing my ignorance of VHDL again...
Quoted text here. Click to load it

I did look at everything in detail in the simulator.  The wait statement
shown above executes with ARM_Bus_Start set to true and the process is
hung at that wait.  I have solved the problem by testing ARM_Bus_Start
before I execute the wait and it runs as expected.  So it is pretty
clear that the issue is the wait requiring a change in state of a signal
in the expression before it evaluates the expression.  

I will try some more tests when I get a chance.  

--

Rick "rickman" Collins

snipped-for-privacy@XYarius.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Showing my ignorance of VHDL again...
Don't waste your time. Think 2 sec. If the wait until was sensitive on
condition level and your signal ARM_Bus_Start is true for 10ns and your
simulator's resolution is set at 1ps then the process would be executed
10000 times in row. Your simulation will take 6 month to execute.

Check in your vhdl book.  If you don't have a book, I recommend  The
Designer's Guide to VHDL by Peter Ashenden.

P.A. wrote in is book : the condition is tested whenever an event occurs on
any of the signals mentioned in the condition.

regards
FE
Sr ASIC Designer

Quoted text here. Click to load it
flag



Re: Showing my ignorance of VHDL again...

Quoted text here. Click to load it
someone
No, it's not a bug. It's the way VHDL is defined. As someone else
said, a wait statement is implicitly sensitive to all the signals
in the boolean condition. So in your example, you can re-write

wait until mysig = '1';

as

wait on mysig until mysig = '1';


In Rick's original example, where the testbench "hung", you can
sometimes use this approach

wait until ArmStart for 100 us; -- 100 us timeout
if ArmStart'EVENT then
   -- yippee, event occurred before time out
   -- so carry on

else
  report "ArmStart didn't occur within 100 us - Doh!";
end if;

regards

Alan

--
Alan Fitch
Consultant

We've slightly trimmed the long signature. Click to see the full one.

Site Timeline