Forum Discussion

BSuma's avatar
BSuma
Icon for New Contributor rankNew Contributor
5 years ago

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

    • BSuma's avatar
      BSuma
      Icon for New Contributor rankNew Contributor

      No, I didn't try to simulate it.

      But, the code synthesizes and works when programmed to an FPGA chip.

  • KhaiChein_Y_Intel's avatar
    KhaiChein_Y_Intel
    Icon for Regular Contributor rankRegular 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's avatar
    KhaiChein_Y_Intel
    Icon for Regular Contributor rankRegular 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's avatar
    cblixt1
    Icon for Occasional Contributor rankOccasional 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's avatar
      ShengN_altera
      Icon for Super Contributor rankSuper 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's avatar
        cblixt1
        Icon for Occasional Contributor rankOccasional 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.