VLSI DESIGIN LABORATORY 2017 Lab Manual
VLSI DESIGIN LABORATORY 2017 Lab Manual
AIM:
To Design the Half adder & Full Adder using Verilog HDL. Simulate it using
Xilinx Software and implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
i. Open Xilinx ISE software and create a project folder in a desired directory.
ii. Now, right click on project as new source add a Verilog HDL Module and name it
accordingly.
iii. Type the Verilog coding in the source page and save it to the directory.
iv. Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
v. Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
vi. Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
vii. Assign package pins in user constraints view or add .ucf file for existing project.
viii. Run the implement design part to get the overall synthesis report.
ix. Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
x. Check the output by varying the corresponding switches.
1
Page
HALF ADDER:
LOGIC DIAGRAM:
TRUTH TABLE:
--------------------------------------------------
2
Page
PROGRAM:
Half Adder:
Full Adder:
3
Page
FULL ADDER
LOGIC DIAGRAM:
TRUTH TABLE:
----------------------------------------------
Input1 Input2 C_in Sum C_out
--------------------------------------------------
0 0 0 0 0
0 0 1 1 0 \
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
SIMULATED WAVEFORM:
4
Page
RESULT:
5
Thus, the simulation of Half adder & Full Adder using Verilog HDL was performed and output
Page
6
Page
Expt. No:2 DESIGN AN 8 BIT ADDER USING VERILOG HDL
Date :
AIM:
To Design the 8-bit adder using Verilog HDL. Simulate it using Xilinx Software
and implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
i. Open Xilinx ISE software and create a project folder in a desired directory.
ii. Now, right click on project as New source add a Verilog HDL Module and name it
accordingly.
iii. Type the Verilog coding in the source page and save it to the directory.
iv. Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
v. Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
vi. Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
vii. Assign package pins in user constraints view or add .ucf file for existing project.
viii. Run the implement design part to get the over all synthesis report.
ix. Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
x. Check the output by varying the corresponding switches.
7
Page
SIMULATED WAVEFORM FOR 8-BIT ADDER:
8
Page
PROGRAM:
wire w1,w2,w3;
Page 10
xor G1(w1, X, Y);
xor G2(S, w1, Ci);
and G3(w2, w1, Ci);
and G4(w3, X, Y);
or G5(Co, w2, w3);
endmodule
11
Page
Page 12
RESULT:
Thus, the simulation of 8 Bit adder using Verilog HDL was performed and output were verified
using XILINX FPGA.
13
Page
BLOCK DIAGRAM FOR 4 BIT MULTIPLIER
14
Page
Expt. No:3 DESIGN OF 4 BIT MULTIPLIER DESIGN
Date :
AIM:
To Design the 4-bit multiplier using Verilog HDL. Simulate it using Xilinx
Software and implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
PROCEDURE:
xi. Open Xilinx ISE software and create a project folder in a desired directory.
xii. Now, right click on project as New source add a Verilog HDL Module and name it
accordingly.
xiii. Type the Verilog coding in the source page and save it to the directory.
xiv. Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
xv. Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
xvi. Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
xvii. Assign package pins in user constraints view or add .ucf file for existing project.
xviii. Run the implement design part to get the over all synthesis report.
xix. Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
xx. Check the output by varying the corresponding switches.
15
Page
SIMULATED WAVEFORM FOR 4 BIT MULTIPLIER:
16
Page
PROGRAM:
Behavioral Modelling
Structural Modelling
module array4x4(a,b,p);
//inputs
input [3:0]a,b;
//outputs
output [7:0]p;
//wires
wire [39:0]w;
//andgate instantiations
and a1(w[0],a[0],b[0]);
and a2(w[1],a[1],b[0]);
and a3(w[2],a[2],b[0]);
and a4(w[3],a[3],b[0]);
and a5(w[4],a[0],b[1]);
and a6(w[5],a[1],b[1]);
and a7(w[6],a[2],b[1]);
and a8(w[7],a[3],b[1]);
and a9(w[8],a[0],b[2]);
and a10(w[9],a[1],b[2]);
and a11(w[10],a[2],b[2]);
and a12(w[11],a[3],b[2]);
and a13(w[12],a[0],b[3]);
and a14(w[13],a[1],b[3]);
and a15(w[14],a[2],b[3]);
and a16(w[15],a[3],b[3]);
assign p[0]=w[0];
//full adders instatiations
fulladder a17(1'b0,w[1],w[4],w[16],w[17]);
fulladder a18(1'b0,w[2],w[5],w[18],w[19]);
fulladder a19(1'b0,w[3],w[6],w[20],w[21]);
17
fulladder a20(w[8],w[17],w[18],w[22],w[23]);
Page
Page 18
fulladder a21(w[9],w[19],w[20],w[24],w[25]);
fulladder a22(w[10],w[7],w[21],w[26],w[27]);
fulladder a23(w[12],w[23],w[24],w[28],w[29]);
fulladder a24(w[13],w[25],w[26],w[30],w[31]);
fulladder a25(w[14],w[11],w[27],w[32],w[33]);
fulladder a26(1'b0,w[29],w[30],w[34],w[35]);
fulladder a27(w[31],w[32],w[35],w[36],w[37]);
fulladder a28(w[15],w[33],w[37],w[38],w[39]);
//output assignments
assign p[1]=w[16];
assign p[2]=w[22];
assign p[3]=w[28];
assign p[4]=w[34];
assign p[5]=w[36];
assign p[6]=w[38];
assign p[7]=w[39];
endmodule
FULL ADDER
module fulladder(a,b,c,s,ca);
//inputs
input a,b,c;
//outputs
output s,ca;
RESULT:
Thus, the simulation of 4 Bit multiplier using Verilog HDL was performed and output were
19
20
Page
Expt. No:4 DESIGN OF 8 BIT ALU
Date :
AIM:
To Design the 8-bit ALU using Verilog HDL. Simulate it using Xilinx Software
and implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
i. Open Xilinx ISE software and create a project folder in a desired directory.
ii. Now, right click on project as New source add a Verilog HDL Module and name it
accordingly.
iii. Type the Verilog coding in the source page and save it to the directory.
iv. Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
v. Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
vi. Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
vii. Assign package pins in user constraints view or add .ucf file for existing project.
viii. Run the implement design part to get the over all synthesis report.
ix. Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
x. Check the output by varying the corresponding switches.
21
Page
Output Waveform
22
Page
Program
module alu(
);
always @(*)
begin
case(ALU_Sel)
4'b0000: // Addition
ALU_Result = A + B ;
4'b0001: // Subtraction
ALU_Result = A - B ;
4'b0010: // Multiplication
ALU_Result = A * B;
4'b0011: // Division
ALU_Result = A/B;
ALU_Result = A<<1;
23
ALU_Result = A>>1;
Page 24
4'b0110: // Rotate left
ALU_Result = {A[6:0],A[7]};
ALU_Result = {A[0],A[7:1]};
ALU_Result = A & B;
4'b1001: // Logical or
ALU_Result = A | B;
ALU_Result = A ^ B;
ALU_Result = (A>B)?8'd1:8'd0 ;
ALU_Result = (A==B)?8'd1:8'd0 ;
default: ALU_Result = A + B ;
endcase
end
endmodule
25
Page
Page 26
RESULT:
Thus, the simulation of 8-bit ALU using Verilog HDL was performed and output were verified
using XILINX FPGA.
27
Page
BLOCK DIAGRAM FOR UNIVERSAL SHIFT REGISTER:
Design Description
28
Page
Expt. No:5 UNIVERSAL SHIFT REGISTER DESIGN
Date :
AIM:
To Design the Universal shift register using Verilog HDL. Simulate it using Xilinx
Software and implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
PROCEDURE:
i. Open Xilinx ISE software and create a project folder in a desired directory.
ii. Now, right click on project as New source add a Verilog HDL Module and name it
accordingly.
iii. Type the Verilog coding in the source page and save it to the directory.
iv. Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
v. Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
vi. Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
vii. Assign package pins in user constraints view or add .ucf file for existing project.
viii. Run the implement design part to get the over all synthesis report.
ix. Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
x. Check the output by varying the corresponding switches.
29
Page
SIMULATED WAVEFORM FOR UNIVERSAL SHIFT REGISTER:
30
Page
PROGRAM:
reg [7:0]temp;
RESULT:
31
Thus, the simulation of Universal Shift Register using Verilog HDL was performed and output
were verified using XILINX FPGA.
Page
MOORE STATE MACHINE STATE DIAGRAM
32
Page
Expt. No:6 DESIGN OF FINITE STATE MACHINE
Date :
AIM:
To Design the finite state machine using Verilog HDL. Simulate it using Xilinx
Software and implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
PROCEDURE:
i. Open Xilinx ISE software and create a project folder in a desired directory.
ii. Now, right click on project as New source add a Verilog HDL Module and name it
accordingly.
iii. Type the Verilog coding in the source page and save it to the directory.
iv. Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
v. Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
vi. Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
vii. Assign package pins in user constraints view or add .ucf file for existing project.
viii. Run the implement design part to get the over all synthesis report.
ix. Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
x. Check the output by varying the corresponding switches.
33
Page
SIMULATED WAVEFORM FOR MOORE MACHINE
34
Page
PROGRAM
MOORE MACHINE:
37
Page
Page 38
PROGRAM
MEALY MACHINE:
2'b01: begin
if( inp ) begin
state <= 2'b00;
outp <= 1;
end
else begin
state <= 2'b10;
outp <= 0;
end
end
2'b10: begin
39
end
end
default: begin
state <= 2'b00;
outp <= 0;
end
endcase
end
end
endmodule
RESULT:
Thus, the simulation of Moore and Mealy State Machine using Verilog HDL was performed
and output were verified using XILINX FPGA.
41
Page
Page 42
Expt. No:7 DESIGN OF MEMORY
Date :
AIM:
To Design the memory using Verilog HDL. Simulate it using Xilinx Software and
implement by Xilinx FPGA.
APPARATUS REQUIRED:
Desktop Computer.
XILINX Software.
Spartan FPGA Trainer Kit
PROCEDURE:
PROCEDURE:
i) Open Xilinx ISE software and create a project folder in a desired directory.
ii) Now, right click on project as New source add a Verilog HDL Module and name it
accordingly.
iii) Type the Verilog coding in the source page and save it to the directory.
iv) Now, check the syntax in Xilinx ISE Simulator, and succeed with no errors, if any just
correct the errors and rerun the process.
v) Now, choose on views, simulation then simulate the behavioral model and force the
constant values to the inputs and run the signals or add a test bench file for existing project.
vi) Check the signals accordingly for the procedure written in verilog HDL coding and view
the RTL-Schematic in implementation type view for the functional coding achieved.
vii) Assign package pins in user constraints view or add .ucf file for existing project.
viii) Run the implement design part to get the over all synthesis report.
ix) Run the generate programming file. Add the bit file to the device by connecting PC to
trainer kit using JTAG.
x) Check the output by varying the corresponding switches.
43
Page
SIMULATED WAVEFORM OF MEMORY
44
Page
PROGRAM:
always@(posedge clk)
begin
if(rd_en)
data_out = memory[address];
else if (wr_en)
memory[address] = data;
else data_out = 4'bx;
end
endmodule
45
Page
Page 46
RESULT:
Thus, the simulation of memory using Verilog HDL was performed and output were verified
using XILINX FPGA.
47
Page
INVERTER
Schematic:
48
Page
Exp.8 Automatic Layout Generation of CMOS Inverter
Date :
Aim:
To design the CMOS inverter circuit using microwind and perform the automatic layout
generation.
Tools Required:
Microwind DSCH
Microwind 3.1
Procedure:
49
Page
Layout Generation for CMOS Inverter
50
Page
RESULT:
Thus, the CMOS inverter circuit have designed using micro wind and performed the automatic
layout generation.
51
Page
CMOS NAND GATE
Schematic:
52
Page
Exp.9 Automatic Layout Generation of Gates and Flipflops
Date:
Aim:
To design the CMOS Gates and Flipflops using microwind and perform the automatic layout
generation.
Tools Required:
Microwind DSCH
Microwind 3.1
Procedure:
53
Page
Input Output Waveforms:
54
Page
Page 55
Layout Generation for CMOS NAND
Schematic:
56
Page
Page 57
Input Output Waveforms:
58
Page
Page 59
D FLipflop
Schematic:
60
Page
Page 61
Layout Generation for D FLipflop
62
Page
RESULT:
Thus, the gates and flipflops have designed using micro wind and performed the automatic
layout generation.
63
Page
4-bit Synchronous Counter Schematic:
64
Page
Exp.10 Automatic Layout Generation of 4-bit synchronous counter
Aim:
To design the 4-bit synchronous counter circuit using microwind and perform the automatic
layout generation.
Tools Required:
Microwind DSCH
Microwind 3.1
Procedure:
65
Page
Input Output Waveforms:
66
Page
RESULT:
Thus, the 4-bit synchronous counter have designed using micro wind and performed the
automatic layout generation
67
Page
INVERTER
Schematic:
68
Page
Exp.11 SPICE SIMUALTION OF CMOS INVERTING AMPLIFIER
Aim:
To design the CMOS inverting amplifier using microwind and observe the DC,transisent
responses, calculate CMRR.
Tools Required:
Microwind DSCH
Microwind 3.1
Procedure:
69
Page
Page 70
RESULT:
Thus, the simple CMOS inverting amplifier was designed, DC and transient analysis were done,
and CMRR was obtained from the results.
71
Page
MOS Differential amplifier:
Circuit:
72
Page
Exp.12 SPICE SIMUALTION OF MOS DIFFERENTIAL AMPLIFIER.
Aim:
To design the MOS Differential amplifier using microwind and observe the DC,transisent
responses, calculate CMRR.
Tools Required:
Microwind DSCH
Microwind 3.1
Procedure:
73
Page
Frequency response :
74
Page
RESULT:
Thus, the simple MOS Differential amplifier was designed, DC and transient analysis were done,
and CMRR was obtained from the results.
75
Page
RING OSCILLATOR SCHEMTIC AND TIMING DIAGRAM:
76
Page
Exp.13 SIMULATION AND AUTOMATIC LAYOUT GENERATION OF
OSCILLATOR
Aim:
To design ring oscillator, simulate, generate layout and extract the parasitic elements.
Tools Required:
Microwind DSCH
Microwind 3.1
Procedure:
77
Page
PARASTIC EXTRACTION:
Input node
Output node:
78
Page
Result:
Thus ring oscillator was designed and verified in DSCH, layout was generated automatically and
parasitic extraction was done.
79
Page