tests: update alu example
Update the alu example to actually compile.
@@ -4,7 +4,7 @@ module alu (
input bit op,
output int z
);
- always_comb begin
+ always @(a, b, op) begin
if (op == 0) begin
z = a + b;
end else begin
@@ -14,16 +14,17 @@ module alu (
endmodule
module top;
- int a, b, c;
+ int a, b, z;
bit op;
alu i_alu(a, b, op, z);
- initial repeat (8) begin
- a++;
- b++;
+ initial #1ns repeat (8) begin
+ a = a+2;
b++;
op = ~op;
#1ns;
+ op = ~op;
+ #1ns;
end
endmodule
