Commit 4d0182cb by SergeyDegtyar

Fix failed tests

parent 897d1f1d
...@@ -24,24 +24,22 @@ module testbench; ...@@ -24,24 +24,22 @@ module testbench;
); );
//assign poutA = in[3:0] % in[7:4];
assign poutB = in[3:0] / in[7:4]; assign poutB = in[3:0] / in[7:4];
//check_comb mod_test(outA, poutA); check_comb div_test(in[7:4], outB, poutB);
check_comb div_test(outB, poutB);
assert_comb div2_test(outB[2], poutB[2]);
endmodule endmodule
module check_comb(input [3:0] test, input [3:0] pat); module check_comb(input [3:0] div, input [3:0] test, input [3:0] pat);
always @* always @*
begin begin
#1; #1;
if (test !== pat) if (div != 4'b0000)
begin if (test !== pat)
$display("ERROR: ASSERTION FAILED in %m:",$time," ",test," ",pat); begin
$stop; $display("ERROR: ASSERTION FAILED in %m:",$time," ",test," ",pat);
end $stop;
end
end end
endmodule endmodule
...@@ -7,7 +7,6 @@ module top ...@@ -7,7 +7,6 @@ module top
output [3:0] B output [3:0] B
); );
//assign A = x % y;
assign B = x / y; assign B = x / y;
endmodule endmodule
read_verilog -sv ../top.v
aigmap
write_aiger aiger.aiger
design -reset
read_aiger -map aig.map aiger.aiger
design -reset
read_verilog -sv ../top.v
synth -top top
write_verilog synth.v
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment