VLSI Design 3151105 Lab Manual
VLSI Design 3151105 Lab Manual
VLSI Design
(3151105)
Certificate
Place: _____________________
Date: _____________________
Index
(Progressive Assessment Sheet)
Date: __________________
Relevant CO:
Objectives:
Basic Theory:
What is an FPGA?
Field Programmable Gate Arrays (FPGAs) are semiconductor devices that are based around a
matrix of configurable logic blocks (CLBs) connected via programmable interconnects. FPGAs can
be reprogrammed to desired application or functionality requirements after manufacturing. This
feature distinguishes FPGAs from Application Specific Integrated Circuits (ASICs), which are
custom manufactured for specific design tasks. Although one-time programmable (OTP) FPGAs
are available, the dominant types are SRAM based which can be reprogrammed as the design
evolves.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_________________________________________________
FPGA Architecture:
A basic FPGA architecture shown below consists of thousands of fundamental elements called
configurable logic blocks (CLBs) surrounded by a system of programmable interconnects, called a
fabric, that routes signals between CLBs. Input/output (I/O) blocks interface between the FPGA
and external devices. Depending on the manufacturer, the CLB may also be referred to as a logic
block (LB), a logic element (LE) or a logic cell (LC).
Fig 1.1 General Architecture of FPGA
The XC4000 families achieve high speed through advanced semiconductor technology and through
improved architecture, and supports system clock rates of up to 50 MHz. Compared to older Xilinx
FPGA families, the XC4000 families are more powerful, offering on-chip RAM and wide-input
decoders. They are more versatile in their applications, and design cycles are faster due to a
combination of increased routing resources and more sophisticated software. And last, but not least,
they more than double the available complexity, up to the 20,000-gate level. The XC4000 families
have 16 members, ranging in complexity from 2,000 to 25,000 gates.
The CLBs provide the functional elements for constructing the user’s logic. The most important
one is a more powerful and flexible CLB surrounded by a versatile set of routing resources, resulting
in more “effective gates per CLB.” The principal CLB elements are shown in Figure 1.2. Each new
CLB also packs a pair of flip-flops and two independent 4-input function generators. The two
function generators offer designers plenty of flexibility because most combinatorial logic functions
need less than four inputs. Consequently, the design-software tools can deal with each function
generator independently, thus improving cell usage.
FPGA Applications:
Aerospace & Defense - Radiation-tolerant FPGAs along with intellectual property for
image processing, waveform generation, and partial reconfiguration for SDRs.
ASIC Prototyping - ASIC prototyping with FPGAs enables fast and accurate SoC system
modeling and verification of embedded software
Automotive - Automotive silicon and IP solutions for gateway and driver assistance
systems, comfort, convenience, and in-vehicle infotainment. - Learn how AMD FPGA's
enable Automotive Systems
Broadcast & Pro AV - Adapt to changing requirements faster and lengthen product life
cycles with Broadcast Targeted Design Platforms and solutions for high-end professional
broadcast systems.
Consumer Electronics - Cost-effective solutions enabling next generation, full-featured
consumer applications, such as converged handsets, digital flat panel displays, information
appliances, home networking, and residential set top boxes.
Data Center - Designed for high-bandwidth, low-latency servers, networking, and storage
applications to bring higher value into cloud deployments.
High Performance Computing and Data Storage - Solutions for Network Attached
Storage (NAS), Storage Area Network (SAN), servers, and storage appliances.
Industrial - AMD FPGAs and targeted design platforms for Industrial, Scientific and
Medical (ISM) enable higher degrees of flexibility, faster time-to-market, and lower overall
non-recurring engineering costs (NRE) for a wide range of applications such as industrial
imaging and surveillance, industrial automation, and medical imaging equipment.
Medical - For diagnostic, monitoring, and therapy applications, the Virtex FPGA and
Spartan™ FPGA families can be used to meet a range of processing, display, and I/O
interface requirements.
Video & Image Processing - FPGAs and targeted design platforms enable higher degrees
of flexibility, faster time-to-market, and lower overall non-recurring engineering costs
(NRE) for a wide range of video and imaging applications.
Wired Communications - End-to-end solutions for the Reprogrammable Networking
Linecard Packet Processing, Framer/MAC, serial backplanes, and more
Wireless Communications - RF, base band, connectivity, transport and networking
solutions for wireless equipment, addressing standards such as WCDMA, HSDPA, WiMAX
and others.
CPLD
Traditionally, CPLDs have used analog sense amplifiers to boost the performance of their
architectures. This performance boost came at the cost of very high current requirements.
Advantages of CPLD:
CPLDs perform a variety of useful functions in systems design due to their unique
capabilities and as the market leader in programmable logic solutions, AMD provides a total
solution to a designer's CPLD needs. Understanding the features and benefits of using CPLDs can
help enable ease of design, lower development costs, and speed products to market.
Sr.
FPGA CPLD
No
Conclusion:
Suggested Reference:
https://www.xilinx.com/products/silicon-devices/fpga/what-is-an-fpga.html
https://www.xilinx.com/products/silicon-devices/cpld/cpld.html
https://media.digikey.com/pdf/data%20sheets/xilinx%20pdfs/xc4000,a,h.pdf
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 2
Date: __________________
Relevant CO:
Objectives:
Basic Theory:
HDLs are indeed similar to programming languages but not exactly the same. We utilize a
programming language to build or create software, whereas we use a hardware description language
to describe or express the behavioral characteristics of digital logic circuits.
We utilize HDLs for designing processors, motherboards, CPUs (i.e., computer chips), as well as
various other digital circuitry.
What Is VHDL?
VHDL Functionality
Though there is an inherent similarity in hardware designs, VHDL has processes that can make the
necessary accommodations. However, these processes differ in syntax from the parallel processes
in tasks (Ada).
Similarly to Ada, VHDL is a predefined part of the programming language, plus, it is not case
sensitive. However, VHDL provides various features that are unavailable in Ada, e.g., an extensive
set of Boolean operators which include nor and nand. These additional features enable VHDL to
precisely represent operations that are customary in hardware.
Another feature of VHDL is it has file output and input capabilities that you can utilize as a general-
purpose language for text processing. Although, we typically see them in use by a simulation
testbench for data verification or stimulus. Specific VHDL compilers build executable binaries,
which afford the option to use VHDL to write a testbench for functionality verification designs
utilizing files on the host computer to compare expected results, user interaction, and define stimuli.
Note: Ada is a statically typed, structured, object-oriented, and imperative high-level programming
language; it is an extension that derives from Pascal and other programming languages.
What Is Verilog?
As I am sure you are aware, Verilog is also a Hardware Description Language. It employs a textual
format to describe electronic systems and circuits. In the area of electronic design, we apply Verilog
for verification via simulation for testability analysis, fault grading, logic synthesis, and timing
analysis.
Verilog is also more compact since the language is more of an actual hardware modeling language.
As a result, you typically write fewer lines of code, and it elicits a comparison to the C language.
However, Verilog has a superior grasp on hardware modeling as well as a lower level of
programming constructs. Verilog is not as wordy as VHDL, which accounts for its compact nature.
Although VHDL and Verilog are similar, their differences tend to outweigh their similarities.
Verilog HDL is an IEEE standard (IEEE 1364). It received its first publication in 1995, with a
subsequent revision in 2001. SystemVerilog, which is the 2005 revision of Verilog, is the latest
publication of the standard. We call the IEEE Verilog standard document the LRM (Language
Reference Manual). Currently, the IEEE 1364 standard defines the PLI (Programming Language
Interface).
Note: The PLI is a collective of software routines that allows a bidirectional interface between other
languages such as C and Verilog.
VHDL vs Verilog
Sr.
VHDL Verilog
No.
1 Strongly typed Weakly typed
2 Easier to understand Less code to write
3 More natural in use More of a hardware modeling language
4 Non-C-like syntax Similarities to the C language
Variables must be described by data A lower level of programming
5
type constructs
6 Widely used for FPGAs and military A better grasp on hardware modeling
7 More difficult to learn Simpler to learn
The most important thing to remember when you are writing HDL code is that you are describing
real hardware, not writing a computer program. The most common beginner’s mistake is to write
HDL code without thinking about the hardware you intend to produce. If you don’t know what
hardware you are implying, you are almost certain not going to get what you want. Instead, begin
by sketching a block diagram of your system, identifying which portions are combinational logic,
which portions are sequential circuits or finite state machines, and so forth. Then, write HDL code
for each portion, using the correct idioms to imply the kind of hardware you need.
Conclusion:
Suggested Reference:
https://resources.pcb.cadence.com/blog/2020-hardware-description-languages-vhdl-vs-verilog-
and-their-functional-uses
https://www.sciencedirect.com/topics/computer-science/hardware-description-languages
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 3
Date: __________________
Relevant CO:
Objectives:
Basic:
The Xilinx ISE software controls all aspects of the design flow. Through the Project Navigator
interface, one can access all of the design entry and design implementation tools. One can also
access the files and documents associated with their project.
The Project Navigator interface is divided into four panel sub-windows, as seen in Figure 2.1.
On the top left are the Start, Design, Files, and Libraries panels, which include display and
access to the source files in the project as well as access to running processes for the
currently selected source. The Start panel provides quick access to opening projects as well
as frequently access reference material, documentation and tutorials.
At the bottom of the Project Navigator are the Console, Errors, and Warnings panels, which
display status messages, errors, and warnings.
To the right is a multi-document interface (MDI) window referred to as the Workspace. The
Workspace enables person to view design reports, text files, schematics, and simulation
waveforms.
Each window can be resized, undocked from Project Navigator, moved to a new location
within the main Project Navigator window, tiled, layered, or closed.
One can use the View > Panels menu commands to open or close panels. You can use the
Layout > Load Default Layout to restore the default window layout.
The Design panel provides access to the View, Hierarchy, and Processes panes.
The View pane radio buttons enable you to view the source modules associated with the
Implementation or Simulation Design View in the Hierarchy pane. If you select Simulation,
you must select a simulation phase from the drop-down list.
The Hierarchy pane displays the project name, the target device, user documents, and design
source files associated with the selected Design View.
The View pane at the top of the Design panel allows you to view only those source files
associated with the selected Design View, such as Implementation or Simulation.
Each file in the Hierarchy pane has an associated icon. The icon indicates the file type (HDL
file, schematic, core, or text file, for example).
For a complete list of possible source types and their associated icons, see the “Source File
Types” topic in the ISE Help.
From Project Navigator, select Help > Help Topics to view the ISE Help. If a file contains
lower levels of hierarchy, the icon has a plus symbol (+) to the left of the name. One can
expand the hierarchy by clicking the plus symbol (+). One can open a file for editing by
double-clicking on the filename.
The Console provides all standard output from processes run from Project Navigator. It
displays errors, warnings, and information messages.
The Workspace is where design editors, viewers, and analysis tools open. These include ISE
Text Editor, Schematic Editor, Constraint Editor, Design Summary/Report Viewer, RTL
and Technology Viewers, and Timing Analyzer.
Other tools such as the PlanAhead™ software for I/O planning and floorplanning, ISim,
third-party text editors, XPower Analyzer, and iMPACT open in separate windows outside
the main Project Navigator environment when invoked.
The Design Summary provides a summary of key design data as well as access to all of the
messages and detailed reports from the synthesis and implementation tools.
The summary lists high-level information about your project, including overview
information, a device utilization summary, performance data gathered from the Place and
Route (PAR) report, constraints information, and summary information from all reports with
links to the individual reports.
Students need to simulate one sample program code on Xilinx/Altera (Intel) Tools and write
all the steps with snapshot for simulation.
Students can use below reference for understanding step by step simulation flow.
https://www.xilinx.com/htmldocs/xilinx13_3/ise_tutorial_ug695.pdf
Conclusion:
Suggested Reference:
https://www.xilinx.com/htmldocs/xilinx13_3/ise_tutorial_ug695.pdf
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 4
Date: __________________
Aim: Implement all the basic Logic Gates and Boolean functions using different modeling
styles in Verilog/ VHDL:
(a) Structural modeling
(b) Dataflow modeling
(c) Behavioural modeling
Basic Theory:
OR Gate
A B Y
0 0 0
A 0 1 1
Y
B 1 0 1
1 1 1
NAND Gate
NOR Gate
XOR Gate
XNOR Gate
RTL Codes:
always @(A,B)
begin
X = ~A; // NOT gate
Y = A | B; // OR gate
end
endmodule
Test Bench:
module gate_tb;
reg A, B; // Inputs
wire X,Y; // Outputs
Simulation waveforms:
1. 𝒇 = 𝒙′ 𝒚′ + 𝒙𝒚
2. 𝒈 = 𝒙′ 𝒚𝒛 + 𝒙𝒚𝒛′ + 𝒙′ 𝒚′ 𝒛′ + 𝒙𝒚𝒛
RTL Code:
(a) Structural Modeling
module boolean_fun(x, y, z, f, g);
input x, y, z;
output f, g;
wire a,b,c,d,e; //internal signal definitions
wire p,q,r,s; //internal signal definitions
endmodule
(b) Dataflow Modeling
module boolean_fun(x, y, z, f, g);
input x, y, z;
output f, g;
assign f = (~x & ~y) | (x & y); // 𝑓 = 𝑥 ′ 𝑦 ′ + 𝑥𝑦
assign g = (~x & y & z) | (x & y & ~z) | (~x & ~y & ~z) | (x & y & z);
//𝑔 = 𝑥 ′ 𝑦𝑧 + 𝑥𝑦𝑧 ′ + 𝑥 ′ 𝑦 ′ 𝑧 ′ + 𝑥𝑦𝑧
endmodule
(c) Behavioural Modeling
module boolean_fun(x, y, z, f, g);
input x, y, z;
output f, g;
always @(x, y, z)
begin
f = (~x & ~y) | (x & y); // 𝑓 = 𝑥 ′ 𝑦 ′ + 𝑥𝑦
g = (~x & y & z) | (x & y & ~z) | (~x & ~y & ~z) | (x & y & z);
//𝑔 = 𝑥 ′ 𝑦𝑧 + 𝑥𝑦𝑧 ′ + 𝑥 ′ 𝑦 ′ 𝑧 ′ + 𝑥𝑦𝑧
end
endmodule
Simulation waveforms:
Conclusion:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 5
Date: __________________
Objectives: Designing of adders and subtractor using different modeling styles in Verilog HDL.
Basic Theory:
Full Adder
A A B Cin Sum Cout
B Sum 0 0 0 0 0
Cin 0 0 1 1 0
0 1 0 1 0
T1 0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
T2
Cout 1 1 0 0 1
1 1 1 1 1
T3
RTL Code:
(b) 1-bit Full Adder Implementation using Half Adders (structural modeling):
S1
A A S A S Sum
HA1 HA2
B B C B C
Cin
C2
Cout
C1
module FA_1_Bit_DF(A,B,Cin,Sum,Cout);
input A,B,Cin;
output Sum,Cout;
assign {Cout,Sum} = A + B + Cin;
endmodule
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 6
Date: __________________
Aim: Design Binary to Gray & Gray to Binary encoder using Verilog/VHDL.
Basic Theory:
G2
B2
G1
B1
G0
B0
RTL Code:
module bin_to_gray(B, G);
input [3:0] B;
output [3:0] G;
assign G[3] = B[3];
assign G[2] = B[3] ^ B[2];
assign G[1] = B[2] ^ B[1];
assign G[0] = B[1] ^ B[0];
endmodule
RTL Schematic:
Simulation waveforms:
Gray to Binary Encoder (Exercise for Students):
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 7
Date: __________________
Basic Theory:
MUX:
A digital logic circuit which is capable of accepting several inputs and generating a single
output is known as multiplexer or MUX.
I1 Y = S I1 + S I0
2:1
MUX
Y I1 T1
I0
Y
S I0
T0
Test Bench:
endmodule
Simulation Waveforms:
(b) 4:1 Mux (Structural and Dataflow modeling)
RTL Schematic
// 4-to-1 MUX (DataFlow Modeling):
module mux4_to_1(I, S, Y);
input [3 : 0] I;
input [1: 0] S;
output Y;
assign Y = I[S];
endmodule
Test Bench
Simulation Results:
(c) 8:1 Mux (Using 4:1 and 2:1 Mux : Structural modeling) (Exercise for Students)
(d) 16:1 Mux (Using Behavioural Modeling & 4:1 Mux : Structural modeling)
(Exercise for Students)
I0 I15
I1 I14 4:1 Y1
I13 MUX
I3 .
. 16 : 1 I12
Y
. MUX
. S1 S0
I14 I11
I15 I10 4:1 Y2
I9 MUX
S3 S2 S1 S0 I8 4:1
MUX Y
S 1 S0
I7
I6 4:1 Y3
I5 MUX
I4
S1 S0
I3
I2 4:1 Y4
I1 MUX
I0
S1 S0 S3 S2
Y7
Y6
Y5
1:8 Y4
I
DEMUX Y3
Y2
Y1
Y0
S 2 S1 S0
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 8
Date: __________________
Relevant CO:
Objectives:
Basic Theory: Decoder is a combinational circuit that has 'n' input lines and maximum of 2n output
lines. Depending on the code presented by input lines, one of the output lines will be active high,
when the decoder is enabled. It reveals a decoder detects a particular code presented at input.
(a) 2-to-4 Decoder
Truth Table of 2-to-4 Decoder
D3 Enable Inputs Outputs
I1 2:4 D2 E I1 I0 D3 D2 D1 D0
I0 Decoder D1 0 X X 0 0 0 0
1 0 0 0 0 0 1
D0
1 0 1 0 0 1 0
1 1 0 0 1 0 0
E
1 1 1 1 0 0 0
endmodule
RTL Schematic:
Test Bench:
`timescale 1ns / 1ps
module tb_Deco2to4;
reg [1:0] I; reg E; // Inputs
wire [3:0] D; // Outputs
// Instantiate the Unit Under Test (UUT)
Decoder2to4_df uut (.I(I), .E(E), .D(D));
initial begin
// Initialize Inputs
E = 0; I = 2'b00;
// Add stimulus here
#10 E = 0; I = 2'b10;
#10 E = 0; I = 2'b11;
#10 E = 0; I = 2'b00;
#10 E = 1; I = 2'b00;
#10 E = 1; I = 2'b01;
#10 E = 1; I = 2'b10;
#10 E = 1; I = 2'b11;
#10 E = 0; I = 2'b00;
#10 $finish;
end
endmodule
Simulation waveform:
(c) 4-to-16 Decoder (Structural Modeling using 3-to-8 Decoder): (Exercise for Students)
D15
D14
I2 D13
I1 D12
3:8 D11
I0 Decoder D10
D9
D8
I3 E1
E
D7
D6
D5
D4
3:8 D3
Decoder D2
D1
D0
E0
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 9
Date: __________________
Relevant CO:
Objectives:
Basic Theory: 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
depending on the input line activated.
Priority Encoder: A priority encoder produces correct code at the output even when multiple lines
at the inputs are simultaneously active high (logic ‘1’). As shown above, the 4-to-2 priority encoder
has four inputs (D3, D2, D1, D0) and two outputs (I1 and I0). Here, the input, D3 has the highest
priority; whereas, the input, D0 has the lowest priority. In this case, even if more than one input
lines are at logic ‘1’ at the same time, the output will be the binary code corresponding to the input,
which is having higher priority.
RTL Code:
module Encoder4to2_bh(D,E,I);
input [3:0] D;
input E;
output reg [1:0] I;
always @(D,E)
begin
casex({E,D})
5'b11xxx: I = 2'b11;
5'b101xx: I = 2'b10;
5'b1001x: I = 2'b01;
5'b10001: I = 2'b00;
default: I = 2'bzz;
endcase
end
endmodule
RTL Schematic:
Simulation waveforms:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 10
Date: __________________
Relevant CO:
Objectives:
Basic Theory:
Program Code:
RTL Schematic:
Output waveform:
Conclusion:
Quiz:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 11
Date: __________________
Aim: Design BCD and Ripple Carry Adder using Verilog / VHDL.
Relevant CO:
Objectives:
Basic Theory:
Program Code:
RTL Schematic:
Output waveform:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 12
Date: __________________
Aim: Design of S-R and D latches with structural / behavioral modeling using Verilog
/ VHDL.
Competency and Practical Skills:
Relevant CO:
Objectives:
Basic Theory:
D – Latch SR Latch
Sample code:
module Dlatch1( D, EN, RSTN, Q );
endmodule
RTL Schematic:
Output waveform:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 13
Date: __________________
Aim: Design positive edge triggered D FF with asynchronous / synchronous active high
reset using Verilog / VHDL.
Relevant CO:
Objectives:
Basic Theory:
Program Code:
RTL Schematic:
Output waveform:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 14
Date: __________________
Aim: Design serial in serial out and serial in parallel out shift registers using Verilog /
VHDL.
Relevant CO:
Objectives:
Basic Theory:
Program Code:
RTL Schematic:
Output waveform:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 15
Date: __________________
Relevant CO:
Objectives:
Basic Theory:
Program Code:
RTL Schematic:
Output waveform:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 16
Date: __________________
Relevant CO:
Objectives:
Introduction:
MICROWIND TOOL
MICROWIND3 is user friendly layout and simulation tool for sub-micron CMOS design. The
MICROWIND3 allows the designer to simulate and design an integrated circuit at physical
description level. The package contains a library of common logic and analog ICs to design and
simulate. MICROWIND3 includes all the commands for a mask editor as well as verification
tools never gathered before in a single module.
MICROWIND3 is truly a complete and cost-effective design solution for your CMOS design.
nanoLambda
VirtuosoFab
MEMsim
PROthumb
PROtutor
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 17
Date: __________________
Relevant CO:
Objectives:
Simulation Waveforms
CMOS Inverter Layout (CMOS 0.12um TECHNOLOGY using Microwind3)
Simulation Waveforms
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks
Experiment No: 18
Date: __________________
Relevant CO:
Objectives:
Basic Theory:
Conclusion:
Suggested Reference:
Rubrics 1 2 3 4 5 Total
Marks