A
ajcrm125
Guest
If I ty something like this:
`define SIZE 5
wire msbs_are_zero;
wire [0:`SIZE-1] data;
// should result to:
//assign msbs_are_zero = (data[0:3] == 4'b0000);
assign msbs_are_zero = (data[0:`SIZE-2] == `SIZE-1'b0000);
I get an error like "redundant digits in numeric numeral" (MTI) or
"too many digits in binary" (Debussy) which leads me to believe the
2nd evaluation of `SIZE is not 5.
I know I can get around this by coding it differently but I coded it
specifically for testing a theory when the RTL failed formal
equivalence.
Any ideas what the compilers are doing here? Maybe there's something
in the standard I'm missing?
`define SIZE 5
wire msbs_are_zero;
wire [0:`SIZE-1] data;
// should result to:
//assign msbs_are_zero = (data[0:3] == 4'b0000);
assign msbs_are_zero = (data[0:`SIZE-2] == `SIZE-1'b0000);
I get an error like "redundant digits in numeric numeral" (MTI) or
"too many digits in binary" (Debussy) which leads me to believe the
2nd evaluation of `SIZE is not 5.
I know I can get around this by coding it differently but I coded it
specifically for testing a theory when the RTL failed formal
equivalence.
Any ideas what the compilers are doing here? Maybe there's something
in the standard I'm missing?