SlideShare une entreprise Scribd logo
1  sur  11
Implementation of ALU in
Verilog
Design an 8-bit ALU in Verilog which performs following
operations.
AND
OR
XOR
NOT
NAND
NOR
A+B
A-B
Logical shift left
Logical shift right
Comparison (A>B, A<B, A=B)
Also write its Test Fixture.
You have to submit project report in proper format. Your report
includes description of ALU and all operations, Verilog module
code, Verilog Test Fixture code, Synthesize report and figures of
Test Fixture waveform. Last date for report submission and viva
is 17th
May 2013.
Good Luck 
Verilog module code
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 23:18:01 05/12/2013
// Design Name:
// Module Name: Eight_bit_alu
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Eight_bit_alu(A,B,operation,out,flag_greater,flag_less,flag_equal);
output [7:0]out;
input[7:0]A,B;
input[3:0]operation;
output flag_greater,flag_less,flag_equal;
reg flag_greater,flag_less,flag_equal;
reg [7:0] out;
always @(operation or A or B)
begin
if(operation==4'b0000)
out=A+B;
else if(operation==4'b0001)
out=A-B;
else if(operation==4'b0010)
out=A&B;
else if(operation==4'b0011)
out=A|B;
else if(operation==4'b0100)
out=A^B;
else if(operation==4'b0101)
out=~A;
else if(operation==4'b0110)
out=~(A&B);
else if(operation==4'b0111)
out=~(A|B);
else if(operation==4'b1000)
out=A>>B;
else if(operation==4'b1001)
out=A<<B;
if(A==B)
flag_equal=1;
else
flag_equal=0;
if(A<B)
flag_less=1;
else
flag_less=0;
if(A>B)
flag_greater=1;
else
flag_greater=0;
end
endmodule
Text fixture code:
` `timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 02:03:52 05/16/2013
// Design Name: Eight_bit_alu
// Module Name: D:/ayeen/Eight_bit.v
// Project Name: ayeen
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: Eight_bit_alu
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module Eight_bit;
// Inputs
reg [7:0] A;
reg [7:0] B;
reg [3:0] operation;
// Outputs
wire [7:0] out;
wire flag_greater;
wire flag_less;
wire flag_equal;
// Instantiate the Unit Under Test (UUT)
Eight_bit_alu uut (
.A(A),
.B(B),
.operation(operation),
.out(out),
.flag_greater(flag_greater),
.flag_less(flag_less),
.flag_equal(flag_equal)
);
initial begin
// Initialize Inputs
A = 1;
B = 0;
operation = 0;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 1;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 2;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 3;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 4;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
A = 1;
B = 0;
operation = 5;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 6;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 6;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 7;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 8;
// Wait 100 ns for global reset to finish
#100;
A = 1;
B = 0;
operation = 9;
// Wait 100 ns for global reset to finish
#100;
end
endmodule
simulation

Contenu connexe

Tendances

All VLSI programs
All VLSI programsAll VLSI programs
All VLSI programs
Gouthaman V
 
Vlsilab13
Vlsilab13Vlsilab13
Vlsilab13
Krish s
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Irfan Qadoos
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Hsien-Hsin Sean Lee, Ph.D.
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
Ron Liu
 
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_countersEceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Nebiyu Musie
 

Tendances (20)

VERILOG CODE
VERILOG CODEVERILOG CODE
VERILOG CODE
 
Embedded system design psoc lab report
Embedded system design psoc lab reportEmbedded system design psoc lab report
Embedded system design psoc lab report
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
 
All VLSI programs
All VLSI programsAll VLSI programs
All VLSI programs
 
Vlsilab13
Vlsilab13Vlsilab13
Vlsilab13
 
Sequential Logic Circuits
Sequential Logic CircuitsSequential Logic Circuits
Sequential Logic Circuits
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
 
Functions for Nano 5 Card
Functions for Nano 5 CardFunctions for Nano 5 Card
Functions for Nano 5 Card
 
Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
 
FYP_DCS_seminar
FYP_DCS_seminarFYP_DCS_seminar
FYP_DCS_seminar
 
Dsd lab Practical File
Dsd lab Practical FileDsd lab Practical File
Dsd lab Practical File
 
Vhdl lab manual
Vhdl lab manualVhdl lab manual
Vhdl lab manual
 
VHDL Programs
VHDL ProgramsVHDL Programs
VHDL Programs
 
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
Lec3 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- CMO...
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
 
Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manual
 
VLSI lab manual
VLSI lab manualVLSI lab manual
VLSI lab manual
 
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_countersEceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
 

En vedette

ECE_467_Final_Project_Report
ECE_467_Final_Project_ReportECE_467_Final_Project_Report
ECE_467_Final_Project_Report
Sidharth Kumar
 

En vedette (10)

8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
 
ECE_467_Final_Project_Report
ECE_467_Final_Project_ReportECE_467_Final_Project_Report
ECE_467_Final_Project_Report
 
8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
 
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
 
FPGA Verilog Processor Design
FPGA Verilog Processor DesignFPGA Verilog Processor Design
FPGA Verilog Processor Design
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 
Verilog codes and testbench codes for basic digital electronic circuits.
Verilog codes and testbench codes for basic digital electronic circuits. Verilog codes and testbench codes for basic digital electronic circuits.
Verilog codes and testbench codes for basic digital electronic circuits.
 
8 bit single cycle processor
8 bit single cycle processor8 bit single cycle processor
8 bit single cycle processor
 
Design and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilogDesign and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilog
 
Programs of VHDL
Programs of VHDLPrograms of VHDL
Programs of VHDL
 

Similaire à Alu description[1]

Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
Abhiraj Bohra
 
Vlsi lab manual exp:1
Vlsi lab manual exp:1Vlsi lab manual exp:1
Vlsi lab manual exp:1
komala vani
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Robot Media
 

Similaire à Alu description[1] (20)

vlsi design using verilog presentaion 1
vlsi design using verilog   presentaion 1vlsi design using verilog   presentaion 1
vlsi design using verilog presentaion 1
 
Verilog Lecture2 thhts
Verilog Lecture2 thhtsVerilog Lecture2 thhts
Verilog Lecture2 thhts
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Fpga 04-verilog-programming
Fpga 04-verilog-programmingFpga 04-verilog-programming
Fpga 04-verilog-programming
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Vlsi lab manual exp:1
Vlsi lab manual exp:1Vlsi lab manual exp:1
Vlsi lab manual exp:1
 
Sankula
SankulaSankula
Sankula
 
Implementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphoresImplementing of classical synchronization problem by using semaphores
Implementing of classical synchronization problem by using semaphores
 
verilog
verilogverilog
verilog
 
Verilog lab mauual
Verilog lab mauualVerilog lab mauual
Verilog lab mauual
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)
 
Verilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSVerilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONS
 
SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2SKEL 4273 CAD with HDL Topic 2
SKEL 4273 CAD with HDL Topic 2
 
Building Hierarchy
Building HierarchyBuilding Hierarchy
Building Hierarchy
 
A Verilog HDL Test Bench Primer
A Verilog HDL Test Bench PrimerA Verilog HDL Test Bench Primer
A Verilog HDL Test Bench Primer
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functions
 
DeVry GSP 115 All Assignments latest
DeVry GSP 115 All Assignments latestDeVry GSP 115 All Assignments latest
DeVry GSP 115 All Assignments latest
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
 

Dernier

sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girlsbhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
mountabuangels4u
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
mountabuangels4u
 

Dernier (20)

sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girlsbhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
 
Overview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractionsOverview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractions
 
ITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomadsITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomads
 
Top places to visit, top tourist destinations
Top places to visit, top tourist destinationsTop places to visit, top tourist destinations
Top places to visit, top tourist destinations
 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdf
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Udhampur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Udhampur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelUdhampur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Udhampur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
 
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot ModelBirbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
abortion pills in Riyadh+966572737505 Cytotec Riyadh
abortion pills in  Riyadh+966572737505    Cytotec Riyadhabortion pills in  Riyadh+966572737505    Cytotec Riyadh
abortion pills in Riyadh+966572737505 Cytotec Riyadh
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
Tehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Tehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot ModelTehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Tehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Kashipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Kashipur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelKashipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Kashipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Dimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Dimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Dimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Siliguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Siliguri Call Girls 🥰 8617370543 Service Offer VIP Hot ModelSiliguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Siliguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Sun World Bana Hills, Vienam Part 2 (越南 巴拿山太陽世界 下集).ppsx
Sun World Bana Hills, Vienam Part 2  (越南 巴拿山太陽世界 下集).ppsxSun World Bana Hills, Vienam Part 2  (越南 巴拿山太陽世界 下集).ppsx
Sun World Bana Hills, Vienam Part 2 (越南 巴拿山太陽世界 下集).ppsx
 
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot ModelHowrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Nainital Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Nainital Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNainital Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Nainital Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Alu description[1]

  • 1. Implementation of ALU in Verilog Design an 8-bit ALU in Verilog which performs following operations. AND OR XOR NOT NAND NOR A+B A-B Logical shift left Logical shift right Comparison (A>B, A<B, A=B) Also write its Test Fixture. You have to submit project report in proper format. Your report includes description of ALU and all operations, Verilog module code, Verilog Test Fixture code, Synthesize report and figures of Test Fixture waveform. Last date for report submission and viva is 17th May 2013.
  • 2. Good Luck  Verilog module code `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 23:18:01 05/12/2013 // Design Name: // Module Name: Eight_bit_alu // Project Name: // Target Devices: // Tool versions: // Description: //
  • 3. // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// module Eight_bit_alu(A,B,operation,out,flag_greater,flag_less,flag_equal); output [7:0]out; input[7:0]A,B; input[3:0]operation; output flag_greater,flag_less,flag_equal; reg flag_greater,flag_less,flag_equal; reg [7:0] out; always @(operation or A or B) begin if(operation==4'b0000) out=A+B; else if(operation==4'b0001) out=A-B; else if(operation==4'b0010) out=A&B; else if(operation==4'b0011) out=A|B; else if(operation==4'b0100) out=A^B; else if(operation==4'b0101) out=~A;
  • 4. else if(operation==4'b0110) out=~(A&B); else if(operation==4'b0111) out=~(A|B); else if(operation==4'b1000) out=A>>B; else if(operation==4'b1001) out=A<<B; if(A==B) flag_equal=1; else flag_equal=0; if(A<B) flag_less=1; else flag_less=0; if(A>B) flag_greater=1; else flag_greater=0; end endmodule
  • 5. Text fixture code: ` `timescale 1ns / 1ps //////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 02:03:52 05/16/2013 // Design Name: Eight_bit_alu // Module Name: D:/ayeen/Eight_bit.v // Project Name: ayeen // Target Device: // Tool versions: // Description: // // Verilog Test Fixture created by ISE for module: Eight_bit_alu // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // //////////////////////////////////////////////////////////////////////////////// module Eight_bit; // Inputs
  • 6. reg [7:0] A; reg [7:0] B; reg [3:0] operation; // Outputs wire [7:0] out; wire flag_greater; wire flag_less; wire flag_equal; // Instantiate the Unit Under Test (UUT) Eight_bit_alu uut ( .A(A), .B(B), .operation(operation), .out(out), .flag_greater(flag_greater), .flag_less(flag_less), .flag_equal(flag_equal) ); initial begin // Initialize Inputs A = 1; B = 0; operation = 0; // Wait 100 ns for global reset to finish #100;
  • 7. A = 1; B = 0; operation = 1; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 2; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 3; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 4; // Wait 100 ns for global reset to finish #100; // Add stimulus here A = 1; B = 0;
  • 8. operation = 5; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 6; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 6; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 7; // Wait 100 ns for global reset to finish #100; A = 1; B = 0; operation = 8; // Wait 100 ns for global reset to finish #100;
  • 9. A = 1; B = 0; operation = 9; // Wait 100 ns for global reset to finish #100; end endmodule
  • 10.