Digital Systems 2 Tutorial 1 Complete
Digital Systems 2 Tutorial 1 Complete
Week 2
Y = CBA' + C'B'A.
SPLD chips shown below 8 AND gates and 1 OR gate with 3 inputs and 1 output.
Do Supp.s 1-3 by searching internet and reference books.
1
1.1. VHDL divides the description of a module into an Entity block and an Architecture
block. What is the purpose of each of these two blocks?
Entity: input and output signal decleration, mode, data type, length or range.
Architecture: Functions
1.3. A VHDL entity contains a set of input and output signals, as shown in the following
figure. The device’s name is neon. Write the complete VHDL entity. Assume signal types of
bit.
1.4. If the device in 1.3 is described by the following truth tables, write statements to realize
V and W.
R S V V<=(not R and not S) or R;
0 0 1 W<=(not S and T) (S and not T);
0 1 0
1 0 1
1 1 1
S T W
0 0 0
0 1 1
1 0 1
1 1 0
1.5. What is the syntax that defines an enumerated type called colour with values of red, blue,
green, amber? What is the syntax to declare a signal named lamp with type colour?
Enumerated type is a "list of key words". Enumerated type is used to make a program
clearer to the reader/maintainer of the program.
2
...
u1 <= "1001";
s1 <= "1001";
i1 <= 16;
…
Determine the values of u1 and s1.
U1:9
S1:-7
1.8. Write the statement needed to assign the decimal value 5 to an unsigned signal u1
declared as follows:
signal u1: unsigned (3 downto 0);
u1<=”0101”;
(S,U)
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity A01 is
port ( A in bit
B in bit
C in bit
D in bit
F out bit );
end A01;
architecture V1 of A01 is
signal S1,S2:bit;
begin
S1<= A and B;
S2<= C and D;
Y<= not(S1 and S2)
Y<= not( (A and B) or (C and D))
end V1;
-- end of VHDL code