VLSI & Embedded Systems Lab Manual
VLSI & Embedded Systems Lab Manual
Note: The students are required to perform any Six Experiments from each Part of the following.
Part-A: VLSI Lab
Course Objective:
To design and draw the internal structure of the various digital integrated circuits
To develop VHDL/Verilog HDL source code, perform simulation using relevant simulator and
analyze the obtained simulation results using necessary synthesizer.
To verify the logical operations of the digital ICs (Hardware) in the laboratory.
Course Outcome:
After completion of the course the students will be able to
Design and draw the internal structure of the various digital integrated circuits
Develop VHDL/Verilog HDL source code, perform simulation using relevant simulator andanalyze
the obtained simulation results using necessary synthesizer.
Verify the logical operations of the digital IC‟s (Hardware) in the laboratory
Note: For the following list of experiments students are required to do the following.
Target Device Specifications
Simulation
Synthesize the design
Generate RTL Schematic.
Generate Technology Map.
Generate Synthesis report.
Design Summary.
List of Experiments:
6 D Flip-Flop-7474
11
12
13
14
EXPERIMENT – 1
AIM: TO Become familiar with the Xilinx ISE Foundation software package and Simulate and verify
functionality of XOR Gate
SOFTWARE REQUIRED:
PROCEDURE:
# Test bench wave form summary window will appear as shown below.
# Assign clock and timing details.
# Dumping process:
Result: Thus the VHD code for half adder is verified and simulated, synthesis report is generated and the
design is implemented using FPGA
EXPERIMENT – 2
SOFTWARE REQIURED:
1. Personal computer
2. ISE Xilinx software
HARDWARE REQUIRED:
THEORY
A logic gate is an elementary building block of a digital circuit. Most logic gates have
two inputs and one output. At any given moment, every terminal is in one of the
two binary conditions low (0) or high (1), represented by different voltage levels. The
logic state of a terminal can, and generally does, change often, as the circuit
processes data. In most logic gates, the low state is approximately zero volts (0 V),
while the high state is approximately five volts positive (+5 V).
There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
The AND gate acts in the same way as the logical "and" operator. The output is
"true" when both inputs are "true." Otherwise, the output is "false."
The OR gate gets its name from the fact that it behaves after the fashion of the logical
inclusive "or." The output is "true" if either or both of the inputs are "true." If both
inputs are "false," then the output is "false."
A logical inverter, sometimes called a NOT gate to differentiate it from other types of
electronic inverter devices, has only one input. It reverses the logic state.
The NAND gate operates as an AND gate followed by a NOT gate. It acts in the
manner of the logical operation "and" followed by negation. The output is "false" if
both inputs are "true." Otherwise, the output is "true."
The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if
both inputs are "false." Otherwise, the output is "false."
The XOR (exclusive-OR) gate acts in the same way as the logical "either/or." The
output is "true" if either, but not both, of the inputs are "true." The output is "false" if
both inputs are "false" or if both inputs are "true." Another way of looking at this
circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs
are the same.
The following figure/table shows the circuit symbols and logic combinations of
different logic gates
PROCEDURE:
AND GATE:
Output wave Form:
OR GATE:
Output wave Form:
NOT GATE:
Output wave Form:
NAND GATE:
NOR GATE:
RESULT: Thus the VHDL/Verilog code for half adder is verified, synthesis report is
generated and the design is implemented using FPGA.
VIVA QUESTIONS:
1. Implement the following function using VHDL coding. (Try to minimize if you can).
F(A,B,C,D)=(A′+B+C) . (A+B′+D′). (B+C′+D′) . (A+B+C+D)
2. What will be the no. of rows in the truth table of N variables?
3. What are the advantages of VHDL?
4. Design Ex-OR gate using behavioral model?
5. Implement the following function using VHDL code f=AB+CD.
6. What are the differences between half adder and full adder?
7. What are the advantages of minimizing the logical expressions?
8. What does a combinational circuit mean?
9. Implement the half adder using VHDL code?
10. Implement the full adder using two half adders and write VHDL program in
structural model?
EXPERIMENT – 3
SOFTWARE REQIURED:
1. Personal computer
2. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
In digital electronics, a decoder can take the form of a multiple-input, multiple-
output logic circuit that converts coded inputs into coded outputs, where the input and
output codes are different e.g. n-to-2n , binary-coded decimal decoders. Decoding is
necessary in applications such as data multiplexing, 7 segment display and memory
address decoding.
It uses all AND gates, and therefore, the outputs are active- high. For active- low
outputs, NAND gates are used. It has 3 input lines and 8 output lines. It is also called as
binary to octal decoder it takes a 3-bit binary input code and activates one of the 8(octal)
outputs corresponding to that code.
PIN DIAGRAM:
TRUTH TABLE:
PROCEDURE:
RESULT: Thus the VHDL code for 3x8 Decoder 74138 is verified, synthesis report is
generated and the design is implemented using FPGA.
VIVA QUESTIONS:
SOFTWARE REQIURED:
1. Personal computer
3. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
Multiplexing and de-multiplexing, therefore, allow the efficient use of common circuits
to feed a common load with signals from several signal sources, and to feed several
loads form a single, common signal source, respectively.
PIN DIAGRAM:
8 X 1 MULTIPLEXER
TRUTH TABLE:
8 X 1 MULTIPLEXER
2x4 Dual - DE MULTIPLEXER
PROCEDURE:
Library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity decoder1 is
port(
a : in STD_LOGIC_VECTOR(1 downto 0);
b : out STD_LOGIC_VECTOR(3 downto 0)
);
end decoder1;
architecture bhv of decoder1 is
begin
process(a)
begin
if (a="00") then
b <= "0001";
elsif (a="01") then
b <= "0010";
elsif (a="10") then
b <= "0100";
else
b <= "1000";
end if;
end process;
end bhv;
Output:
8X1 MULTIPLEXER
8X1 MULTIPLEXER
RESULT: Thus the VHDL code for 8 X 1 MULTIPLEXER-74151 AND 2 X 4
DEMULTIPLEXER-74155 is verified, synthesis report is generated and the design is
implemented using FPGA
VIVA QUESTIONS:
4-BIT COMPARATOR-7485
SOFTWARE REQIURED:
1. Personal computer
4. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
IC7485 is a bit comparator. It can be used to compare two 4-bit binary words.
These ICs, can cascade to compare words of almost any length.
PIN DIAGRAM:
PROCEDURE:
D Flip-Flop-7474
SOFTWARE REQIURED:
1. Personal computer
5. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
The D-flip flop has only a single data input .The data input is connected to
the S input of an RS flip flop, while the inverse of D is connected to the R
input. This prevents that the input combination ever occurs. To allow the flip
flop to be in a holding state, a D-flip flop has a second input called “Enable.”
The Enable-input is AND with the D-input, such that when Enable=0, the R
& S of the RS-flip flop are 0 and the state is held. When the Enable-input is
1, the S input of the RS flip flop equals the D input and R is the inverse of D
determines the value of the output Q when Enable is 1. When Enable returns
to 0, the most recent input D is “remembered.”
PIN DIAGRAM:
PROCEDURE:
PROGRAM
RESULT: Thus the VHDL code for D Flip-Flop is verified, synthesis report is generated
and the design is implemented using FPGA
VIVA QUESTIONS:
SOFTWARE REQIURED:
1. Personal computer
2. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
A binary counter can be constructed from J-K flip-flops by taking the output of one cell
to the clock input of the next. The J and K inputs of each flip flop are set to 1 to produce
a toggle at each cycle of the clock input. For each two toggles of the first cell, a toggle is
produced in the second cell, and so on down to the fourth cell. This produces a binary
number equal to the number of cycles of the input clock signal. This device is sometimes
called a ripple through counter. The same device is useful as a frequency divider, a BCD
counter or decade counter can be constructed from a straight binary counter by
terminating the ripple through counting when the count reaches decimal 9(binary 1001).
Since the next toggle would set the two most significant bit, a NAND gate tied from those
two outputs to the asynchronous clear line will start the count over after 9. A frequency
divider can be constructed from J-K flip flops by taking the output of one cell to the clock
input of the next. The J and K inputs of each flip flop are set to 1 to produce a toggle at
each cycle of the clock input. For each two toggles of the first cell, a toggle is produced in
second cell, so its output is at half the frequency of the first. The output of the fourth cell
is 1/16 the clock frequency. The same device is useful as a binary counter.
PIN DIAGRAM:
PROCEDURE:
RESULT: Thus the VHDL code for Decade counter is verified, synthesis report is
generated and the design is implemented using FPGA
VIVA QUESTIONS:
SHIFT REGISTERS-7495.
SOFTWARE REQIURED:
1. Personal computer
3. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
Today, there are many high speed bi-directional “universal” type Shift
Registers available such as the TTL 74LS194, 74LS195 or the CMOS 4035 which are
available as 4-bit multi-function devices that can be used in either serial-to-serial, left
shifting, right shifting, serial-to-parallel, parallel-to-serial, or as a parallel-to-parallel
multifunction data register, hence their name “Universal”.
These universal shift registers can perform any combination of parallel and serial
input to output operations but require additional inputs to specify desired function and
to pre-load and reset the device. A commonly used universal shift register is the TTL
74LS194 as shown below.
PROCEDURE:
PROGRAM
library ieee;
use ieee.std_logic_1164.all;
entity universal is
port(clk,clr_l,Lin,Rin,s1,s0:in std_logic;
a,b,c,d:in std_logic;
q:inout std_logic_vector(3 downto 0));
end universal;
architecture universal of universal is
component and3
port(a,b,c:in std_logic;y:out std_logic);
end component;
component or4
port(a,b,c,d:in std_logic;y:out std_logic);
end component;
component not1
port(a:in std_logic;b:out std_logic);
end component;
component dff
port(pre_l,clr_l,d,clk:in std_logic;q,q_l:inout std_logic);
end component;
signal s1_l,s0_l:std_logic;
signal q_l:std_logic_vector(3 downto 0);
signal s:std_logic_vector(1 to 20);
signal pr:std_logic;
begin
l1:not1 port map(s1,s1_l);
l2:not1 port map(s0,s0_l);
l3:and3 port map(Lin,s1,s0_l,s(1));
l4:and3 port map(q(0),s1_l,s0_l,s(2));
l5:and3 port map(d,s1,s0,s(3));
l6:and3 port map(q(1),s1_l,s0,s(4));
l7:or4 port map(s(1),s(2),s(3),s(4),s(5));
--18:not1 port map(clr_l,clr);
l9:dff port map(pr,clr_l,s(5),clk,q(0),q_l(0));
l10:and3 port map(q(0),s1,s0_l,s(6));
l11:and3 port map(q(1),s1_l,s0_l,s(7));
l12:and3 port map(c,s1,s0,s(8));
l13:and3 port map(q(2),s1_l,s0,s(9));
l14:or4 port map(s(6),s(7),s(8),s(9),s(10));
l15:dff port map(pr,clr_l,s(10),clk,q(1),q_l(1));
l16:and3 port map(q(1),s1,s0_l,s(11));
l17:and3 port map(q(2),s1_l,s0_l,s(12));
l18:and3 port map(b,s1,s0,s(13));
l19:and3 port map(q(3),s1_l,s0,s(14));
l20:or4 port map(s(11),s(12),s(13),s(14),s(15));
l21:dff port map(pr,clr_l,s(15),clk,q(2),q_l(2));
l22:and3 port map(q(2),s1,s0_l,s(16));
l23:and3 port map(q(3),s1_l,s0_l,s(17));
l24:and3 port map(a,s1,s0,s(18));
l25:and3 port map(Rin,s1_l,s0,s(19));
l26:or4 port map(s(16),s(17),s(18),s(19),s(20));
l27:dff port map(pr,clr_l,s(20),clk,q(3),q_l(3));
end universal;
Thus the VHDL code for universal shift register is verified, synthesis report is
generated and the design is implemented using FPGA
VIVA QUESTIONS:
ALU
SOFTWARE REQIURED:
1. Personal computer
4. ISE Xilinx software
HARDWARE REQUIRED:
THEORY:
Arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic
operations. It represents the fundamental building block of the central processing unit
(CPU) of a computer. Modern CPUs contain very powerful and complex ALUs. In
addition to ALUs, modern CPUs contain a control unit (CU).
Most of the operations of a CPU are performed by one or more ALUs, which load data
from input registers. A register is a small amount of storage available as part of a CPU.
The control unit tells the ALU what operation to perform on that data, and the ALU
stores the result in an output register. The control unit moves the data between these
registers, the ALU, and memory.
PROCEDURE:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity alu16 is
Port (
r : in std_logic_vector(15 downto 0);
w : in std_logic_vector(15 downto 0);
d : in std_logic_vector(3 downto 0);
f : out std_logic_vector(15 downto 0)
);
end alu16;
Result:
Thus the VHDL code for ALU is verified, synthesis report is generated and
the design is implemented using FPGA