Beruflich Dokumente
Kultur Dokumente
T
E
S
T
B
E
N
C
H
Gate level
Simulation
RTL Model
Synthesis
Gate level
description using
target library cells
Target Device
Libraries (Vender
Specific)
Design Constraints
Area / Speed
Mapping +
Translation
Gate level model to
device architecture
Place and Route
Placing the design in
device while optimizing
it for speed and area
Libraries
(Simprims
and
Unisims)
Target Device
Libraries (Vender
Specific)
Design Constraints
Area / Speed
Programming file
generation
Bit Stream
Download onto
FPGA/ CPLD
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Xilinx FPGAs are reprogrammable and when combined with an HDL design
flow can greatly reduce the design and verification cycle.
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
VERILOG HDL/Verilog
Code Design Entry
Functional Simulation
Synthesis
Implementation
Timing Simulation
Design Entry
The first stage of Xilinx design flow is a design entry process. A design must be
specified by using either a schematic editor or HDL text-based tool.
Functional Simulation
Upon the finish of the design entry stage, the functional simulation of the design
is being performed, which is used to verify functionality of the design assuming no
delays, whatsoever. This assumes no target technology selection at this stage and hence
assumes zero delay in simulation.
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Design Synthesis
After this process, the synthesis is performed. Here for the first time in the design
flow the target technology (choice of a particular FPGA device family) is being
performed. This target technology selection will remain the same, henceforth in the
design flow, upto the final implementation stage, where finally generated Bit stream file
gets downloaded onto that FPGA.
The output of the synthesis process is creation of gate level netlist. This refers to
the EDIF implementation netlist of the FPGA design. Besides the EDIF implementation
netlist, the XNF (Xilinx netlist format) netlist can be used as well.
Although the XNF is now becoming rather obsolete. The EDIF netlist is used as
an input file to the Xilinx Implementation tool and specifies how the core will be
implemented.
The Electronic Design Interchange Format (EDIF) is a format used to exchange design
data between different CAD systems. In the world of FPGA design, it is used for
interchange of data between different EDA (Electronic Design Automation) software
tools. EDIF files are used for FPGA implementation only. They are the result of design
synthesis and can be generated from different design entry EDA tools: schematic or HDL
design tools. EDIF files are inputs to the Xilinx implementation tools during the
translation step (NGDBuild).
Design Implementation
Design Implementation includes the following steps:
i) Translate
ii) Map
iii) Place and Route
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 1
Simulation using all the modeling styles and Synthesis of all the
logic gates using VHDL
AIM:
Perform
Zero
Delay
Simulation
of
all
the
logic
gates
written in behavioral, dataflow and structural modeling style in VHDL using a
Test bench. Then, Synthesize each one of them on Xilinx 8.1 Project Navigator.
Block Diagram:
And, Nand,
Or, Nor,
Xor, Xnor
Truth table:
And Gate:
A
0
0
1
1
B
0
1
0
1
Y
0
0
0
1
A
0
0
1
1
B
0
1
0
1
Y
1
1
1
0
Or Gate:
A
0
0
1
1
B
0
1
0
1
Y
0
1
1
1
Nand Gate:
Nor Gate:
A
0
0
1
1
B
0
1
0
1
Y
1
0
0
0
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Xor Gate:
A
B
0
0
0
1
1
0
1
1
Xnor Gate:
A
B Y
0
0
1
0
1
0
1
0
0
1
1
1
Y
0
1
1
0
Boolean Equation:
And Gate: Y = (A.B)
Nand Gate: Y = (A.B)
Xor Gate: Y = A.B + A.B
Or Gate: Y = (A + B)
Nor Gate: Y = (A+B)
Xnor Gate: Y = A.B + A.B
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Nand Gate:
Nor Gate:
And Gate:
Or Gate:
Xor Gate:
Xnor Gate:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 2
Simulation using all the modeling styles and Synthesis of 1-bit half
adder and 1-bit Full adder using VHDL
AIM:
Perform Zero Delay Simulation of 1-bit half adder and 1-bit Full adder written in
behavioral, dataflow and structural modeling style in VHDL using a Test bench. Then,
Synthesize each one of them on Xilinx 8.1 Project Navigator.
Block Diagram:
1-bit Half Adder:
Half Adder
(1-bit)
A
B
Sum
Carry
Full Adder
(1-bit)
Sum
Cout
Cin
Truth table:
Half Adder:
A
0
0
1
1
B
0
1
0
1
Sum
0
1
1
0
Carry
0
0
0
1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
Cin
0
1
0
1
0
1
0
1
Sum
0
1
1
0
1
0
0
1
Cout
0
0
0
1
0
1
1
1
Boolean Equation:
Half Adder:
Sum = A B
Carry = A.B
Full Adder:
Sum = A B Cin
Cout = A.B + A.Cin + B.Cin
VHDL Code:
Half Adder (Using dataflow, Behavioral Modeling):
library ieee;
use ieee.std_logic_1164.all;
entity ha_1b is
port ( a, b
: in std_logic;
sum, carry : out std_logic
);
end ha_1b;
architecture ha_1b_df of ha_1b is -- dataflow modeling using with select
signal s : std_logic_vector(1 downto 0);
begin
s <= a & b;
with s select
sum <= '0' when "00",
'1' when "01",
'1' when "10",
'0' when "11",
'Z' when others;
with s select
carry <= '0' when "00",
'0' when "01",
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
--structural modeling
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Half Adder:
Full Adder:
Synthesis:
Half Adder:
EDA Tool Name: Xilinx Project Navigator 8.1
Full Adder:
EDA Tool Name: Fpga Advantage 3.1 Leonardo spectrum
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 3
Simulation using all the modeling styles and Synthesis of 2:1
Multiplexer and 4:1 Multiplexer using VHDL
Aim:
Perform Zero Delay Simulation of 2:1 Multiplexer and 4:1 Multiplexer written in
behavioral, dataflow and structural modeling style in VHDL using a Test bench. Then,
Synthesize each one of them on Xilinx 8.1 Project Navigator.
Block Diagram:
2:1 Multiplexer:
A
B
2:1
Multiplexer
4:1 Multiplexer:
A
B
C
4:1
Multiplexer
S1
S0
D
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Truth table:
2:1 Multiplexer:
S
0
0
0
0
1
1
1
1
A
0
0
1
1
0
0
1
1
B
0
1
0
1
0
1
0
1
Y
0
0
1
1
0
1
0
1
4:1 Multiplexer:
A
0
0
1
1
B
0
1
0
1
Y
A
B
C
D
Boolean Equation:
2:1 Multiplexer:
Y = A.S + B.S
4:1 Multiplexer:
Y = A.S1.S0 + B.S1.S0 + C.S1.S0 + D.S1.S0
VHDL Code:
2:1 Multiplexer ( in dataflow and behavioral modeling style) :
library ieee;
use ieee.std_logic_1164.all;
entity mux21 is
port ( a,b,s
y
);
end mux21;
: in std_logic;
: out std_logic
library ieee;
use ieee.std_logic_1164.all;
entity mux21_tst is
end mux21_tst;
architecture mux21_tst_a of mux21_tst is
component mux21
port (a,b,s : in std_logic;
y : out std_logic
);
End component;
signal a,b,s,y : std_logic;
begin
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
library ieee;
use ieee.std_logic_1164.all;
entity mux41_tst is
end mux41_tst;
architecture mux41_tst_a of mux41_tst is
component mux41
port ( a,b,c,d,s1,s0 : in std_logic;
y : out std_logic
);
end component;
signal a,b,c,d,s1,s0,y : std_logic;
begin
mux41_tst_i : mux41 port map ( a, b, c, d, s1, s0, y ); -- positional association
process
begin
a <= '0';
b <= '1';
c <= '1';
d <= '0';
s1 <= '0';
s0 <= '0';
wait for 100 ns;
s1 <= '0';
s0 <= '1';
wait for 100 ns;
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
2 :1 Multiplexer:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 4
Simulation and Synthesis of 1:4 Demultiplexer using VHDL
Aim:
Perform Zero Delay Simulation 1:4 Demultiplexer in VHDL using a Test bench. Then,
Synthesize on Xilinx 8.1 Project Navigator.
Block Diagram:
1:4
Demultiplexer
Truth Table:
Input
A
B
C
D
Select
00
01
10
11
Output
Y(0)
Y(1)
Y(2)
Y(3)
Boolean Equation:
Y(3) = A.S.(1).S(0)
Y(2) = B.S.(1).S(0)
Y(1) = C.S.(1).S(0)
Y(0) = D.S.(1).S(0)
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
VHDL Code:
library ieee;
use ieee.std_logic_1164.all;
entity demux14 is
port ( a : in std_logic;
s : in std_logic_vector(1 downto 0);
y : out std_logic_vector(3 downto 0)
);
end demux14;
architecture demux14_df of demux14 is -- dataflow modeling using when . else
begin
y <= ( a & '0' & '0' & '0') when s = "00" else
('0' & a & '0' & '0') when s = "01" else
('0' & '0' & a & '0') when s = "10" else
('0' & '0' & '0' & a ) when s = "11" else
"0000";
end demux14_df;
architecture demux14_beh of demux14 is -- behavioral modeling using case .. end case
begin
process(a,s)
begin
case s is
when "00" => y <= ( a & '0' & '0' & '0');
when "01" => y <= ('0' & a & '0' & '0');
when "10" => y <= ('0' & '0' & a & '0');
when "11" => y <= ('0' & '0' & '0' & a );
when others => y <= "0000";
end case;
end process;
end demux14_beh;
Simulation Waveform:
Synthesis:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 5
Simulation and Synthesis of 2:4 Decoder using VHDL
Aim:
Perform Zero Delay Simulation 2:4 Decoder in VHDL using a Test bench. Then,
Synthesize on Xilinx 8.1 Project Navigator.
Block Diagram:
2:4
Decoder
Truth Table:
A
00
01
10
11
Y
0001
0010
0100
1000
Boolean Equation:
Y(0) = A(1). A(0)
Y(1) = A(1).A(0)
Y(2) = A(1).A(0)
Y(3) = A(1). A(0)
VHDL Code:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
library ieee;
use ieee.std_logic_1164.all;
entity decod24 is
port ( a : in std_logic_vector(1 downto 0);
y : out std_logic_vector(3 downto 0)
);
end decod24;
architecture decod24_beh of decod24 is -- behavioral modeling using case end case
begin
process(a)
begin
case a is
when "00" => y <= "0001";
when "01" => y <= "0010";
when "10" => y <= "0100";
when "11" => y <= "1000";
when others => y <= "0000";
end case;
end process;
end decod24_beh;
Simulation Waveform:
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 6
Simulation and Synthesis of 4:2 Encoder using VHDL
Aim:
Perform Zero Delay Simulation 4:2 Encoder in VHDL using a Test bench. Then,
Synthesize on Xilinx 8.1 Project Navigator.
Block Diagram:
4:2
Encoder
Truth Table:
A
1000
0100
0010
0001
Y
00
01
10
11
Boolean Equation:
Y(1) = A(1) + A(0)
Y(0) = A(2) + A(0)
VHDL Code:
library ieee;
use ieee.std_logic_1164.all;
entity encod42 is
port (a : in std_logic_vector(3 downto 0);
y : out std_logic_vector(1 downto 0)
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 7
Simulation and Synthesis of 4:2 Priority Encoder using VHDL
Aim:
Perform Zero Delay Simulation 4:2 Priority Encoder in VHDL using a Test bench.
Then, Synthesize on Xilinx 8.1 Project Navigator.
Block Diagram:
4:2
Priority
Encoder
Truth Table:
A(3) A(2) A(1)
0
0
0
0
0
1
0
1
X
1
X
X
A(0)
1
X
X
X
Y(1) Y(0)
0
0
0
1
1
0
1
1
A(0)
1
0
1
0
1
0
1
0
1
0
Y(1) Y(0)
0
0
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
1
1
1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
0
1
1
1
1
1
0
0
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
Boolean Equation:
Y(1) = A(3) + A(2)
Y (0) = A(2).A(1) + A(3).A(2) + A(3).A(0)
VHDL Code:
library ieee;
use ieee.std_logic_1164.all;
entity pri_encod42 is
port (a : in std_logic_vector(3 downto 0);
y : out std_logic_vector(1 downto 0);
valid : out std_logic
);
end pri_encod42;
architecture pri_encod42_beh of pri_encod42 is
begin
process(a)
begin
if (a(3) = '1') then
y <= "11";
valid <= '1';
elsif (a(2) = '1') then
y <= "10";
valid <= '1';
elsif (a(1) = '1') then
y <= "01";
valid <= '1';
elsif (a(0) = '1') then
y <= "00";
valid <= '1';
else
y <= "XX";
valid <= '0';
end if;
end process;
end pri_encod42_beh;
Simulation Waveform:
Synthesis:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 8
Simulation and Synthesis of magnitude comparator 1-bit using
VHDL
Aim:
Perform Zero Delay Simulation of magnitude comparator 1-bit in VHDL using a Test
bench. Then, Synthesize on Xilinx 8.1 Project Navigator.
Block Diagram:
AgtB
Magnitude
Comparator
1-bit
A
B
AltB
AeqB
Truth Table:
A
0
0
1
1
B
0
1
0
1
AgtB
0
0
1
0
AltB
0
1
0
0
AeqB
1
0
0
1
Boolean Equation:
AgtB = A.B
AltB = A.B
AeqB = A.B + A.B
VHDL Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 9
Simulation and Synthesis of D latch and D flip flop using VHDL
Aim:
Perform Zero Delay Simulation of d latch and d flip flop in VHDL using a Test bench.
Then, Synthesize on Xilinx 8.1 Project Navigator.
VHDL Code:
D-latch:
library ieee;
use ieee.std_logic_1164.all;
entity dlatch is
port (d,en,reset : in std_logic;
q : out std_logic
);
end dlatch;
architecture dlatch_beh of dlatch is
signal s : std_logic;
begin
process(d,en,reset)
begin
if (reset = 1) then
s <=0;
elsif (en = 1) then
s <= d;
else
s <= s;
end if;
q <= s;
end process;
end dlatch_beh;
architecture dlatch_beh1 of dlatch is
begin
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 10
Simulation and Synthesis of JK, T Flip Flop using VHDL
Aim:
Perform Zero Delay Simulation of JK, T, Flip flop in VHDL using a Test bench. Then,
Synthesize on Xilinx 8.1 Project Navigator.
VHDL Code:
JK-flip flop:
library ieee;
use ieee.std_logic_1164.all;
entity JKff is
port (j,k,clk,reset : in std_logic;
q : out std_logic
);
end JKff;
architecture JKff_beh of JKff is
signal s : std_logic;
begin
process(clk,reset)
begin
if (reset = '1') then
s <= '0';
elsif (clk'event and clk = '1' ) then
if ( j = '0' and k = '0') then
s <= s;
elsif ( j = '0' and k = '1') then
s <= '0';
elsif ( j = '1' and k = '0') then
s <= '1';
elsif ( j = '1' and k = '1') then
s <= not s;
end if;
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 11
Simulation using all the modeling styles and Synthesis of all the
logic gates using Verilog HDL
AIM:
Perform
Zero
Delay
Simulation
of
all
the
logic
gates
written in behavioral, dataflow and structural modeling style in Verilog using a
Test bench. then, Synthesize each one of them on two different EDA tools.
Block Diagram:
And, Nand,
Or, Nor,
Xor, Xnor
Truth table:
And Gate:
A
0
0
1
1
B
0
1
0
1
Y
0
0
0
1
A
0
0
1
1
B
0
1
0
1
Y
1
1
1
0
Or Gate:
A
0
0
1
1
B
0
1
0
1
Y
0
1
1
1
Nand Gate:
Nor Gate:
A
0
0
1
1
B
0
1
0
1
Y
1
0
0
0
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Xor Gate:
A
B
0
0
0
1
1
0
1
1
Xnor Gate:
A
B Y
0
0
1
0
1
0
1
0
0
1
1
1
Y
0
1
1
0
Boolean Equation:
And Gate: Y = (A.B)
Nand Gate: Y = (A.B)
Xor Gate: Y = A.B + A.B
Or Gate: Y = (A + B)
Nor Gate: Y = (A+B)
Xnor Gate: Y = A.B + A.B
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Nand Gate:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
: "xorg"
: NGC
: xc3s50-5-pq208
*
Final Report
*
===============================================================
Final Results
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
:3
Cell Usage :
# BELS
:1
#
LUT2
:1
# IO Buffers
:3
#
IBUF
:2
# OBUF
:1
===============================================================
==========
Device utilization summary:
--------------------------Selected Device : 3s50pq208-5
Number of Slices:
Number of 4 input LUTs:
Number of IOs:
Number of bonded IOBs:
1 out of 768 0%
1 out of 1536 0%
3
3 out of 124 2%
Timing Summary:
--------------Speed Grade: -5
Minimum period: No path found
Minimum input arrival time before clock: No path found
Maximum output required time after clock: No path found
Maximum combinational path delay: 7.760ns
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 12
Simulation using all the modeling styles and Synthesis of 1-bit half
adder and 1-bit Full adder using verilog HDL
AIM:
Perform Zero Delay Simulation of 1-bit half adder and 1-bit Full adder written in
behavioral, dataflow and structural modeling style in VERILOG HDL using a Test
bench. Then, Synthesize each one of them on two different EDA tools.
Block Diagram:
1-bit Half Adder:
Half Adder
(1-bit)
A
B
Sum
Carry
Full Adder
(1-bit)
Sum
Cout
Cin
Truth table:
Half Adder:
A
0
0
1
1
B
0
1
0
1
Sum
0
1
1
0
Carry
0
0
0
1
Full Adder:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
Cin
0
1
0
1
0
1
0
1
Sum
0
1
1
0
1
0
0
1
Cout
0
0
0
1
0
1
1
1
Boolean Equation:
Half Adder:
Sum = A B
Carry = A.B
Full Adder:
Sum = A B Cin
Cout = A.B + A.Cin + B.Cin
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Half Adder:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Full Adder:
Synthesis:
Half Adder:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Full Adder:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
: "fa2"
: NGC
: xc3s50-5-pq208
===============================================================
*
HDL Analysis
*
===============================================================
Analyzing top module <fa2>.
Module <fa2> is correct for synthesis.
Analyzing module <ha> in library <work>.
Module <ha> is correct for synthesis.
Analyzing module <org> in library <work>.
Module <org> is correct for synthesis.
===============================================================
*
HDL Synthesis
*
===============================================================
Performing bidirectional port resolution...
Synthesizing Unit <ha>.
Related source file is "ha.v".
Found 1-bit xor2 for signal <s>.
Unit <ha> synthesized.
Synthesizing Unit <org>.
Related source file is "org.v".
Unit <org> synthesized.
Synthesizing Unit <fa2>.
Related source file is "fa.v".
Unit <fa2> synthesized.
===============================================================
HDL Synthesis Report
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
:2
:2
======================================================
*
Advanced HDL Synthesis
*
======================================================
Loading device for application Rf_Device from file '3s50.nph' in environment C:\Xilinx.
======================================================
Advanced HDL Synthesis Report
Macro Statistics
# Xors
1-bit xor2
:2
:2
======================================================
*
Final Report
*
=====================================================================
Final Results
RTL Top Level Output File Name : fa2.ngr
Top Level Output File Name
: fa2
Output Format
: NGC
Optimization Goal
: Speed
Keep Hierarchy
: NO
Design Statistics
# IOs
:5
Cell Usage :
# BELS
:2
#
LUT3
:2
# IO Buffers
:5
#
IBUF
:3
#
OBUF
:2
=====================================================================
Device utilization summary:
--------------------------Selected Device : 3s50pq208-5
Number of Slices:
Number of 4 input LUTs
Number of IOs:
Number of bonded IOBs:
: 1 out of 768 0%
: 2 out of 1536 0%
:5
: 5 out of 124 4%
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 13
Simulation using all the modeling styles and Synthesis of 2:1
Multiplexer and 4:1 Multiplexer using VERILOG HDL
Aim:
Perform Zero Delay Simulation of 2:1 Multiplexer and 4:1 Multiplexer written in
behavioral, dataflow and structural modeling style in VERILOG HDL using a Test
bench. Then, Synthesize each one of them on two different EDA tools.
Block Diagram:
2:1 Multiplexer:
A
B
2:1
Multiplexer
4:1 Multiplexer:
A
B
C
4:1
Multiplexer
S1
S0
D
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Truth table:
2:1 Multiplexer:
S
0
0
0
0
1
1
1
1
A
0
0
1
1
0
0
1
1
B
0
1
0
1
0
1
0
1
Y
0
0
1
1
0
1
0
1
4:1 Multiplexer:
A
0
0
1
1
B
0
1
0
1
Y
A
B
C
D
Boolean Equation:
2:1 Multiplexer:
Y = A.S + B.S
4:1 Multiplexer:
Y = A.S1.S0 + B.S1.S0 + C.S1.S0 + D.S1.S0
module mux21_tst_v;
reg a;
reg b;
reg s;
wire c;
mux21 uut (
.a(a),
.b(b),
.s(s),
.c(c) );
initial
begin
a = 0;
b = 1;
s = 0;
#100
s = 1;
end
endmodule
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
4: 1 Multiplexer:
module mux41_tst_v;
reg [3:0] a;
reg [1:0] s;
wire c;
mux41 uut (
.a(a),
.s(s),
.c(c)
);
initial
begin
a = 4'b0101;
s = 2'b00;
#100
#100
#100
#100
end
s = 2'b00;
s = 2'b01;
s = 2'b10;
s = 2'b11;
endmodule
Simulation Waveform:
Mux41:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Synthesis:
2 :1 Multiplexer:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
4 :1 Multiplexer:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Synthesis Report:
===============================================================
*
Synthesis Options Summary
*
===============================================================--- Source Parameters
Input File Name
: "mux41.prj"
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
: "mux41"
: NGC
: xc3s50-5-pq208
===============================================================
*
HDL Compilation
*
===============================================================
Compiling verilog file "mux21.v" in library work
Module <mux21> compiled
Compiling verilog file "mux41.v" in library work
Module <mux21a> compiled
Module <mux41> compiled
Module <mux41a> compiled
Module <mux41b> compiled
No errors in compilation
Analysis of file <"mux41.prj"> succeeded.
===============================================================
*
Final Report
*
===============================================================
Final Results
RTL Top Level Output File Name : mux41.ngr
Top Level Output File Name
: mux41
Output Format
: NGC
Optimization Goal
: Speed
Keep Hierarchy
: NO
Design Statistics
# IOs
:7
Cell Usage :
# BELS
:3
#
LUT3
:2
#
MUXF5
:1
# IO Buffers
:7
#
IBUF
:6
#
OBUF
:1
===============================================================
Device utilization summary:
--------------------------Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
1 out of 768
2 out of 1536
7
7 out of 124
0%
0%
5%
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 14
Simulation and Synthesis of 1:4 Demultiplexer using VERILOG
HDL
Aim:
Perform Zero Delay Simulation 1:4 Demultiplexer in VERILOG HDL using a Test
bench. Then, Synthesize on two different EDA tools.
Block Diagram:
1:4
Demultiplexer
Truth Table:
Input
A
B
C
D
Select
00
01
10
11
Output
Y(0)
Y(1)
Y(2)
Y(3)
Boolean Equation:
Y(3) = A.S.(1).S(0)
Y(2) = B.S.(1).S(0)
Y(1) = C.S.(1).S(0)
Y(0) = D.S.(1).S(0)
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 15
Simulation and Synthesis of 2:4 Decoder using VERILOG HDL
Aim:
Perform Zero Delay Simulation 2:4 Decoder in VERILOG HDL using a Test bench.
Then, Synthesize on two different EDA tools.
Block Diagram:
2:4
Decoder
Truth Table:
A
00
01
10
11
Y
0001
0010
0100
1000
Boolean Equation:
Y(0) = A(1). A(0)
Y(1) = A(1).A(0)
Y(2) = A(1).A(0)
Y(3) = A(1). A(0)
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 16
Simulation and Synthesis of 4:2 Encoder using VERILOG HDL
Aim:
Perform Zero Delay Simulation 4:2 Encoder in VERILOG HDL using a Test bench.
Then, Synthesize on two different EDA tools.
Block Diagram:
4:2
Encoder
Truth Table:
A
1000
0100
0010
0001
Y
00
01
10
11
Boolean Equation:
Y(1) = A(1) + A(0)
Y(0) = A(2) + A(0)
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 17
Simulation and Synthesis of 4:2 Priority Encoder using
VERILOG HDL
Aim:
Perform Zero Delay Simulation 4:2 Priority Encoder in VERILOG HDL using a Test
bench. Then, Synthesize on two different EDA tools.
Block Diagram:
4:2
Priority
Encoder
Truth Table:
A(3) A(2) A(1)
0
0
0
0
0
1
0
1
X
1
X
X
A(0)
1
X
X
X
Y(1) Y(0)
0
0
0
1
1
0
1
1
A(0)
1
0
1
0
1
0
1
0
1
Y(1) Y(0)
0
0
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
0
0
1
1
1
1
1
1
0
0
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
Boolean Equation:
Y(1) = A(3) + A(2)
Y (0) = A(2).A(1) + A(3).A(2) + A(3).A(0)
Simulation Waveform:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 18
Simulation and Synthesis of magnitude comparator 1-bit using
VERILOG HDL
Aim:
Perform Zero Delay Simulation of magnitude comparator 1-bit in VERILOG HDL
using a Test bench. Then, Synthesize on two different EDA tools.
Block Diagram:
AgtB
Magnitude
Comparator
1-bit
A
B
AltB
AeqB
Truth Table:
A
0
0
1
1
B
0
1
0
1
AgtB
0
0
1
0
AltB
0
1
0
0
AeqB
1
0
0
1
Boolean Equation:
AgtB = A.B
AltB = A.B
AeqB = A.B + A.B
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 19
Simulation and Synthesis of D flip flop using VERILOG HDL
Aim:
Perform Zero Delay Simulation of d flip flop in VERILOG HDL using a Test bench.
Then, Synthesize on EDA tool.
Simulation Waveform:
Synthesis:
EDA Tool Name: Xilinx Project Navigator 8.1
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 20
Simulation and Synthesis of JK, T Flip Flop using VERILOG
HDL
Aim:
Perform Zero Delay Simulation of JK, T, Flip flop in VERILOG HDL using a Test
bench. Then, Synthesize on EDA tools.
Xilinx Project Navigator 8.1 (Includes all the steps in the design flow from
Simulation to Implementation to download onto FPGA).
jkff uut (
.j(j),
.k(k),
.clk(clk),
.reset(reset),
.q(q) );
initial
begin
j = 0;
k = 0;
clk = 1;
reset = 1;
#20 reset = 0;
#10 j = 0;
k = 1;
#10 j = 1;
k = 0;
#10 j = 1;
k = 1;
end
always
#5 clk = ~ clk;
endmodule
Test Bench of T flip flop:
module tff_tst_v;
reg t;
reg clk;
reg reset;
wire q;
tff uut (
.t(t),
.clk(clk),
.reset(reset),
.q(q)
);
initial
begin
t = 0;
clk = 1;
reset = 1;
#20 reset = 1'b0;
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
endmodule
Simulation Waveform:
JKFF:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
TFF:
Synthesis:
JKFF:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
TFF:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 21
Simulation and Synthesis of SISO, SIPO, PIPO shift registers
using VERILOG HDL
Aim:
Perform Zero Delay Simulation of SISO, SIPO, PIPO shift registers in VERILOG HDL
using a Test bench. Then, Synthesize on EDA tools.
dff a2 (.d(pout[0]),
.clk(clk),
.reset(reset),
.q(pout[1])
);
dff a3 (.d(pout[1]),
.clk(clk),
.reset(reset),
.q(pout[2])
);
dff a4 (.d(pout[2]),
.clk(clk),
.reset(reset),
.q(pout[3])
);
endmodule
PIPO:
module pipo(pin, clk, reset, pout);
input [3:0] pin;
input clk;
input reset;
output [3:0] pout;
reg [3:0] pout;
always @ (posedge clk or posedge reset)
begin
if (reset)
pout <= 4'b0000;
else
pout <= pin;
end
endmodule
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
SISO:
SIPO:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
PIPO:
Synthesis:
SISO:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
SIPO:
PIPO:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
EXPERIEMENT NO. 22
Simulation and Synthesis of Asynchronous counter and
synchronous counter using VERILOG HDL
Aim:
Perform Zero Delay Simulation of asynchronous and synchronous counter in VERILOG
HDL using a Test bench. Then, Synthesize on EDA tools.
Xilinx Project Navigator 8.1 (Includes all the steps in the design flow from
Simulation to Implementation to download onto FPGA).
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Simulation Waveform:
Asynchronous up counter:
Synchronous up counter:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Synthesis:
Asynchronous up counter:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Synchronous up counter:
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com
Prepared By:
Parag Parandkar Asst. Prof. & Head, ECE Dept., Oriental University, Indore (M.P.)
parag.vlsi@gmail.com