Exp 1 - Vlsi Design Lab
Exp 1 - Vlsi Design Lab
DEPARTMENT OF ECE
STUDENT NAME :
REGISTER NUMBER :
INDEX
Program:
//Half Adder
module half_add(sum,carry,a,b);
input a,b;
output sum,carry;
xor(sum,a,b);
and(carry,a,b);
endmodule
Simulation Output: -
PROCEDURE:
Step 1: Start the Xilinx Project Navigator by using the desktop shortcut or by using the
Start Programs Xilinx 2020.1.
Step 2: Create a new project and Select File menu and then select New project.
Step3: Specify the project name and location in pop up window and click NEXT.
Step4: Select Device. Select the required family, device, package, speed grade, Synthesis tool
Simulator from new project wizard pop up window. Click NEXT. Project summary will be
displayed.
Step 5: Click FINISH to start Project.
Step6: To create new V file Right click on the device name and select NEW SOURCE
Step 7: Select VERILOG MODULE in NEW SOURCE WIZARD and give suitable name for the
Project. Click NEXT for the DEFINE MODULE Window Assign required ports in this Window.
Step 8: Write the Behavioural VERILOG Code in VERILOG Editor Sample code is given below for
this experiment.
Step 9: SIMULATION using ISE tool creating a test bench file and verify the operation of the
design
before
Program:
//half subtractor
module half_sub(diff,borrow,a,b);
input a,b;
output diff,borrow;
wire n1;
xor(diff,a,b);
not(n1,a);
and(borrow,n1,b);
endmodule
Simulation Output: -
PROGRAM:
//Full adder
module fulladd(a, b, cin, sum, cout);
input a,b,cin;
output sum,cout;
wire s1,a1,a2;
xor x2(s1,a,b);
xor x1(sum,s1,cin);
and an1(a1,a,b);
and an2(a2,cin,s1);
or r1(cout,a1,a2);
endmodule
Simulation Output: -
Program:
//Full subtractor
module fullsub(diff,borrow,a,b,c);
input a,b,c;
output diff,borrow;
wire s1,a1,a2,n1,n2;
not nn1(n1,a);
not nn2(n2,s1);
xor x1(s1,a,b); xor x2(diff,s1,c);
and an1(a1,a,b); and an2(a2,c,s1);
or r2(borrow,a1,a2);
endmodule
Simulation Output: -
Simulation Output: -