Beruflich Dokumente
Kultur Dokumente
COM
MULTIPLEXERS
EX:NO:2 4:1 MULTIPLEXER
AIM
To design and implement 4:1 multiplexer using Verilog HDL and to view the floor
planning for the same.
APPARATUS REQUIRED
1. PC with Windows XP.
2. Xilinx ISE Design Suite 10.1
PROCEDURE
1. Write and draw the Digital logic System.
2. Write the Verilog code for above system.
3. Enter the Verilog code in Xilinx software.
4. Check the syntax and simulate the above Verilog code with test bench inputs
(using ISE Simulator) and verify the output waveform as obtained.
5. Implement the above code in FPGA kit.
PROGRAM
module multiplexer(y,s0,s1,d0,d1,d2,d3);
input s0;
input s1;
input d0;
input d1;
input d2;
input d3;
output y;
wire w1,w2,w3,w4,w5,w6;
not n1(w1,s0);
not n2(w2,s1);
and a1(w3,d0,w1,w2);
and a2(w4,d1,w1,s1);
and a3(w5,d2,s0,w2);
and a4(w6,d3,s0,s1);
or a5(y,w3,w4,w5,w6);
endmodule
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
TEST BENCH INPUT
#50 s0=0;s1=0;d0=0;d1=1;d2=0;d3=0;
#50 s0=0;s1=0;d0=0;d1=0;d2=0;d3=0;
#50 s0=1;s1=1;d0=0;d1=1;d2=0;d3=1;
#100 $finish;
TECHNOLOGY SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
LUT SCHEMATIC
TRUTH TABLE
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
K-MAP
SIMULATION
Simulator is doing circuit initialization process. Finished circuit initialization process.
Initialization
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Input selection
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Simulation Output
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
FLOOR PLANNING
RESULT
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
The design and implementation of 4:1 multiplexer using Verilog HDL and floor planning
are done using Xilinx and the simulation for the same is done using ISE simulator.
DECODERS
EX:NO:3 3(a) 2X4 DECODER
AIM
To design and implement 2x4 decoder using Verilog HDL and to view the floor planning
for the same.
APPARATUS REQUIRED
6. PC with Windows XP.
7. Xilinx ISE Design Suite 10.1
PROCEDURE
8. Write and draw the Digital logic system.
9. Write the Verilog code for above system.
10. Enter the Verilog code in Xilinx software.
11. Check the syntax and simulate the above Verilog code with test bench inputs
(using ISE Simulator) and verify the output waveform as obtained.
12. Implement the above code in FPGA kit.
PROGRAM
module decoder(y0,y1,y2,y3,s0,s1);
input s0,s1;
output y0,y1,y2,y3;
wire w1,w2;
not n1(w1,s0);
not n2(w2,s1);
and a1(y0,w1,w2);
and a2(y1,w1,w2);
and a3(y2,w1,w2);
and a4(y3,s0,s1);
endmodule
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
#50 S0=0;S1=0;
#50 S0=1;S1=0;
#50 S0=1;S1=1;
#100 $finish;
RTL SCHEMATIC
TECHNOLOGY SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
LUT SCHEMATIC
TRUTH TABLE
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
K-MAP
SIMULATION
Simulator is doing circuit initialization process. Finished circuit initialization process.
Initialization
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Input Selection
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Simulation Output
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
FLOOR PLANNING
RESULT
The design and implementation of 2x4 decoder using Verilog HDL and floor planning
are done using Xilinx and the simulation for the same is done using ISE simulator.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
endmodule
TEST BENCH INPUT
#50 s0=0;s1=0;s2=1;
#50 s0=0;s1=0;s2=0;
#50 s0=0;s1=1;s2=1;
#50 s0=1;s1=0;s2=0;
#50 s0=1;s1=0;s2=1;
#50 s0=1;s1=1;s2=0;
#50 s0=1;s1=1;s2=1;
#100 $finish;
RTL SCHEMATIC
TECHNOLOGY SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
LUT SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
TRUTH TABLE
K-MAP
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
SIMULATION
Simulator is doing circuit initialization process. Finished circuit initialization process.
Initialization
Input Selection
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Simulation Output
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
FLOOR PLANNING
RESULT:
The design and implementation of 3x8 decoder using Verilog HDL and floor planning
are done using Xilinx and the simulation for the same is done using ISE simulator.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
COMPARATORS
EX:NO:4 4(a) 1-BIT COMPARATOR
AIM:
To design and implement using 1-bit comparator Verilog HDL and to view the floor
planning for the same.
APPARATUS REQUIRED:
20. PC with Windows XP.
21. Xilinx ISE Design Suite 10.1
PROCEDURE:
22. Write and draw the Digital logic system.
23. Write the Verilog code for above system.
24. Enter the Verilog code in Xilinx software.
25. Check the syntax and simulate the above Verilog code with test bench inputs
(using ISE Simulator) and verify the output waveform as obtained.
26. Implement the above code in FPGA kit.
PROGRAM
module onebitcomp(a,b,x,y,z);
input a,b;
output x,y,z;
assign x=((~a)&(~b))|((a)&(b));
assign y=(a)&(~b);
assign z=(~a)&(b);
endmodule
RTL SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
TECHNOLOGY SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
LUT SCHEMATIC
TRUTH TABLE
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
K-MAP
SIMULATION
Simulator is doing circuit initialization process. Finished circuit initialization process.
Initialization
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Input Selection
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Simulation Output
FLOOR PLANNING
RESULT:
The design and implementation of 1-bit comparator using Verilog HDL and floor
planning are done using Xilinx and the simulation for the same is done using ISE simulator.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
TECHONOLOGY SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
LUT SCHEMATIC
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
TRUTH TABLE
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
K-MAP
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
SIMULATION
Simulator is doing circuit initialization process. Finished circuit initialization process.
Initialization
Input Selection
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Simulation Output
FLOOR PLANNING
RESULT:
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
The design and implementation of 2-bit comparator using Verilog HDL and floor
planning are done using Xilinx and the simulation for the same is done using ISE simulator.
AIM
KIT SPECIFICATIONS
1. FPGA Specifications:
1.1 Hardware:
Family: Spartan3E
Device: XC3S250E
Package: PQ208
Speed Grade: -4
1.2 Software:
Synthesis Tool: XST (VHDL/Verilog)
Simulator: ISE Simulator (VHDL/Verilog)
2. Other hardware:
1. Clock Generation:
The input signallevel is generated using DIP switches. The DIP-switch has 8
separate switches. When the switch is ON position the output will be ‘0’ level,
which is fed to FPGA as input. When the switch is OFF position the output of this
will be ‘1’ level. The ‘RC’ is used to limit the current, while connecting to ground
point.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
2.3 Output’s:
The FPGA device outputs are connected to bar-graph LEDs which shows the
output level. The output is ‘1’ level the LED will be glowing and when the output
is at ‘0’ level the LED will be in off.
2.6 Keyboard:
The trainer kit has a 4*4 key matrix connected to the FPGA I/O lines.
2.8 LCD:
The trainer kit has one 16*2 LCD display.
RS - LCD Register Select Signal
R/W - LCD Read / Write Signal
EN - LCD Enable Signal
D7-D0 - LCD Data Lines
2.9 26-pin FRC Lines
FPGA Kit Interfacing Diagram
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
RESULT
Thus the study of Xilinx Simulation Trainer kit is successfully completed.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
EX:NO:6 DESIGN AND IMPLEMENTATION OF FIR FILTER
AIM
To design and implement a FIR Filter using Xilinx software and FPGA Trainer kit.
APPARATUS REQUIRED
Software
34. PC with Windows XP.
35. Xilinx ISE Design Suite 10.1
Hardware
1. Family: Spartan3E
2. Device: XCS250E
PROCEDURE
3. Write and draw the Digital logic System.
4. Write the Verilog code for above system.
5. Enter the Verilog code in Xilinx software.
6. Check the syntax and simulate the above Verilog code with test bench inputs
(using ISE Simulator) and verify the output waveform as obtained.
7. Implement the above code in FPGA kit.
PROGRAM
module filter(clk,a,b,c,x,l,m,n,s,d,t,e);
input [1:0]a,b,c,x;
input clk;
input[3:0]l,m,n,s;
input[4:0]d,t;
output[5:0]e;
mul m1(clk,l,x,c);
mul m2(clk,m,x,b);
mul m3(clk,n,x,a);
flop dflop1(clk,l,s);
add a1(clk,d,m,s);
flop dflop2(clk,d,t);
a a2(clk,e,n,t);
endmodule
module flop(clk,d,q);
input clk;
input [4:0]d;
output reg[4:0]q;
always@(posedge clk)
begin
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
q<=d;
end
endmodule
module mul(clk,f,g,h);
input clk;
input[1:0]g,h;
output reg[3:0]f;
always@(posedge clk)
begin
f<=g*h;
end
endmodule
module add(clk,f,g,h);
input clk;
input[3:0]g,h;
output reg[4:0]f;
always@(posedge clk)
begin
f<=g+h;
end
endmodule
module a(clk,f,g,h);
input clk;
input[3:0]g;
input[4:0]h;
output reg[5:0]f;
always@(posedge clk)
begin
f<=g+h;
end
endmodule
SIMULATION
Simulator is doing circuit initialization process. Finished circuit initialization process.
Initialization
Input Selection
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Simulation Output
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
SYNTHESIS REPORT
TABLE OF CONTENTS
1) Synthesis Options Summary
2) HDL Compilation
3) Design Hierarchy Analysis
4) HDL Analysis
5) HDL Synthesis
5.1) HDL Synthesis Report
6) Advanced HDL Synthesis
6.1) Advanced HDL Synthesis Report
7) Low Level Synthesis
8) Partition Report
9) Final Report
9.1) Device utilization summary
9.2) Partition Resource Summary
9.3) TIMING REPORT
=====================================================================
* Synthesis Options Summary *
=====================================================================
---- Source Parameters
Input File Name : "filter.prj"
Input Format : mixed
Ignore Synthesis Constraint File : NO
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
---- Target Parameters
Output File Name : "filter"
Output Format : NGC
Target Device : xc3s250e-4-ft256
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Optimization Effort :1
Library Search Order : filter.lso
Keep Hierarchy : NO
Netlist Hierarchy : as_optimized
RTL Output : Yes
Global Optimization : AllClockNets
Read Cores : YES
Write Timing Constraints : NO
Cross Clock Analysis : NO
Hierarchy Separator :/
Bus Delimiter : <>
Case Specifier : maintain
Slice Utilization Ratio : 100
BRAM Utilization Ratio : 100
Verilog 2001 : YES
Auto BRAM Packing : NO
Slice Utilization Ratio Delta : 5
=====================================================================
=====================================================================
* HDL Compilation *
=====================================================================
Compiling verilog file "filter.v" in library work
Module <filter> compiled
Module <flop> compiled
Module <mul> compiled
Module <add> compiled
Module <a> compiled
No errors in compilation
Analysis of file <"filter.prj"> succeeded.
=====================================================================
* Design Hierarchy Analysis *
=====================================================================
Analyzing hierarchy for module <filter> in library <work>.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Related source file is “filter.v”.
Unit <filter> synthesized.
====================================================================
HDL Synthesis Report
Macro Statistics
#Multipliers :3
2x2-bit multiplier :3
# Adders/Subtractors :2
4-bit adder carry out :1
5-bit adder carry out :1
# Registers :7
4-bit register :3
5-bit register :3
6-bit register :1
====================================================================
* Advanced HDL Synthesis *
====================================================================
Advanced HDL Synthesized Report
Macro Statistics
#Multipliers :3
2x2-bit multiplier :3
# Adders/Subtractors :2
4-bit adder carry out :1
5-bit adder carry out :1
====================================================================
* Low Level Synthesis *
====================================================================
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
====================================================================
* Partition Report *
====================================================================
Partition Implementation Status
………………………
No Partitions were found in this design.
……………………
Process “Synthesize – XST” completed Successfully.
RESULT
The design and implementation of FIR Filter using Xilinx and the simulation for the
same is done using ISE simulator with FPGA kit.
AIM
THEORY
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Features of MATLAB
1. Emphasis on Top-Down Design Methodology
2. Emphasis on Functions
3. Emphasis on MATLAB Tools
4. Good Programming Practice
The fundamental unit of data in any MATLAB program is the array. An array is a
collection of data values organized into rows and columns and known by a single name.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
Disadvantages of MATLAB
MATLAB has two principle disadvantages.
1. It is an interpreted language and therefore can execute more slowly than compiled
languages.
2. High cost, a full copy of MATLAB is five to ten times more expensive than a
conventional C or Fortran compiler.
Initializing Variables in MATLAB
MATLAB Variables are automatically created when they are initialized. There are three
common ways to initialize a variable in MATLAB.
1, Assign data to the variable in an assignment statement.
2.Input data into the variable from the keyboard.
3.Read data from a file.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
RESULT
Thus the study of MATLAB Tool is successfully completed.
DESIGN
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
DESIGN EQUATIONS
L = µ0 µr A N2 / l
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
mr=1;
a=input('Enter the value of Area in meter sqr = ');
l=input ('Enter the value of Length in meters = ');
N=input ('Enter the value of No.Of.Turns = ');
L = ((m0*mr*a*N^2)/l);
display (L);
% The values of Resister,Capacitor,Inductor for interconnection
display (' The Estimatedvalues of R,C,L of Intrconnections are ');
display (R);
display (C);
display (L);
OUTPUT
Enter the value of Specific Resistance in ohm/cm = 44.64
Enter the value of Length in meters = 0.5
Enter the value of Area in meter sqr = 1.2
R = 18.6000
Enter the values of cg in pf = 15
Enter the values of cc in pf = 10
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
C = 50
Enter the value of Area in meter sqr = 1.5
Enter the value of Length in meters = 1.2
Enter the value of No.Of.Turns = 20
L = 1.5579
The Estimated values of R,C,L of Interconnections are
R = 18.6000
C = 50
L= 1.5579
RESULT
Thus the Resistance ( R ), Capacitance ( C ), Inductance ( L ) of Interconnections were
designed and values were estimated successfully.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
MATLAB SOURCE CODE
clc;
clear all;
format long;
syms x;
e = 1e-5; % setting the tolerance value
dx = e+1;
f = log(2-x) +x^2; % enter your function here;
x=7; % initially assumed value of x
count=0; % setting counter to know the no of iterations taken
p = zeros(1,1);
while (abs(dx)>e) % initializing the iteration and continue until the error is less
than tolerance
dx = eval(f/(diff(f))); % calculating dx, diff is used for finding the differentiation of
the function
x = x-dx; % updating the value of x
count = count +1; % incrementing the counter
p(count)=x;
drawnow();
plot(abs(p),'r','linewidth',3);
grid;
if(count>300)
fprintf('Error...! Solution not converging !!!\n'); % printing the error message
break;
end
end
if(count<300)
fprintf('The solution ='); % printing the result
x
fprintf('\n Number of iteration taken = %d\n',count);
end
OUTPUT
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
The solution:
x = 0.268213493174994 - 0.854413795679647i
RESULT
The V-I characteristics of P-Channel and N-Channel MOSFET using Newton Raphson
method is designed and simulated.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
AIM:
To simulate of Schrodinger equation based device modeling for MOSFET using
MATLAB.
APPARATUS REQUIRED
Software
23. MATLAB
PROCEDURE
24. Open the MATLAB.
25. Create a new file by File→ new→ blank M-file.
26. Type the MATLAB coding for device modeling using Schrodinger equation.
27. Run the coding.
28. By giving the corresponding input values, then the output graph is obtained.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
y(1)=0;
y(m+1)=0;
y(2) = 1;
for i=3:m
y(i) = -(y(i-2) + ((-2+(n*n*pi*pi*h*h/(x1*x1)))*y(i-1)));
sum2=sum2+y(i)^2;
end
y=y/sqrt(sum2);
y2=y.^2;
figure('color','white');
subplot(2,1,1);
plot(x,y,'r');
xlabel('Distance in nm');
ylabel('wave function');
subplot(2,1,2);
plot(x,y2);
xlabel('Distance in nm');
ylabel('propality density');
OUTPUT
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
RESULT
The device modeling of a MOSFET using Schrodinger equation is designed and
simulated.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
transistors, a time-domain response, a small-signal frequency response, and so on. SPICE
contains models for common circuit elements. Active as well as passive, and it is capable of
simulation most electronic circuits. It is a versatile program and is widely used both in industries
and universities. The acronym SPICE stands for Simulation Program with Integrated Circuit
Emphasis.
PSpice, which uses the same algorithms as SPICE2 and is a member of the SPICE family, is
equally useful for simulating all types of circuits in a wide range of applications. A circuit is
described by statements that are stored in a file called the circuit file. The circuit file is read by
the SPICE simulator. Each statement is self-contained and independent; the statements do not
interact with each other. SPICE (or PSPICE) statements are easy to learn and use.
TYPES OF ANALYSIS:
PSpice allows various types of analysis. Each analysis is invoked by including its command
statement. For example, a statement beginning with the .DC command invokes the DC sweep.
The types of analysis and their corresponding. (dot) commands are described below.
DC Analysis is used for circuits with time-invariant sources (e.g., steady-state dc sources). It
calculates all node voltages and branch currents over a range of values, and their quiescent (dc)
values are the outputs.
1. DC sweep of an input voltage/current source, a model parameter, or
temperature over a range of values (.DC)
2. Determination of the linearized model parameters of nonlinear devices
(.OP) dc operating point to obtain all node voltages (.OP)
3. Small-signal transfer function with small-signal gain, input resistance, and output
resistance (Thevinin’s equivalent) (.TF)
4. DC small-signal sensitivities (.SENS)
Transients Analysis is used for circuits with time-invariant sources (e.g., ac sources and
switched de sources). It calculates all node voltages and branch currents over a time interval, and
their instantaneous values are the outputs.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
2. Noise generation at an output node for every frequency (.NOISE)
LIMITATION OF PSpice:
As a circuit simulator, PSpice has the following limitations:
1. The student version of PSpice is restricted to circuits with 10 transistors only.
2. The program is not interactive.
3. PSpice does not support and interactive method of solution.
4. The input impedance cannot be determined directly without running the graphic post-
processor, Probe.
5. The PC version needs 512 kilobytes of memory (RAM) to run.
6. Distortion analysis is not available in PSpice.
7. The output impedance of a circuit cannot be printed or plotted directly.
OrCAD PSpice:
OrCAD PSpice A/D is a simulation program that models the behavior of a circuit
containing any mix of analog and digital devices.
PSpice A/D can perform the following types of analyses:
1. AC, DC and transient analyses, so you can test the response of your circuits to different
inputs.
2. Parametric, monte carlo, and sensitivity/worst-case analysis , so you can see how your
circuit’s behavior varies with changing components values
3. Digital worst-case timing analysis to help you find timing problems that occur with only
certain combination of slow and fast signal transmissions.
PSpice A/D also supports analog and digital behavioral modeling, so you can describe
functional block of circuitry using mathematical expressions and functions.
1. Transmission line models, including delay, reflection, loss, dispersion, and crosstalk.
2. Nonlinear magnetic core models, including saturation and histerisis.
3. Six MOSFET models.
4. Five Gas FET models
5. IGBTs
6. Digital components with analog I/O models
STIMULUS EDITOR:
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
The stimulus editor is the utility that allows you to quickly setup and verify the input
waveforms for the transient’s analysis. The stimulus editor is graphical waveform editor that
allows you to define the shape of time-based signals used test your circuit design’s response
during simulation.
BASIC ANALYSES:
1. AC sweep and noise.
2. DC sweep & other DC calculation.
3. Transient and Fourier.
NETLIST:
A netlist is the connectivity description of a circuits, showing all of the components, their
interconnection, and their values. When you create a simulation netlist from OrCAD capture, that
netlist describes the current design.
During the netlist process, capture creates several files with different extensions
1. .NET file contains the netlist.
2. .CIR file contains simulation commants.
3. .ALS file contains alias information.
TYPES OF DESCRIPTION:
1. Circuit description
2. Analyses description
3. Output description
STEPS TO CREATING A CIRCUIT FILE:
1. Double click the PSpice AD students icon.
2. Go to file – select new and choose text file.
3. Write the various parameters in forms that are allowed by PSpice.
4. Save the file with extension of .CIR
STEPS TO RUN A CIRUCUIT FILE:
1. Go to file and select open simulation.
2. Choose and input file (.CIR file)
3. Select open.
4. Run and simulate the circuit file.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
5. Choose and output file name, default is circuit file with an .OUT extension.
6. Trace the output waveform.
STEPS TO ABORT PSPICE:
7. Click on close box.
8. Select QUIT from the file menu.
RESULT:
Thus the study of PSpice Simulation tool is successfully completed.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
CMOS INVERTER
CIRCUIT DIAGRAM:
VDD
4
CMOS INVERTER
M1 PMOS
M1
1 3
Y=a
M4
V1
NMOS
M2
vss
0
0
PSpice NetList
VDDS 2 0 5V
VIN 1 0 DC 5V PULSE(0 5V 0 1NS 10NS 20US 40US)
RL 3 0 100k
M1 3 1 2 2 PMOD L=1U W=20U
.MODEL PMOD PMOS(VTO=2 KP=4.5E-4 CBD=5PF CBS=2PF RD=5
+RS=2 RB=0 RG=0 RDS=1MEG CGSO=1PF CGDO=1PF CGBO=1PF)
M2 3 1 0 0 NMOD L=1U W= 5U
.MODEL NMOD NMOS(VTO=-2 KP=4.5E-5 CBD=5PF CBS=2PF RD=5
+RS=2 RB=0 RG=0 RDS=1MEG CGSO=1PF CGDO=1PF CGBO=1PF)
.TRAN 1US 100US
.TF V(3) VIN
.OP
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
.PLOT TRAN V(1)
.PROBE
.END
SIMULATION OUTPUT
1.0V
0.5V
SEL>>
0V
V(3)
4.0V
0V
-4.0V
0s 0.5ms 1.0ms 1.5ms 2.0ms 2.5ms 3.0ms
V(1)
Time
DC CHARACTERISTICS
Simulation Output Waveform
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
TRANSIENT CHARACTERISTICS
Simulation Output Waveform
RESULT
Thus the CMOS Inverter and the study of DC & Transient Characteristics using PSpice
was designed and simulated.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
VDD
4
M2
M1
1
3
0V
V1
M3 Y=a.b
0 5
2
M4 V2
0V
vss
0
0
V1 V2 Y
A Y
Low Low High
B
Low High High
High Low High
High High Low
PSpice NetList
VDD 4 0 DC 5V
VIN1 1 0 DC 5V ; INPUT VOLTAGE CAN BE VARIED AS PER TRUTH TABLE
VIN2 2 0 DC 5V
RL 3 0 100K
M1 4 1 3 0 PMOD L=5U W=20U
M2 4 2 3 0 PMOD L=5U W=20U
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
.MODEL PMOD PMOS(VTO=-2 KP=4.5E-4 CBD=5PF
+CBS=2PF RD=5 RS=2 RB=0 RG=0
+RDS=1MEG CGSO=1PF CGDO=1PF CGBO=1PF)
M3 3 1 5 0 NMOD L=5U W=20U
M4 5 2 0 0 NMOD L=5U W=20U
.MODEL NMOD NMOS(VTO=-2 KP=4.5E-5 CBD=5PF
+CBS=2PF RD=5 RS=2 RB=0 RG=0
+RDS=1MEG CGSO=1PF CGDO=1PF CGBO=1PF)
.TRAN 1US 80US
.TF V(3) VIN1
.OP
.PLOT TRAN V(2) V(1)
.PROBE
.END
SIMULATION OUTPUT
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
5.0V
2.5V
0V
0s 10us 20us 30us 40us 50us 60us 70us 80us
V(1) V(3)
Time
RESULT
Thus the CMOS NAND Gate using PSpice is designed and simulated.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
APPARATUS REQUIRED
10. PC with Windows XP.
11. OrCAD PSpice
PROCEDURE
1. Double click the PSpice AD students icon.
2. Go to file – select new and choose text file.
3. Write the various parameters in forms that are allowed by PSpice.
4. Save the file with extension of .CIR
5. Go to file and select open simulation.
6. Choose and input file (.CIR file)
7. Select open.
8. Run and simulate the circuit file.
9. Choose and output file name, default is circuit file with an .OUT extension.
10. Trace the output waveform.
11. Select QUIT from the file menu.
M1
3
1
M2
V1
0V
5
Y= a + b
M4
0 M3
2
V2
0V
0 vss
0
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
V1 V2 Y
A Y
Low Low High
B
Low High Low
High Low Low
High High Low
PSpice NetList
VDD 4 0 DC 5V
VIN1 1 0 DC 0V
VIN2 2 0 DC 0V
M1 4 1 3 0 PMOD L=5U W=20U
M2 3 2 5 0 PMOD L=5U W=20U
.MODEL PMOD PMOS (VTO=-2 KP=4.5E-4 CBD=5PF
+CBS=2PF RD=5 RS=2 RB=0 RG=0
+RDS=1MEG CGSO=1PF CGDO=1PF CGBO=1PF)
M3 5 2 0 0 NMOD L=5U W=20U
M4 5 1 0 0 NMOD L=5U W=20U
.MODEL NMOD NMOS (VTO=-2 KP=4.5E-5 CBD=5PF
+CBS=2PF RD=5 RS=2 RB=0 RG=0
+RDS=1MEG CGSO=1PF CGDO=1PF CGBO=1PF)
.TRAN 1US 80US
.TF V (5) VIN1
.OP
.PLOT TRAN V (2) V(1)
.PROBE
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
.END
SIMULATION OUTPUT
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM
RESULT
Thus the CMOS NOR Gate using PSpice is designed and simulated.
WWW.VIDYARTHIPLUS.COM WWW.VIDYARTHIPLUS.COM