-
Notifications
You must be signed in to change notification settings - Fork 983
Closed as duplicate of#3426
Closed as duplicate of#3426
Copy link
Labels
pending-verificationThis issue is pending verification and/or reproductionThis issue is pending verification and/or reproduction
Description
Version
Yosys 0.54 (git sha1 db72ec3, g++ 12.2.0-14+deb12u1 -fPIC -O3)
On which OS did this happen?
Linux
Reproduction Steps
read_verilog -sv <<EOT
module simple_sub (
input logic [7:0] a,
input logic [7:0] b,
output logic [7:0] a_out,
output logic [7:0] b_out,
output logic [7:0] diff
);
wire [7:0] conflict_wire;
assign a_out = a;
assign b_out = b;
assign conflict_wire = b;
assign conflict_wire = a;
assign diff = a - b;
always_comb assert(b != a);
endmodule
module top;
logic [7:0] a, b, a_out, b_out, diff;
assign a = 8'hAA;
assign b = 8'h55;
simple_sub dut (
.a(a),
.b(b),
.a_out(a_out),
.b_out(b_out),
.diff(diff)
);
endmodule
EOT
prep -top top
chformal -lower
select simple_sub
sat -prove-asserts -verify
Tried to write a yosys script to simplify reproduction of bug, (hopefully it is correct 😅)
Expected Behavior
I don't really know (I thought I would mention it as this behaviour surprised me), I would have thought that for conflict_wire
the value could be either that of a
or that of b
but I would have thought that the inputs are not modified in the module.
Actual Behavior
module simple_sub(a, b, a_out, b_out, diff);
input [7:0] a;
wire [7:0] a;
output [7:0] a_out;
wire [7:0] a_out;
input [7:0] b;
wire [7:0] b;
output [7:0] b_out;
wire [7:0] b_out;
wire [7:0] conflict_wire;
output [7:0] diff;
wire [7:0] diff;
assign diff = a - a;
assign a_out = a;
assign b = a;
assign b_out = a;
assign conflict_wire = a;
endmodule
b
is assigned the value of a
Metadata
Metadata
Assignees
Labels
pending-verificationThis issue is pending verification and/or reproductionThis issue is pending verification and/or reproduction