Vlsi Lab Manual Final R2021 Edited
Vlsi Lab Manual Final R2021 Edited
: 1(a)
Design of basic combinational circuits
using HDL
AIM:
To design, simulate and implement basic combinational circuits using Verilog HDL
SOFTWARE REQUIRED:
THEORY:
HALF ADDER:
The half adder consists of two input variables designated as Augends and Addend bits. Output
variables produce the Sum and Carry. The ‘carry’ output is 1 only when both inputs are 1 and
sum is 1 if any one input is 1. The Boolean expression is given by,
FULL ADDER:
A Full adder is a combinational circuit that focuses the arithmetic sum of three bits. It consists
of 3 inputs and 2 outputs. The third input is the carry from the previous Lower Significant
Position. The two outputs are designated as Sum (S) and Carry (C). The binary variable S
gives the value of the LSB of the Sum. The output S=1 only if odd number of 1’s are present
in the input and the output C=1 if two or three inputs are 1.
sum = x ^ y ^ z
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 thesynthesis in the process window.
4. Perform the functional simulation using Xilinx ISE simulator.
5. The output can be observed by using ISIM Simulator.
Half Adder:
Program :
Truth table:
Half Adder
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
RTL SCHEMATIC:
TECHNOLOGIC SCHEMATIC:
OUTPUT WAVEFORM:
Full Adder:
Program:
Truth Table:
a b c carry Sum
- -
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
----- -
RTL SCHEMATIC:
TECHNOLOGIC SCHEMATIC:
OUTPUT WAVEFORM:
HALF SUBTRACTOR:
Program:
module halfSub(a, b, diff, borr);
input a, b;
output diff, borr;
wire s;
not (s, a);
xor (diff, a, b);
and (borr, s, b);
endmodule
Truth Table:
- -
Input1 Input2 Borrow Difference
-
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
RTL SCHEMATIC
TECHNOLOGIC SCHEMATIC
Output Wave:
FULL SUBTRACTOR:
Program:
Truth Table:
A B Cin D Bout
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
RTL Schematic
TEHNOLOGICAL SCHEMATIC
Output Wave:
Result:
Thus the basic combinational circuits was simulated and implemented successfully.
Exp. No.: 1(b) Design of basic sequential circuits using
HDL
AIM:
PROCEDURE:
Software part
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking
on thesynthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
D-FLIPFLOP:
PROGRAM:
Truth Table:
D FlipFlop
-
Clock Reset Input (d) Output q(~q)
0 0 0 0(1)
1 0 0 0(1)
0 0 1 0(1)
1 0 1 0(1)
0 0 0 0(1)
1 0 0 0(1)
0 1 1 0(1)
1 1 1 1(0)
0 1 0 1(0)
1 1 0 0(1)
0 1 1 0(1)
1 1 1 1(0)
0 0 0 0(1)
1 0 0 0(1)
0 0 0 0(1)
OUTPUT:
T-FLIPFLOP:
PROGRAM:
TRUTH TABLE:
-
Clock Reset Input (t) Output q(~q)
0 0 0 0(1)
1 0 0 0(1)
0 0 1 0(1)
1 0 1 0(1)
0 0 0 0(1)
1 0 0 0(1)
0 1 1 0(1)
1 1 1 1(0)
0 1 0 1(0)
1 1 0 1(0)
0 1 1 1(0)
1 1 1 0(1)
0 0 0 0(1)
1 0 0 0(1)
0 0 0 0(1)
OUTPUT WAVEFORM:
RESULT:
Thus the basic sequential circuits are designed, simulated and implemented successfully.
Exp. No.: 2(a) DESIGN 8-BIT ADDERS U SIN G HD L
AIM:
To design and to implement 8-bit adders usingVerilog HDL.
SOFTWARE REQUIRED:
PROCEDURE:
Software part
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking
on thesynthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
Sub-Program
OUTPUT WAVEFORM:
RESULT:
AIM:
PROCEDURE:
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilization summary by double Clicking
on the synthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
4 BIT MULTIPLIER:
--------------------------------------------------------
A B RES
---------------------------------------------------------
----------------------------------------------------------
RTL SCHEMATIC:
TECHNOLOGICAL SCHEMATIC:
OUTPUT WAVE:
ARRAY MULTIPLIER:
Program:
module HA (sout,cout,a,b);
input a,b;
output sout,cout;
assign sout=(a^b);
assign cout=(a&b);
endmodule
module FA (sout,cout,a,b,cin);
input a,b,cin;
output sout,cout;
assign sout=(a^b^cin);
assign cout=((a&b)|(b&cin)|(cin&a));
endmodule
module bitmul (m,x,y);
output [7:0]m;
input [3:0]x;
input [3:0]y;
assign m[0]=(x[0]&y[0]);
wire x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17;
HA HA1 (m[1],x1,(x[1]&y[0]),(x[0]&y[1]));
FA FA1 (x2,x3,(x[1]&y[1]),(x[0]&y[2]),x1);
FA FA2 (x4,x5,(x[1]&y[2]),(x[0]&y[3]),x3);
HA HA2 (x6,x7,(x[1]&y[3]),x5);
HA HA3 (m[2],x15,x2,(x[2]&y[0]));
FA FA5 (x14,x16,x4,(x[2]&y[1]),x15);
FA FA4 (x13,x17,x6,(x[2]&y[2]),x16);
FA FA3 (x9,x8,x7,(x[2]&y[3]),x17);
HA HA4 (m[3],x12,x14,(x[3]&y[0]));
FA FA8 (m[4],x11,x13,(x[3]&y[1]),x12);
FA FA7 (m[5],x10,x9,(x[3]&y[2]),x11);
FA FA6 (m[6],m[7],x8,(x[3]&y[3]),x10);
endmodule
RTL SCHEMATIC:
TECHNOLOGICAL SCHEMATIC:
OUTPUT WAVEFORM:
Result:
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.
PROCEDURE:
Software part
6. Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
7. Write the Verilog code by choosing HDL as top level source module.
8. Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking on the
synthesis in the process window.
9. Perform the functional simulation using Xilinx ISE simulator.
10. The output can be observed by using ISIM Simulator.
PROGRAM:
REGISTER
S1 S0
OPERATION
0 0 No changes
0 1 Shift right
1 0 Shift left
1 1 Parallel load
RESULT
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.
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
RESULT:
Thus the memories are designed using Verilog HDL and simulated successfully.
Exp. No.: 5(a) DESIGN OF FINITE STATE MACHINE
(MOORE MACHINE)
AIM:
SOFTWARE REQUIRED:
PROCEDURE:
Software part
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking
on thesynthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
MOORE MACHINE:
PROGRAM:
begin
case( state )
2'b00:
begin
if( inp ) state <= 2'b01;
else state <= 2'b10;
end
2'b01:
begin
if( inp ) state <= 2'b11;
else state <= 2'b10;
end
2'b10:
begin
if( inp ) state <= 2'b01;
else state <= 2'b11;
end
2'b11:
begin
if( inp ) state <= 2'b01;
else state <= 2'b10;
end
endcase
end
end
always @(posedge clk, posedge rst)
begin
if( rst )
outp <= 0;
else if( state == 2'b11 )
outp <= 1;
else outp <= 0;
end
endmodule
RTL SCHEMATIC:
TECHNOLOGICAL SCHEMATIC:
OUTPUT WAVEFORM:
RESULT:
Thus the finite state machine (moore machine) has been simulated and verified and
implemented.
Exp. No.: 5(b) DESIGN OF FINITE STATE MACHINE
(MEALY MACHINE)
AIM:
SOFTWARE REQUIRED:
PROCEDURE:
Software part
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking
on thesynthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
else begin
case( state )
2'b00: begin
if( inp ) begin
state <= 2'b01;
outp <= 0;
end
else begin
state <= 2'b10;
outp <= 0;
end
end
2'b01: begin
if( inp ) begin
state <= 2'b00;
outp <= 1;
end
else begin
state <= 2'b10;
outp <= 0;
end
end
2'b10: begin
if( inp ) begin
state <= 2'b01;
outp <= 0;
end
else begin
state <= 2'b00;
outp <= 1;
end
end
default: begin
state <= 2'b00;
outp <= 0;
end
endcase
end
end
endmodule
RTL SCHEMATIC:
TECHNOLOGICAL SCHEMATIC:
OUTPUT WAVEFORM:
RESULT:
Thus the finite state machine (Mealy machine) has been simulated and verified
and implemented.
Exp. No.: 6
DESIGN OF SYNCHRONOUS
UP/ DOWN COUNTER
AIM:
SOFTWARE REQUIRED:
PROCEDURE:
Software part
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking
on thesynthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
UP COUNTER:
PROGRAM:
module upcounterr(clk,clr,q);
input clk, clr;
output [3:0]q;
reg [3:0]tmp;
always@(posedge clk or posedge clr)
begin
if (clr)
tmp <= 4'b0000;
else
tmp <= tmp + 1'b1;
end
assign q = tmp;
endmodule
RTL SCHEMATIC:
TECHNOLOGICAL SCHEMATIC:
OUTPUT WAVEFORM:
DOWN COUNTER:
PROGRAM:
module downcounterr(clk,clr,q);
input clk, clr;
output [3:0]q;
reg [3:0]tmp;
always@(posedge clk or posedge clr)
begin
if (clr)
tmp <= 4'b1111;
else
tmp <= tmp - 1'b1;
end
assign q = tmp;
endmodule
RTL SCHEMATIC:
TECHNOLOGICAL SCHEMATIC:
OUTPUT WAVEFORM:
RESULT:
Thus the synchronous up / down counter is designed and simulated successfully.
Exp. No.: 7
DESIGN OF ASYNCHRONOUS
UP/ DOWN COUNTER
AIM :
To implement synchoronous up/down counters using Verilog HDL
SOFTWARE REQUIRED:
PROCEDURE:
Software part
Click on the Xilinx ISE Design Suite 12.1or Xilinx Project navigator icon on the desktop of PC.
Write the Verilog code by choosing HDL as top level source module.
Check syntax, view RTL schematic and note the device utilizatio n summary by double Clicking on the
synthesis in the process window.
Perform the functional simulation using Xilinx ISE simulator.
The output can be observed by using ISIM Simulator.
UP COUNTER :
PROGRAM :
module counter(clk,rst,count);
input clk,rst;
output[3:0]count;
reg[3:0]count;
always@(negedge clk)
if(rst)
count[0]<=1’b0;
else
count[0]<=~count[0];
always @(negedge count[0])
if(rst)
count[1]<=1’b0;
else
count[1]<=~count[1];
always @(negedge count[1])
if(rst)
count[2]<=1’b0;
else
count[2]<=~count[2];
always @(negedge count[2])
if (rst)
count[3]<=1’b0;
else
count[3]<=~count[3];
endmodule
RESULT:
Thus the asynchronous is designed and simulated successfully.
EXP.NO: 8(a)
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.
CMOS NOT
SCHEMATIC DIAGRAM:
OUTPUT WAVEFORM:
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
OUTPUT WAVEFORM:
NETLIST:
SCHEMATIC DIAGRAM:
OUTPUT WAVEFORM:
NETLIST:
RESULT
Thus the functional verification of the CMOS gates are done successfully.
EXP.NO: 8(b)
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 standsfor
"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.
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
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
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
* Total Number of Shorted Elements not written to the SPICE file: 10
.END
RESULT:
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.
4-BIT COUNTER
SCHEMATIC DIAGRAM:
OUTPUT WAVEFORM:
NETLIST:
RESULT:
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.
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
NETLIST:
SPICE export by: SEDIT 13.12
* Design: adm705-1
* Cell: Cell3
* View: view0
* Exclude .model: no
* Exclude .end: no
* Wrap lines: no
* Exclude globalpins: 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
RESULT:
Thus the functional verification of a CMOS inverting amplifier circuit is designed and simulated successfully.
EXP.NO: 11(a)
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:
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
NETLIST:
RESULT:
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.
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
NETLIST:
RESULT:
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.
SCHEMATIC ENTRY:
OUTPUT WAVEFORM:
NETLIST:
RESULT:
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.
SCHEMATICDIAGRAM:
DIFFERENTIAL MODE:
COMMON MODE:
COMMON MODE OUTPUT:
NETLIST:
MNMOS_2_5v_1 N_1 N_2 N_3 0 NMOS25 W=1.5u L=250n AS=975f PS=4.3u AD=975f
PD=4.3u
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
MNMOS_2_5v_3 N_3 N_5 Gnd 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
MEASUREMENT RESULT SUMMARY:
DIFFERNTIAL AMPLIFIER
AC_Measure_Gain Bandwidth
Product
CMRR = Ad / Ac
RESULT
AIM:
To write a verilog program for multiplexer and demultiplexer to synthesize and simulate
using Xilinx software tool.
TOOLS REQUIRED:
SOFTWARE:
1. Xilinx ISE Design Suite 12.1
ALGORITHM:
1. Start the program.
2. Declare the input and output variables.
3. Declare the output as register data type.
4. Use PROCEDURAL construct statements (behavioral modeling) for Verilog code.
5. Terminate the program.
THEORY:
MULTIPLEXER
A Multiplexer is a Combinational circuit that selects binary information from one of many
input lines and directs it to a single output line. The set of selection of a particular line is controlled
by selection lines. Normally there are 2 n input lines and n selection lines whose bit combinations
determine which input is selected.
The 4:1 MUX has four inputs I0, I1, I 2 and I 3 and select lines S0 and S1. The select lines s0
and s1 are decoded to select a particular AND gate. The outputs of the AND gates are applied to a
single OR gate that provides the one line output Y.
DEMULTIPLEXER
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 using model sim.
PROGRAM:
module mux4to1(s0,s1,t0,t1,t2,t3,out);
input s0,s1,t0,t1,t2,t3;
output out;
wire s0n,s1n,n1,n2,n3,n4;
not(s0n,s0);
not(s1n,s1);
and(n1,s0n,s1n,t0);
and(n2,s0,s1n,t1);
and(n3,s0n,s1,t2);
and(n4,s0,s1,t3);
or(out,n1,n2,n3,n4);
endmodule
module demux1to4(s0,s1,s0n,s1n,in,t0,t1,t2,t3);
input s0,s1,in;
output s0n,s1n,t0,t1,t2,t3;
wire s0n,s1n;
not(s0n,s0);
not(s1n,s1);
and(t0,s0n,s1,in);
and(t1,s0n,s1n,in);
and(t2,s0,s1,in);
and(t3,s0,s1n,in);
endmodule
SIMULATION REPORT: (FOR DEMUX)
RESULT:
Thus the multiplexer and demultiplexer are designed and simulated successfully.
EXP: NO:
SIMULATION OF ENCODER AND DECODER
DATE:
AIM:
To write a verilog program for encoder and decoder to synthesize and simulate using Xilinx
software tool.
TOOLS REQUIRED:
SOFTWARE:
1. Xilinx ISE Design Suite 12.1
ALGORITHM:
1. Start the program.
2. Declare the input and output variables.
3. Declare the output as register data type.
4. Use PROCEDURAL construct statements (behavioral modeling) for Verilog code.
5. Terminate the program.
THEORY:
ENCODER
An Encoder is a digital circuit that has 2 n (or fewer) input lines and n output lines. The
output lines generate the binary the binary code corresponding to the input value. In encoder it is
assumed that only one input has a value of 1 at any given time.
DECODER
Discrete quantities of information are represented in digital systems by binary codes. A
binary code of n bits is capable of representing up to 2n distinct elements of coded information. A
decoder is a combinational circuit that converts binary information from n input lines to a
maximum of 2n unique output lines. If the n bit coded information unused combinations. The
decoder may have fewer than 2 n outputs.
The decoder are also called ‘n’ to ‘m’ line decoders, where is less than or equal to 2 n. Their
purpose is to generate the 2 n (or fewer) minterms of input variables. The name decoder is also used
in conjunction with other code converters such as BCD to SEVEN SEGMENT decoder.
PROCEDURE: (FOR ENCODER & DECODER)
Software part
1. Click on the Xilinx ISE Design Suite 12.1 or 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 using model sim.
PROGRAM:
module encoder(a,b,c,d,s0,s1);
input a,b,c,d;
output s0,s1;
or(s0,c,d);
or(s1,b,d);
endmodule
module decoder(s0,s1,t0,t1,t2,t3);
input s0,s1;
output t0,t1,t2,t3;
wire s0n,s1n;
not(s0n,s0);
not(s1n,s1);
and(t0,s0n,s1n);
and(t1,s0n,s1);
and(t2,s0,s1n);
and(t3,s0,s1);
endmodule
RESULT:
Thus the encoder and decoder are designed and simulated successfully.
VIVA VOCE QUESTION &ANSWERS
2)
2. Give the advantages of IC?
Systems-On-Chips
Crystal growth & doping, Ingot trimming & grinding, Ingot slicing, Wafer polishing & etching,
Wafer cleaning.
If a large Vds is applied this voltage with deplete the Inversion layer .This Voltage
effectively pinches off the channel near the drain.
Tub Formation, Thin-oxide Construction, Source & Drain Implantation, Contact cut
definition, Metallization.
No Latch-up, Due to absence of bulks transistor structures are denser than bulk silicon.
Transistors with Channel length less than 3- 5 microns are termed as Short channel
devices. With short channel devices the ratio between the lateral & vertical dimensions
The Threshold voltage, VT for a MOS transistor can be defined as the voltage applied
between the gate and the source of the MOS transistor below which the drain to source
The threshold voltage VT is not a constant w. r. to the voltage difference between the
substrate and the source of MOS transistor. This effect is called substrate-bias effect or
body effect.
levels of abstraction ranging from the algorithmic level to the switch level.
19. What are the various modeling used in Verilog
Structural modeling describes a digital logic networks in terms of the components that make up the system.
Gate-level modeling is based on using primitive logic gates and specifying how they are wired together.
Verilog allows switch-level modeling that is based on the behavior of MOSFETs.Digital circuits at the
MOS-transistor level are described using the MOSFET switches.
Identifiers are names of modules, variables and other objects that we can reference in the design.
Identifiers consists of upper and lower case letters, digits 0 through 9, the underscore character(_) and the
dollar sign($). It must be a single group of characters.