Activated all testbenches
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* Need to allow for signed numbers
|
||||
* Remove subtraction from ALU
|
||||
* Have arithmetic shift left and right
|
||||
* Uncomment all testbenches
|
||||
* <strike>Uncomment all testbenches</strike>
|
||||
* We can have multiple testbenches active at once
|
||||
* Bitwise operations do not need a 1-bit implementation, modify 9-bit and keep it only
|
||||
* Comparator needed
|
||||
|
||||
@@ -62,47 +62,47 @@ module ALU(
|
||||
|
||||
endmodule
|
||||
|
||||
//testbench
|
||||
//module alu_tb();
|
||||
//reg [8:0] a;
|
||||
//reg [8:0] b;
|
||||
//reg [2:0] c;
|
||||
//wire [8:0] d;
|
||||
testbench
|
||||
module alu_tb();
|
||||
reg [8:0] a;
|
||||
reg [8:0] b;
|
||||
reg [2:0] c;
|
||||
wire [8:0] d;
|
||||
|
||||
//ALU alu0(
|
||||
//.operand0(a),
|
||||
//.operand1(b),
|
||||
//.opcode(c),
|
||||
//.result(d));
|
||||
ALU alu0(
|
||||
.operand0(a),
|
||||
.operand1(b),
|
||||
.opcode(c),
|
||||
.result(d));
|
||||
|
||||
// initial begin
|
||||
// a = 9'b000000111;
|
||||
// b = 9'b000111000;
|
||||
// c = 3'b000;
|
||||
// #5
|
||||
// a = 9'b000011000;
|
||||
// b = 9'b000011000;
|
||||
// c = 3'b001;
|
||||
// #5
|
||||
// a = 9'b101010100;
|
||||
// b = 9'b010101011;
|
||||
// c = 3'b010;
|
||||
// #5
|
||||
// a = 9'b101010100;
|
||||
// b = 9'b010101000;
|
||||
// c = 3'b011;
|
||||
// #5
|
||||
// a = 9'b000110000;
|
||||
// b = 9'b000111000;
|
||||
// c = 3'b100;
|
||||
// #5
|
||||
// a = 9'b01011000;
|
||||
// c = 3'b101;
|
||||
// #5
|
||||
// a = 9'b00001010;
|
||||
// c = 3'b110;
|
||||
// #5
|
||||
// #5 $finish;
|
||||
initial begin
|
||||
a = 9'b000000111;
|
||||
b = 9'b000111000;
|
||||
c = 3'b000;
|
||||
#5
|
||||
a = 9'b000011000;
|
||||
b = 9'b000011000;
|
||||
c = 3'b001;
|
||||
#5
|
||||
a = 9'b101010100;
|
||||
b = 9'b010101011;
|
||||
c = 3'b010;
|
||||
#5
|
||||
a = 9'b101010100;
|
||||
b = 9'b010101000;
|
||||
c = 3'b011;
|
||||
#5
|
||||
a = 9'b000110000;
|
||||
b = 9'b000111000;
|
||||
c = 3'b100;
|
||||
#5
|
||||
a = 9'b01011000;
|
||||
c = 3'b101;
|
||||
#5
|
||||
a = 9'b00001010;
|
||||
c = 3'b110;
|
||||
#5
|
||||
#5 $finish;
|
||||
|
||||
// end
|
||||
//endmodule
|
||||
end
|
||||
endmodule
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -85,7 +85,8 @@ FetchUnit fetchUnit0(
|
||||
#5
|
||||
#5
|
||||
#5
|
||||
#5 $finish;
|
||||
#5
|
||||
$finish;
|
||||
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user