• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. Veriloga parameter expression

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 126
  • Views 17430
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Veriloga parameter expression

RobinCommander
RobinCommander over 7 years ago

In veriloga documentation I have seen examples where one parameter is used to set the default of another parameter in the same module.

When I tried this I found it didn't work in ADE/spectre. A simple example:

==============================

`include "constants.vams"
`include "disciplines.vams"

module test_param(n1, n2);
inout n1, n2;
electrical n1, n2;

parameter real myres = 1k;
parameter real twores = 2*myres;

analog begin

I(n1, n2) <+ V(n1, n2)/twores;

end

endmodule

========================

When I tried simulating this in a test bench, ADE added myres to the list of design variables to be set.

If I try running without setting a value I get an error:

Error found by spectre during hierarchy flattening.
ERROR (SFE-1997): "input.scs" 14: I0: parameter `twores': Cannot run the simulation because parameter 'myres' has been used but no value has been assigned to it. Assign a value to the parameter and rerun the simulation.

Is this a bug?

Thanks,

Robin

  • Cancel
Parents
  • vijaykpd
    vijaykpd over 7 years ago

    Dear Robin,

    Please refer the work around proposed by Andrew. I think you need to do the following steps

    Tools->CDF->Edit, pick "Base" CDF and edit the CDF of your cell (the one with the VerilogA model). Delete the myres parameter, and OK the forms

    Regards,

    Vijay

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • vijaykpd
    vijaykpd over 7 years ago

    Dear Robin,

    Please refer the work around proposed by Andrew. I think you need to do the following steps

    Tools->CDF->Edit, pick "Base" CDF and edit the CDF of your cell (the one with the VerilogA model). Delete the myres parameter, and OK the forms

    Regards,

    Vijay

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to vijaykpd

    Vijay, Robin,

    Note, you don't need to delete the parameter (in fact it's not the myres parameter that's really the problem). When the CDF for the component is created, it creates two CDF parameters with default values:

    myres: 1000
    twores: (2)*(myres)

    The issue is that when the component gets netlisted, it adds both of these parameters on the instance line - and then myres is in spectre's scope and it looks for a global parameter called that. 

    All you need to do is go to the Tools->CDF->Edit CDF in the CIW, pick "Base" and the test_param component, and then blank out the default value of twores. That will then mean that the default value is taken within the model, and the problem goes away.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RobinCommander
    RobinCommander over 7 years ago in reply to Andrew Beckett

    Vijay, Andrew,

    OK thanks, blanking the default for the derived parameters fixed the problem.

    I found I would need to do the CDF edit again if I changed the VerilogA, even just adding some comment lines, but not really an issue.

    Regards,

    Robin

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information