Blocking and non blocking assignment in VHDL

H

Hendra Gunawan

Hi folks,
In Verilog, we have blocking and non blocking assignments. Is there any
equivalent assignment in VHDL? From my understanding, inside the "process",
statements are executed consecutively. Is there anyway that I can make it
concurrent, just like the one in Verilog when we use "<=" assignment to
ensure concurrent execution of all the statements in the always block?
Thanks!

Hendra
 
A

Allan Herriman

Hi folks,
In Verilog, we have blocking and non blocking assignments. Is there any
equivalent assignment in VHDL?

In VHDL, we have blocking and non blocking assignments that are
roughly equivalent to the Verilog ones.

There is a major difference though: All assignments to signals (with
'<=' ) are non blocking (i.e. they happen some (delta) time in the
future), and all assignments to variables (with ':=' )are blocking
(i.e. they happen immediately).

Signals are like regs or wires, depending on context.
Variables are like regs.

Variables (mostly) can only be declared within processes, and have a
scope that is restricted to that process.
From my understanding, inside the "process",
statements are executed consecutively. Is there anyway that I can make it
concurrent, just like the one in Verilog when we use "<=" assignment to
ensure concurrent execution of all the statements in the always block?

Yes, if you use signals, this will happen automatically.

Also, since variables can only be used in the process in which they
are defined, a major possible cause of races has been eliminated.

Regards,
Allan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top