• 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. Mixed-Signal Design
  3. Want to assign a variable for a "string parameter" of veriloga...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 64
  • Views 6485
  • 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

Want to assign a variable for a "string parameter" of veriloga block

fatcat1206
fatcat1206 over 9 years ago

Hi All

In a veriloga block, I define a "string" parameter (test_mode)

When instantiate this veriloga block, I want to assign a variable (testMode) for this "string" parameter.

Then I can use this variable in the ADEXL.

However, when generating the netlist, the "variable" itself has been consider as the value for the veriloga "string" parameter.

below is part of the netlist for defining the parameter for the veriloga block

test_mode="testMode"

The problem is clear, the quotation mark makes the variable to be a string value.

Does anyone knows a solution for this?

Best Regards

Yi

  • Cancel
  • fatcat1206
    fatcat1206 over 9 years ago

    Hi All

    I have found a solution inside the community

    http://community.cadence.com/cadence_technology_forums/f/92/t/27120

    below is the content of that post, thanks Soner for the solution, it also works at my place

    "Here is a workaround: 

    1) Ensure that the parameter is defined in the CDF as parseAsCEL=yes

    2) Edit object properties of the instance, type pPar("myVariable")

    myVariable shows up as a design variable in ADE XL." 

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • sergeiGorbikov
    sergeiGorbikov over 4 years ago
    1) the CDF parameter must have the property "parseAsCEL=yes"
    2) input 'pPar("myVariable")' to the CDF parameter field in the Edit Object Properties window
    3) create the design variable "myVariable" in the ADE
    works like a charm
    doesn't work if 'VAR("myVariable")' is input what is surprising
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to sergeiGorbikov

    The expressions on CDF parameters are "AEL" (or "CEL") and not SKILL expressions. pPar() is an AEL function, and VAR is a SKILL function. You can't put arbitrary SKILL functions in CDF parameters - which is why it doesn't work - only a limited set of expressions are possible (because they generally need to be supported by the simulator, with some level of translation of syntax); the AEL language is constrained enough that this is possible; SKILL is too general purpose and powerful that would make translating to something that makes sense in a simulator very hard.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • sergeiGorbikov
    sergeiGorbikov over 4 years ago in reply to Andrew Beckett

    Dear Andrew, thank you for clarification

    • 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