In the previous tutorial VHDL tutorial, we designed 8×3 encoder and 3×8 decoder circuits using VHDL.
(If you are not following this VHDL tutorial series one by one, you are requested to go through all previous tutorials of these series before going ahead in this tutorial)
In this tutorial,
- We shall write a VHDL program to build 1×8 demultiplexer and 8×1 multiplexer circuits
- Verify the output waveform of the program (digital circuit) with the truth table of these multiplexer and demultiplexer circuits
1×8 Demultiplexer circuit
(Please go through step by step procedure given in VHDL-tutorial 3 to create a project, edit and compile the program, create a waveform file, simulate the program, and generate output waveforms.)Now we shall write a VHDL program, compile it, simulate it, and get the output in a waveform. Finely, we shall verify that the output waveforms with the given truth table.
I have used the behavioral modeling style to write a VHDL program to build demultiplexer because it will be easier than the dataflow or structural modeling style.
(To know more and get more details about VHDL program(s), please go through the first two tutorials, VHDL tutorial 1 and VHDL tutorial 2 of these series.)
Next, compile the above program – create a waveform file with all inputs and outputs listed – apply different input combinations – save the waveform file, and finally, simulate the project. You will get the following result.
As shown in the figure, one can observe that when select lines (S2, S1, S0) are “001”, the input I=0 is available in output O1=0, and when select lines are “101”, the input I=1 is available in output O5 = 1. You may verify other select line combinations with input and output.
Next, let us move on to build an 8×1 multiplexer circuit.
8×1 multiplexer circuit
As shown in the figure, one can see that for select lines (S2, S1, S0) “011” and “100,” the inputs d3=1 and d4=1 are available in output o=1. You may verify other combinations of select lines from the truth table.
In the next tutorial, we shall design RS flip-flop and clocked RS Latch.