VLSI Lab Manual Complete (1) - 1
VLSI Lab Manual Complete (1) - 1
Introduction
An HDL is a programming language used to describe electronic circuit essentially
digital logic circuits. It can be used to describe the operation, design and organization of a
digital circuit. It can also be used to verify the behaviour by means of simulations. The
principle difference between HDL and other programming languages is that HDL is a
concurrent language whereas the others are procedural i.e. single threaded. HDL has the
ability to model multiple parallel processes like adders, flip-flops execute automatically and
independently of each other. It is like building many circuits that can operate independently
of each other. It is a computer aided design (CAD) tool for the modern design and synthesis
of digital systems. The recent, steady advances in semiconductor technology continue to
increase the power and complexity of digital systems. Due to their complexity, such systems
cannot be realized using discrete integrated circuits. They are usually realized using high
density, programmable chips, such as application specific Integrated circuits (ASICs) and
Field programmable gate arrays (FPGAs) and require sophisticated CAD tools. HDL is an
integral part of such tools. HDL offers the designer a very efficient tool for implementing and
synthesizing designs on chips.
The two widely used HDLs are:
VHDL: Very High-Speed Integrated Circuits HDL
Verilog HDL
VHDL (VHSIC Hardware Description Language) is a hardware description language
used in electronic design automation to describe digital and mixed-signal systems such as
field-programmable gate arrays and integrated circuits. VHDL can also be used as a general-
purpose parallel programming language.
Verilog, standardized as IEEE 13.64, is a hardware description language (HDL) used
to model electronic systems. It is most commonly used in the design and verification of
digital circuits at the register-transfer level of abstraction. It is also used in the verification of
analog circuits and mixed-signal circuits, as well as in the design of genetic circuits.
different stimuli, and configure the target device with the programmer. Xilinx ISE is a design
environment for FPGA (Field programmable gate arrays) products from Xilinx, and is
tightly-coupled to the architecture of such chips, and cannot be used with FPGA products
from other vendors. The Xilinx ISE is primarily used for circuit synthesis and design, while
ISIM or the ModelSim logic simulator is used for system-level testing
1. A 4-Bit Adder
AIM: To write Verilog code for 4-bit adder and its test bench for verification and observe
the waveform and synthesize the code.
OBJECTIVE: The objective of this program is to design, implement, verify, and analyse a
4-bit adder to ensure:
THEORY:
A full adder is a combinational circuit that performs the arithmetic sum of three input
bits Ai, addend Bi and carry in C in from the previous adder. Its results contain the sum Si
and the carry out, C out to the next stage. So to design a 4-bit adder circuit we start by
designing the 1 bit full adder then connecting the four 1-bit full adders to get the 4-bit adder
as shown in the diagram below. For the 1-bit full adder, the design begins by drawing the
Truth Table for the three input and the corresponding output SUM and CARRY.
PROGRAM:
module fa(x,y,z,s,co);
input x,y,z; // Three 1-bit inputs.
output s,co; // Two 1-bit outputs.
assign {co,s}=x+y+z; // The addition of three 1-bit inputs
Mrs Manasa A Assistant Professor ECE Page 3
Dept. of ECE, RIT, Hassan VLSI Lab Manual
TESTBENCH:
BLOCK DIAGRAM:
The block diagram of adder as shown in below figure.
SYNTHESIS REPORT:
This means the Adder can operate at a maximum clock speed of ~……………….Hz
WAVEFORM:
PROCEDURE:
Select new project and type the project name.
Enter the device properties and click next.
Click new source and select the Verilog module and then give the file name.
Type the Verilog program and save it.
Click new source and select the Verilog test fixture and then give the file name.
Type the Verilog test bench program and save it.
Double click the synthesize XST and check syntax.
Double click the implement design.
Simulate the waveform by behavioural simulation.
Note down RTL schematic and analyse the design summary.
RESULT: Verilog code for 4-bit adder and its test-bench for verification are written, the
waveform is observed and the code is synthesized.
VIVA QUESTIONS
1. What is a 4-bit adder?
2. What is the difference between a half adder and a full adder?
3. What type of adder is used in a 4-bit adder?
4. What are the inputs and outputs of a 4-bit adder?
5. What is the role of carry propagation in a 4-bit adder?
6. What is a ripple-carry adder?
7. What is the main disadvantage of a ripple-carry adder?
OBJECTIVES:
The objective of this program is to design, implement, and analyze a 4-bit shift-and-add
multiplier using Verilog. The program follows a structured approach, including:
1. Designing a 4-bit Shift-and-Add Multiplier using Verilog.
2. Verifying its functionality using a testbench.
3. Synthesizing the design to generate a gate-level netlist.
4. Analyzing critical parameters such as delay, power, area, and total number of cells.
THEORY:
Binary multipliers are used for multiplication of 2 binary numbers and are used
mainly in signal processing and also in other computationally intensive applications. Shift
and add binary multiplier is a type of sequential multiplier. Sequential multipliers generate
the partial products sequentially and add each newly generated partial product to the
previously accumulated sum. Shift and add binary multiplier is a type of sequential
multiplier.
PROGRAM:
// Module Declaration
module shift_add_multiplier (
input [3:0] A, // 4-bit multiplicand
input [3:0] B, // 4-bit multiplier
output [7:0] product // 8-bit product ); // The final multiplication result (since
multiplying two 4-bit numbers can produce an 8-bit result).
reg [7:0] product_reg; // Stores the intermediate and final product result.
reg [7:0] A_reg; // Stores an extended version of A (with 4 extra bits for
shifting).
reg [7:0] B_reg; // Stores an extended version of B (same as A_reg).
endmodule
TESTBENCH:
module test_shift_add_multiplier; // Declares the testbench module
// Testbench signals
reg [3:0] A; // Stores the multiplicand for testing
reg [3:0] B; // Stores the multiplier for testing
wire [7:0] product; // Captures the multiplication result from the DUT (Design
Under Test).
// Instantiate the shift-and-add multiplier
shift_add_multiplier uut ( .A(A), .B(B), .product(product) );
initial begin // start of the simulation.
// Test Case 1: 3 * 2
A = 4'b0011; // A = 3
B = 4'b0010; // B = 2
#10;
BLOCK DIAGRAM:
SYNTHESIS REPORT:
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: 18.627ns
WAVEFORM:
PROCEDURE:
Select new project and type the project name.
Enter the device properties and click next.
Click new source and select the Verilog module and then give the file name.
Type the Verilog program and save it.
Click new source and select the Verilog test fixture and then give the file name.
Type the Verilog test bench program and save it.
Double click the synthesize XST and check syntax.
Double click the implement design.
Simulate the waveform by behavioural simulation.
Note down RTL schematic and analyse the design summary.
RESULT: Verilog code for 4-Bit Shift and add Multiplier and its test-bench for
verification are written, the waveform is observed and the code is synthesized.
VIVA QUESTION:
32-Bit ALU
AIM: To write Verilog code for 32-bit ALU and its test bench for verification and observe
the waveform and synthesize the code.
THEORY:
The ALU will take in two 32-bit values, and control line. An Arithmetic unit does the
following task like addition subtraction, multi-fiction and logical operations. As the input is
given in 32 bit we get 32 bit output. The arithmetic will show only one output at a time so a
selector is necessary to select one of the operator.
PROGRAM:
//Module Declaration
module ALU_32bit (
input [31:0] A, B, //32-bit input operands
input [2:0] ALU_Sel, // 3-bit selection signal that determines which
operation the ALU performs.
output reg [31:0] ALU_Result, //A 32-bit register that holds the result of the
selected operation.
output reg Zero //A flag that is set when the result is zero.
);
always @(*) begin //it executes whenever any of its input
case (ALU_Sel) //Case Statement for ALU Operations
3'b000: ALU_Result = A + B; // Addition If ALU_Sel is 000,
perform addition: A + B
3'b001: ALU_Result = A - B; // Subtraction
3'b010: ALU_Result = A * B; // Multiplication
3'b011: ALU_Result = A +1 ; // increment
3'b100: ALU_Result = A & B; // AND
3'b101: ALU_Result = A | B; // OR
if (ALU_Result == 32'b0)
Zero = 1; //If ALU_Result is zero, set Zero = 1 (indicating a zero
result).
else
Zero = 0; //Otherwise, set Zero = 0
end
endmodule //Marks the end of the module definition.
TESTBENCH:
ALU_32bit uut (
.A(A),
.B(B),
.ALU_Sel(ALU_Sel),
.ALU_Result(ALU_Result),
.Zero(Zero)
); //Instantiates the ALU module
initial begin //The initial block runs once when the simulation starts.
$monitor("A = %d, B = %d, ALU_Sel = %b, ALU_Result = %d, Zero =
%b", A, B, ALU_Sel, ALU_Result, Zero); //$monitor continuously displays
signal values whenever they change.
//Test Cases
A = 32'hA5A5A5A5; B = 32'h5A5A5A5A; //Assigns initial values to A
and B.
ALU_Sel = 3'b000; #10;
ALU_Sel = 3'b001; #10;
BLOCK DIAGRAM:
Synthesis Report:
Wave form:
Procedure:
Select new project and type the project name.
Enter the device properties and click next.
Click new source and select the Verilog module and then give the file name.
Type the Verilog program and save it.
Click new source and select the Verilog test fixture and then give the file name.
Type the Verilog test bench program and save it.
Double click the synthesize XST and check syntax.
Double click the implement design.
Simulate the waveform by behavioural simulation.
Note down RTL schematic and analyse the design summary.
Result: Verilog code for 32-bit ALU and its test-bench for verification are written, the
waveform is observed and the code is synthesized.
VIVA QUESTION
1. What is an ALU?
2. What are the arithmetic and logical operations implemented in your ALU?
3. Why do we use always @(*) in Verilog?
4. What is the role of the case statement in your ALU?
5. What does $monitor do in your testbench?
6. What does synthesis do in Verilog?
7. What factors affect area and power in an ALU?
8. Which operation has the highest delay in your ALU and why?
9. How do you optimize power consumption in your ALU?
10. What is the critical path in your ALU?
11. How is the maximum operating frequency calculated?
12. What is the difference between behavioral and structural modeling in Verilog?
Flip-Flop
AIM: To write Verilog code for flip-flop and its test bench for verification and observe the
waveform and synthesize the code.
OBJECTIVE: The objective of this program is to design, implement, and analyze D, SR,
and JK flip-flops using Verilog. The design will be tested at both the Register Transfer Level
(RTL) and Gate Level, ensuring correctness, performance, and optimization for synthesis.
THEORY:
Latches and flip-flops are the basic elements for storing information. One latch or flip
flop can store one bit of information. The main difference between latches and flip-flops is
that for latches, their outputs are constantly affected by their inputs as long as the enable
signal is asserted. In other words, when they are enabled, their content changes immediately
when their inputs change. Flip-flops, on the other hand, have their content change only either
at the rising or falling edge of the enable signal. This enable signal is usually the controlling
clock signal. After the rising or falling edge of the clock, the flip-flop content remains
constant even if the input changes. There are basically four main types of latches and flip-
flops: SR, D, and JK. The major differences in these flip-flop types are the number of inputs
they have and how they change state. For each type, there are also different variations that
enhance their operations.
D-Flip-flop
Program:
TESTBENCH:
CLOCK REPORT:
SYNTHESIS REPORT:
WAVEFORM:
SR- Flip-flop
PROGRAM:
SR FLIP - FLOP
TESTBENCH:
s=1;r=0;#200;
s=1;r=1;#200;
end
initial
#2000 $finish; // This initial block ensures that the simulation finishes after
2000 time units
endmodule
BLOCK DIAGRAM:
CLOCK REPORT:
SYNTHESIS REPORT:
WAVEFORM:
JK- Flip-flop
PROGRAM:
module jkff(j,k,clk,q,qn); //defines the module jkff with inputs and outputs
input j,k,clk; // input signals
output q,qn; // output signals
reg q,qn; //q and qn will store values, they are declared as register type
initial begin
q=1'b0; // It initializes q to 0.
qn=1'b1; // It initializes qn to 1
end
always @(posedge clk) // execute on the rising edge of the clock
begin
case({j,k}) // Case Statement (Defining JK Flip-Flop Behavior)
{1'b0,1'b0}:begin q=q;qn=qn;end // Case Conditions
{1'b0,1'b1}:begin q=1'b0;qn=1'b1;end
{1'b1,1'b0}:begin q=1'b1;qn=1'b0;end
{1'b1,1'b1}:begin q=~q;qn=~qn;end
endcase
end
endmodule //module ends
TESTBENCH:
end
initial
endmodule
BLOCK DIAGRAM:
CLOCK REPORT:
SYNTHESIS REPORT:
WAVEFORM:
PROCEDURE:
Select new project and type the project name.
Enter the device properties and click next.
Click new source and select the Verilog module and then give the file name.
Type the Verilog program and save it.
Click new source and select the Verilog test fixture and then give the file name.
Type the Verilog test bench program and save it.
Double click the synthesize XST and check syntax.
Double click the implement design.
Simulate the waveform by behavioural simulation.
Note down RTL schematic and analyse the design summary.
RESULT: Verilog code for flip-flop and its test-bench for verification are written, the
waveform is observed and the code is synthesized.
VIVA QUESTION
1. What is the difference between a latch and a flip-flop?
2. Explain the working of a D Flip-Flop.
3. Why is an SR Flip-Flop not used in practical circuits?
4. How does a JK Flip-Flop overcome the limitations of the SR Flip-Flop?
5. What is the race-around condition in a JK Flip-Flop, and how is it avoided?
6. What is the difference between synchronous and asynchronous reset?
7. How can you implement a T Flip-Flop using a JK Flip-Flop?
8. How do you implement a Toggle Flip-Flop using a D Flip-Flop?
9. What happens in a JK Flip-Flop when both J and K are 1?
10. Can you design a JK Flip-Flop using a D Flip-Flop? If yes, how?
OBJECTIVES: The objective of the programis 4-bit Synchronous MOD-N counter with
Asynchrounous reset, verify the functionality using Test bench and Synthesize the design and
compare the synthesis report.
THEORY:
MOD-N Counter Counters are sequential logic devices that follow a predetermined sequence
of counting states triggered by an external clock (CLK) signal. The number of states or
counting sequences through which a particular counter advances before returning to its
original first state is called the modulus (MOD). In other words, the modulus (or modulo) is
the number of states the counter counts and is the dividing number of the counter.
Modulus Counters, or MOD counters, are defined based on the number of states that
the counter will sequence before returning to its original value.
For example, a 2-bit counter that counts from 002 to 112 in binary, 0 to 3 in decimal,
has a modulus value of 4 ( 00 → 1 → 10 → 11, and return to 00 ); therefore, be called a
modulo-4, or mod-4, counter. Note also that it has taken four clock pulses to get from 00 to
11. In this example, there are only two bits ( n = 2 ) then the maximum number of possible
output states (maximum modulus) for the counter is 2n = 22 or 4.
Note that N is always a whole integer value. Then we can see that MOD counters
have a modulus value that is an integral power of 2, that is, 2, 4, 8, 16 and so on to produce
an n-bit counter depending on the number o
PROGRAM:
always @(posedge clk or posedge rst) begin // this means the block
will execute whenever there is a clock edge (for counting) or a reset signal (to
reset the counter).
if (rst) // rst signal is high
count <= 0; // Asynchronously resets the count to 0
else if (count == N - 1) //
count <= 0; // the counter will be reset to 0 in the next clock
cycle.
else
count <= count + 1; // counter is incremented.
end
endmodule
TESTBENCH
initial begin
$dumpfile("modN_counter_tb.vcd"); // This opens a file
modN_counter_tb.vcd where waveform data will be written
CLOCK REPORT:
SYNTHESIS REPORT:
WAVEFORM:
PROCEDURE:
Select new project and type the project name.
Enter the device properties and click next.
Click new source and select the Verilog module and then give the file name.
Type the Verilog program and save it.
Click new source and select the Verilog test fixture and then give the file name.
Type the Verilog test bench program and save it.
Double click the synthesize XST and check syntax.
Double click the implement design.
Simulate the waveform by behavioural simulation.
Note down RTL schematic and analyse the design summary.
RESULT: Verilog code for Four-bit Synchronous MOD-N counter with Asynchronous
reset and its test-bench are written and verified, the waveform is observed and the code is
synthesized.
VIVA QUESTIONS
1. What is a MOD-N counter?
A MOD-N counter is a counter that counts from 0 to (N-1) and then resets to 0.
INTRODUCTION
Very-large-scale integration (VLSI) is the process of creating an integrated circuit
(IC) by combining thousands of transistors into a single chip. VLSI began in the 1970s when
complex semiconductor and communication technologies were being developed. The
microprocessor is a VLSI device. Before the introduction of VLSI technology most ICs had a
limited set of functions they could perform. An electronic circuit might consist of a CPU,
ROM, RAM and other glue logic. VLSI lets IC designers add all of these into one chip.
During the mid-1920s, several inventors attempted devices that were intended to
control current in solid-state diodes and convert them into triodes. Success did not come until
after World War II, during which the attempt to improve silicon and germanium crystals for
use as radar detectors led to improvements in fabrication and in the understanding of quantum
mechanical states of carriers in semiconductors.
Then scientists who had been diverted to radar development returned to solid-state
device development. With the invention of transistors at Bell Labs in 1947, the field of
electronics shifted from vacuum tubes to solid-state devices. With the small transistor at their
hands, electrical engineers of the 1950s saw the possibilities of constructing far more
advanced circuits. As the complexity of circuits grew, problems arose.
One problem was the size of the circuit. A complex circuit, like a computer, was
dependent on speed. If the components of the computer were too large or the wires
interconnecting them too long, the electric signals couldn't travel fast enough through the
circuit, thus making the computer too slow to be effective.
Jack Kilby at Texas Instruments found a solution to this problem in 1958. Kilby's idea
was to make all the components and the chip out of the same block (monolith) of
semiconductor material. Kilby presented his idea to his superiors, and was allowed to build a
test version of his circuit.
In September 1958, he had his first integrated circuit ready. Although the first
integrated circuit was crude and had some problems, the idea was ground breaking. By
making all the parts out of the same block of material and adding the metal needed to connect
them as a layer on top of it, there was no need for discrete components. No more wires and
components had to be assembling manually.
The circuits could be made smaller, and the manufacturing process could be
automated From here, the idea of integrating all components on a single silicon wafer came
into existence, which led to development in small-scale integration (SSI) in the early 1960s,
medium-scale integration (MSI) in the late 1960s, and then large-scale integration (LSI) as
well as VLSI in the 1970s and 1980s, with tens of thousands of transistors on a single chip
(later hundreds of thousands, then millions, and now billions (109 ).
NMOS
PMOS
P-channel MOSFET also has a Source and Drain diffused on a substrate. The Source
is P-type while the substrate is N-type. The majority carriers are holes. PMOS will conduct
when a low voltage is applied. When a high voltage is applied to the gate, the PMOS will not
conduct.
CMOS
Since CMOS technology uses both N-type and P-type transistors to design logic
functions, a signal which turns ON a transistor type is used to turn OFF the other transistor
type. This eliminates the need for pull-up resistors in favour of simple switches. In CMOS
logic gates N-type MOSFETs are arranged in a pull-down network between the output and
the low voltage supply rail (VSS or ground) while P-type MOSFETs are in a pull-up network
between the output and the higher-voltage rail (often V DD). Thus, the N-type MOSFET will
be ON when the P-type MOSFET is OFF, and vice-versa. For any input pattern, one of the
networks is ON and the other is OFF.
Stick Diagram:
INVERTER
AIM: To simulate the schematic of the CMOS inverter, and then to perform the physical
verification for the layout of a CMOS inverter.
Capture the Schematic of a CMOS Inverter with Load Capacitance of 0.1 pF and set
the Widths of Inverter with different constraints.
Set the Input Signal to a pulse with Rise Time, Fall Time of 1 ps and Pulse Width of
10 ns, Time Period of 20 ns and plot the input voltage and output voltage of the
designed Inverter.
From the Simulation Results, compute tpHL, tpLH and tPD for all the three
geometrical settings of Width
Tabulate the results of delay and find the best geometry for minimum delay for
Draw the layout of NOR with 𝑊𝑃/ 𝑊𝑁 = 40 20, use optimum layout methods
CMOS Inverter.
Verify DRC and extract the parasitics
TOOLS REQUIRED:
SOFTWARE USED:
DSCH
Micro wind
DESCRIPTION:
The inverter is universally accepted as the most basic logic gate doing a Boolean
operation on a single input variable.
The NMOS transistor and the PMOS transistor form a typical complementary MOS
(CMOS) device. When a low voltage (0 V) is applied at the input, the top transistor (P-type)
is conducting (switch closed) while the bottom transistor behaves like an open circuit.
Therefore, the supply voltage (5 V) appears at the output. Conversely, when a high voltage (5
V) is applied at the input, the bottom transistor (N-type) is conducting (switch closed) while
the top transistor behaves like an open circuit. Hence, the output voltage is low (0 V)
PROCEDURE:
i) Schematic (DSCH)
Open the DSCH software.
Click on Select foundry and select CMOS45nm technology.
Drag the components like pmos, nmos, voltage source, ground, and LED from
the symbol library.
Connect the circuit as in the circuit diagram.
Save the circuit & run the simulation.
Select generate spice file and run win spice
ii) Layout(Micro wind)
Double click on micro wind icon and go to file new.
Click on Select foundry and select CMOS45nm technology.
Draw the layout by using components from palette.
Go to the file, save as and type the file name
Run simulation and analysis waveform.
OBSERVATION:
SPECIFICATIONS:
DC Parameters:
Values (V): 1.0
Pulse parameters: TD (ns) =1, TR (ns) =1, TF (ns) =1
SCHEMATIC DIAGRAM:
CALCULATIONS:
Case (i): Wn=Wp;
tPLH=………, tPHL=………,
tPLH=………, tPHL=………,
tPLH=………, tPHL=………,
LAYOUT:
PMOS: W=800nm, L=40nm
NMOS: W=400nm, L=40nm
SPECIFICATIONS:
VIVA QUESTIONS:
1. Why do we use Wp > Wn in inverter design?
2. What causes delay in CMOS inverter?
3. Why do post-layout simulations differ from pre-layout?
4. How does increasing W affect performance?
5. What is the impact of load capacitance?
6. What is a CMOS inverter?
7. Explain the operation of a CMOS inverter.
8. Why is CMOS preferred over NMOS or PMOS logic?
9. What happens when input is at VDD? What about 0V?
10. Define tpHL and tpLH.
11. What is propagation delay and how is it measured?
12. What is logical effort?
13. How does transistor sizing affect delay and power?
14. How do you generate an input pulse in simulation?
15. How do you calculate delay from the simulation waveform?
16. What tools did you use for schematic and simulation?
17. Why is transient analysis important in CMOS simulation?
18. What is stick diagram and why is it useful?
19. What is the significance of λ in layout design?
20. What are design rules and why are they important?
21. What are DRC and LVS? Why are they done?
22. How do you design an inverter to drive large capacitive loads?
Draw the layout of NOR with 𝑊𝑃/ 𝑊𝑁 = 40 20, use optimum layout methods
Increase drive strength to 2× and 4×, and compare delays
Verify DRC and extract the parasitics
TOOLS REQUIRED:
SOFTWARE USED:
DSCH
Micro wind
DESCRIPTION:
In digital electronics, NAND and NOR gates are two universal logic gates that are
used to perform Boolean operations on multiple input variables. These gates produce an
output based on the combination of inputs applied.
NAND and NOR gates are used as the fundamental building blocks in the digital
circuits and systems. We can design and implement the NAND and NOR gates in different
technologies such as DTL, RTL, TTL, and CMOS. This chapter deals with implementation of
NAND and NOR gates using CMOS technology.
The block diagram of a 2-input NOR logic gate in CMOS technology is shown in the
following figure. It consists of two parallel NMOS transistors between Y(output) and Ground
and two series PMOS transistors between Y (output) and VDD.
The NOR gate is a universal logic gate in digital electronics. It is a combination of
two basic logic gates namely, NOT gate and OR gate, where it is realized by connecting a
NOT gate to the output of the OR gate. Therefore,
The output of the NOR gate is high or logic 1, when all its inputs are low or logic 0.
For all other input combinations, the output of the NOR gate is low or logic 0.
PROCEDURE:
i) Schematic (DSCH)
Open the DSCH software.
Click file tab then open select foundry and select CMOS 45nm technology.
Construct the schematic circuit by dragging the components from like pmos,
nmos, voltage source, ground, and LED from the symbol library.
Connect the circuit as in the circuit diagram.
Save the circuit & go to file ,Select generate spice file and run winspice
The waveform window will open now calculate the delay for 3 constraints.
ii) Layout(Micro wind)
Double click on micro wind icon and go to file new.
Click on Select foundry and select CMOS45nm technology.
Draw the layout by using components from palette.
Go to the file, save as and type the file name
Run simulation and analysis waveform.
Figure: Circuit diagram, symbol and truth table of 2-input NOR gate
SCHEMATIC DIAGRAM:
SPECIFICATIONS:
DC Parameters:
Values (V): 1.0
Pulse parameters: TD (ns) =1, TR (ns) =1, TF (ns) =1
CALCULATIONS:
Case (i): Wn=Wp; 0.4u
tPLH=………, tPHL=………,
tPLH=………, tPHL=………,
tPLH=………, tPHL=………,
LAYOUT:
PMOS: W=800nm, L=40nm
NMOS: W=400nm, L=40nm
Number of Fingers: 2
SPECIFICATIONS:
VIVA QUESTIONS:
DESCRIPTION:
When the input signal is applied at the gate terminal and source terminal, then the
output voltage is amplified and obtained across the resistor at the load in the drain terminal.
This is called a common source amplifier. Here source acts as a common terminal between
the input and output. It produces current gain and voltage gain according to the input
impedance and output Impedance. To produce voltage gain along with high input impedances
FET’s are used in these circuits.
As a voltage amplifier, input voltage modulates the current flowing through the FET,
changing the voltage across the output resistance according to Ohm's law. However, the FET
device's output resistance typically is not high enough for a reasonable transconductance
amplifier (ideally infinite), nor low enough for a decent voltage amplifier (ideally zero).
Another major drawback is the amplifier's limited high-frequency response. Therefore, in
practice the output often is routed through either a voltage follower (common-drain or CD
stage), or a current follower (common-gate or CG stage), to obtain more favorable output and
frequency characteristics. The CS–CG combination is called a cascode amplifier.
PROCEDURE:
i) Schematic (DSCH)
Open the DSCH software.
Click file tab then open select foundry and select CMOS 90nm technology.
Construct the schematic circuit by dragging the components from like pmos,
nmos, voltage source, ground, and LED from the symbol library.
Connect the circuit as in the circuit diagram.
Save the circuit & go to file ,Select generate spice file and run winspice
The waveform window will open now calculate the gain.
iii) Layout(Micro wind)
Double click on micro wind icon and go to file new.
Click on Select foundry and select CMOS 90nm technology.
Draw the layout by using components from palette.
Go to the file, save as and type the file name
Run simulation and analysis the waveform.
SCHEMATIC DIAGRAM:
SPECIFICATIONS:
Gain Calculation
i) Transient Analysis: ii) AC Analysis:
Input: …………… (GHz)
Output:
Output
Gain: =
Input
AC Response:
LAYOUT DIAGRAM:
PMOS: W=1000nm, L=40nm
NMOS: W=1000nm, L=40nm
Number of Fingers: 5
RESULTS:
The schematic and layout for the common source amplifier is drawn and verified.
The gain of the common source amplifier is……….
VIVA QUESTION
1. What is a common source amplifier?
2. Why do we use a PMOS current mirror as load?
3. What is the role of the bias current source?
4. How does the gain of the CS amplifier depend on gm and ro?
5. What is the small-signal gain expression?
6. What is unit gain bandwidth (UGB)?
7. How do you find UGB from AC plot?
8. Why does gain increase but UGB decrease with higher width?
9. How does a PMOS current mirror work?
10. What is the advantage of active load over resistive load?
11. What layout techniques help minimize mismatch in analog circuits?
12. What are parasitics, and how do they affect frequency response?
13. What are the effects of layout parasitics on UGB?
14. What checks do you perform in layout?
15. Why does gain reduce in post-layout simulation?
16. What trade-offs exist between gain and bandwidth?
17. How does increasing transistor width affect UGB and gain?
TOOLS REQUIRED:
SOFTWARE USED:
DSCH
DESCRIPTION:
The pull up and pull down network consist of combination of transistor,where two or
more transistors in series are ON only if all of the series transistors are ON. Two or more
transistors in parallel are ON if any of the parallel transistors are ON. By using combinations
of these constructions, CMOS combinational gates can be constructed.When both pull-up and
pull-down are OFF, the high impedance or floating Z output state results. This is of
importance in multiplexers, memory elements, and tristate bus drivers. The crowbarred (or
contention) X level exists when both pull-up and pull-down are simultaneously turned ON.
Contention between the two networks results in an indeterminate output level and dissipates
static power. It is usually an unwanted condition
PROCEDURE:
Schematic (DSCH)
Open the DSCH software.
Click file tab then open select foundry and select CMOS 90nm technology.
Construct the schematic circuit by dragging the components from like pmos,
nmos, voltage source, ground, and LED from the symbol library.
Connect the circuit as in the circuit diagram.
Save the circuit & go to file ,Select generate spice file and run winspice
OBSERVATIONS:
SPECIFICATIONS:
WAVEFORMS:
VIVA QUESTIONS
1. How do you implement SOP expressions in CMOS?
2. Why do we use DeMorgan’s law in CMOS logic design?
3. Why can't we implement SOP directly in CMOS?
4. What is the advantage of using NAND or NOR logic in CMOS?
5. What’s the difference between pull-up and pull-down networks?
6. Why are PMOS used in the pull-up and NMOS in pull-down?
7. How does logic gate depth affect delay?
8. What is the worst-case delay scenario in this circuit?
9. What is propagation delay (td)?
10. How do tpHL and tpLH differ in multi-level CMOS logic?
11. How does series connection of NMOS or PMOS affect delay?
12. How do you reduce delay in CMOS circuits?
13. Would increasing transistor widths always reduce delay? What are the trade-offs?
14. What is logical effort and how does it apply here?
15. What layout factors affect delay in such CMOS circuits?
16. What are parasitic capacitances, and how do they arise in layout?
OPERATIONAL AMPLIFER
AIM: To simulate the schematic of the two stage Operational Amplifier.
TOOLS REQUIRED:
SOFTWARE USED:
DSCH
DESCRIPTION:
With the advancement in VLSI technology Digital Signal Processing has become
more reliable and popular in almost all electronic applications. Digital systems have
enormous advantages over analog systems like accuracy, speed, immunity to noise etc. Since
all natural signals are Analog, we need an Analog to Digital Converter (ADC) to convert
analog data into digital form. Then the digital data is processed using Digital Signal
Processor and finally the processed data is converted back to analog, using Digital to Analog
Converter (DAC). DAC is an integral part of Digital Communication Systems for Data
Conversion. DAC converts digital data into analog signal (usually current, voltage or electric
charge). CSDAC is the preferred data converter, considering High Speed applications and
High Power efficiency, over other DAC architectures. The CSDAC is designed ensuring that
it provides acceptable accuracy and moderate power consumption. DACs are used in wide
range of applications like Calibration Systems, Display Electronics, Data Acquisition
Systems, Software radio, Data Distribution Systems, audio applications, communication and
information systems etc. The suitability of various DAC in an application is decided based on
various measurements including speed, area, power, resolution, output range, power supply
requirement etc.
PROCEDURE:
i) Schematic (DSCH)
Open the DSCH software.
Click file tab then open select foundry and select CMOS 90nm technology.
Construct the schematic circuit by dragging the components from like pmos,
nmos, voltage source, ground, and LED from the symbol library.
Connect the circuit as in the circuit diagram.
Save the circuit & go to file ,Select generate spice file and run winspice
The waveform window will open now calculate the gain.
OBSERVATION:
SCHEMATIC DIAGRAM:
SPECIFICATIONS:
Gain Calculation
i) Transient Analysis: ii) AC Analysis:
Input: …………… (GHz)
Output:
Output
Gain: =
Input
AC Analysis Waveform:
RESULTS: The schematic for the operational amplifier is drawn and verified the
following transient analysis and AC analysis.
OUTCOME: Students are able to
Analysis of pre-layout simulations.
Highlighting the effectiveness of design methodologies in optimizing the
performance of operational amplifier.
VIVA QUESTIONS
UART
AIM: To write Verilog code for UART and its test bench for verification and observe the
waveform and synthesize the code.
OBJECTIVES: The objective of this program is to design, implement, verify, and analyse
UART to ensure
Write a Verilog RTL code to implement a simple UART transmitter and/or receiver.
Verify functionality using a testbench
Synthesize the design targeting a suitable technology library
Analyze post-synthesis reports for Area ,Timing and Power.
PROGRAM:
module uart (
reset ,
txclk ,
ld_tx_data ,
tx_data ,
tx_enable ,
tx_out ,
tx_empty ,
rxclk ,
uld_rx_data ,
rx_data ,
rx_enable ,
rx_in ,
rx_empty
);
// Port declarations
input reset ;
input txclk ;
input ld_tx_data ;
input [7:0] tx_data ;
input tx_enable ;
output tx_out ;
output tx_empty ;
input rxclk ;
input uld_rx_data ;
// Internal Variables
reg [7:0] tx_reg ;
reg tx_empty ;
reg tx_over_run ;
reg [3:0] tx_cnt ;
reg tx_out ;
reg [7:0] rx_reg ;
reg [7:0] rx_data ;
reg [3:0] rx_sample_cnt ;
reg [3:0] rx_cnt ;
reg rx_frame_err ;
reg rx_over_run ;
reg rx_empty ;
reg rx_d1 ;
reg rx_d2 ;
reg rx_busy ;
// UART RX Logic
always @ (posedge rxclk or posedge reset)
if (reset) begin
rx_reg <= 0;
rx_data <= 0;
rx_sample_cnt <= 0;
rx_cnt <= 0;
rx_frame_err <= 0;
rx_over_run <= 0;
rx_empty <= 1;
rx_d1 <= 1;
rx_d2 <= 1;
rx_busy <= 0;
end else begin
// Synchronize the asynch signal
// UART TX Logic
always @ (posedge txclk or posedge reset)
if (reset) begin
tx_reg <= 0;
tx_empty <= 1;
tx_over_run <= 0;
tx_out <= 1;
tx_cnt <= 0;
end else begin
if (ld_tx_data) begin
if (!tx_empty) begin
tx_over_run <= 0;
end else begin
tx_reg <= tx_data;
tx_empty <= 0;
end
end
if (tx_enable && !tx_empty) begin
tx_cnt <= tx_cnt + 1;
if (tx_cnt == 0) begin
tx_out <= 0;
end
if (tx_cnt > 0 && tx_cnt < 9) begin
tx_out <= tx_reg[tx_cnt -1];
end
if (tx_cnt == 9) begin
tx_out <= 1;
tx_cnt <= 0;
tx_empty <= 1;
end
end
if (!tx_enable) begin
tx_cnt <= 0;
end
end
endmodule
Testbench:
module UART_testbench();
reg txclk, reset,tx_enable,ld_tx_data,rxclk,rx_enable;
wire tx_out,tx_empty,rx_in,rx_empty;
reg[7:0] tx_data;
wire[7:0] rx_data;
wire uld_rx_data;
uart U1 (
.reset(reset),
.txclk(txclk),
.ld_tx_data(ld_tx_data),
.tx_data(tx_data),
.tx_enable(tx_enable),
.tx_out(tx_out),
.tx_empty(tx_empty),
.rxclk(rxclk),
.uld_rx_data(uld_rx_data),
.rx_data(rx_data),
.rx_enable(rx_enable),
.rx_in(rx_in),
.rx_empty(rx_empty)
);
assign rx_in=tx_out;
assign uld_rx_data=~rx_empty;
always@(reset,tx_empty)
begin
if(reset) begin
tx_data=170;
end
else if (tx_empty) begin
tx_data=tx_data+10;
end
end
initial begin
txclk=0;
forever #32 txclk=~txclk;
end
initial begin
rxclk=0;
forever #2 rxclk=~rxclk;
end
initial begin
reset=0;
ld_tx_data=0;
tx_enable=0;
rx_enable=0;
tx_data=170;
#10;
reset=1;
#20;
reset=0;
#50;
tx_enable=1;
rx_enable=1;
#50;
ld_tx_data=1;
#400;
end
endmodule
Block Diagram:
TIMING CONSTRAINTS:
Mrs Manasa A Assistant Professor ECE Page 74
Dept. of ECE, RIT, Hassan VLSI Lab Manual
CLOCK REPORT:
SYNTHESIS REPORT:
WAVE FORM:
PROCEDURE:
RESULT: Verilog code for UART and its test-bench for verification are written, the
waveform is observed and the code is synthesized.
VIVA QUESTIONS:
1. What is UART and where is it used?
2. What is the format of a UART frame?
3. How does UART differ from SPI or I2C?
4. Why is a state machine used in UART?
5. How do you generate baud rate in Verilog?
6. What is the role of CLK_PER_BIT in your design?
7. Why do we need a start and stop bit?
8. What are the key components of a testbench?
9. How do you verify correctness of UART using simulation?
10. How do you check if the transmitted data matches the expected sequence?
11. What is logic synthesis?
12. What does setting a clock constraint do?
13. What is area constraint, and why do we apply it?
14. What is slack in timing analysis?
15. What happens if your design violates timing constraints?
Implementation of 6T-SRAM
AIM: To simulate the Schematic Capture of 1-bit 6T -SRAM and Creating Layout of Bit-
Cell Using microwind 3.8
TOOLS REQUIRED:
SOFTWARE USED:
DSCH
Micro wind
DESCRIPTION:
The nMOS access transistors (5 and 6) located at the ends of circuit and a pair of
cross-coupled inverters constitute memory cell. The nMOS elements (1and 2) of the latch are
the driver transistors, while pMOS (3 and 4) are the pull-up transistors. The access transistors
operate when the word line is raised, for read or write operation, connecting the cell to the bit
lines.
PROCEDURE:
i) Schematic (DSCH)
Open the DSCH software.
Click file tab then open select foundry and select CMOS 90nm technology.
Construct the schematic circuit by dragging the components from like pmos,
nmos, voltage source, ground, and LED from the symbol library.
Connect the circuit as in the circuit diagram.
Save the circuit & go to file ,Select generate spice file and run winspice
The waveform window will open now calculate the gain.
SCHEMATIC DIAGRAM:
SPECIFICATIONS:
Fig:Read Operations
VIVA QUESTIONS