• 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. How to Pass a String Design Parameter to a Cell

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 12654
  • 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

How to Pass a String Design Parameter to a Cell

strat57
strat57 over 4 years ago

Hi, 

I am trying to pass a string design parameter, defined in ADE, to a cell in my schematic.  In my particular case, I have a verilog-A cell, which is a custom digital source, that uses a parameterized input waveform file.  The verilog-A code and CDF define this parameter (fname) as a string (path+filename of the playback file). If I set the cell's fname parameter to a fixed string like "/simulation/tmckeen/prbs_HV_driver_32x.txt", everything works great. 

However, when I define an ADE design variable called srcfname = "/simulation/tmckeen/prbs_HV_driver_32x.txt" and the set the cell parameter to srcfname, I get an error.  Why the error occurs can be seen in the netlist file below.  The srcfname design parameter is correct, but the instantiated cell U0 uses quotes around the fname parameter.  Somehow, I need to remove these quotes.

I thought there might be something like VAR("fname") that needs to be used in the cell parameter so the fname is evaluated before passing it to the verilog-A code.

 

parameters fsdiv2=1 fb=53.125G osr=32 CPW=60f \
spname="/home/user/mysync/cadence_PDK/Keystone/rfic_data/Tx/TOSA/Foton_EML_DE_022.s9p" \
srcfname="/simulation/tmckeen/prbs_HV_driver_32x.txt" fs=osr*fb Tb=1/fb \
Tsim=20*Tb Ts=1/fs


U0 (net7\<0\> net7\<1\> net7\<2\> net7\<3\> net7\<4\> net7\<5\> net7\<6\> \
net7\<7\> net7\<8\> net7\<9\> net7\<10\> net7\<11\> net7\<12\> \
net7\<13\> net7\<14\> net7\<15\> net7\<16\> net7\<17\> net7\<18\> \
net7\<19\> net7\<20\> net7\<21\> net7\<22\> net7\<23\> net7\<24\> \
net7\<25\> net7\<26\> net7\<27\> net7\<28\> net7\<29\> net7\<30\> \
net7\<31\> net7\<32\> net6\<0\> net6\<1\> net6\<2\> net6\<3\> \
net6\<4\> net6\<5\> net6\<6\> net6\<7\> net6\<8\> net6\<9\> \
net6\<10\> net6\<11\> net6\<12\> net6\<13\> net6\<14\> net6\<15\> \
net6\<16\> net6\<17\> net6\<18\> net6\<19\> net6\<20\> net6\<21\> \
net6\<22\> net6\<23\> net6\<24\> net6\<25\> net6\<26\> net6\<27\> \
net6\<28\> net6\<29\> net6\<30\> net6\<31\> net6\<32\> net1 0) \
key_dac_rdriver_osr baud=fb Rs=50 osr=osr fname="srcfname" \
cycle=1

Thanks

Trent

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Hi Trent,

    The issue is that the parameter will have been marked in the view-specific CDF to be a string parameter, in which case it will write it in the netlist with quotation marks around the fname parameter. There's not a good UI to alter this within Virtuoso, but with a short piece of SKILL, you can fix it:

    almGetStringParameterList("mylib" "key_dac_rdriver_osr" ?view "veriloga")

    (fname someOtherParam somethingElse)

    almSetStringParameterList("mylib" "key_dac_rdriver_osr" '(someOtherParam somethingElse) ?view "veriloga")

    (someOtherParam somethingElse)

    The first argument to each is the library in which it's stored, and the ?view is the view name for the model. The first function will return all the string parameters (I illustrated it with two additional parameters). The idea is that you call the "set" function with the same list but omitting the parameter you no longer want to be treated as specifically a string. If there are no other parameters, it's probably '() as the third argument to almSetStringParameterList.

    Then you can put srcfname in the fname field of the edit properties form, and it should get netlisted without the quotation marks.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Hi Trent,

    The issue is that the parameter will have been marked in the view-specific CDF to be a string parameter, in which case it will write it in the netlist with quotation marks around the fname parameter. There's not a good UI to alter this within Virtuoso, but with a short piece of SKILL, you can fix it:

    almGetStringParameterList("mylib" "key_dac_rdriver_osr" ?view "veriloga")

    (fname someOtherParam somethingElse)

    almSetStringParameterList("mylib" "key_dac_rdriver_osr" '(someOtherParam somethingElse) ?view "veriloga")

    (someOtherParam somethingElse)

    The first argument to each is the library in which it's stored, and the ?view is the view name for the model. The first function will return all the string parameters (I illustrated it with two additional parameters). The idea is that you call the "set" function with the same list but omitting the parameter you no longer want to be treated as specifically a string. If there are no other parameters, it's probably '() as the third argument to almSetStringParameterList.

    Then you can put srcfname in the fname field of the edit properties form, and it should get netlisted without the quotation marks.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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