I have a schematic pcell that generates an n-stage chain of (non-pcell) instances, each with different instance parameters. To do this, I have a pcell string parameter 'numStages' (also defined in the CDF for the cell), and something in the pcDefinePCell let block like
n = atoi( numStages )
for( inst 1 n ....
I'd like to be able to sweep this parameter for optimisation in ADE by assigning it a design variable. First problem I ran into is, of course, when pcell evaluation happens, numStages is a text string representing a design variable, so atoi( numStages ) is nil. To get around that, I have
if( n == nil then n=round( VAR( numStages ) ) )
Not the most foolproof, but at least it seems to work in ADE L. When I try to move it to ADE XL for global optimisation, it fails: all instances of the pcell at every design point are instantiated as if numStages were set equal to the value it takes on in the first design point.
Is this due to the pcell evaluation only happening once, then ADE XL just changing the parameter declaration line in subsequent netlists? Either way, does anyone have any insight into how I can make this work? Or is this a fool's errand...