Hi guys
i'm doing some tests with vhdl and vivado. I made a simple mux.
Within the architecture I used a "process".
From the theory I know that the assignments placed within the process are sequential to each other.
Having said that, I don't get the timing diagram of the simulation, attached. What I expected is that the output on DOUT would be at least slightly out of phase with respect to the "Sel" signal and the "Data_In".
Then I thought that it is normal that it is so because it is an ideal case and not a real one since the simulation was not done physically on an FPGA.
Welcome to the world of HDL simulation. The terms I use here can be found in any VHDL textbook, if you are not familiar. (I like Peter Ashenden's book.)
Let's start with what you designed. You have a combinatorial multiplexor, described with a process. The signals in the parentheses of the process are called "the sensitivity list." Normally, a process is
suspended -- that means it is asleep -- until there is an
event on any signal on the sensitivity list. At that instant, the process wakes up, and all of the signals on all of the right-hand-sides of all assignments are frozen.
Then the right-hand-sides of the assignments are evaluated, from the top down, and once that is complete for each assignment, the signals on the left hand sides of the assignment (
<=) are "scheduled for assignment." That is, the process will hold off on finally driving the signals on the left hand side until all of the logic on all of the right-hand-sides in the process are evaluated.
This evaluation takes place in "delta" time, which is infinitesimally short (think Dirac delta) and it's a simulation construct only, it's not "real" time. Thus in your simulation waveform display, it looks like the output changes instantaneously with changes in the input. But there really is a delay between the input and output. And it is important to remember this.
Remember that in this behavioral model, you don't care about actual gate delays. You know that some delay exists, but it doesn't matter. That's because later, in the final FPGA the tools will take your behavioral code and fit it into a chip with actual non-delta delays, and the timing tools will tell you what those delays are. And the delays can be different depending on FPGA family chosen, routing and other such things.
So for a logic simulation you shouldn't worry about actual delays.
I suggest spending quality time with a good VHDL text.