Fixed unconnected wires/ports
This commit is contained in:
@@ -851,7 +851,7 @@ module register_tb();
|
|||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module shift_left(
|
module shift_left(
|
||||||
input wire [8:0] A,
|
input wire [7:0] A,
|
||||||
output wire [8:0] B);
|
output wire [8:0] B);
|
||||||
|
|
||||||
assign B = {A[7:0],1'b0};
|
assign B = {A[7:0],1'b0};
|
||||||
@@ -887,20 +887,20 @@ module shift_left_tb();
|
|||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module shift_right_logical(
|
module shift_right_arithmetic(
|
||||||
input wire [8:0] A,
|
input wire [8:1] A,
|
||||||
output wire [8:0] B);
|
output wire [8:0] B);
|
||||||
|
|
||||||
assign B = {1'b0,A[8:1]};
|
assign B = {A[8],A[8:1]};
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
//testbench
|
//testbench
|
||||||
module shift_right_logical_tb();
|
module shift_right_arithmetic_tb();
|
||||||
reg [8:0] a;
|
reg [8:0] a;
|
||||||
wire [8:0] b;
|
wire [8:0] b;
|
||||||
|
|
||||||
shift_right_logical tb0(
|
shift_right_arithmetic tb0(
|
||||||
.A(a),
|
.A(a),
|
||||||
.B(b));
|
.B(b));
|
||||||
|
|
||||||
@@ -924,21 +924,21 @@ module shift_right_logical_tb();
|
|||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module shift_right_arithmetic(
|
module shift_right_logical(
|
||||||
input wire [8:0] A,
|
input wire [8:1] A,
|
||||||
output wire [8:0] B);
|
output wire [8:0] B);
|
||||||
|
|
||||||
assign B = {A[8],A[8:1]};
|
assign B = {1'b0,A[8:1]};
|
||||||
|
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
|
||||||
//testbench
|
//testbench
|
||||||
module shift_right_arithmetic_tb();
|
module shift_right_logical_tb();
|
||||||
reg [8:0] a;
|
reg [8:0] a;
|
||||||
wire [8:0] b;
|
wire [8:0] b;
|
||||||
|
|
||||||
shift_right_arithmetic tb0(
|
shift_right_logical tb0(
|
||||||
.A(a),
|
.A(a),
|
||||||
.B(b));
|
.B(b));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user