Ec3561-Vlsi Design Lab
Ec3561-Vlsi Design Lab
Ec3561-Vlsi Design Lab
LIST OF EXPERIMENTS:
1. Design of basic combinational and sequential (Flip-flops) circuits using HDL. Simulate it using Xilinx/Altera
Software and implement by Xilinx/Altera FPGA
2. Design an Adder ; Multiplier (Min 8 Bit) using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
3. Design and implement Universal Shift Register using HDL. Simulate it using Xilinx/Altera Software
4. Design Memories using HDL. Simulate it using Xilinx/Altera Software and implement by Xilinx/Altera FPGA
5. Design Finite State Machine (Moore/Mealy) using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
6. Design 3-bit synchronous up/down counter using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
7. Design 4-bit Asynchronous up/down counter using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
8. Design and simulate a CMOS Basic Gates & Flip-Flops. Generate Manual/Automatic Layout .
9. Design and simulate a 4-bit synchronous counter using a Flip-Flops. Generate Manual/Automatic Layout
10. Design and Simulate a CMOS Inverting Amplifier.
11. Design and Simulate basic Common Source, Common Gate and Common Drain Amplifiers.
12. Design and simulate simple 5 transistor differential amplifier.
COURSE OUTCOMES:
On completion of the course, students will be able to:
CO1: Write HDL code for basic as well as advanced digital integrated circuit
CO2: Import the logic modules into FPGA Boards
CO3: Synthesize Place and Route the digital Ips
CO4: Design, Simulate and Extract the layouts of Digital & Analog IC Blocks using EDA tools
CO5: Test and Verification of IC design
TOTAL: 60 PERIODS
LAB PLAN
LIST OF EXPERIMENTS
CYCLE - I
1. Design an Adder (Min 8 Bit) using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
2. Design a Multiplier (4 Bit Min) using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
3. Design an ALU using HDL. Simulate it using Xilinx/Altera Software and implement by Xilinx/Altera
FPGA
4. Design a Universal Shift Register using HDL. Simulate it using Xilinx/Altera Software and implement by
Xilinx/Altera FPGA
5. Design Finite State Machine (Moore/Mealy) using HDL. Simulate it using Xilinx/Altera Software and
implement by Xilinx/Altera FPGA
6. Design Memories using HDL. Simulate it using Xilinx/Altera Software and implement by Xilinx/Altera
FPGA
CYCLE - II
11. Design and Simulate basic Common Source, Common Gate and Common Drain Amplifiers.
12. Design and simulate simple 5 transistor differential amplifier. Analyze Gain, Bandwidth and CMRR by
performing Schematic Simulations.
1
EXP.NO:
STUDY OF SIMULATION TOOLS
DATE:
AIM:
To study simulation tools using Xilinx software tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
PROCEDURE:
1. Now start the Xilinx ISE Design Suite 12.1
2. Go to file and click new project
3. Enter the project name and click next
4. Select the family name is Spartan 3E, speed is -4 and simulator is verilog click next
and click Finish.
5. Click new source.
6. Select verilog module and type file name and click next.
7. Assign input and output port and click next.
8. Finally the report is shown click finish.
9. Type the program save and click synthesis.
10. To see the output wave form change the source from implementation to simulation and click
simulator behavior model in ISim simulator.
11. Give values to the input variables and then click run
12. In wave window, click run icon and you can see corresponding output.
2
Steps to use Xilinx tool:
Start the Xilinx Project Navigator by using the desktop shortcut or by using the
In the Project Navigator window go to FILE New project Click on new source verilog
module and give the name inverter.v Define portsFinish
3
In the create new source window select source type as verilog module give file name
4
Check syntax, and remove errors if present
Simulate the design using ISE Simulator Highlight inverter.v file in the Sources in Project
window. To run the Behavioral Simulation, Click on the symbol of FPGA device and then right
clickClick on new sourceClick on verilog text fixtureGive file name with _tb finish
Generate test bench file after initial begin assign value for inputs Click on simulate behavioral
model see the output.
RESULT:
5
EXP.NO:
STUDY OF SYNTHESIZE TOOLS
DATE:
AIM:
To study synthesize tools using Xilinx software tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY:
Synthesis is an automatic method of converting a higher level abstraction to a lower level
abstraction. The synthesis tool convert Register Transfer Level (RTL) description to gate level netlists.
These gate level netlists consist of interconnected gate level macro cells. These gate level netlists currently
can be optimized for area, speed etc., The analyzed design is synthesized to a library of components,
typically gates, latches, or flipflops. Hierarchical designs are synthesized in bottom up fashion, that is
lower level components are synthesized before higher level components. Once the design is synthesized
we have a gate level netlist. This gate level netlist can be simulated. Delay for the individual components
are available as part of the description of the component libraries. Timing accurate simulation is not
possible at this point because the actual timing characteristics is determined by the physical placement o f
the design within the FPGA chip. However, the functional simulation that is possible at this point is quite a
bit more accurate than simulation based on user specified delays. After run the synthesize in process
window then full adder model is converted to netlist file.
PROCEDURE:
1. Now start the Xilinx ISE Design Suite 12.1
2. Go to file and click new project
3. Enter the project name and click next
4. Select the family name is Spartan 3E, speed is -4 and simulator is verilog click next
and click Finish.
5. Click new source.
6. Select verilog module and type file name and click next.
6
7. Assign input and output port and click next.
8. Finally the report is shown click finish.
9. Type the program save and click synthesis.
10. Go to synthesisView RTL schematic
PROGRAM:
RTL SCHEMATIC:
RESULT:
7
EXP.NO:
PLACE AND ROOT AND BACK ANNOTATION FOR FPGAS
DATE:
AIM:
To study place and root and back annotation for FPGAs synthesize tools using Xilinx software
tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY:
To map this Full adder design onto the FPGA. The primitive hardware elements that are available
in Xilinx xc3s500e chip, namely lookup tables and positive-edge-triggered flip-flops are organized as a
two dimensional array of CLBs. The net list from synthesize is composed of gates, latches, and flip-
flops. It is necessary to assign CLB to net list primitives. This is the process of mapping a design. For
example gates will be assigned to look-up tables. This process effectively translates the gate level netlis t
produce by the synthesize compiler into a netlist of FPGA primitive hardware components. Each elements
of this new netlist corresponds to a hardware primitive in the FPGA Chip. The mapped design produces
identifies the set of FPGA hardware primitives and their interconnection. The next step is to assign each of
the components in the netlist to a equivalent physical primitives on the FPGA chip. Once this assignment
or placement is made the interconnection between the components in the netlist must be made within the
chip. This will require routing signals through the switch matrix and other inter connect resources
available on FPGA Chip. This Place and route layout was generated from Xilinx ISE Floor planner. After
place and route the design can be simulated to validate the design. At this point timing is more accurate
because the propagation delays along routed signals and through CLBs can be more accurately estimated.
This is particularly important for designs that are operating under tight timing tolerance.
PROCEDURE:
1. Now start the Xilinx ISE Design Suite 12.1
2. Go to file and click new project
3. Enter the project name and click next
8
4. Select the family name is Spartan 3E, speed is -4 and simulator is verilog click next and
9
click Finish.
5. Click new source.
6. Select verilog module and type file name and click next.
7. Assign input and output port and click next.
8. Finally the report is shown click finish.
9. Types the program saves and clicks synthesis.
10.Choose Implementation user constraints I/O pin planning (plan ahead) pre- synthesis, type the
input /output port.
PROGRAM:
RESULT:
10
EXP.NO: STUDY OF FPGA BOARD AND ON-BOARD LED’S AND
DATE: SWITCHES
AIM:
To Study Field Programmable Gate Array (FPGA) board and to test the on-board LEDs and
Switches using Xilinx software tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY:
DIP SWITCHES:
When in the UP or ON position, a switch connects the FPGA pin to V cc, a logic High. When
DOWN or in the OFF position, the switch connects the FPGA pin to ground, a logic low. The switches
typically exhibit about 2ms of mechanical bounce and there is no active debouncing circuitry, although
such circuitry could easily be added to the FPGA design programmed on the board.
KEY SWITCHES:
The key switches can provide pulse input to the FPGA. The switches connect to an associated
FPGA pin. Pressing a key generates logic High on the associated FPGA pin. There is no active
debouncing circuitry on the key switches.
LEDS:
Test LEDs are provided for mapping output of FPGA or tracking particular stage in the design. A
series current limiting resistor of 270 ohm is associated with every LED. To turn on an individual LED,
drive the associated FPGA control signal High.
PROCEDURE:
1. Create a new project & create a new Verilog file.
2. Type the program for testing LEDs and Switches and Save
it 3.Synthesize the program and view the RTL Model.
4. Create test bench waveform and simulate it.
5. Download the program using the procedure given below into the FPGA.
6.Now test the physical working of the switches and the LED‟s on –
board.
11
12
DOWNLOADING PROCEDURE:
1. Select “Synthesis/Implementation” in the source window.
2. Select the created module (*.v file) in the source window.
3. Select “user constraint” in the process window, double click “edit constraint” to create user
constraint file (*.UCF).
4. Type the net list to define the I/O pins and save it.
5. Double click “implement design” in the process window.
6. Double click “Generate programming “file and select the respective created bit file (*.bit)
7. Double click “ configure device (iMPACT) ”. In the impact window that appears, select
„configure device using boundary scan‟. Click finish
8. Right click on the created Xilinx model & select „program‟, give OK on the displayed window.
PROGRAM:
module leds(a, b);
input [0:15]a;
output [0:15]b;
reg [0:15]b;
always@(a)begin
b=~a;
end
endmodule
13
RESULT:
14
EXP.NO:
SIMULATION OF BASIC LOGIC GATES
DATE:
AIM:
To write a verilog program for basic logic gates to synthesize and simulate using Xilinx software
tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY:
AND GATE:
An AND gate is a digital logic gate with two or more inputs and one output that performs logical
conjunction. The output of an AND gate is true only when all of the inputs are true. I f one or more of an
AND gate's inputs are false, then the output of the AND gate is false.
Y=a&b
OR GATE:
An OR gate is a digital logic gate with two or more inputs and one output that performs logical
disjunction. The output of an OR gate is true when one or more of its inputs are true. If all of an OR gate's
inputs are false, then the output of the OR gate is false
EQUATION LOGIC SYMBOL TRUTH TABLE
A B
Y=a|b
15
NOT GATE:
A NOT gate, often called an inverter, is a nice digital logic gate to start with because it has only a single
input with simple behavior. A NOT gate performs logical negation on its input. In other words, if the input
is true, then the output will be false. Similarly, a false input results in a true output.
EQUATION LOGIC SYMBOL TRUTH TABLE
A
Y = ~a
NAND GATE:
A NAND gate (sometimes referred to by its extended name, Negated AND gate) is a digital logic gate with
two or more inputs and one output with behavior that is the opposite of an AND gate. The output of a
NAND gate is true when one or more, but not all, of its inputs are false. If all of a NAND gate's inputs are
true, then the output of the NAND gate is false.
EQUATION LOGIC SYMBOL TRUTH TABLE
A B Y
Y = ~(a & b)
NOR GATE:
A NOR gate (sometimes referred to by its extended name, Negated OR gate) is a digital logic gate with
two or more inputs and one output with behavior that is the opposite of an OR gate. The output of a NOR
gate is true all of its inputs arefalse. If one or more of a NOR gate's inputs are true, then the output of the
NOR gate is false.
EQUATION LOGIC SYMBOL TRUTH TABLE
A B Y
Y = ~(a | b)
16
EX-OR GATE (XOR):
An XOR gate (sometimes referred to by its extended name, Exclusive OR gate) is a digital logic gate with
two or more inputs and one output that performs exclusive disjunction. The output of an XOR gate is true
only when exactly one of its inputs is true. If both of an XOR gate's inputs are false, or if both of its inputs
are true, then the output of the XOR gate is false.
EQUATION LOGIC SYMBOL TRUTH TABLE
A B Y
Y=a^b
Y = ~(a ^ b)
BUFFER GATE:
A buffer has only a single input and a single output with behavior that is the opposite of an NOT gate. It
simply passes its input, unchanged, to its output. In a boolean logic simulator, a buffer is mainly used to
increase propagation delay. In a real- world circuit, a buffer can be used to amplify a signal if its current is
too weak.
EQUATION LOGIC SYMBOL TRUTH TABLE
A Y
Y=A
17
PROCEDURE:
Software part
1. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
2. Write the Verilog code by choosing HDL as top level source module.
3. Check syntax, view RTL schematic and note the device utilization summary by double clicking on the
synthesis in the process window.
4. Perform the functional simulation using Xilinx ISE simulator.
5. The output can be observed by using ISIM Simulator.
18
PROGRAM:
BASIC GATES:
NOT GATE
19
NOR GATE
module norgate(a,b,y); module norgate(a,b,y); module norgate(a,b,y);
inpput a,b; input a,b; input a,b;
output y; output y; output y;
assign y=~(a|b); reg y; nor a1(y,a,b);
endmodule always @(a,b) endmodule
begin
y=~(a|b);
end
endmodule
NAND Gate
module nandgate(a,b,y); module nandgate(a,b,y); module nandgate(a,b,y);
input a,b; input a,b; input a,b;
output y; output y; output y;
assign y=~(a&b); reg y; nand a1(y,a,b);
endmodule always @(a,b) endmodule
begin
y=~(a&b);
end
endmodule
XOR Gate
module xorgate(a,b,y); module xorgate(a,b,y); module xorgate(a,b,y);
input a,b; input a,b; input a,b;
output y; output y; output y;
assign y=(a^b); reg y; xor a1(y,a,b);
endmodule always @(a,b) endmodule
begin
y=a^b;
end
endmodule
XNOR GATE
module xnorgate(a,b,y); module xnorgate(a,b,y); module xnorgate(a,b,y);
input a,b; input a,b; input a,b;
output y; output y; output y;
assign y=(~(a^b)); reg y; xnor a1(y,a,b);
endmodule always @(a,b) endmodule
20
begin
y=~(a^b);
end
endmodule
BUFFER GATE
module bufgate (a,y); module bufgate (a,y); module bufgate (a,y);
input a; input a; input a;
output y; output y;
assign y= a; output y;
reg y;
endmodule always @(a) buf(y,a);
begin endmodule
y=a;
end
endmodule
BASIC GATES (ALL GATES IN ONE PROGRAM)
module gates(a,b,c,d,e,f,g,h,i,j); module gates(a,b,c,d,e,f,g,h,i,j); module gates(a,b,c,d,e,f,g,h,i,j);
input a,b; input a,b; input a,b;
output c,d,e,f,g,h,i,j; output c,d,e,f,g,h,i,j; output c,d,e,f,g,h,i,j;
assign c=a&b; reg c,d,e,f,g,h,i,j; and (c,a,b);
assign d=a|b; always @(a,b) or(d,a,b);
assign e=~a; begin not(e,a);
assign f=a; c=a&b; buf(f,a);
assign g=~(a|b); d=a|b; nor(g,a,b);
assign h=a^b; e=~a; xor(h,a,b);
assign i=~(a^b); f=a; xnor(i,a,b);
assign j=~(a&b); g=~(a|b); nand(j,a,b);
endmodule h=a^b; endmodule
i=~(a^b);
j=~(a&b);
end
endmodule
21
SIMULATION REPORT
RESULT:
22
EXP.NO:
SIMULATION OF ADDER
DATE:
AIM:
To write a Verilog program for Adder and to synthesize, simulate it using Xilinx software tool.
.
TOOLS REQUIRED:
Software :
1. Xilinx ISE Design Suite 12.1
THEORY :
When you add large numbers carefully together the addition is done digit by digit. In the illustration, two 8
–digit binary numbers are being added. The top row contains the first number and the second row the
other. Working from the right-hand side, there can be no 'carry' to add to the sum of the first two digits, so
a half adder is sufficient. But for the second and subsequent pairs of digits, full adders must be use (any
carry' is indicated by a f below the adder). The output will be an 8-bit and if the carry is formed that will be
shown in cout output value.
PROCEDURE:
Software part
1. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
2. Write the Verilog code by choosing HDL as top level source module.
3. Check syntax, view RTL schematic and note the device utilization summary by double
4. Clicking on the synthesis in the process window.
5. Perform the functional simulation using Xilinx ISE simulator.
6. The output can be observed by using ISIM Simulator.
23
PROGRAM:
8-BIT RIPPLE CARRY ADDER:
module half_adder(a,b,sum,carry);
input a,b;
output sum,carry;
xor(sum,a,b);
and(carry,a,b);
endmodule
module full_adder(a,b,c,sum,carry);
input a,b,c;
output sum,carry;
wire w1,w2,w3;
half_adder ha1(a,b,w1,w2);
half_adder ha2(c,w1,sum,w3);
or(carry,w2,w3);
endmodule
24
4-BIT RIPPLE CARRY ADDER
module half_adder(a,b,sum,carry);
input a,b;
output sum,carry;
xor(sum,a,b);
and(carry,a,b);
endmodule
module full_adder(a,b,c,sum,carry);
input a,b,c;
output sum,carry;
wire w1,w2,w3;
half_adder ha1(a,b,w1,w2);
half_adder ha2(c,w1,sum,w3);
or(carry,w2,w3);
endmodule
25
SIMULATION REPORT:
RESULT:
26
EXP.NO:
SIMULATION OF MULTIPLIER
DATE:
AIM:
To write a Verilog program for 4-bit multiplier and to synthesize, simulate it using Xilinx software
tool.
TOOLS REQUIRED:
SOFTWARE:
1. Xilinx ISE Design Suite 12.1
THEORY:
Multiplication of two elements in the polynomial basis can be accomplished in the normal way of
multiplication, but there are a number of ways to speed up multiplication, especially in hardware. In this
type the multiplication can done parallel counter and it is generate carry. The multiplication is independent
of the carry so we can perform N number of multiplication independent of carry.
27
PROCEDURE:
Software part
1. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
2. Write the Verilog code by choosing HDL as top level source module.
3. Check syntax, view RTL schematic and note the device utilization summary by double
4. Clicking on the synthesis in the process window.
5. Perform the functional simulation using Xilinx ISE simulator.
6. The output can be observed by using ISIM Simulator.
28
PROGRAM:
4-BIT ARRAY MULTIPLIER:
a3 a2 a1 a0
X b3 b2 b1 b0
m7 m6 m5 m4 m3 m2 m1 m0
c7 c4 c2 c1
FA7 FA4 FA2 HA1
s7 s4 s2 s1
s10 s8 p9 s5 s3
c11 c9 c6
FA12 FA11 HA9 HA6
m7 m6 m5 m4 m3 m2 m1 m0
29
PROGRAM:
module half_adder(a,b,sum,carry);
input a,b;
output sum,carry;
xor(sum,a,b);
and(carry,a,b);
endmodule
module full_adder(a,b,c,sum,carry);
input a,b,c;
output sum,carry;
wire w1,w2,w3;
half_adder ha1(a,b,w1,w2);
half_adder ha2(c,w1,sum,w3);
or(carry,w2,w3);
endmodule
module arraymultiplier(m,a,b);
input [3:0]a,b;
output [7:0]m;
wire [15:0]p;
wire [12:1]s,c;
and(p[0],a[0],b[0]);
and(p[1],a[1],b[0]);
and(p[2],a[0],b[1]);
and(p[3],a[2],b[0]);
and(p[4],a[1],b[1]);
and(p[5],a[0],b[2]);
and(p[6],a[3],b[0]);
and(p[7],a[2],b[1]);
and(p[8],a[1],b[2]);
and(p[9],a[0],b[3]);
and(p[10],a[3],b[1]);
and(p[11],a[2],b[2]);
30
and(p[12],a[1],b[3]);
and(p[13],a[3],b[2]);
and(p[14],a[2],b[3]);
and(p[15],a[3],b[3]);
half_adder ha1(s[1],c[1],p[1],p[2]);
full_adder fa2(s[2],c[2],p[4],p[3],p[5]);
half_adder ha3(s[3],c[3],s[2],c[1]);
full_adder fa4(s[4],c[4],p[6],p[7],p[8]);
full_adder fa5(s[5],c[5],s[4],c[2],c[3]);
half_adder ha6(s[6],c[6],s[5],p[9]);
full_adder fa7(s[7],c[7],p[10],p[11],p[12]);
full_adder fa8(s[8],c[8],c[5],c[4],s[7]);
half_adder ha9(s[9],c[9],s[8],c[6]);
full_adder fa10(s[10],c[10],p[14],p[13],c[7]);
full_adder fa11(s[11],c[11],c[9],c[8],s[10]);
full_adder fa12(s[12],c[12],p[15],c[10],c[11]);
buf(m[0],p[0]);
buf(m[1],s[1]);
buf(m[2],s[3]);
buf(m[3],s[6]);
buf(m[4],s[9]);
buf(m[5],s[11]);
buf(m[6],s[12]);
buf(m[7],c[12]);
endmodule
4- BIT MULTIPLIER
module adder(a,b,
out); input [3:0]a,b;
output [7:0]out;
assign out= a*b;
endmodule
31
SIMULATION REPORT:
RESULT:
32
EXP.NO:
SIMULATION OF 8-BIT ARITHMETIC AND LOGIC UNIT
DATE:
AIM:
To write a Verilog program for 8-bit Arithmetic and Logic Unit and to synthesize, simulate it using
Xilinx software tool.
TOOLS REQUIRED:
SOFTWARE:
1. Xilinx ISE Design Suite 12.1
THEORY:
ALU is the fundamental building block of the processor, which is responsible for carrying out the
arithmetic and logic functions. ALU comprises of combinatorial logic that implements arithmetic
operations such as Addition, Subtraction and Multiplication, and logic operations such as AND, OR, NOT.
The ALU gets operands from the register file or memory.
The block diagram of a typical ALU is shown in Figure below. The ALU reads two input operands In A
and In B. The operation to perform on these input operands is selected using the control input Opcode. The
ALU performs the selected operation on the input operands In A and In B and produces the output, Out.
The ALU also updates different flag signals after performing the selected function. Note that the ALU is
purely combinatorial logic and contains no registers or latches.
33
The arithmetic functions are much more complex to implement than the logic functions. The
performance of the ALU depends upon the architecture of each structural components of the ALU.
In this example only some basic ALU functions are implemented. The ALU is divided into an arithmetic
section and a logical section.
The Arithmetic Unit compromises of three functions. They are:
o Addition
o Subtraction
o Multiplication
o Bitwise AND
o Bitwise OR
o Bitwise NAND
o Bitwise NOR
o Bitwise XOR
Flags: ALU updates the conditional flags, which are used by the processor to perform other
operations like condition checking and branching. In this example two flags are implemented. They
are:
Zero - If all the bits of the result data are zero then the zero flag is set
Carry out - If the addition of the two operands gives the carry out this flag is set
o
2. Truth Table
The Figure below shows the truth table of the 8-bit ALU. The ALU works on 8-bit operands. It
supports 8 instructions which are selected by the 3-bit Opcode.
34
Truth table for 8-bit ALU.
PROCEDURE:
Software part:
1. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
2. Write the Verilog code by choosing HDL as top level source module.
3. Check syntax, view RTL schematic and note the device utilization summary by double clicking on the
synthesis in the process window.
4. Perform the functional simulation using Xilinx ISE simulator.
5. The output can be observed by using ISIM Simulator
Verilog Module :
module ALU1 (
37
endcase
end
endmodule
SIMULATION REPORT:
RESULT:
38
EXP.NO:
SIMULATION OF UNIVERSAL SHIFT REGISTER
DATE:
AIM:
To write a verilog program for Universal Shift Register and to synthesize, simulate it using Xilinx
software tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY :
UNIVERSAL SHIFT REGISTER:
A Unidirectional shift register is a register that can capable of transferring data in only one direction.
Whereas the register that is capable of transferring data in both left and right direction is called a
„bidirectional shift register.‟ Now let we have a register which can capable to transfer data in both the
shift-right and shift- left, along with the necessary input and output terminals for parallel transfer, then it is
called a shift register with parallel load or „universal shift register.‟
A shift-right control to enable the shift-right operation and the serial input and output lines associated
with the shift-right.
A shift- left control to enable the shift- left operation and the serial input and output lines associated
with the shift- left.
A parallel- load control to enable a parallel transfer and the n input lines associated with the parallel
transfer.
n parallel output lines.
A clear control to clear the register to 0.
A CLK input for clock pulses to synchronize all operations.
A control state that leaves the information in the register unchanged even though clock pulses are
continuously applied.
39
PROCEDURE:
Software part
1. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
2. Write the Verilog code by choosing HDL as top level source module.
3. Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking on
the synthesis in the process window.
4. Perform the functional simulation using Xilinx ISE simulator.
5. The output can be observed by using ISIM Simulator.
40
PROGRAM:
REGISTER
S1 S0
OPERATION
0 0 No changes
0 1 Shift right
1 0 Shift left
1 1 Parallel load
41
2'b10:
begin
p[0]<=p[3];
p[1]<=p[0];
p[2]<=p[1];
p[3]<=p[2];
end
2'b11:
begin
p[0]<=a[0];
p[1]<=a[1];
p[2]<=a[2];
p[3]<=a[3];
end
endcase
end
endmodule
SIMULATION REPORT:
42
RESULT
43
EXP.NO:
SIMULATION AND DESIGN OF MEMORIES
DATE:
AIM:
To write a Verilog program for a 16x4 memory and to synthesize, simulate it using Xilinx software
tool.
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY:
MOD 10 COUNTERS:
The memory block diagram is shown in above figure. It takes a few assumptions into consideration for
easing the operations of the circuit. While data input pin and address pin may have any value depending on
the specifications of memory used and your need, clock used in the circuit is active high.
Enable pin triggers the circuit when it is active high, and read operation is performed when read/write pin
is high, while write operation is performed when read/write pin is active low.
44
PROCEDURE:
Software part
1. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
2. Write the Verilog code by choosing HDL as top level source module.
3. Check syntax, view RTL schematic and note the device utilization summary by double clicking on the
synthesis in the process window.
4. Perform the functional simulation using Xilinx ISE simulator.
5. The output can be observed by using ISIM Simulator.
PROGRAM:
module memory_16x4(op,ip,rd_wr,clk,address);
output reg [3:0] op;
input [3:0] ip;
input [3:0]
address; input
rd_wr,clk;
reg [3:0] memory[0:15];
always @(posedge clk)
begin
if (rd_wr)
op=memory[address];
else
begin
memory[address]=ip;
end
end
endmodule // memory_16x4
45
SIMULATION REPORT:
RESULT:
46
EXP.NO:
ANALYSIS AND SIMULATION OF STATE MACHINES
DATE:
AIM:
To analyze, synthesize and simulate state machines using Xilinx simulation tool
TOOLS REQUIRED:
Software:
1. Xilinx ISE Design Suite 12.1
THEORY:
MEALY MODEL:
Analysis describes what a given circuit will do under certain operating co nditions. The behavior of a
clocked sequential circuit is determined from the inputs, the outputs, and the state of its flip-flops. The
outputs and the next state are both a function of the inputs and the present state. The analysis of a
sequential circuit consists of obtaining a table or a diagram for the time sequence of inputs, outputs, and
internal states. It is also possible to write Boolean expressions that describe the behavior of the sequential
circuit. These expressions must include the necessary time sequence, either directly or indirectly. A logic
diagram is recognized as a clocked sequential circuit if it includes flip-flops with clock inputs. The flip-
flops may be of any type, and the logic diagram may or may not include combinational logic gates.
State Equations: The behavior of a clocked sequential circuit can be described algebraically by means of
state equations. A state equation (also called a transition equation) specifies the next state as a function of
the present state and inputs. Consider the sequential circuit shown in Fig. 1. It acts as a 0-detector by
asserting its output when a 0 is detected in a stream of 1s.
A(t + 1) = A(t)x(t) + B(t)x(t) ; B(t + 1) = A’(t)x(t); y(t) = [A(t) + B(t)]x’(t)
A state equation is an algebraic expressio n that specifies the condition for a flip- flop state transition. The
left side of the equation, with (t + 1), denotes the next state of the flip- flop one clock edge later. The right
side of the equation is a Boolean expression that specifies the present state and input conditions that make
the next state equal to 1. Since all the variables in the Boolean expressions are a function of the present
state, we can omit the designation ( t ) after each variable for convenience and can express the state
equations in the more compact form
A(t + 1) =Ax + Bx ; B(t + 1) =A’x ; y = Ax’+ Bx’
47
LOGIC DIAGRAM:
STATE TABLE:
The time sequence of inputs, outputs, and flip- flop states can be enumerated in a state table (sometimes
called a transition table). The table consists of four sections labeled present state, input, next state, and
output . The present-state section shows the states of flip- flops A and B at any given time t. The input
section gives a value of x for each possible present state. The next-state section shows the states of the flip-
flops one clock cycle later, at time t + 1. The output section gives the value of y at time t for each present
state and input condition. State table for the above Circuit diagram
Present
Input Next State Output
State
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 1
0 1 1 1 1 0
1 0 0 0 0 1
1 0 1 1 0 0
1 1 0 0 0 1
1 1 1 1 0 0
48
STATE DIAGRAM:
The information available in a state table can be represented graphically in the form of a state
diagram. In this type of diagram, a state is represented by a circle, and the (clock-triggered) transitions
between states are indicated by directed lines connecting the circles. The state diagram provides the same
information as the state table and is obtained directly from Table. The b inary number inside each circle
identifies the state of the flip- flops. The directed lines are labeled with two binary numbers separated by a
slash. The input value during the present state is labeled first, and the number after the slash gives the
output during the present state with the given input. A directed line connecting a circle with itself indicates
that no change of state occurs.
PROGRAM:
MEALY MODEL:
module Mealy_model(y, x, clk,
reset); input x,clk,reset;
output reg y;
reg [1:0] state, next_state;
parameter S0 = 2'b00, S1 = 2'b01, S2 = 2'b10, S3 = 2'b11;
always @ ( posedge clk)
if (reset == 0) state <=
S0; else state <=
next_state; always @
(state, x)
case (state)
S0: if (x) next_state = S1; else next_state = S0;
49
S1: if (x) next_state = S3; else next_state =
S0; S2: if (x) next_state = S2; else next_state
= S0; S3: if (x) next_state = S2; else
next_state = S0; endcase
always @ (state, x)
case (state)
S0: y = 0;
S1, S2, S3: y = ~x;
endcase
endmodule
50
MOORE MODEL:
LOGIC DIAGRAM:
STATE TABLE:
The time sequence of inputs, outputs, and flip- flop states can be enumerated in a state table (sometimes
called a transition table). The table consists of four sections labeled present state, input, next state, and
output . The present-state section shows the states of flip- flops A and B at any given time t. The input
section gives a value of x for each possible present state. The next-state section shows the states of the flip-
flops one clock cycle later, at time t + 1. The output section gives the value of y at time t for each present
state and input condition.
A B x A B JA KA JB KB
0 0 0 0 1 0 0 1 0
0 0 1 0 0 0 0 0 1
0 1 0 1 1 1 1 1 0
0 1 1 1 0 1 0 0 1
1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 0 0 0
51
1 1 0 0 0 1 1 1 1
1 1 1 1 1 1 0 0 0
STATE EQUATIONS:
A(t+1) = JA‟ + K‟A
B(t+1) = JB‟ + K‟B
A(t+1) = BA‟ + (Bx‟)‟A = A‟B+AB‟+Ax
B(t+1) = x‟B‟ + (A x)‟B = B‟x‟ + ABx + A‟Bx‟
STATE DIAGRAM:
MOORE MODEL:
module Moore_Model(y, x, clk,
reset); input x,clk,reset;
output [1:0]y;
reg [1:0]
state;
parameter S0 = 2'b00, S1 = 2'b01, S2 = 2'b10, S3 = 2'b11;
always @ (posedge clk)
if (reset == 0) state <=
S0; else case (state)
S0: if (x) state <= S0; else state <=
S1; S1: if (x) state <= S2; else state
52
<= S3; S2: if (x) state <= S2; else
state <= S3;
53
S3: if (x) state <= S3; else state <=
S0; endcase
assign y=state;
endmodule
54
RESULT:
55
TANNER
TOOLS
56
Introduction to Tanner Tool
Tanner tool is a Spice Computer Analysis Programmed for Analogue Integrated Circuits. Tanner tool
consists of the following Engine Machines:
Using these engine tools, spice program provides facility to the use to design & simulate new ideas in
Analogue Integrated Circuits before going to the time consuming & costly process of chip fabrication.
S-Edit is hierarchy of files, modules & pages. It introduces symbol & schematic modes. S-Edit provides the
facility of:
1. Beginning a design.
3. Design connectivity.
Beginning a design: It explains the design process in detail in terms of file module operation and module.
Browser: Effective schematic design requires a working knowledge of the S-Edit design hierarchy of files &
modules. S-Edit design files consist of modules. A module is a functional unit of design such as a transistor,
a gate and an amplifier.
2) Instances: References to other modules in file. The instanced module is the original.
2. Symbol Mode: it represents symbol of a larger functional unit such as operational amplifier.
57
T-SPICE PRO CIRCUIT ANALYSIS
An introduction to the integrated components of the T- Spice Pro circuit analysis suite:
Schematic data files (.sdb): describes the circuits to be analyzed in graphical form, for display and editing
by S- Edit" Schematic Editor.
Simulation input files (.sp): describes the circuits to be analyzed in textual form, for editing and simulation
by T- Spice" Circuit Simulator.
Simulation output files (.out): containing the numerical results of the circuit analyses, for manipulation and
display by W- Edit" Waveform Viewer.
T- Spice Pro‟s waveform probing feature integrates S- Edit, T- Spice, and W- Edit to allow individual points
in a circuit to be specified and analyzed. A few analysis is described below:
The heart of T-Spice operation is the input file (also known as the circuit description, the net list & the input
deck). This is a plain text file that contains the device statement & simulation commands, drawn from the
SPICE circuit description language with which T-Spice constructs a model of the circuit to be simulated.
Input files can be created and modified with any text editor.
T-Spice is a tool used for simulation of the circuit. It provides the facility of
1. Design Simulation
2. Simulation Commands
3. Device Statements
T-Spice uses Kirchhoff‟s Current Law (KCL) to solve circuit problems. To T-Spice, a circuit is a set of
devices attached to nodes. The voltage at all nodes represents the circuit state. T-Spice solves for a set of
node voltage that satisfied KCL (implying that sum of currents flowing into each node is zero). In order to
evaluate whether a set of node voltages is a solution, T-Spice computers and sums all the current flowing
out of each device into nodes connected to it (its terminals). The relationship between the voltages at device
terminals and the currents through the terminal is determined by the device model for a resistor of resistance
R is
58
I=∆V/R
Where, ∆V represents the voltage difference across the device. A few analyses are discussed below:
DC operating point analysis finds a circuit‟s steady- state condition, obtained (in principle) after the input
voltages have been applied for an infinite amount of time. The .include command causes T- Spice to read in
the contents of the model file for the evaluation of NMOS and PMOS transistors.
The technology file assigns values to MOSFET model parameters for both n - and p -type devices. When
read by the input file, these parameters are used to evaluate MOSFET model equations, and the results are
used to construct internal tables of current and charge values. Values read or interpolated from these tables
are used in the computations called for by the simulation. Following each transistor name are the names of
its terminals. The required order of terminal names is: drain - gate -source -bulk. Then the model name
(NMOS or PMOS in this example), and physical characteristics such as length and width, are specified. The
.op command performs a DC operating point calculation and writes the results to the file specified in the
Simulate > Start Simulation dialog. The output file lists the DC operating point information for the circuit
described by the input file.
DC Transfer Analysis
DC transfer analysis is used to study the voltage or current at one set of points in a circuit as a function of
the voltage or current at another set of points. This is done by sweeping the source variables over specified
ranges, and recording the output. A list of sources to be swept, and the voltage ranges across which the
sweeps are to take place follow the .dc command, indicating transfer analysis. The transfer analysis will be
performed as follows: vdd will be set at 5 volts and vin will be swept over its specified range; vdd will then
be incremented and vin will be reswept over its range; and so on, until vdd reaches the upper limit of its
range. The .dc command ignores the values assigned to the voltage sources vdd and vin in the voltage
source statements, but they must still be declared in those statements. The results for nodes in and out are
reported by the .print dc command to the specified destination.
Transient Analysis
Transient analysis provides information on how circuit elements vary with time. The basic T- Spice
command for transient analysis has three modes. In the default mode, the DC operating point is computed,
and T- Spice uses this as the starting point for the transient simulation. The .tran command specifies the
characteristics of the transient analysis to be performed.
AC Analysis
AC analysis characterizes the circuit‟s behavior dependence on small- signal input frequency. It involves
59
three steps: (1) calculating the DC operating point; (2) linearizing the circuit; and (3) solving the linearized
circuit for each frequency. When ac voltage source is to be applied, then vdiff sets the DC voltage difference
between nodes the two nodes to -0. 0007 volts; its AC magnitude is 1 volt and its AC phase is 180 degrees.
The .ac command performs an AC analysis. Following the .ac keyword is information concerning the
frequencies to be swept during the analysis. In case, the frequency is to be swept logarithmically, by decades
(DEC); 5 data points are to be included per decade is considered to be the standard The two .print
commands write the voltage magnitude (in decibels) and phase (in degrees), respectively, for the node out to
the specified file. The .acmodel command writes the small- signal model parameters and operating point
voltages and currents for all circuit devices
Noise Analysis
Real circuits, of course, are never immune from small, random fluctuations in voltage and current levels. In
T- Spice, the influence of noise in a circuit can be simulated and reported in conjunction with AC analysis.
The purpose of noise analysis is to compute the effect of the noise associated with various circuit devices on
an output voltage or voltages as a function of frequency. Noise analysis is performed in conjunction with
AC analysis; if the .ac command is missing, then the .noise command is ignored. With the .ac command
present, the .noise command causes noise analysis to be performed at the same frequencies. The .noise
command takes two arguments: the output at which the effects of noise are to be computed, and the input at
which the .noise can be considered to be concentrated for the purposes of estimating the equivalent noise
spectral density. The print command is used to print results.
WAVEFORM EDIT
The ability to visualize the complex numerical data resulting from VLSI circuit simulation is critical to
testing, understanding & improving these circuits. W-Edit is a waveform viewer that provides ease of use,
power & speed in a flexible environment designed for graphical data representation. The advantages of W-
Edit include:
1. Tight Integration with T-spice, Tanner EDA_s circuit level simulator. W-Edit can chart data generated
by T-spice directly, without modification of the output text data files. The data can also be charted
dynamically as it is produced during the simulation.
2. Charts can automatically configure for the type of data being presented.
3. A data is treated by W-Edit as a unit called a trace. Multiple traces from different output files can be
viewed simultaneously in single or several windows; traces can be copied and moved between charts &
windows. Trace arithmetic can be performed on existed tracing to create new ones.
60
4. Chart views can be panned back & forth and zoomed in & out, including specifying the exact X-Y co-
ordinate range.
5. Properties of axes, traces, rides, charts, text & colors can be customized.
Numerical data is input to W-Edit in the form of plain or binary text files. Header & Comment information
supplied by T-Spice is used for automatic chart configuration. Runtime update of results is made possible by
linking W-Edit to a running simulation in T-Spice. W-Edit saves data with chart, trace, axis & environment
settings in files with the WDB (W-Edit Database).
LAYOUT(L-EDIT)
It is a tool that represents the masks that are used to fabricate an integrated circuit. It describes a layout
design in terms of files, cells & mask primitives. On the layout level, the component parameters are totally
different from schematic level. So it provides the facility to the user to analyze the response of the circuit
before forwarding it to the time consuming & costly process of fabrication. There are rules for designing
layout diagram of a schematic circuit using which user can compare the output response with the expected
one.
In L- Edit, layers are associated with masks used in the fabrication process. Different layers can be
conveniently represented by different colors and patterns. L- Edit describes a layout design in terms of files,
cells, instances, and mask primitives. You may load as many files as desired into memory. A file may be
composed of any number of cells. A file may be composed of any number of cells. These cells may be
hierarchically related, as in a typical design, or they may be independent, as in a library file. Cells may
contain any number or combination of mask primitives and instances of other cells.
The basic building block of the integrated circuit design in L- Edit is a cell. Design layout occurs within
cells. A cell can:
61
Hierarchy
L- Edit supports fully hierarchical mask design. Cells may contain instances of other cells. An instance is a
reference to a cell; should you edit the instanced cell, the change is reflected in all the instances of that cell.
Instances simplify the process of updating a design, and also reduce data storage requirements, because an
instance does not need to store all the data within the instanced cell instead, only a reference to the
instanced cell is stored, along with information on the position of the instance and on how the instance may
be rotated and mirrored.
L- Edit does not use a “separated” hierarchy: instances and primitives may coexist in the same cell at any
level in the hierarchy. Design files are self- contained. The pointer to a cell contained in an instance always
points to a cell within the same design file. When cells are copied from one file to another, L- Edit
automatically copies across any cells that are instanced by the copied cell, to maintain the self- contained
nature of the destination file.
Design Rules
Manufacturing constraints can be defined in L- Edit as design rules. Layouts can be checked against these
design rules.
Design Features
L- Edit is a full- custom mask editor. Manual layout can be accomplished more quickly because of L Edit‟s
intuitive user interface. In addition, one can construct special structures to utilize a technology without,
worrying about problems caused by automatic transformations. Phototransistors, guard bars, vertica l and
horizontal bipolar transistors, static structures, and Schottky diodes, for example, are as easy to design in
CMOS- Bulk technology as are conventional MOS transistors.
Floor plans
L- Edit is a manual floor planning tool. You have the choice of displaying instances in outline, identified
only by name, or as fully fleshed- out mask geometry. When you display your design in outline, you can
manipulate the arrangement of the cells in your design quickly and easily to achieve the desired floor plan.
One can manipulate instances at any level in the hierarchy, with insides hidden or displayed, using the same
graphical move/ select operations or rotation/ mirror commands that you use on primitive mask geometry.
Memory Limits
In L- Edit, one can make your design files as large as one like, given available RAM and disk space.
Hard Copy
L- Edit provides the capability to print hard copy of the design. A multiage option allows very large plots to
62
be printed to a specific scale on multiple 8 1/ 2 x 11 inch pages. An L- Edit macro is available to support
large- format, high- resolution, color plotting on inkjet plotters.
Variable Grid
L- Edit‟s grid options support lambda- based design as well as micron- based and mil- based design.
Error Recovery
L- Edit‟s error- trapping mechanism catches system errors and in most cases provides a means to recover
without losing or damaging data.
L- Edit Modules
L- Edit is a full- featured, high-performance, interactive, graphical mask layout editor. L- Edit generates
layouts quickly and easily, supports fully hierarchical designs, and allows an unlimited number of layers,
cells, and levels of hierarchy. It includes all major drawing primitives and supports 90°, 45°, and all- angle
drawing modes.
L- Edit ¤ Extract creates SPICE- compatible circuit netlists from L- Edit layouts. It can recognize active and
passive devices, sub circuits, and the most common device parameters, including resistance, capacitance,
device length, width, and area, and device source and drain area.
L- Edit ¤ DRC features user- programmable rules and handles minimum width, exact width, minimum
space, minimum surround, non- exist, overlap, and extension rules. It can handle full chip and region- only
DRC. DRC offers Error Browser and Object Browser functions for quickly and easily cycling through rule-
checking errors.
63
Steps to use Tanner tool:
i. SCHEMATIC (S-edit):
Start the tanner EDA by using the desktop shortcut or by using the
64
65
66
67
68
69
70
71
ii) Layout (L-edit):
Start Programs tanner EDA tanner tool v13.0 L-edit
72
73
74
75
76
77
78
79
80
81
82
83
EXP.NO:
DESIGN AND SIMULATION OF CMOS GATES
DATE:
AIM:
To perform the functional verification of the CMOS gates through schematic entry.
Inverter consists of nMOS and pMOS transistor in series connected between VDD and GND.
The gate of the two transistors are shorted and connected to the input. When the input to the
inverter A =0, nMOS transistor is OFF and pMOS transistor is ON. The output is pull- up to
VDD.When the input A=1, nMOS transistor is ON and pMOS transistor is OFF. The Output is
Pull-down to GND.
84
CMOS NOT
SCHEMATIC DIAGRAM:
OUTPUT WAVEFORM:
85
NETLIST:
********* Simulation Settings - General Section *********
.lib "C:\Documents and Settings\ece01\My Documents\Tanner EDA\Tanner Tools
v15.0\Process\Generic_250nm\Generic_250nm_Tech\Generic_250nm.lib" TT
86
CMOS NAND
SCHEMATIC DIAGRAM:
OUTPUT WAVEFORM:
87
NETLIST:
88
CMOS NOR
SCHEMATIC DIAGRAM:
OUTPUT WAVEFORM:
89
NETLIST:
90
RESULT
91
EXP.NO:
DESIGN AND SIMULATION OF A CMOS INVERTER USING DIGITAL FLOW
DATE:
AIM:
To perform the functional verification of a CMOS inverter circuit through schematic entry.
c) THEORY:
The term CMOS stands for “Complementary Metal Oxide Semiconductor”. CMOS technology is one of
the most popular technology in the computer chip design industry and broadly used today to
form integrated circuits in numerous and varied applications. Today‟s computer memories, CPUs and cell
phones make use of this technology due to several key advantages. This technology makes use of both P
One of the most popular MOSFET technologies available today is the Complementary MOS or CMOS
technology. This is the dominant semiconductor technology for microprocessors, microcontroller chips,
memories like RAM, ROM, EEPROM and application specific integrated circuits (ASICs)
92
SCHEMATIC ENTRY:
93
NETLIST:
* Design: adm705-1
* Cell: Cell3
* View: view0
* Exclude .model: no
* Exclude .end: no
* Wrap lines: no
MNMOS_1 Out N_2 Gnd N_1 NMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u
MPMOS_1 Out N_2 Vdd N_3 PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u
.print dc v(MNMOS_1,Gnd)
.end
95
EXP.NO:
DESIGN AND SIMULATION OF 4-BIT COUNTER
DATE:
AIM:
To perform the functional verification of the 4-bit counter circuit through schematic entry.
c) THEORY: (COUNTER)
A counter that can change state in either direction, under the control of an up or down selector input, is
known as an up/down counter. When the selector is in the up state, the counter increments its value. When
the selector is in the down state, the counter decrements the count. Likewise the counter counts in both the
directions continuously until attaining the end of the count. The count is init iated by the positive clock
pulse. The counter counts from 0000 to 1111 for up count and 1111 to 0000 for down count.
96
4-BIT COUNTER
SCHEMATIC DIAGRAM:
97 Prepared By Mr.B.ARUNKUMAR,AP/ECE
OUTPUT WAVEFORM:
98 Prepared By Mr.B.ARUNKUMAR,AP/ECE
NETLIST:
RESULT:
10 Prepared By Mr.B.ARUNKUMAR,AP/ECE
1
EXP.NO:
LAYOUT CMOS INVERTOR
DATE:
AIM:
To draw the layout of CMOS Inverter using L-Edit and extract the SPICE code.
1 Draw the CMOS Inverter layout by obeying the Lamda Rules using L-edit.
i.Poly- 2λ
ii.Activecontact-2λ
iii.ActiveContact–Metal-1λ
2
iv.ActiveContact–Activeregion-2λ
v.ActiveRegion–Pselect-3λ
vi.Pselect–nWell-3λ
3 Check DRC to verify whether any region violate the Lamda rule
4 Setup the extraction and extract the spice code using T-spice.
10 Prepared By Mr.B.ARUNKUMAR,AP/ECE
2
CMOS INVERTER:
LAYOUT DAIGRAM:
105 Prepared By
Mr.B.ARUNKUMAR,AP/ECE
EXP.NO:
AUTOMATIC LAYOUT GENERATION
DATE:
AIM:
To generate the automatic Layout from the schematic using the Tanner tool and verify
the layout using simulation.
1 Draw the schematic using S -Edit and verify the output in W-Edit.
2 Extract the schematic and store it in another location
3 Open the L-Edit, open the design in Ring VCO
4 Create the new cell
5 Open the schematic file(.sdl) using the SDL Navigator
6 Do the necessary connections as per the design.
7 Name the ports and check the design for the DRC Rules
Locate the Destination file in the setup Extract window and extract
8
the layout.
Include the Library and the print voltage statements in the net list
9
which is obtained.
10 Verify the layout design using W-Edit.
106 Prepared By
Mr.B.ARUNKUMAR,AP/ECE
SCHEMATIC DIAGRAM:
RESULT:
109
EXP.NO:
DESIGN AND SIMULATE A FLIP-FLOP
DATE:
AIM:
To perform the functional verification of a D- flip flop through schematic entry.
The D flip- flop tracks the input, making transitions with match those of the input D. The D stands
for "data"; this flip- flop stores the value that is on the data line. It can be thought of as a basic
memory cell. A D flip- flop can be made from a set/reset flip- flop by tying the set to the reset
through an inverter. The result may be clocked.
110
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
111
NETLIST:
Circuit Extracted by Tanner Research's L-Edit Version 13.00 / Extract Version 13.00 ;
.include lights.md
* 6 = q (100 , 12.5)
* 6 = U1/NAND2C_3/Out1 (2 , 52)
* 7 = Vdd (-101 , 4)
* 8 = d (-101 , 106.5)
* 17 = Gnd (92 , 4)
M1 Vdd d U1/NAND2C_2/B Vdd PMOS L=2u W=28u AD=84p PD=34u AS=84p PS=34u
M2 U1/NAND2C_2/B d Vdd Vdd PMOS L=2u W=28u AD=84p PD=34u AS=144p PS=68u
M4 Vdd U1/NAND2C_2/Out1 qbar Vdd PMOS L=2u W=28u AD=84p PD=34u AS=84p PS=34u
M5 qbar q Vdd Vdd PMOS L=2u W=28u AD=84p PD=34u AS=144p PS=68u
M6 U1/NAND2C_4/Out2 qbar Vdd Vdd PMOS L=2u W=28u AD=148p PD=68u AS=84p PS=34u
M7 Vdd qbar q Vdd PMOS L=2u W=28u AD=84p PD=34u AS=84p PS=34u
M8 U1/NAND2C_3/Out2 q Vdd Vdd PMOS L=2u W=28u AD=148p PD=68u AS=84p PS=34u
M10 5 d U1/NAND2C_2/B Gnd NMOS L=2u W=28u AD=28p PD=30u AS=148p PS=68u
113
M11 U1/NAND2C_5/Out2 U1/NAND2C_2/B Gnd Gnd NMOS L=2u W=28u AD=148p PD=68u
AS=122p PS=47u
M12 Gnd U1/NAND2C_2/Out1 4 Gnd NMOS L=2u W=28u AD=122p PD=47u AS=28p PS=30u
M13 4 q qbar Gnd NMOS L=2u W=28u AD=28p PD=30u AS=148p PS=68u
M14 U1/NAND2C_4/Out2 qbar Gnd Gnd NMOS L=2u W=28u AD=148p PD=68u AS=122p
PS=47u
M15 U1/NAND2C_3/Out2 q Gnd Gnd NMOS L=2u W=28u AD=148p PD=68u AS=122p PS=47u
M16 q U1/NAND2C_1/Out1 Vdd Vdd PMOS L=2u W=28u AD=84p PD=34u AS=144p PS=68u
M17 Vdd U1/NAND2C_2/B U1/NAND2C_2/Out1 Vdd PMOS L=2u W=28u AD=84p PD=34u
AS=84p PS=34u
M18 U1/NAND2C_2/Out1 clk Vdd Vdd PMOS L=2u W=28u AD=84p PD=34u AS=144p PS=68u
M20 Vdd clk U1/NAND2C_1/Out1 Vdd PMOS L=2u W=28u AD=84p PD=34u AS=84p PS=34u
M21 U1/NAND2C_1/Out1 d Vdd Vdd PMOS L=2u W=28u AD=84p PD=34u AS=144p PS=68u
M23 Gnd qbar 19 Gnd NMOS L=2u W=28u AD=122p PD=47u AS=28p PS=30u
M24 19 U1/NAND2C_1/Out1 q Gnd NMOS L=2u W=28u AD=28p PD=30u AS=148p PS=68u
M25 Gnd U1/NAND2C_2/B 16 Gnd NMOS L=2u W=28u AD=122p PD=47u AS=28p PS=30u
M26 16 clk U1/NAND2C_2/Out1 Gnd NMOS L=2u W=28u AD=28p PD=30u AS=148p PS=68u
M28 Gnd clk 15 Gnd NMOS L=2u W=28u AD=122p PD=47u AS=28p PS=30u
M29 15 d U1/NAND2C_1/Out1 Gnd NMOS L=2u W=28u AD=28p PD=30u AS=148p PS=68u
* Total Nodes: 19
* Total Elements: 30
114
* Total Number of Shorted Elements not written to the SPICE file: 10
.END
RESULT:
115
EXP.NO:
DESIGN AND SIMULATE A CMOS INVERTING AMPLIFIER
DATE:
AIM:
To perform the functional verification of a CMOS inverting amplifier circuit through
schematic entry.
c) THEORY:
CMOS Inverter consists of nMOS and pMOS transistor in series connected between VDD
and GND. The gate of the two transistors are shorted and connected to the input.
When the input to the inverter A = 0, nMOS transistor is OFF and pMOS transistor is ON.
The output is pull- up to VDD.
When the input A = 1, nMOS transistor is ON and pMOS transistor is OFF. The Output is
Pull-down to GND.
116
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
117
NETLIST:
SPICE export by: SEDIT 13.12
* Design: adm705-1
* Cell: Cell3
* View: view0
* Exclude .model: no
* Exclude .end: no
* Wrap lines: no
MNMOS_1 Out N_2 Gnd N_1 NMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u
MPMOS_1 Out N_2 Vdd N_3 PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u
118
.tran 350ns 500ns
.print dc v(MNMOS_1,Gnd)
.end
RESULT:
119
EXP.NO:
DESIGN AND SIMULATION OF COMMON SOURCE AMPLIFIER
DATE:
AIM:
To perform the Design and Simulation of Common Source Amplifier circuit through
schematic entry.
c) THEORY:
120
As a transconductance amplifier, the input voltage is seen as modulating the current going to the
load. As a voltage amplifier, input voltage modulates the amount of 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.
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
121
NETLIST:
RESULT:
124
EXP.NO:
DESIGN AND SIMULATION OF COMMON DRAIN AMPLIFIER
DATE:
AIM:
To perform the Design and Simulation of Common drain amplifier circuit through schematic
entry.
c) THEORY:
Common drain amplifier is a source follower or buffer amplifier circuit using a MOSFET. The
output is simply equal to the input minus about 2.2V. The advantage of this circuit is that the
MOSFET can provide current and power gain; the MOSFET draws no current from the input. It
provides low output impedance to any circuit using the output of the follower, meaning that the
output will not drop under load.Its output impedance is not as low as that of an emitter follower
using a bipolar transistor (as you can verify by connecting a resistor from the output to -15V), but it
has the advantage that the input impedance is infinite.The MOSFET is in saturation, so the current
across it is determined by the gate-source voltage. Since a current source keeps the current constant,
the gate-source voltage is also constant.
125
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
126
NETLIST:
RESULT:
129
EXP.NO:
DESIGN AND SIMULATION OF COMMON GATE AMPLIFIER
DATE:
AIM:
To perform the Design and Simulation of Common drain amplifier circuit through schematic
entry.
c) THEORY:
In common source amplifier and source follower circuits, the input signal are applied to the gate of
a MOSFET. It is also possible to apply the input signal to the source terminal by keeping common
gate terminal. This type of amplifier is called as common gate amplifier.
Figure below shows the CG amplifier in which the input signal is sensed at the source terminal and
the output is produced at the drain terminal. The gate terminal is connected to V B i.e. dc potential
which will maintain the proper operating conditions.
130
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
131
NETLIST:
RESULT:
134
EXP.NO:
DESIGN AND SIMULATION OF DIFFERENTIAL AMPLIFER
DATE:
AIM:
To calculate the gain, bandwidth and CMRR of a differential amplifier through schematic
entry using Tanner EDA tool.
PROCEDURE:
Enter the schematic of differential amplifier using S-Edit.
Perform AC Analysis of the differential amplifier.
Go to „setup‟ in that select „spice simulation‟. Choose „ac analysis‟ and give the
following values.
Set „Start frequency =10‟,‟ Stop frequency=10meg‟, „No. of frequency=25‟, „Sweep type =
dec‟. Click on „general‟ type and give path to Generic_250nm.lib.Then Click OK.
RUN Simulation to get output.
Obtain the frequency response from W-Edit.
Obtain the spice code using T-Edit.
135
SCHEMATICDIAGRAM:
DIFFERENTIAL MODE:
136
NETLIST:
137
********* Simulation Settings - Analysis Section *********
.ac dec 25 10 10X
********* Simulation Settings - Additional SPICE Commands *********
.end
SCHEMATICDIAGRAM:
COMMON MODE:
138
NETLIST:
MNMOS_2_5v_2 Out N_2 N_3 0 NMOS25 W=1.5u L=250n AS=975f PS=4.3u AD=975f PD=4.3u
MPMOS_2_5v_1 N_1 N_1 Vdd Vdd PMOS25 W=3u L=250n AS=1.95p PS=7.3u AD=1.95p
PD=7.3u
.MEASURE AC AC_Measure_GainBandwidthProduct_1
PARAM='AC_Measure_GainBandwidthProduct_1_Gain*AC_Measure_GainBandwidthProduct_1_
UGFreq'
.end
DIFFERNTIAL AMPLIFIER
AC_Measure_GainBandwidthProduct
140
CMRR = Ad / Ac
RESULT
141