• 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. ADE Explorer: How to pass a design variable to a parameter...

Stats

  • Replies 0
  • Subscribers 132
  • Views 96
  • Members are here 0

ADE Explorer: How to pass a design variable to a parameter array and another design variable as a string parameter to an instance - Spectre vs. AMS

Volker T
Volker T 2 days ago

Hi,

I am referring to the following two blog posts, both dealing with ADE Explorer and/or Spectre, as an introduction to a similar problem I have with ADE Explorer and AMS.

ADE Explorer and Spectre

1. How to Pass a String Design Parameter to a Cell

2. Defining Verilog-A vector in the maestro view

The first deals with the issue that when we have a parameterizable cell, like e.g. an instance "myInstance" of a cell using a Verilog-A view, that has a string parameter, e.g. "fname" that we want to specify by design variable, the Spectre netlist does not contain the value of the design variable, but its name only.

Example:

At the beginning of the Spectre netlist, we see the parameters passed to Spectre, e.g.

parameters temperature=27 vdd50=5 fname="/tmp/mylogfile.log" \
debuglevel=1 tperiod=50n trise=100p tsdelay=10n

But later in the netlist, when we look at the instance "myInstance" that receives some of these parameters, one of which is the "fname" string parameter, we only see

myInstance trise=trise tfall=trise tdelay=0 \
        tsdelay=tsdelay tperiod=tperiod vdd=vdd50 logfile="fname"

So, instead of our string defined by design variable value, we only see the design variable name as a string passed to the instance's string parameter "logfile",

The solution shown by Andrew Beckett suggests to use SKILL functions to remove the respective string parameter while leaving the other string parameters in place:

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

=> (fname someOtherParam somethingElse)

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

=> (someOtherParam somethingElse)

The former function identifies all string parameters used by the respective view of a cell of a library (fname, someOtherParam and somethingElse in the example shown) and then the latter function can be used to set the same list minus the string parameter we would like to pass by design variable (e.g. fname) as the new string parameter list. That way, our Spectre netlist gets the value of the string parameter, and not only its name.

Now the beginning of the Spectre netlist still looks like this:

parameters temperature=27 vdd50=5 fname="/tmp/mylogfile.log" \
debuglevel=1 tperiod=50n trise=100p tsdelay=10n

But later in the netlist, when we look at the instance "myInstance" that receives some of these parameters, one of which is the "fname" string parameter, we now see

myInstance trise=trise tfall=trise tdelay=0 \
        tsdelay=tsdelay tperiod=tperiod vdd=vdd50 logfile=fname

So, instead of "fname" (in quotes, hence being a string), we only see fname without quotes, hence referencing the respective Spectre parameter.

Problem solved, instance parameter "logfile" is now fed by Spectre parameter "fname" containing string value "/tmp/mylogfile.log" of design variable "fname"..

--

The second post deals with parameter arrays. Again, let's assume we use an instance of a cell using a Verilog-A view, that has a parameter array, like

parameter integer pattern[2:0] = {1, 2, 3};

and we would like to use a design variable "myPattern" for the definition of the pattern, in ADE, then we cannot just enter [4 5 6] for that design variable value to define a new pattern, as ADE interprets that as a literal or SKILL code.

Andrew Beckett shows the solution for this in the referenced post #2, namely to use strcat("[4 5 6]") as design variable value instead. This gives valid SKILL code for ADE, translates into string "[4 5 6]", which translates into Spectre parameter [4 5 6].

Example:

At the beginning of the Spectre netlist, the parameter list now is

parameters myPattern=[4 5 6] vdd50=5 fname="/tmp/mylogfile.log" \
    debuglevel=1 tperiod=50n trise=100p tsdelay=10n

Later, when the respective instance occurs in the netlist, we see something like

myInstance trise=trise tfall=trise tdelay=0 pattern=myPattern\
        tsdelay=tsdelay tperiod=tperiod vdd=vdd50 logfile=fname

So, similar to the string parameter described before, the instance parameter now gets assigned the correct Spectre parameter.

So far, so good, problems solved for ADE Explorer and Spectre.


ADE Explorer and AMS

Now let's use the same test bench, using the same cells and design parameters, but AMS as a simulator. As far as I know, AMS uses a different netlister (UNL?), and that apparently behaves differently.

The instance now gets its parameters assigned like this

myInstance #(.trise(cds_globals.trise), .pattern("myPattern") .tperiod(cds_globals.tperiod), .tsdelay(cds_globals.tsdelay), .vdd(cds_globals.vdd50), .tdelay(0), .tfall(cds_globals.trise), .logfile("fname"), .debuglevel(cds_globals.debuglevel)) I1 (.nrst( nreset ), .mclk( mclk ), ... );

There is no "pre-translation" of design variables into AMS parameters to be found as a list (but apparently there exists one, named "cds_globals", as one can see for the other parameters). But both the string parameter and the array parameter do not show up in cds_globals but are used directly as a string containing the design variable name instead of its value.

So the question is, is there any trick similar to the two shown for Spectre that we can create a netlist using design variable values instead of design variable names?

  • Cancel
  • Sign in to reply

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.

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

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