Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

concurrent and conditional signal assignment (VHDL)

In VHDL, there are two types for signal assignment:

concurrent   ---->    when...else
             ---->    select...when...else

sequential   ---->    if...else
             ---->    case...when

Problem is that some say that when...else conditions are checked line by line (king of sequential) while select...when...else conditionals are checked once. See this reference for example.

I say that when..else is also a sequential assignment because you are checking line by line. In other words, I say that there no need to say if..else within a process is equivalent to when..else. Why they assume when..else is a concurrent assignment?

like image 745
mahmood Avatar asked Dec 19 '25 00:12

mahmood


1 Answers

Concurrent vs Sequential is about independence of execution.

A concurrent statement is simply a statement that is evaluated and/or executed independently of the code that surrounds it. Processes are concurrent. Component/Entity Instances are concurrent. Signal assignments and procedure calls that are done in the architecture are concurrent.

Sequential statements (other than wait) run when the code around it also runs.

Interesting note, while a process is concurrent (because it runs independently of other processes and concurrent assignments), it contains sequential statements.

Often when we write RTL code, the processes that we write are simple enough that it is hard to see the sequential nature of them. It really takes a statemachine or a testbench to see the true sequential nature of a process.

like image 50
Jim Lewis Avatar answered Dec 21 '25 23:12

Jim Lewis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!