Vlsi Lab File
Vlsi Lab File
ECL-16
LABORATORY MANUAL
Table of Content
4 Program Outcome 5
7 RTU Syllabus 8
8 List of Experiments 9
Beyond Curriculum Experiments and mapping with POs
9 10
and PSOs
10 Lab Ethics 11
11 Safety Measures 12
Step1 Write the VHDL/Verilog code using VHDL software
for following experiment and simulate them. Step 2. Burn
PART-A 14
the Written code in Xilinx Board and test the output with
real input signal.
Design and simulate all the logic gates with 2 inputs using
Exp:1 30
VHDL.
Design and simulate 2-to-4 decoder, 3-to-8 encoder and
Exp:2 36
8X1 multiplexer using VHDL.
Design and simulate half adder and full adder using VHDL
Exp:3 46
(data flow method.
Exp:4
Design and simulate D, T and J-K flip flop using VHDL. 52
Exp:5 Design a 4bit binary Asynchronous and synchronous
counter. Obtain its number of gates, area, and speed and 62
power dissipation.
Exp:6 Design a 4- bit Serial in-serial out shift register. Obtain its 76
Vision
To promote higher learning in advanced technology and industrial research to make our
country a global player.
Mission
To promote quality education, training and research in the field of Engineering by
establishing effective interface with industry and to encourage faculty to undertake
industry sponsored projects for students.
Quality Policy
We are committed to ‘achievement of quality’ as an integral part of our institutional
policy by continuous self-evaluation and striving to improve ourselves.
Functional areas like teaching departments, Training & Placement Cell, library,
administrative office, accounts office, hostels, canteen, security services, transport,
maintenance section and all other services.”
Mission
To empower students by imparting quality education in Electronics and Communication
Engineering for better employability and preparing them to be competent in dealing with
industrial and societal challenges.
I. The graduates will be able to pursue their career successfully in the field of
Electronics & Communication Engineering and advance in their profession.
II. The graduates will be able to excel in pursuing higher education and life-long
learning.
III. Graduates will be able to hold high ethical standards and work effectively in
multidisciplinary teams with strong management and team work skills.
PROGRAM OUTCOMES
After the completion of the program, engineering graduates will be able to:
After the completion of the program, engineering graduates will be able to:
COURSE OUTCOMES
After successful completion of this course, students will be able to:
POs→
COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
↓
2 3 1 2 2 - - - - 3 - 3 3 2
C7EC4-21.1
2 3 2 2 2 - - - - 3 - 3 3 2
C7EC4-21.2
2 3 2 3 3 - - - - 3 - 3 3 2
C7EC4-21.3
2 3 2 3 3 - - - - 3 - 3 3 2
C7EC4-21.4
2 3 2 3 3 - - - - 3 - 3 3 2
C7EC4-21.5
RTU Syllabus
RAJASTHAN TECHNICAL UNIVERSITY, KOTA
Scheme & Syllabus
IV Year- VII & VIII Semester: B. Tech. (Electronics & Communication Engineering)
7EC4-21: VLSI Design Lab
Credit: Max. Marks: 100 (IA:60, ETE:40) 0L+0T+4P
SN Contents
1 Introduction: Objective, scope and outcome of the course.
Step1 Write the VHDL/Verilog code using VHDL software for following
experiment and simulate them.
PART-A
Step 2. Burn the Written code in Xilling Board and test the output with
real input signal
Design and simulate all the logic gates with 2 inputs using
1
VHDL/Verilog.
Design and simulate 2-to-4 decoder,3-to-8 encoder and 8X1 multiplexer
2
using VHDL/Verilog.
Design and simulate half adder and full adder using VHDL (data flow
3
method)/Verilog.
4 Design and simulate D, T and J-K flip flop using VHDL/Verilog.
Design a 4bit binary Asynchronous and synchronous counter. Obtain its
5
number of gates, area, and speed and power dissipation.
Design a 4- bit Serial in-serial out shift register. Obtain its number of
6
gates, area, and speed and power dissipation.
Step-1 Design and simulate following experiment using ECAD software
Viz. Mentor graphics, Orcade Pspice, Cadence etc.
PART-B Step-2 Draw the layout (without any DRC error) of the schematic obtain
in step 1 and obtain post layout simulation using appropriate ECAD
software.
Design and simulate all the logic gates (NOT, NAND and NOR) with 2
7
inputs in CMOS Technology.
Design and simulate Y = AB (C+D), Y = A+B(C+D) and 4X1 multiplexer
8
using CMOS Technology.
9 Design and simulate half adder and full adder using CMOS Technology.
10 Design and simulate SR flip flop using CMOS Technology.
11 Design and Simulate any DRAM cell.
LIST OF EXPERIMENTS
Step1 Write the VHDL/Verilog code using VHDL software for following
experiment and simulate them.
PART-A
Step 2. Burn the Written code in Xilinx Board and test the output with
real input signal
EXP-1 Design and simulate all the logic gates with 2 inputs using VHDL.
Design and simulate 2-to-4 decoder, 3-to-8 encoder and 8X1 multiplexer
EXP-2
using VHDL.
Design and simulate half adder and full adder using VHDL (data flow
EXP-3
method).
EXP-4 Design and simulate D, T and J-K flip flop using VHDL.
Design a 4bit binary Asynchronous and synchronous counter. Obtain its
EXP-5
number of gates, area, and speed and power dissipation.
Design a 4- bit Serial in-serial out shift register. Obtain its number of
EXP-6
gates, area, and speed and power dissipation.
PART-B Design and simulate following experiment using SYMICA DE Software.
Design and simulate all the logic gates (NOT, NAND and NOR) with 2
EXP-7
inputs in CMOS Technology.
Design and simulate Y = AB (C+D), Y = A+B(C+D) and 4X1 multiplexer
EXP-8
using CMOS Technology.
EXP-9 Design and simulate half adder and full adder using CMOS Technology.
EXP-10 Design and simulate SR flip flop using CMOS Technology.
EXP-11 Design and Simulate any DRAM cell.
B1 Design and simulate 16*1 mux using different modeling styles in VHDL.
B2 Design and simulate S-R Flip flop using VHDL
B1 2 3 3 3 3 - - - - 3 - 3 3 2
B2 2 3 3 3 3 - - - - 3 - 3 3 2
LAB ETHICS
DO’S
1. Student should get the record of previous experiment checked before starting
the new experiment.
2. Read the manual carefully before starting the experiment.
3. Before starting the experiment, get circuit diagram checked by the teacher.
4. Before switching on the power supply, get the circuit connections checked.
5. Get your readings checked by the teacher.
6. Apparatus must be handled carefully.
7. Maintain strict discipline.
8. Keep your mobile phone switched off or in vibration mode.
9. Students should get the experiment allotted for next turn, before leaving the
lab.
DON’TS
1. Do not touch or attempt to touch the mains power supply wire with bare
hands.
2. Do not overcrowd the tables.
3. Do not tamper with equipments.
4. Do not leave the lab without permission from the teacher.
PART-A
IC design methodology:
Integrated Circuits (ICs) may be classified in many ways:
Digital, Analog, and Mixed Signal - Technology
Standard IC or Application Specific IC (ASIC) - Commercial
Full Custom, Semi Custom (standard cell), and Gate Array (FPGA) –Design Technique
IC Design Process consists of
Circuit design and Logic design (Front End)
Physical design (Layout –Back End)
We can use a Hardware Description Language (HDL), such as VHDL or Verilog, for our
top-level or lower-level design files. HDL files describe the behavior and structure of
system and circuit designs. Using HDLs we can:
We can use the same HDL design for new architectures with a minimum of recoding.
Summary of all steps for implementing the design on FPGA Trainer kit:-Now right
click on the device and click “Program….”.And before doing this ensure all
connections and setting on the board are correct. JTAG is plugged, power supply to the
board is on and jumper setting and DIP switch setting on the board is correct.
As the programming completes “Program Successful” message appears in the end in
blue.
If “Program Failed” in red appears then check the hardware settings and all other
connections and reprogram the device.
Similarly any other design can be implemented using the FPGA Trainer Kits.
Pin Description of Various FPGAs for writing any UCF/XDC file for
Implementation of any design on FPGA
S. FPGA Name
No.
(Pin Nexys 4 Zybo Board Spartan – 6 Spartan – 3 Spartan – 2
No.) DDR Kit (Zynq Series) (XC6SLX16- (XC3S400-
(Artix-7) 2FT256C) 4PQ208) XC2S30 XC2S15
PQ208 TQ144
(ST103) (ST104)
0 J17 – C7 P178 P8 P7
2 T9 – C6 P176 P9 P10
4 P14 – – – – –
5 T14 – – – – –
6 K2 – – – – –
7 U13 – – – – –
Pmod Header JXADC (for Nexys-4 DDR) & JA-XADC for Zybo Board
Pmod Header JA
JA1 C17 – – – – –
JA2 D18 – – – – –
JA3 E18 – – – – –
JA4 G17 – – – – –
JA7 D17 – – – – –
JA8 E17 – – – – –
JA9 F18 – – – – –
JA10 G18 – – – – –
Pmod Header JB
USB Interface
– N6 – –
"F_USB_D<0>" – P106
"F_USB_D<1>" – – P7 P107 – –
"F_USB_D<2>" – – P8 P108 – –
"F_USB_D<3>" – – N8 P109 – –
– L7 – –
"F_USB_D<4>" – P111
"F_USB_D<5>" – – M7 P113 – –
"F_USB_D<6>" – – L8 P114 – –
"F_USB_D<7>" – – M9 P115 – –
– N9 – –
"F_WR#" – P119
"F_RD#" – – P9 P116 – –
LCD Interface
– A8 – –
"F_LCD_D<0>" – P21
"F_LCD_D<1>" – – A9 P20 – –
– A11 – –
"F_LCD_D<4>" – P16
"F_LCD_E" – – B8 P22 – –
"F_LCD_R/W" – – A7 P24 – –
"F_LCD_RS" – – A6 P26 – –
RS232 Interface
"F_RS232_RXD<2>" – – M12 – – –
"F_RS232_TXD<2>" – – N12 – – –
"F_MOTOR<2>" – – P33 A3 – –
"F_MOTOR<3>" – – P31 A5 – –
"F_MOTOR<4>" – – P29 B5 – –
"F_MOTOREN_A" – – P28 B6 – –
"F_MOTOREN_B" – – P27 B3 – –
DAC Interface
"F_DAC_D<0>" – – P1 P85 – –
"F_DAC_D<1>" – – P2 P86 – –
"F_DAC_D<2>" – – H3 P65 – –
"F_DAC_D<3>" – – G5 P67 – –
"F_DAC_D<4>" – – G3 P68 – –
"F_DAC_D<5>" – – G6 P71 – –
"F_DAC_D<6>" – – F4 P72 – –
"F_DAC_D<7>" – – F3 P74 – –
"F_DAC_D<8>" – – F5 P76 – –
"F_DAC_D<9>" – – F6 P77 – –
"F_DAC_D<10>" – – E3 P78 – –
"F_DAC_D<11>" – – E4 P81 – –
"F_DAC1_\CS1\" – – R1 P90 – –
"F_DAC2_\CS2\" – – D3 P93 – –
"F_DAC_\WE\" – – N1 P94 – –
(CS3)
"F_\CS4\" – – – P95 – –
ADC Interface
"F_ADC_D<0>" – – M2 P6; – –
"F_ADC_D<1>" – – M1 p63 – –
"F_ADC_D<2>" – – L1 p62 – –
"F_ADC_D<3>" – – K2 p61 – –
"F_ADC_D<4>" – – K1 p58 – –
"F_ADC_D<5>" – – J1 p57 – –
"F_ADC_D<6>" – – H1 p52 – –
"F_ADC_D<7>" – – H2 p51 – –
"F_ADC_D<8>" – – G1 p48 – –
"F_ADC_D<9>" – – F1 p46 – –
"F_ADC_D<10>" – – F2 p45 – –
"F_ADC_D<11>" – – E1 p44 – –
"F_ADC_\CONVS – – – –
C1 P40
T\"
"F_ADC_\CS\" – – B2 P36 – –
"F_ADC_\RD\" – – B1 P37 – –
"F_ADC_\WR\" – – C2 P39 – –
"F_ADC_BUSY" – – E2 P43 – –
"F_ADC_CLK" – – K3 P42 – –
VGA Interface
"F_RED<0>" – – J3 P189 – –
"F_RED<1>" – – H5 P190 – –
"F_RED<2>" – – A2 P191 – –
"F_GREEN<0>" – – D1 P194 – –
"F_GREEN<1>" – – C3 P196 – –
"F_GREEN<2>" – – J4 P197 – –
"F_BLUE<0>" – – L3 P198 – –
"F_BLUE<1>" – – K6 P199 – –
"F_BLUE<2>" – – K5 P200 – –
"F_VER_SYNC" – – T8 P97 – –
EXPERIMENT-1
AIM: Design and simulate all the logic gates with 2 inputs using VHDL
Tools Used: Xilinx ISE 14.4/ Xilinx Vivado, NEXYS4 DDR Board
Theory:
Logic Gates: A logic gate is an idealized model of computation or
physical electronic device implementing a Boolean function, a logical
operation performed on one or more binary inputs that produces a single binary output.
Digital systems are said to be constructed by using logic gates. These gates are the AND,
OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described
below with the aid of truth tables.
1. AND Gate:
The AND gate is an electronic circuit that gives a high output (1) onlyif all itsinputs are
high.
Symbol:
Truth Table:
2. OR Gate:
The OR gate is an electronic circuit that gives a high output (1) if one or more of its
inputs are high. A plus (+) is used to show the OR operation
Symbol:
Truth table:
3. NOT Gate:
The NOT gate is an electronic circuit that produces an inverted version of the input at its
output. It is also known as an inverter. If the input variable is A, the inverted output is
known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the
outputs.
Symbol:
Truth Table:
A Output
0 1
1 0
4. NAND Gate:
This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The
outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND
gate with a small circle on the output. The small circle represents inversion.
Symbol:
Truth Table:
5. NOR Gate:
This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The
outputs of all NOR gates are low if any of the inputs are high.The symbol is an OR gate
with a small circle on the output. The small circle represents inversion.
Symbol:
6. EX-OR Gate:
The ‘Exclusive-OR’ gate is a circuit which will give a high output if either, but not both,
of its two inputs are high. An encircled plus sign ( ) is used to show the EX-OR
operation.
Symbol:
Truth Table:
7. EX-NOR:
The 'Exclusive-NOR' gate circuit does the opposite to the EX-OR gate. It will give a low
output if either, but not both, of its two inputs are high. The symbol is an EXOR gate with
a small circle on the output. The small circle represents inversion.
Symbol:
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity allgates is
Port ( A,B : in STD_LOGIC;
AND1,OR1,NOT1,NAND1,NOR1,XOR1,XNOR1 : out
STD_LOGIC);
end allgates;
Output:
RTL Schematic:
Simulation Results:
Result: We have designed vhdl code for all the logic gates and simulated waveforms
have been observed. For this Software and Hardware realisation is done through Xilinx
ISE and NEXYS 4DDR. VHDL code Simulation results are shown in the form of
waveforms. Values are forced through user. Functionality of Logic gate is verified
through simulation result. Simulation result is verified on hardware (NEXYS 4DDR
kit), where output show in form of LED after applying particular input on button on
NEXYS 4DDR.
Discussion:
EXPERIMENT-2
AIM: Design and simulate 2-to-4 decoder, 3-to-8 encoder and 8X1 multiplexer using
VHDL.
Theory:
Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output
lines. One of these outputs will be active High based on the combination of inputs
present, when the decoder is enabled. That means decoder detects a particular code. The
outputs of the decoder are nothing but the min terms of ‘n’ input.
2 to 4 Decoder:
Truth Table:
From Truth table, we can write the Boolean functions for each output as
Y3=E. A1.A0
Y2=E.A1.A0′
Y1=E.A1′.A0
Y0=E.A1′.A0′
Each output is having one product term. So, there are four product terms in total. We can
implement these four product terms by using four AND gates having three inputs each
&two inverters. The circuit diagram of 2 to 4 decoder is shown in the following figure.
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity decoder is
port(
a : in STD_LOGIC_VECTOR(1 downto 0);
b: out STD_LOGIC_VECTOR(3 downto 0));
end decoder;
begin
case a is
when "00" => b <= "0001";
when "01" => b <= "0010";
when "10" => b <= "0100";
when "11" => b <= "1000";
end case;
end process;
end bhv;
Output:
RTL Schematic:
Simulation Result:
8 to 3 Encoder:
An Encoder is a combinational circuit that performs the reverse operation of Decoder. It
has maximum of 2n input lines and ‘n’ output lines. It will produce a binary code
equivalent to the input, which is active High. Therefore, the encoder encodes 2n input
lines with ‘n’ bits. It is optional to represent the enable signal in encoders.
Truth Table:
From Truth table, we can write the Boolean functions for each output as
A2=Y7+Y6+Y5+Y4A2=Y7+Y6+Y5+Y4
A1=Y7+Y6+Y3+Y2A1=Y7+Y6+Y3+Y2
A0=Y7+Y5+Y3+Y1
Circuit Diagram:
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.all, IEEE.NUMERIC_STD. all;
entity ENCODER8 is
port (A: in std_logic_vector (7 downto 0);
Y: out std_logic_vector (2 downto 0));
end ENCODER8;
architecture ARCH of ENCODER8 is
begin
process (A)
begin
If (A = "00000001") then Y <= "000";
elsif (A = "00000010") then Y <= "001";
elsif (A = "00000100") then Y <= "010";
elsif (A = "00001000") then Y <= "011";
elsif (A = "00010000") then Y <= "100";
elsif (A = "00100000") then Y <= "101";
elsif (A = "01000000") then Y <= "110";
elsif (A = "10000000") then Y <= "111";
Output:
RTL Schematic:
Simulation Result:
8:1 Multiplexer
Multiplexer is a combinational circuit that has maximum of 2n data inputs, ‘n’ selection
lines and single output line. One of these data inputs will be connected to the output
based on the values of selection lines.
Since there are ‘n’ selection lines, there will be 2n possible combinations of zeros and
ones. So, each combination will select only one data input. Multiplexer is also called
as Mux.
Truth Table:
VHDL Code:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY MUX8_1 IS
PORT(DIN:IN STD_LOGIC_VECTOR(7 DOWNTO 0);SEL:IN
STD_LOGIC_VECTOR(2 DOWNTO 0);DOUT:OUT STD_LOGIC);
END MUX8_1;
ARCHITECTURE BEH123 OF MUX8_1 IS
BEGIN
PROCESS(DIN,SEL)
BEGIN
CASE SEL IS
WHEN"000"=>DOUT<=DIN(0);
WHEN"001"=>DOUT<=DIN(1);
WHEN"010"=>DOUT<=DIN(2);
WHEN"011"=>DOUT<=DIN(3);
WHEN"100"=>DOUT<=DIN(4);
WHEN"101"=>DOUT<=DIN(5);
WHEN"110"=>DOUT<=DIN(6);
WHEN"111"=>DOUT<=DIN(7);
WHEN OTHERS=>
DOUT<='Z';
END CASE;
END PROCESS;
END BEH123;
Output:
RTL Schematic:
Simulation Result:
Result: We have designed VHDL code for 2*4 decoder, encoder and 8*1 multiplexer
and simulated waveforms have been observed. For this Software and Hardware
realisation is done through Xilinx ISE and NEXYS 4DDR. VHDL code Simulation
results are shown in the form of waveforms. Values are forced through user.
Functionality of circuit is verified through simulation result. Simulation result is verified
on hardware (NEXYS 4DDR kit), where output show in form of LED after applying
particular input on button on NEXYS 4DDR.
Discussion:
1. How is an encoder different from a decoder?
2. For 8-bit input encoder how many combinations are possible?
3. How many 3-line-to-8-line decoders are required for a 1-of-32 decoder?
4. How many data select lines are required for selecting eight inputs?
EXPERIMENT-3
AIM: Design and simulate half adder and full adder using VHDL (data flow method).
Theory:
Half Adder:
The addition of 2 bits is done using a combination circuit called Half adder. The input
variables are augend and addend bits and output variables are sum & carry bits. A and B
are the two input bits. Half Adder is a combinational logic circuit which is designed by
connecting one EX-OR gate and one AND gate.
Boolean Function:
Sum = x'y+xy'
Carry = xy
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity HADF is
RTL Schematic:
Full Adder:
The half adder is used to add only two numbers. To overcome this problem, the full adder
was developed. The full adder is used to add three 1-bit binary numbers A, B, and carry
C. The full adder has three input states and two output states i.e., sum and carry.
Truth Table:
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity FA_STR is
Port (A,B,C : in STD_LOGIC;
SUM,CARRY : out STD_LOGIC);
end FA_STR;
--STURCTURAL MODELING
architecture STRUCT of FA_STR is
COMPONENT HAdf
Port ( A,B : in STD_LOGIC;
S,C : out STD_LOGIC);
end COMPONENT;
SIGNAL X,Y,Z:STD_LOGIC;
begin
Department of ECE Page 48
VLSI DESIGN LAB
Output:
RTL Schematic:
Simulation Results:
Result: We have designed VHDL code for half adder and full adder and simulated
waveforms have been observed. For this Software and Hardware realisation is done
through Xilinx ISE and NEXYS 4DDR. VHDL code Simulation results are shown in
the form of waveforms. Values are forced through user. Functionality of adders is
verified through simulation result. Simulation result is verified on hardware (NEXYS
4DDR kit), where output show in form of LED after applying particular input on button
on NEXYS 4DDR.
Discussion:
1. The difference between half adder and full adder is?
2. How many AND, OR and EXOR gates are required for the configuration of full
adder?
3. If A and B are the inputs of a half adder, the sum is given by?
4. If A, B and C are the inputs of a full adder then the sum is given by?
5. Half-adders have a major limitation in that they cannot?
EXPERIMENT-4
AIM: Design and simulate D, T and J-K flip flop using VHDL.
Theory:
D Flip-flops are used as a part of memory storage elements and data processors as well. D
flip-flop can be built using NAND gate or with NOR gate. Due to its versatility they are
available as IC packages. The major applications of D flip-flop are to introduce delay in
timing circuit, as a buffer, sampling data at specific intervals. D flip-flop is simpler in
terms of wiring connection compared to JK flip-flop. Here we are using NAND gates for
demonstrating the D flip flop.
Whenever the clock signal is LOW, the input is never going to affect the output
state. The clock has to be high for the inputs to get active. Thus, D flip-flop is a
controlled Bi-stable latch where the clock signal is the control signal. Again, this gets
divided into positive edge triggered D flip flop and negative edge triggered D flip-
flop. Thus, the output has two stable states based on the inputs.
A D flip – flop is constructed by modifying an SR flip – flop. The S input is given with D
input and the R input is given with inverted D input. Hence a D flip – flop is similar to SR
flip – flop in which the two inputs arecomplement to each other, so there will be no
chance of any intermediate state occurs. The major drawback of SR flip – flop is the race
around condition which in D flip – flop is eliminated (because of the inverted inputs).
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity DFF is
Port ( PRE,CLR,CLK,D : in STD_LOGIC;
Q :inout STD_LOGIC);
end DFF;
architecture Behavioral of DFF is
begin
PROCESS(PRE,CLR,CLK)
BEGIN
IF(PRE='0') THEN
Q<='1';
ELSIF(CLR='0') THEN
Q<='0';
--ELSIF(CLK='1' AND CLK'EVENT) THEN
ELSIF RISING_EDGE(CLK) THEN
Q<=D;
END IF;
END PROCESS;
end Behavioral;
Output:
RTL Schematic:
Simulation Result:
JK FLIP-FLOP:
The JK flip flop is one of the most used flip flops in digital circuits. The JK flip flop is a
universal flip flop having two inputs 'J' and 'K'. In SR flip flop, the 'S' and 'R' are the
shortened abbreviated letters for Set and Reset, but J and K are not. The J and K are
themselves autonomous letters which are chosen to distinguish the flip flop design from
other types.
The JK Flip Flop is a gated SR flip-flop having the addition of a clock input circuitry. The
invalid or illegal output condition occurs when both of the inputs are set to 1 and are
prevented by the addition of a clock input circuit. So, the JK flip-flop has four possible
input combinations, i.e., 1, 0, "no change" and "toggle".
The symbol of JK flip flop is the same as SR Bistable Latch except for the addition of a
clock input.
JK Flip Flop is a universal flip-flop that makes the circuit toggle between two states and
is widely used in shift registers, counters, PWM and computer applications.
Truth Table:
Circuit Diagram:
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity jkff is
Port ( clk : in STD_LOGIC;
jk : in STD_LOGIC_VECTOR (0 to 1);
q :inout STD_LOGIC := '1');
end jkff;
begin
process(clk)
begin
if (clk='1' and clk'event) then
case jk is
when "01" => q<= '0';
when "10" => q<= '1';
When "11" => q<= not q;
When others => null;
end case;
end if;
end process;
end Behavioral;
Output:
RTL Schematic:
Simulation Result:
T- Flip Flop:
A T flip flop is like JK flip-flop. These are basically a single input version of JK flip flop.
This modified form of JK flip-flop is obtained by connecting both inputs J and K
together. This flip-flop has only one input along with the clock input.
Block Diagram:
Circuit Diagram:
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity TFF is
Port ( rst,CLK, T : in STD_LOGIC;
Q :inout STD_LOGIC );
end TFF;
Output:
RTL Schematic:
Simulation Result:
Result: We have designed vhdl code for D flip flop, J-K Flip Flop, T Flip-Flop and
simulated waveforms have been observed. For this Software and Hardware realisation is
done through Xilinx ISE and NEXYS 4DDR. VHDL code Simulation results are shown
in the form of waveforms. Values are forced through user. Functionality of addres is
verified through simulation result. Simulation result is verified on hardware (NEXYS
4DDR kit), where output show in form of LED after applying particular input on button
on NEXYS 4DDR.
Discussion:
1. When both inputs of a J-K flip-flop cycle, the output will?
2. Which of the following is correct for a gated D-type flip-flop?
3. The logic circuits whose outputs at any instant of time depends only on the present
input but also on the past outputs are called?
4. In S-R flip-flop, if Q = 0 the output is said to be? The output of latches will
remain in set/reset until?
EXPERIMENT-5
AIM: Design a 4bit binary Asynchronous and Synchronous counter. Obtain it’s number
of gates, area, and speed and power dissipation.
Theory:
Asynchronous counters are those whose output is free from the clock signal. Because the
flip flops in asynchronous counters are supplied with different clock signals, there may be
delay in producing output. The required number of logic gates to design asynchronous
counters is very less. So they are simple in design. Another name for Asynchronous
counters is “Ripple counters”.
In asynchronous counter different lip flop are triggered with different clock not
simultaneously. Asynchronous Counter is also called Serial Counter.
Circuit Diagram:
Truth Table:
rst ld_count count_en u_d O/P Operation
(Dout)
1 × × × 0 Reset operation
0 0 1 1 Q=q+1 Up Counter
0 0 0 × × Counting disable
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity univ_cntr is
Generic (N : integer := 4);
Port ( clk, rst, ld_count, count_en, u_d : in
STD_LOGIC;
Din : in STD_LOGIC_VECTOR (N-1 downto 0);
Dout : out STD_LOGIC_VECTOR (N-1 downto 0));
end univ_cntr;
tmp<= tmp - 1;
RTL Schematic:
Simulation Result:
SYNTHESIS REPORT:
================================================================
=========
* Final Report *
================================================================
=========
Final Results
RTL Top Level Output File Name : univ_cntr.ngr
Top Level Output File Name : univ_cntr
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : No
Design Statistics
# IOs : 13
Cell Usage :
# BELS :9
# LUT2 :1
# LUT3 :1
# LUT3_L :1
# LUT4 :4
# LUT4_L :1
# MUXF5 :1
# FlipFlops/Latches :4
# FDCE :4
# Clock Buffers :1
# BUFGP :1
# IO Buffers : 12
# IBUF :8
# OBUF :4
================================================================
=========
---------------------------
Partition Resource Summary:
---------------------------
---------------------------
================================================================
=========
TIMING REPORT
Clock Information:
------------------
-----------------------------------+------------------------+-------+
Clock Signal | Clock buffer(FF name) | Load |
Department of ECE Page 66
VLSI DESIGN LAB
-----------------------------------+------------------------+-------+
clk | BUFGP |4 |
-----------------------------------+------------------------+-------+
Timing Summary:
---------------
Speed Grade: -5
Minimum period: 2.708ns (Maximum Frequency: 369.324MHz)
Minimum input arrival time before clock: 3.352ns
Maximum output required time after clock: 4.252ns
Maximum combinational path delay: No path found
Timing Detail:
--------------
All values displayed in nanoseconds (ns)
================================================================
=========
Timing constraint: Default period analysis for Clock 'clk'
Clock period: 2.708ns (frequency: 369.324MHz)
Total number of paths / destination ports: 11 / 4
-------------------------------------------------------------------------
Delay: 2.708ns (Levels of Logic = 2)
Source: tmp_0 (FF)
Destination: tmp_2 (FF)
Source Clock: clk rising
Destination Clock: clk rising
================================================================
=========
Timing constraint: Default OFFSET IN BEFORE for Clock 'clk'
Total number of paths / destination ports: 22 / 8
-------------------------------------------------------------------------
Offset: 3.352ns (Levels of Logic = 3)
Source: u_d (PAD)
Destination: tmp_2 (FF)
Destination Clock: clk rising
================================================================
=========
Timing constraint: Default OFFSET OUT AFTER for Clock 'clk'
Total number of paths / destination ports: 4 / 4
-------------------------------------------------------------------------
Offset: 4.252ns (Levels of Logic = 1)
Source: tmp_0 (FF)
Destination: Dout<0> (PAD)
Source Clock: clk rising
----------------------------------------
Total 4.252ns (3.683ns logic, 0.569ns route)
(86.6% logic, 13.4% route)
================================================================
=========
-->
Total memory usage is 251856 kilobytes
Number of errors : 0 ( 0 filtered)
Number of warnings : 0 ( 0 filtered)
Number of infos : 0 ( 0 filtered)
Synchronous Counter:
If all the flip-flops receive the same clock signal, then that counter is called
as Synchronous counter. Hence, the outputs of all flip-flops changeaffect at the same
time. Synchronous counters are sometimes called parallel counters as the clock is fed in
parallel to all flip-flops. The inherent memory circuit keeps track of the counters present
state. The count sequence is controlled using logic gates. The one advantage of
synchronous counter over asynchronous counter is, it can operate on higher frequency
than asynchronous counter as it does not have cumulative delay because of same clock
is given to each flip flop.
Circuit Diagram:
An ‘N’ bit Synchronous binary down counter consists of ‘N’ T flip-flops. It counts from
2 − 1 to 0.
VHDL Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity tcounter is
port(clk,rst:instd_logic;
q,qbar:inoutstd_logic_vector(3 downto 0));
end tcounter;
Department of ECE Page 70
VLSI DESIGN LAB
Simulation Result:
Design Statistics
# IOs :6
Cell Usage :
# BELS :7
# INV :4
# LUT2 :1
# LUT3 :1
# VCC :1
# FlipFlops/Latches :4
# FDCE_1 :4
# Clock Buffers :1
# BUFGP :1
# IO Buffers :5
# IBUF :1
# OBUF :4
================================================================
=========
---------------------------
Partition Resource Summary:
---------------------------
---------------------------
================================================================
=========
TIMING REPORT
Clock Information:
------------------
-----------------------------------+------------------------+-------+
Clock Signal | Clock buffer(FF name) | Load |
-----------------------------------+------------------------+-------+
clk | BUFGP |4 |
-----------------------------------+------------------------+-------+
Timing Summary:
---------------
Speed Grade: -5
Timing Detail:
--------------
All values displayed in nanoseconds (ns)
================================================================
=========
Timing constraint: Default period analysis for Clock 'clk'
Clock period: 2.617ns (frequency: 382.124MHz)
Total number of paths / destination ports: 10 / 7
-------------------------------------------------------------------------
Delay: 2.617ns (Levels of Logic = 1)
Source: a2/Q (FF)
Destination: a3/Q (FF)
Source Clock: clk falling
Destination Clock: clk falling
================================================================
=========
Timing constraint: Default OFFSET OUT AFTER for Clock 'clk'
Total number of paths / destination ports: 4 / 4
-------------------------------------------------------------------------
Offset: 4.221ns (Levels of Logic = 1)
Source: a1/Q (FF)
Destination: q<0> (PAD)
Source Clock: clk falling
================================================================
=========
Department of ECE Page 74
VLSI DESIGN LAB
-->
Total memory usage is 251984 kilobytes
Result: We have designed the VHDL code of a general purpose universal Counter using
behavioural modelling style and virtually verified the design by test bench and also
implemented on FPGA trainer kit for physical verification.
Discussion:
1. How many natural states will there be in a 4-bit ripple counter?
2. One of the major drawbacks to the use of asynchronous counters is that?
3. How many flip-flops are required to construct a decade counter?
4. How many different states does a 3-bit asynchronous counter have?
5. A 5-bit asynchronous binary counter is made up of five flip-flops, each with a 12
ns propagation delay. The total propagation delay (tp(total)) is?
EXPERIMENT-6
AIM: Design a 4- bit Serial in-serial out shift register. Obtain its number of gates, area,
and speed and power dissipation.
Theory:
The Shift Register is another type of sequential logic circuit that can be used for the
storage or the transfer of binary data. This sequential device loads the data present on its
inputs and then moves or “shifts” it to its output once every clock cycle, hence the
name Shift Register.
A shift register basically consists of several single bit “D-Type Data Latches”, one for
each data bit, either a logic “0” or a “1”, connected together in a serial type daisy-chain
arrangement so that the output from one data latch becomes the input of the next latch and
so on. Data bits may be fed in or out of a shift register serially, that is one after the other
from either the left or the right direction, or all together at the same time in a parallel
configuration.
The number of individual data latches required to make up a single Shift Register device
is usually determined by the number of bits to be stored with the most common being 8-
bits (one byte) wide constructed from eight individual data latches.
Generally, shift registers operate in one of four different modes with the basic movement
of data through a shift register being:
Serial-in to Parallel-out (SIPO) - The register is loaded with serial data, one
bit at a time, with the stored data being available at the output in parallel
form.
Serial-in to Serial-out (SISO) -The data is shifted serially “IN” and “OUT”
of the register, one bit at a time in either a left or right direction under clock
control.
Parallel-in to Serial-out (PISO) -The parallel data is loaded into the register
simultaneously and is shifted out of the register serially one bit at a time
under clock control.
Parallel-in to Parallel-out (PIPO) -The parallel data is loaded
simultaneously into the register, and transferred together to their respective
outputs by the same clock pulse.
Circuit Diagram:
VHDL Code:
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity SISO is
end SISO;
component dff
port(D,clk,reset : in std_logic;
Q: out std_logic);
end component;
Begin
X(0)<= sin;
End generate;
Sout<= x(4);
end Struct;
Output:
RTL Schematic:
Simulation Result:
SYNTHESIS REPORT:
================================================================
=========
* Final Report *
================================================================
=========
Final Results
Design Statistics
# IOs :4
Cell Usage :
# FlipFlops/Latches :4
# FDC :4
# Clock Buffers :1
# BUFGP :1
# IO Buffers :3
# IBUF :2
# OBUF :1
================================================================
=========
---------------------------
Partition Resource Summary:
---------------------------
---------------------------
================================================================
=========
TIMING REPORT
Clock Information:
------------------
-----------------------------------+------------------------+-------+
Clock Signal | Clock buffer(FF name) | Load |
-----------------------------------+------------------------+-------+
clk | BUFGP |4 |
-----------------------------------+------------------------+-------+
Timing Summary:
---------------
Speed Grade: -5
Timing Detail:
--------------
All values displayed in nanoseconds (ns)
================================================================
=========
Timing constraint: Default period analysis for Clock 'clk'
Clock period: 1.139ns (frequency: 877.963MHz)
Total number of paths / destination ports: 3 / 3
-------------------------------------------------------------------------
Delay: 1.139ns (Levels of Logic = 0)
Source: L1[2].L2/Q (FF)
Destination: L1[3].L2/Q (FF)
Source Clock: clk rising
Department of ECE Page 80
VLSI DESIGN LAB
================================================================
=========
Timing constraint: Default OFFSET IN BEFORE for Clock 'clk'
Total number of paths / destination ports: 1 / 1
-------------------------------------------------------------------------
Offset: 1.731ns (Levels of Logic = 1)
Source: sin (PAD)
Destination: L1[0].L2/Q (FF)
Destination Clock: clk rising
================================================================
=========
Timing constraint: Default OFFSET OUT AFTER for Clock 'clk'
Total number of paths / destination ports: 1 / 1
-------------------------------------------------------------------------
Offset: 4.040ns (Levels of Logic = 1)
Source: L1[3].L2/Q (FF)
Destination: sout (PAD)
Source Clock: clk rising
Gate Net
Cell:in->out fanout Delay Delay Logical Name (Net Name)
---------------------------------------- ------------
FDC:C->Q 1 0.514 0.357 L1[3].L2/Q (L1[3].L2/Q)
OBUF:I->O 3.169 sout_OBUF (sout)
----------------------------------------
Total 4.040ns (3.683ns logic, 0.357ns route)
(91.2% logic, 8.8% route)
================================================================
=========
Total REAL time to Xst completion: 3.00 secs
Total CPU time to Xst completion: 3.59 secs
-->
Total memory usage is 252048 kilobytes
Result: We have designed VHDL code for 4 bit serial in serial out shift registerand
simulated waveforms have been observed. For this Software and Hardware realisation is
done through Xilinx ISE and NEXYS 4DDR. VHDL code Simulation results are shown
in the form of waveforms. Values are forced through user. Functionality of SISO shift
register is verified through simulation result. Simulation result is verified on hardware
(NEXYS 4DDR kit), where output show in form of LED after applying particular input
on button on NEXYS 4DDR.
Discussion:
1. A shift register that will accept a parallel input or a bidirectional serial load and
internal shift features is called as?
2. How can parallel data be taken out of a shift register simultaneously?
3. The group of bits 11001 is serially shifted (right-most bit first) into a 5-bit parallel
output shift register with an initial state 01110. After three clock pulses, the
register contains?
PART-B
7. Give cell name (eg. Inverter). Click OK. Schematic editor window will open.
8. Place Instance (or press “I” on keyboard). Instance window will open.
9. Select the library and search for cell to be placed on schematic. Select the symbol
of the component and click on Place. The component symbol will be placed on schematic
Editor. Place all the required components one by one.
10. Then go to Place Wire (or press “w” on keyboard) to make connections
between the components. To place input and output Pins go to Place Pin (or press “p”
on keyboard)
11. For creating symbol : select Cell in library manager right click select new
cell view from.
Department of ECE Page 85
VLSI DESIGN LAB
12. Choose right cell for which symbol is to be created. Click OK.
13. In Symbol Generation Options, give pin specifications and click OK. Symbol will
be created. It can be customized.
14. Now to check properties of the circuit, a test circuit can be designed by creating a
new cell naming “invertertest”. Or you can also modify the existing inverter circuit by
replacing input pin by input source.
16. Simulation Environment window will open. Setup Model Libraries. Select
library from “modellib” folder.
The Choosing Analysis form appears. This is a dynamic form, the bottom of the form
changes based on the selection above.
2. To setup for transient analysis
a. In the Analysis section selecttran
b. Set the stop time as 200n
c. Click at the moderate or Enabled button at the bottom, and then click Apply.
3. To set up for DC Analyses:
a. In the Analyses section, select dc.
b. In the DC Analyses section, turn on Save DC Operating Point.
c. Turn on the Component Parameter.
d. Double click the Select Component, Which takes you to the schematic window.
e. Select input signal vpulse source in the test schematic window.
f. Select ―DC Voltage‖in the Select Component Parameter form and click OK.
f. In the analysis form type startandstop voltages as 0 to 1.8 respectively.
g. Check the enable button and then click Apply.
2. Click Copy From at the bottom of the form. The design is scanned and all variables
found in the design are listed. In a few moments, the wpvariable appears in the Table of
Design variables section.
3. Set the value of the wpvariable:
With the wpvariable highlighted in the Table of Design Variables, click on the variable
name wp and enter the following:
Click Change and notice the update in the Table of Design Variables.
4. Click OK or Cancel in the Editing Design Variables window.
save field.
3. Click OK in the saving state form. The Simulator state is saved.
These numbers vary the value of the wpof the pmos between 1um and 10um at
ten evenly spaced intervals.
5. Execute Analysis—Start.
The Parametric Analysis window displays the number of runs remaining in the analysis
and the current value of the swept variable(s). Look in the upper right corner of the
window. Once the runs are completed the wavescan window comes up with the plots for
different runs.
EXPERIMENT-7
AIM: Design and simulate all the logic gates (NOT, NAND and NOR) with 2inputs in
CMOS Technology.
Theory:
INVERTER:
CMOS inverters (Complementary NOSFET Inverters) are some of the most widely used
and adaptable MOSFET inverters used in chip design. They operate with very little power
loss and at relatively high speed. Furthermore, the CMOS inverter has good logic buffer
characteristics, in that, its noise margins in both low and high states are large.
This short description of CMOS inverters gives a basic understanding of the how a
CMOS inverter works. It will cover input/output characteristics, MOSFET states at
different input voltages, and power losses due to electrical current.
A CMOS inverter contains a PMOS and a NMOS transistor connected at the drain and
gate terminals, a supply voltage VDD at the PMOS source terminal, and a ground
connected at the NMOS source terminal, were VIN is connected to the gate terminals and
VOUT is connected to the drain terminals. It is important to notice that the CMOS does
not contain any resistors, which makes it more power efficient that a regular resistor-
MOSFET inverter. As the voltage at the input of the CMOS device varies between 0 and
5 volts, the state of the NMOS and PMOS varies accordingly. If we model each transistor
as a simple switch activated by VIN, the inverter’s operations can be seen very easily:
NMOS Vgs>Vtn ON
PMOS Vsg>Vtp ON
When VIN is low, the NMOS is "off", while the PMOS stays "on": instantly charging
VOUT to logic high. When Vin is high, the NMOS is "on and the PMOS is "on: draining
the voltage at VOUT to logic low.
Schematic Diagram:
Symbol:
Test Circuit:
Transient Analysis:
NAND Gate:
Circuit Diagram:
Transistors Q1 and Q3 resemble the series-connected complementary pair from the
inverter circuit. Both are controlled by the same input signal (input A), the upper
transistor turning off and the lower transistor turning on when the input is “high” (1), and
vice versa. transistors Q2 and Q4 are similarly controlled by the same input signal (input
B), and how they will also exhibit the same on/off behavior for the same input logic
levels. The upper transistors of both pairs (Q 1 and Q2) have their source and drain
terminals paralleled, while the lower transistors (Q 3 and Q4) are series-connected.
Q1
Q2
Q3
Q4
Truth Table:
Symbol:
Test Circuit:
Simulation Result:
NOR Gate:
The Logic NOR Gate gate is a combination of the digital logic OR gate and an inverter or
NOT gate connected together in series.The inclusive NOR (Not-OR) gate has an output
that is normally at logic level “1” and only goes “LOW” to logic level “0” when ANY of
its inputs are at logic level “1”. The Logic NOR Gate is the reverse or “Complementary”
form of the inclusive OR gate we have seen previously.
Circuit Diagram:
Truth Table:
Output:
RTL Schematic:
Symbol:
Test Circuit:
Simulation Result:
Result: We designed the circuit diagram on symica DE free tool. Symbol of circuit are
created. Functionality were checked with the help of simulation waveform. Test circuit
are also tested. Different logic gate are simulated and tested.
Discussion:
1. In CMOS logic circuit the n-MOS transistor acts as?
2. In CMOS logic circuit, the switching operation occurs ?
3. When both nMOS and pMOS transistors of CMOS logic design are in OFF
condition, the output ?
4. When both nMOS and pMOS transistors of CMOS logic gates are ON, the output
is?
5. In positive logic convention, the true state is represented as?
EXPERIMENT- 8
AIM: Design and simulate Y = AB (C+D), Y = A+B(C+D) and 4X1 multiplexer using
CMOS Technology.
Tools Used: Symica-DE Free
Theory:
CMOS MUX
• 2:1 multiplexer chooses output between two inputs
D0 0
Y
D1 1
4:1 MULTIPLEXER:
Truth Table:
S0 S1 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
Output:
RTL Schematic: Y = AB (C+D)
Simulation Result:
Simulation Result:
4*1 Mutiplexer:
2*1 MUX:
Schematic Diagram:
Symbol:
4*1 MUX:
Simulation Result:
Result: We have designed and simulate Boolean expression using Symica DE free.
Truth table was also verified with simulation waveform. Also 4*1 multiplexer was also
designed with the help of 2*1 multiplexer. Truth table was also verified with waveform.
Discussion:
1. When both nMOS and pMOS transistors of CMOS logic gates are ON, the output
is?
2. When both nMOS and pMOS transistors of CMOS logic design are in OFF
condition, the output is?
EXPERIMENT-9
AIM: Design and simulate half adder and full adder using CMOS Technology.
Theory:
An adder is a digital circuit that performs addition of numbers. In many computers and
other kinds of processors adders are used in the arithmetic logic units or ALU.
Half Adder:
The half adder adds two single binary digits A and B. It has two outputs, sum (S) and
carry (C). The carry signal represents an overflow into the next digit of a multi-digit
addition.
Fig. 9.1: Block Diagram Truth Table and Circuit Diagram of Half adder
FULL ADDER:
A full adder adds binary numbers and accounts for values carried in as well as out. A
one-bit full-adder adds three one-bit numbers, often written as A, B, and Cin; A and B are
the operands, and Cin is a bit carried in from the previous less-significant stage. The
circuit produces a two-bit output. Output carry and sum typically represented by the
signals Cout and S. A full adder can be implemented in many different ways such as with a
custom transistor-level circuit or composed of other gates.
Output:
Schematic Diagram:
Test circuit:
Simulation Result:
Full Adder:
Schematic Diagram:
Simulation Result:
Result: We have designed and simulate half adder and full adder using Symica DE free.
Truth table was also verified with simulation waveform. Truth table was also verified
with waveform.
EXPERIMENT-10
AIM: Design and simulate SR flip flop using CMOS Technology.
.
Tools Used: Symica-DE Free
Theory:
A flip-flop or latch is a circuit that has two stable states and can be used to store state
information – a bistable multivibrator. The circuit can be made to change state
by signals applied to one or more control inputs and will have one or two outputs. It is the
basic storage element in sequential logic. Flip-flops and latches are fundamental building
blocks of digital electronics systems used in computers, communications, and many other
types of systems.
The SR Latch – Using NOR Gate Circuit diagram and Truth Table:
Fig. 10.1: Block Diagram, Circuit Diagram and Truth Table of SR Flip
Flop using NOR gate
Clocked SR Latch
The figure shows a NOR-based SR latch with a clock added. The latch is responsive to
inputs S and R only when CLK is high.
When CLK is low, the latch retains its current state. Observe that Q changes state −
CMOS AOI implementation of clocked NOR based SR latch is shown in the figure.
When CLK is low, two series terminals in N tree N are open and two parallel transistors
in tree P are ON, thus retaining state in the memory cell.
When clock is high, the circuit becomes simply a NOR based CMOS latch which
will respond to input S and R.
Output:
Schematic Diagram:
Simulation Result:
Result: We have designed and simulate a SR flip flop using CMOS technology on
symica DE free. Functionality of circuit was verified from waveform.
Discussion:
1. Gated S-R flip-flops are called asynchronous because the output responds
immediately to input changes.
2. Which of the following is not generally associated with flip-flops?
3. Edge-triggered flip-flops must have?
4. What is one disadvantage of an S-R flip-flop?
5. An invalid condition in the operation of an active-HIGH input S-R latch occurs
when ?
EXPERIMENT-11
AIM: Design and simulate any DRAM cell.
Theory:
Dynamic random-access memory (DRAM) is a type of semiconductor memory that is
typically used for the data or program code needed by a computer processor to
function. DRAM is a common type of random access memory (RAM) that is used in
personal computers (PCs), workstations and servers.
destroys the stored charge on C1. SO, we also have to refresh data every timefor
each "data read" operation.
Output:
Schematic Diagram:
Discussion:
3. Which memory storage is widely used in PCs and Embedded Systems?
4. Which of the following is more volatile?
5. Which one of the following is a storage element in SRAM?
6. Which of the following memory technology is highly denser?
7. What is the size of a trench capacitor in DRAM?
Experiment B1
AIM: Design and simulate 16*1 mux using different modeling styles in
VHDL.
Theory:
Multiplexer is a combinational circuit that has maximum of 2n data inputs, ‘n’ selection
lines and single output line. One of these data inputs will be connected to the output
based on the values of selection lines.
Since there are ‘n’ selection lines, there will be 2n possible combinations of zeros and
ones. So, each combination will select only one data input. Multiplexer is also called
as Mux.
A 16x1 mux can be implemented using 5 4x1 MUX. 4 of these multiplexers can be used
as first stage to mux 4 inputs each with two least significant bits of select lines (S0 and
S1), resulting in 4 intermediate outputs, which, then can be MUX again using a 4:1 mux.
begin
process(i,s)
begin
case s is
when "00" => y <= i(0);
when "01" => y <= i(1);
when "10" => y <= i(2);
when others => y <= i(3);
end case;
end process;
end Behavioral;
library IEEE;
entity mux16 is
port(a:instd_logic_vector(15 downto 0);
s: in std_logic_vector(3 downto 0);
z:out std_logic);
End mux16;
Output:
Schematic Diagram:
Simulation Result:
Result: We have designed VHDL code for 16*1 multiplexer using 4*1 multiplexer
and simulated waveforms have been observed. For this Software and Hardware
realisation is done through Xilinx ISE and NEXYS 4DDR. VHDL code Simulation
results are shown in the form of waveforms. Values are forced through user.
Functionality of circuit is verified through simulation result. Simulation result is verified
on hardware (NEXYS 4DDR kit), where output show in form of LED after applying
particular input on button on NEXYS 4DDR.
Discussion:
1. How is an encoder different from a decoder?
2. For 8-bit input encoder how many combinations are possible?
3. How many 3-line-to-8-line decoders are required for a 1-of-32 decoder?
4. How many data select lines are required for selecting eight inputs?
Experiment B2
Theory:
S R Flip Flop:
The SR flip-flop, also known as a SR Latch, can be considered as one of the most basic
sequential logic circuit possible. This simple flip-flop is basically a one-bit memory
bistable device that has two inputs, one which will “SET” the device (meaning the output
= “1”), and is labelled S and one which will “RESET” the device (meaning the output =
“0”), labelled R.
Then the SR description stands for “Set-Reset”. The reset input resets the flip-flop back to
its original state with an output Q that will be either at a logic level “1” or logic “0”
depending upon this set/reset condition.
A basic NAND gate SR flip-flop circuit provides feedback from both of its outputs back
to its opposing inputs and is commonly used in memory circuits to store a single data bit.
Then the SR flip-flop actually has three inputs, Set, Reset and its current output Q relating
to it’s current state or history. The term “Flip-flop” relates to the actual operation of the
device, as it can be “flipped” into one logic Set state or “flopped” back into the opposing
logic Reset state.
VHDL CODE
library ieee ;
use ieee.std_logic_1164.all;
entity srff is
Port(reset,clock,s,r : in std_logic;
q: out std_logic );
end srff;
architecture behv of srff is
Signal FF: std_logic:=‘0’;
begin
process(clock,reset)
variable sr: std_logic_vector(0 to 1);
begin
If (reset=‘1’) then --negative logic
FF<=‘0’;
-- clock negative edge
elsif (clock=‘0' and clock' event) then
sr := s & r;
case sr is
when "01" => FF <= ’0’;
when "10" => FF <= ’1’;
when "11" => FF <= ’Z’;
when others => FF <= FF;
end case;
end if;
end process;
Q<= FF;
end behv;
Output:
Schematic Diagram:
Simulation Result:
Result:We have designed VHDL code for SR flip flop and simulated waveforms have
been observed. For this Software and Hardware realisation is done through Xilinx ISE
and NEXYS 4DDR. VHDL code Simulation results are shown in the form of
waveforms. Values are forced through user. Functionality of circuit is verified through
simulation result. Simulation result is verified on hardware (NEXYS 4DDR kit), where
output show in form of LED after applying particular input on button on NEXYS
4DDR.
Discussion:
1. When both inputs of a J-K flip-flop cycle, the output will?
2. Which of the following is correct for a gated D-type flip-flop?
3. The logic circuits whose outputs at any instant of time depends only on the present
input but also on the past outputs are called?
4. In S-R flip-flop, if Q = 0 the output is said to be? The output of latches will
remain in set/reset until?