• 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. Automation in Calculator

Stats

  • Locked Locked
  • Replies 19
  • Subscribers 125
  • Views 15830
  • 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

Automation in Calculator

ElectronLearn
ElectronLearn over 4 years ago

Hi,

I have a design which have 100 nets and same measurements have to be done on them. Manually doing it in Visualization & Analysis XL calculator and adding expression to the ADEL seems never ending task. How can I automate it? Please help.

Thanks

Sheenu

  • Cancel
  • ElectronLearn
    ElectronLearn over 4 years ago in reply to Andrew Beckett

    Hi Andrew, 

    When I am using this fucntion as, 

    axlAddOutputExpr("session11" "tb_usr1_clk:tb_driver_1440um_singleroute:2" "ttttdsfdt" ?expr "riseTime(clipX(v("/CLKP_120u" ?result "tran") 863.6E-12 5.0E-9 ) 0 nil VAR("supply") nil 10 90 nil "time" )")

    Its giving syntax error pointing at the ?result part. I have used this expression from calculator which is able to correctly evaluate this. The thing is the function should directly take whatever is in "" as string and should be able to put it in adexl.
    So I tried this,
    axlAddOutputExpr("session11" "tb_usr1_clk:tb_driver_1440um_singleroute:2" "ttttdsfdt" ?expr "abd")

    And it passed whereas "abd" didnt even mean anything.
    Why is this error then coming in the upper use case. How can I forcefully impose something as string?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ElectronLearn

    It's because the string contains quotation marks - and so the string will end as soon as the first quotation mark it finds within the sequence of characters unless you escape them. So you'd need to do:

    axlAddOutputExpr("session11" "tb_usr1_clk:tb_driver_1440um_singleroute:2" "ttttdsfdt" ?expr "riseTime(clipX(v(\"/CLKP_120u\" ?result \"tran\") 863.6E-12 5.0E-9 ) 0 nil VAR(\"supply\") nil 10 90 nil \"time\" )")

    You'd need to do the same if using the function I provided you with above:

    CCFaddManyExpr("tb_usr1_clk:tb_driver_1440um_singleroute:2" "riseTime(clipX(v(\"/%s\" ?result \"tran\") 863.6E-12 5.0E-9 ) 0 nil VAR(\"supply\") nil 10 90 nil \"time\" )" ?outNameTemplate "rt %s")

    So all embedded quotation marks need to be prefixed by backslash to escape them so that they are not interpreted as the end of the string (or the start of another one).

    Andrew

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

    Hi Andrew,

    Is there a function by which I can add spec(range or less than or greater than a value etc) to each of the measurements?

    Thanks

    Sheenu

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ElectronLearn

    Hi Sheenu,

    Yes, that would be axlAddSpecToOutput() . If you were using Explorer/Assembler, there's a simpler interface using maeSetSpec().

    Andrew.

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

    Hi Andrew,

    I wish to add spec specific to a particular measurement on these nets. I wish to check if a string contains "risetime", it doesnt matter if its is risetime_net1 or risetime_net2, meant to say I wish to check risetime* in a string. How can I use wildcard in string for comparison?

    Sheenu
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ElectronLearn

    Hi Sheenu,

    If you're asking how to do this in general for a string, then it would be:

    when(index(theString "risetime")
       ; do what you want when it matches
    )

    or using regular expressions:

    when(pcreMatchp("risetime" theString)
       ; do what you want when it matches
    )

    The benefit of pcreMatchp is that you then can have full regular expressions - so it could be "^risetime.*" which would mean anything beginning with risetime followed by any number of any character; strictly speaking the pattern doesn't need to be "anchored" though - so the trailing ".*" isn't really needed here.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ElectronLearn
    ElectronLearn over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    In this following code, this error is coming,"pcreMatchp: argument #2 should be either string or a symbol"

    axlSess=axlGetWindowSession() ;To get active adexl session
    sdb=axlGetMainSetupDB(axlSess)

    foreach(testName cadr(axlGetTests(sdb))
    sevSess=axlGetToolSession(axlSess testName)
    asiSess=sevEnvironment(sevSess)
    foreach(output asiGetOutputList(asiSess)
    outname=output->name
    when(pcreMatchp("Risetime" outname)
    printf(" %s : %L\n" output->name output->expression))

    )
    )

    I am not able to figure out why this is occuring.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ElectronLearn

    If you have any outputs which don't have a name, then output->name will be nil (this could be signals). So you should do:

    when(outname && pcreMatchp("Risetime" outname)
      printf(" %s : %L\n" output->name output->expression))
    )

    You could also use:

    foreach(nameExpr sevGetExpressions(sevSess ?namedOnly t)
      when(pcreMatchp("Risetime" car(nameExpr))
        printf(" %s : %s\n" car(nameExpr) cadr(nameExpr))
      )
    )

    Note that when using sevGetExpressions it returns a list of lists, with the first element being the name, and the second being the expression (as a string).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ElectronLearn
    ElectronLearn over 4 years ago in reply to Andrew Beckett

    Oh I got it Andrew, thank u. It was "nil" which was creating issue!

    • 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