Forum Discussion
Quartus compiler parameter expression evaluation with power operator (A**) faulty?
- 3 years ago
Hi,
Verilog LRM says
"Implementations may limit the maximum size of integer variables, but it shall be at least 32 bits."You see that Quartus apparently uses 32 bit integer but Modelsim most likely 64 bit. That's completely legal but must be considered.
Quartus gives an overflow warning for line 10, by the way.
The rest shouldn't happen according to Verilog language reference, I think. Looks a bug in parameter calculation, ignoring type proagation rules for real parameters.
This worked for me in Quartus 19.1localparam PHASE_RATE_5 = real'(F_C_HZ)/real'(F_S_HZ) * real'(2.0**N_BITS);
Hi Steve,
As far as I know there isn't a way to produce info messages on Quartus besides using $display.
Regards,
Nurina
- Steve-Mowbray-ENL3 years ago
Occasional Contributor
Hi Nurina
Sorry for late response I didn't receive any prompts about this thread for some reason - thanks for confirming that, I shall continue using $display() to generate console output messages as and when required
Regards
Steve