Basics of VHDL. Whats happening here?

I just started to learn VHDL so kindly support me
I'm getting confused between how <= and := symbols actually work? I know that they have a major difference but I cant really make out as I'm from s/w background.

For example in the following code, when do :=, <= statements execute? Please don't stop at saying one is sequential and other is concurrent, that is where I'm not able to understand please explain more with small examples and other possibilities. I really learn fast with examples.

Also can you please explain to me whats happening in this code? I'm really lost.

Advertisements

Well you found one the "cornerstones" of VHDL - the difference between signals and variables.

A signal will not get its value before the process ends while the variable gets its value immediate (as in C++, Java, C# etc.)

I you add "r" to the sensitivity list will your code work nicely. The problem is that "r" must be able to
trigger the process in order to pass the value to q.
But I will surgest that you pass rin directly to q in the clk-driven process.

Please search for the free interactive book on VHDL Evita from aldec. Specially chapter 6 will answer your questions.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!