#3 xprop mistakenly changes the signedness of expressions

open
nobody
None
5
2011-09-04
2011-09-04
Anonymous
No

xprop is a powerful tool. I like it very much. It would be even better if you can fix the following bug.

xprop always appends unsigned x, which changes the signedness of the original expressions and may introduce severe bugs into the design.
Please append signed x (e.g. 'shx) instead, which should be safe for all expressions (both signed and unsigned). Or please at least add a switch to enable the v2k users to do so.

For example, in the following code, o is 3 in the original design, but the xprop generated code will give 1.

module dut;

wire signed [1:0] a = 2'h2;
wire signed [1:0] b = 2'h2;
wire c = 1'b1;

wire signed [1:0] o = c ? (a >>> 1) : ~c ? (b >>> 1) : 2'hx; // o=1, which is incorrect. change 2'hx to 2'shx to fix this issue.

initial #10 $display("o=%x", o);

endmodule

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks