Forum Discussion
localparam and parameter values in Synthesis report
I am writing a parameterized Verilog module. In the module I calculate some localparam values using the parameter valued passed. Please seed the code below for example. I want to know the values calculated for localparam during synthesis. But I cannot find that information in reports shown in the Quartus Prime software. I am using Quartus Prime Lite edition.
Where can I find that information?
module Counter #(CLOCK_FREQUENCY=25000000,TIME=1000000)(
input Clk,
input Start,
output reg End
);
localparam megs = (CLOCK_FREQUENCY/1000000)*TIME;
10 Replies
- KhaiChein_Y_Intel
Regular Contributor
Hi,
Have you tried to simulate the design?
Thanks
Best regards,
KhaiY
- BSuma
New Contributor
No, I didn't try to simulate it.
But, the code synthesizes and works when programmed to an FPGA chip.
- KhaiChein_Y_Intel
Regular Contributor
Hi,
You may check the parameter value in Processing > Compilation Report > Synthesis > Parameter Settings by Entity Instance > Parameter Settings for XX.
Thanks
Best regards,
KhaiY
- KhaiChein_Y_Intel
Regular Contributor
Attached is the screenshot.
- KhaiChein_Y_Intel
Regular Contributor
- KhaiChein_Y_Intel
Regular Contributor
Hi,
We do not receive any response from you to the previous question/reply/answer that I have provided. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you
Best regards,
KhaiY
- cblixt1
Occasional Contributor
This is an old thread, but I found it because I have the same question. I may have a large number of localparams in a verilog module with complicated expressions. I would like to ensure that all of them are calculated as I expect, that I got operator precedence, rounding and such right.
Now since Quartus calculates all these localparams at some point, it would be very useful to be able to see the result in a report. I tried Parameter Settings by Entity Instance, but it only shows parameters, not localparams.
I would really not have to set up a simulation just to be able to see values that are already computed. Is there a way to see them? Would changing them from localparams to parameters (temporarily) do the trick?
- ShengN_altera
Super Contributor
Only parameter will show in report. Yes, you can change localparams to parameters. If you want to use both localparam and parameter, you can use mix approach by specifying localparam equal to the parameter.
- cblixt1
Occasional Contributor
Well, take it as a suggestion for improvement then.
Using localparam instead of parameter is a way to protect constants from inadvertently being modified by instantiation, so assigning them from parameters is pointless. I tried to temporarily change localparams to parameters and that works, but it is of course tedious.
Also the display in Parameter Settings by Entity Instance is not the best, with some parameters (for some reason) being of the type unsigned binary being displayed in binary rather than decimal or hexadecimal.