Commit 4d0182cb by SergeyDegtyar

Fix failed tests

parent 897d1f1d
...@@ -24,19 +24,17 @@ module testbench; ...@@ -24,19 +24,17 @@ 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 (div != 4'b0000)
if (test !== pat) if (test !== pat)
begin begin
$display("ERROR: ASSERTION FAILED in %m:",$time," ",test," ",pat); $display("ERROR: ASSERTION FAILED in %m:",$time," ",test," ",pat);
......
...@@ -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