I have a system verilog comparison as follows.
module m();
int count = 4;
logic [3:0] first = 14;
logic [3:0] second = 15;
initial begin
$display("Second %b\n", {count{1'b1}});
if(first == {count{1'b1}}) $display("FIRST Equals\n");
else $display("FIRST Not equal %b and %b\n", first, {count{1'b1}});
if(second == {count{1'b1}}) $display("SECOND Equals\n");
else $display("SECOND Not equal %b and %b\n", second, {count{1'b1}});
end
endmodule
This is the output
Second 1
FIRST Not equal 1110 and 1
SECOND Equals
What I did not understand is the print statements Second 1 and FIRST Not equal 1110 and 1
Why is it printing 1 instead of 1111?
`define count 4and then using`countwork? - J Reid