Vlsi Design Lab Manual: Department of Electronics & Communication Engineering
Vlsi Design Lab Manual: Department of Electronics & Communication Engineering
Vlsi Design Lab Manual: Department of Electronics & Communication Engineering
Name:_____________________________________________
H.T.No:____________________________________________
Year/Semester:______________________________________
PEO 1: To prepare the graduates to be able to plan, analyze and provide innovative ideas to
investigate complex engineering problems of industry in the field of Electronics and
Communication Engineering using contemporary design and simulation tools.
PEO-2: To provide students with solid fundamentals in core and multidisciplinary domain for
successful implementation of engineering products and also to pursue higher studies.
PEO-3: To inculcate learners with professional and ethical attitude, effective communication
skills, teamwork skills, and an ability to relate engineering issues to broader social context at
work place
Programme Outcomes(Pos)
Course Outcomes:
Advanced Experiments
13. Design and Implementation of differentitional amplifier
IV B.Tech-II SEM
PART A
1. Realization of Logic Gates.
2. 4-bit ripple carry and carry look ahead adder using behavioral
dataflow and structural
modelling
3. Design and Implementation of
A ) 16:1 MUX through 4:
PART B
8. Design and Implementation of Universal Gates
Advanced Experiments
13. Design and Implementation of Differential Amplifier
1. While entering the Laboratory, the students should follow the dress code
Wear shoes, White Apron & Female students should tie their hair back).
2. The students should bring their observation note book, practical manual,
record note book, calculator, necessary stationary items and graph sheets if
any for the lab classes without which the students will not be allowed for
doing the practical.
3. All the equipments and components should be handled with utmost care.
Any breakage/damage will be charged.
4. If any damage/breakage is noticed, it should be reported to the instructor
immediately.
5. If a student notices any short circuits, improper wiring and unusual smells
immediately the same thing is to be brought to the notice of technician/lab in
charge.
6. At the end of practical class the apparatus should be returned to the lab
technician and take back the indent slip.
7. Each experiment after completion should be written in the observation note
book and should be corrected by the lab in charge on the same day of the
practical class.
8. Each experiment should be written in the record note book only after getting
signature from the lab in charge in the observation note book.
9. Record should be submitted in the successive lab session after completion of
the experiment.
10. 100% attendance should be maintained for the practical classes.
SCHEME OF EVALUATION
Marks Awarded
S.N Obs. Total
Program Date Record Viva Attd.
o (10M 30(M)
(10M) (5M) (5M)
)
PART-A
1 Realization of Logic Gates.
PART-B
Design and Implementation of Universal
8. Gates
Advanced Experiments
Design and Implementation of differentitional
13.
amplifier
PART A
(FPGA Level Implementation)
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
OR GATE
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
NOT GATE
A Y
0 1
1 0
NAND GATE
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
NOR GATE
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
AIM:
To write a VHDL/Verilog code for All Logic Gates and to generate
synthesis report, RTL schematic and to implement designs using FPGA (Spartan-3).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
1. Open Xilinx ISE 9.1i.
2. Create a new source file in a new project with suitable name.
3. Create the file in VHDL/Verilog module.
4. Select the appropriate input and output ports according to the requirements.
5. Type the program and save it and synthesize the process.
6. Select Synthesize XST, check for syntax errors and generate report and RTL
schematic.
7. Create another new source.
8. Select source type as Test bench wave form.
9. Associate the test bench to the source.
10. Assign clock and timing details.
11. Give the input waveforms for the source.
12. Save the input waveforms and perform behavioral simulation.
13. The simulated output waveforms window will be shown.
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after that
double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure Device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report. Bit
file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on Xilinx
component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
AND gate
OR gate
NOT GATE
NAND gate
VHDL CODE:
AND GATE :
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Andgate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end Andgate ;
begin
y <= a and b;
end Behavioral;
OR GATE :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity orgate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end orgate ;
begin
y <= a or b;
end Behavioral;
NOR gate
BLOCK DIAGRAM:
NOT GATE :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity notgate is
Port ( a : in STD_LOGIC;
y : out STD_LOGIC);
end notgate ;
architecture Behavioral of notgate is
begin
y <= not a;
end Behavioral;
NAND GATE :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity nandgate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end nandgate ;
architecture Behavioral of nandgate is
begin
y <= a nand b;
end Behavioral;
NOR GATE :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity norgate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end norgate ;
T E C H NO L O G Y S C H EM A TI C :
R T L S C H EM A T IC :
DESIGN SUMMARY:
SYNTHESIS REPORT:
RESULT:
CONCLUSION:
VIVA QUESTIONS:
4. Which gates are called as universal gates? What are its advantages?
CIRCUIT DIAGRAM:
AIM:
To write a VHDL/Verilog code for 4-bit ripple carry and carry look ahead adder and to
generate synthesis report, RTL schematic and to implement designs using FPGA (Spartan-3).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after
that double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report.
Bit file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on
Xilinx component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Ripple_Adder is
Port ( A : in STD_LOGIC_VECTOR (3 downto 0);
B : in STD_LOGIC_VECTOR (3 downto 0);
Cin : in STD_LOGIC;
S : out STD_LOGIC_VECTOR (3 downto 0); Cout : out STD_LOGIC);
end Ripple_Adder;
begin
entity Partial_Full_Adder is
Port ( A : in STD_LOGIC;
B : in STD_LOGIC;
Cin : in STD_LOGIC;
S : out STD_LOGIC;
P : out STD_LOGIC;
G : out STD_LOGIC);
End Partial_Full_Adder;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Carry_Look_Ahead is
Port ( A : in STD_LOGIC_VECTOR (3 downto 0);
B: in STD_LOGIC_VECTOR (3 downto 0);
Cin : in STD_LOGIC;
S : out STD_LOGIC_VECTOR (3 downto 0);
Cout : out STD_LOGIC);
end Carry_Look_Ahead;
architecture Behavioral of Carry_Look_Ahead is component Partial_Full_Adder
Port ( A : in STD_LOGIC;
B : in STD_LOGIC;
Cin : in STD_LOGIC;
S : out STD_LOGIC;
P : out STD_LOGIC;
G : out STD_LOGIC);
end component;
signal c1,c2,c3: STD_LOGIC;
signal P,G: STD_LOGIC_VECTOR(3 downto 0);
begin
PFA1: Partial_Full_Adder port map( A(0), B(0), Cin, S(0), P(0), G(0));
PFA2: Partial_Full_Adder port map( A(1), B(1), c1, S(1), P(1), G(1));
PFA3: Partial_Full_Adder port map( A(2), B(2), c2, S(2), P(2), G(2));
PFA4: Partial_Full_Adder port map( A(3), B(3), c3, S(3), P(3), G(3));
R T L S C H EM A T IC :
T E C H NO L O G Y S C H EM A TI C :
Design Statistics
# IOs : 14
Cell Usage :
# BELS :4
# LUT3 :4
# IO Buffers : 14
# IBUF :9
# OBUF :5
# Others :4
# Partial_Full_Adder :4
SYNTHESIS REPORT
Design Statistics
# IOs : 14
Cell Usage :
# IO Buffers : 14
# IBUF :9
# OBUF :5
# Others :4
# full_adder_vhdl_code :4
RESULT:
CONCLUSION:
VIVA QUESTIONS:
TRUTH TABLE:
AIM:
To write a VHDL/Verilog code for 16:1 Mux generate synthesis report, RTL schematic
and to implement designs using FPGA (Spartan-2).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after that
double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure Device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report. Bit
file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on Xilinx
component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
CIRCUIT DIAGRAM:
Y0_L
G1 Y1_L
G2A_L
Y2_L
G2B_L
Y3_L
Y4_L
A
Y5_L
B
Y6_L
C
Y7_L
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity kanhe_4x1mux is
port(a,b,c,d : in std_logic;
S0,s1 : in std_logic;
q : out std_logic);
end kanhe_4x1mux;
Main program:
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity kanhe_16x1mux is
port(a:in std_logic_vector(15 downto 0);
s: in std_logic_vector(3 downto 0);
Z :out st d_log i c );
End kanhe_1 6x1 mux ;
component kanhe_4x1mux is
port(a,b,c,d,s0,s1:in std_logic;
Q:out std_logic);
End co mponen t;
Begin
M1 : kanhe_4x1mux po rt map (a (0 ),a (1 ) ,a( 2) ,a (3 ), s( 0) ,s (1 ), z1 );
m 2: kanhe_4x1mux po rt map (a (4 ),a (5 ) ,a( 6) ,a (7 ), s( 0) ,s (1 ), z2 );
m 3: kanhe_4x1mux po rt map (a (8 ),a (9 ) ,a( 10) ,a (11 ), s (0 ),s (1 ), z3 );
m 4: kanhe_4x1mux po rt map (a (12 ), a(1 3) ,a (14 ),a (15 ), s (0 ), s(1 ) ,z4 );
m 5: kanhe_4x1mux po rt map ( z1, z2, z3,z4 ,s (2 ), s (3) ,z );
AIM:
To write a VHDL/Verilog code for 3x8 Decoder and to generate synthesis report, RTL
schematic and to implement designs using FPGA (Spartan-2).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after
that double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report.
Bit file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on
Xilinx component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
TRUTH TABLE:
BLOCK DIAGRAM:
VHDL CODE:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity dec3to8_beh is
port ( g1 : in STD_LOGIC;
g2a_l : in STD_LOGIC;
g2b_l : in STD_LOGIC;
a : in STD_LOGIC_VECTOR(2 downto 0);
y_l : out STD_LOGIC_VECTOR(7 downto 0));
end dec3to8_beh;
architecture Behavioral of dec3to8_beh is
begin
process (g1,g2a_l,g2b_l,a)
begin
if (g1='0' and g2a_l='0' and g2b_l='0')then
y_l<= "11111111";
elsif(g1 ='1' and g2a_l='0' and g2b_l='0') then
if(a="000")then
y_l<="11111110";
elsif(a="001") then
y_l<="11111101";
elsif(a="010")then
y_l<="11111011";
elsif(a="011")then
y_l<="11110111";
elsif(a="100")then
y_l<="11101111";
elsif(a="101")then
y_l<="11011111";
elsif(a="110")then
y_l<="10111111";
elsif(a="111") then
y_l<="01111111";
end if;
end if;
end process;
end Behavioral;
T E C H NO L O G Y S C H EM A TI C :
R T L S C H EM A T IC :
D E VI C E U TI L I Z A TI O N S UM M A R Y:
Number of Slices: 8 out of 960 0%
Number of 4 input LUTs: 14 out of 1920 0%
Number of IOs: 14
Number of bonded IOBs: 14 out of 66 21%
IOB Flip Flops: 8
SYNTHESIS REPORT:
RTL Top Level Output File Name : decoder.ngr
Top Level Output File Name : decoder
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : NO
Design Statistics
# IOs : 14
Cell Usage:
# BELS : 14
# LUT2 :4
# LUT3 :2
# LUT4 :8
# FlipFlops/Latches :8
# LD :8
# IO Buffers : 14
# IBUF :6
# OBUF :8
RESULT:
CONCLUSION:
VIVA QUESTIONS:
2. Write the VHDL code for the IC 74x138 using CASE statement.
AIM:
To write a VHDL/Verilog code for 8:3 Encoder and to generate synthesis report, RTL schematic
and to implement designs using FPGA (Spartan-3).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after
that double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report.
Bit file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on
Xilinx component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
l i brary i ee e;
ent i t y e83 i s
port ( p: i n st d_l ogi c_ve ct or( 7 do w nt o 0);
y: out st d_l ogi c_ve ct or( 2 dow nt o 0));
end e8 3;
archi t ect ur e beh of e83 i s
begi n
proc ess (p )
begin
case p is
when "00000001"=>y<="000";
when "00000001"=>y<="001";
when "00000100"=>y<="010";
when "00001000"=>y<="011";
when "00010000"=>y<="100";
when "00100000"=>y<="101";
when "01000000"=>y<="110";
when "10000000"=>y<="111";
when others=>y<="UUU";
end ca se;
end p roce ss;
R T L S C H EM A T IC :
TRUTH TABLE:
INPUT OUTPUTS
S
P7 P6 P5 P P3 P2 P1 P0 Y(2) Y(1) Y(0)
4
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
RESULT:
CONCLUSION:
VIVA QUESTIONS:
1. what is the use of 8:3 encoder?
CIRCUIT DIAGRAM:
TRUTH TABLE:
AIM:
To write a VHDL/Verilog code for Parity generator and checker synthesis report, RTL
schematic and to implement designs using FPGA (Spartan-3).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after
that double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report.
Bit file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on
Xilinx component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
CIRCUIT DIAGRAM:
TRUTH TABLE:
VHDL CODE:
library ieee;
use ieee.std_logic_1164.all;
entity parity is
port( data:in bit_vector(7 downto 0);
even_p,odd_p: out bit);
end parity;
architecture parity_gen of parity is
signal temp : bit_vector(5 downto 0);
begin
temp(0)<=data(0) xor data(1);
temp(1)<=temp(0) xor data(2);
temp(2)<=temp(1) xor data(3);
temp(3)<=temp(2) xor data(4);
temp(4)<=temp(3) xor data(5);
temp(5)<=temp(4) xor data(6);
even_p <= temp(5) xor data(7);
odd_p <= not(temp(5) xor data(7);
end parity_gen;
The 8-bit parity checker :
library ieee;
use ieee.std_logic_1164.all;
entity parity is
port( data:in bit_vector(7 downto 0);
even_p,odd_p: out bit);
end parity;
architecture parity_gen of parity is
signal temp : bit_vector(5 downto 0);
begin
temp(0)<=data(0) xor data(1);
temp(1)<=temp(0) xor data(2);
temp(2)<=temp(1) xor data(3);
temp(3)<=temp(2) xor data(4);
temp(4)<=temp(3) xor data(5);
temp(5)<=temp(4) xor data(6);
even_p <= temp(5) xor data(7);
odd_p <= not(temp(5) xor data(7);
end parity_arch;
RESULT:
CONCLUSION:
VIVA QUESTIONS:
FLIP FLOPS:
TRUTH TABLE :
LOGIC DIARAM OF D FLIP FLOP
CLK PR_L CLR_L D Q QN
x 0 1 x 1 0
x 1 0 x 0 1
PR-L x 0 0 x 1 1
1 1 1 0 0 1
1 1 1 1 1 0
1 1 x Q QN
CLR-L Q
CLK QN
AIM:
To write a VHDL/Verilog code for Flip Flop and to generate synthesis report, RTL schematic
and to implement designs using FPGA (Spartan-2).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after that
double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure Device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report. Bit
file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on Xilinx
component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
TRUTH TABLE:
TRUTH TABLE :
x 0 1 x 1 0
x 1 0 x 0 1
x 0 0 x 1 1
1 1 1 0 0 1
1 1 1 1 1 0
1 1 x Q QN
BLOCK DIAGRAM:
VHDL CODE:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity dfff is
Port ( d: in STD_LOGIC_VECTOR(0 to 1);
clk : in STD_LOGIC_VECTOR;
pr : in STD_LOGIC_VECTOR(0 to 1);
clr : in STD_LOGIC_VECTOR(0 to 1);
q : inout STD_LOGIC_VECTOR(0 to 1);
nq :inout STD_LOGIC_VECTOR(0 to 1));
end DFFF;
architecture structural of DFFF is
component dff1
port(d1,clk1,pr1,clr1:in std_logic;
q1,nq1:inout std_logic);
end component;
begin
D1:dff1 port map(d(0),clk, pr(0),clr(0),q(0),nq(0));
D2:dff1 port map(d(1),clk, pr(1),clr(1),q(1),nq(1));
end structural;
T E C H NO L O G Y S C H EM A TI C :
R T LS C H EM A TI C :
entity dff1 is
Port ( d1: in STD_LOGIC;
Clk1 : in STD_LOGIC;
Pr1 : in STD_LOGIC;
Clr1 : in STD_LOGIC;
Q1 : inout STD_LOGIC;
Nq1 :inout STD_LOGIC);
end dff1;
architecture Behavioral of dff1 is
begin
process(d1,pr1,clr1,clk1)
begin
if(pr1='0' and clr1='0')then
q1<='1';nq1<='1';
elsif(pr1='0' and clr1='1')then
q1<='1';nq1<='0';
elsif(pr1='1' and clr1='0')then
q1<='0';nq1<='1';
else
if(clk1='1' and clk1'event)then
q1<=d1;nq1<=not d1;
else
q1<=q1;nq1<=nq1;
end if;
end if;
end process;
end Behavioral;
D E VI C E U TI L I Z A TI O N S UM M A R Y:
Number of Slices : 3 out of 960 0%
Number of Slice Flip Flops : 2 out of 1920 0%
Number of 4 input LUTs : 5 out of 1920 0%
Number of IOs : 6
Number of bonded IOBs : 6 out of 66 9%
IOB Flip Flops : 2
Number of GCLKs : 1 out of 24 4%
SYNTHESIS REPORT:
RTL Top Level Output File Name : dff.ngr
Top Level Output File Name : dff
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : NO
Design Statistics
# IOs :6
Cell Usage :
# BELS :5
# INV :3
# LUT2 :2
# FlipFlops/Latches :2
# FDCP :2
# Clock Buffers :1
# BUFGP :1
# IO Buffers :5
# IBUF :3
# OBUF :2
RESULT:
CONCLUSION:
VIVA QUESTIONS:
2. The truth table for an S-R flip-flop has how many VALID entries?
TRUTH TABLE:
S0 S0 S1 0 0
S1 S0 S1 0
R T L S C H EM A T IC :
MEALY
AIM:
To write a VHDL/Verilog code and to generate synthesis report, RTL schematic and to
implement designs using FPGA (Spartan-2).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
1. In the process window, go to ‘user constraints’ and select ‘assign package pins’ and after that
double click on ‘implement design’.
2. Select properties by right clicking on ‘generate programming file’. Select ‘JTAG’ clock in
startup options.
3. Select boundary scan in ‘impact window’ after double clicking on ‘configure Device’.
4. In ‘generate programming file’ double clicking on ‘programming file generation report. Bit
file will be generated.
5. Xilinx boundary scan window will appear when the bit file is selected. Right click on Xilinx
component and select program.
6. Programming properties will appear and finally program will be succeeded.
7. Thus the program can be dumped into FPGA kit and finally output can be seen on the kit.
libra ry ieee;
entity
meal yis
end if;
whe not her s=>z < ='0';
n_state <= s0;
end ca se;
end beh;
TRUTH TABLE:
RTL SCHEMATIC:
MOORE
entity moor e is
port(a, clk:i nstd_l ogic ; z:out std_logic);
end m oore;
architecture beh of moore is
type state is(s0,s1,s2);
signal n_state,p_state: state;
be gin
s:process(clk)
begi n
if rising_edge(clk) then
p_state <= n_state;
end i f;end pr oce ss;
d: pr oce ss(a ,p_state)
begi n
case p_state is
when s0=>z<='0';
if(a='0') then
n_state<= p_state;
else
n_state<=s1;
end if;
when s1=>z<='0';
if(a='1') then
n_state <= s2;
else
n_state<=p_state;
end if;
when s2=>z<='1';
n_state <= s0;
end ca se;
end pr oce ss;
end beh;
RESULT:
CONCLUSION:
VIVA QUESTIONS:
4. What is VHDL?
PART B
(Back-end Level Design and Implementation)
Circuit Diagram:
PROCEDURE:
1. Connect the Circuit as shown in the circuit diagram using Pyxis Schematic tool
2. Enter into Simulation mode.
3. Setup the Analysis and library.
4. Setup the required analysis.
5. Probe the required Voltages
6. Run the simulation.
7. Observe the waveforms in EZ wave.
Testbench:
Output waveforms:
NOR Gate:
Testbench:
Output waveforms:
Result:
Conclusion:
Viva Questions:
CIRCUIT DIAGRAM:
PROCEDURE:
1. Connect the Circuit as shown in the circuit diagram using Pyxis Schematic tool
2. Enter into Simulation mode.
3. Setup the Analysis and library.
4. Setup the required analysis.
5. Probe the required Voltages
6. Run the simulation.
7. Observe the waveforms in EZ wave.
8. Draw the layout using Pysis Layout.
9. Perform Routing using IRoute
10. Perform DRC, LVS, PEX.
OUTPUT WAVEFORMS:
Layout:
Result:
Conclusion:
Viva Questions:
CIRCUIT DIAGRAM:
Testbench:
output Waveforms:
Result:
Conclusion:
Viva Questions:
CIRCUIT DIAGRAM:
Testbench:
Output waveforms:
Result:
Conclusion:
Viva Questions:
4. How many NAND gates make a full subtractor and design it?
CIRCUIT DIAGRAM:
Testbench:
Output Waveform:
Result:
Conclusion:
Viva Questions:
ADVANCED EXPERIMENT
CIRCUIT DIAGRAM:
Testbench:
OUTPUT WAVEFORMS:
Result:
Conclusion:
Viva Questions:
BLOCK DIAGRAM:
OUTPUT WAVEFORMS:
14
AIM:
To write a VHDL/Verilog code for ALU Design and to generate synthesis report, RTL
schematic and to implement designs using FPGA (Spartan-2).
APPARATUS:
1. Synthesis Tool: Xilinx Project Navigator - ISE 9.1i.
2. Simulation Tool: Modelsim Simulator.
PROCEDURE:
DUMPING PROCESS:
RTL SCHEMATIC:
TRUTH TABLE:
m=0 Logic
s(2) s(1) s(0) Function Operation (bit wise)
0 0 0 ~a NOT
0 0 1 ~b NOT
0 1 0 a&b AND
0 1 1 a|b OR
1 0 0 ~(a&b) NAND
1 0 1 ~(a|b) NOR
1 1 0 a^b EXOR
1 1 1 ~(a^b) EXNOR
m=1 Arithmetic
0 0 0 a Transfer a
0 0 1 a+1 Increment a by 1
0 1 0 a+b Add a and b
0 1 1 a+b+1 Increment the sum of a and b by 1
1 0 0 a+(~b) a plus one’s complement of b
1 0 1 a-b Subtract b from a (i.e. ~b+a+1)
1 1 0 (~a)+b b plus one’s compliment of a
1 1 1 b-a Subtract a from b (i.e. ~a+b+1)
VHDL CODE:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity alu4b is
Port ( a,b : in STD_LOGIC_VECTOR (3 downto 0);
s : in STD_LOGIC_VECTOR (2 downto 0);
m,clk : in STD_LOGIC;
y: out STD_LOGIC_VECTOR (3 downto 0));
end alu4b;
architectureBehavioral of alu4b is
begin
process(a,b,s,m)
begin
if(clk'event and clk='1')then
elsif(m='0')then
case s is
when"000"=>y<=not a;
when"001"=>y<=not b;
when"010"=>y<=a and b;
when"011"=>y<=a or b;
when"100"=>y<=a nand b;
when"101"=>y<=a nor b;
when"110"=>y<=a xor b;
when"111"=>y<=a xnor b;
when others=>null;
end case;
else
case s is
when"000"=>y<=a;
when"001"=>y<=a+1;
when"010"=>y<=a+b;
when"011"=>y<=a+b+1;
when"100"=>y<=a+(not b);
when"101"=>y<=a-b;
when"110"=>y<=(not a)+b;
when"111"=>y<=b-a;
when others=>y<=b;
end case;
end if;
end process;
end Behavioral;
SYNTHESIS REPORT:
RTL Top Level Output File Name : alu.ngr
Top Level Output File Name : alu
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : NO
Design Statistics
# IOs :6
Cell Usage :
# BELS :4
# INV :1
# LUT3 :1
# LUT4 :2
# FlipFlops/Latches :4
# FDC :4
# Clock Buffers :1
# BUFGP :1
# IO Buffers :5
# IBUF :1
# OBUF :4
RESULT:
CONCLUSION:
VIVA QUESTIONS: