• 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 SKILL
  3. Extract current(i) value from transient analysis using SKILL...

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 143
  • Views 4573
  • 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

Extract current(i) value from transient analysis using SKILL for Multiple inputs

rijalomkar
rijalomkar over 3 years ago

I want to report current(i) value from an output port after doing transient analysis. I have 10 input source in my circuit and also I have multi line inputs in a file. So, I want to report the output of all the input combinations in a file using SKILL. Can you please help me?

  • Cancel
Parents
  • rijalomkar
    rijalomkar over 3 years ago

    I wrote this code to write it in a file but the output is not changing. every time I am getting same output current value.

    out = i("/V62/MINUS" ?result "tran")
    out_val = value(out, time)
    fprintf(output "%.9f\n" out_val)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to rijalomkar

    That looks as if it's correct, but without knowing what the circuit looks like and what you're varying (so in other words, what would be causing the output to change), it's rather hard to know what might be wrong. At the moment I don't understand what you're expecting!

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • rijalomkar
    rijalomkar over 3 years ago in reply to Andrew Beckett

    I have 10 input current sources and I have thousands of lines of inputs in a file. And I am measuring the winner current from an output port and save it in a file. But every time i am getting same output, even if I change the input values. I want to measure the output current after transient analysis.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to rijalomkar

    Simply repeating what you said earlier doesn't help explain what you mean.  I still have no clue what you're actually doing or what your code or what is supposed to change. If you can't describe the problem well enough, you're really not going to be able to get an answer!

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • rijalomkar
    rijalomkar over 3 years ago in reply to Andrew Beckett

    I have made an current comparator circuit that picks a winner among 10 currents. My circuit works and gives correct winner value if I run the transient analysis through ADE L. But I want to check the accuracy of my circuit by providing multiple input patterns and save the winner current in a file. I have an input file with 10k input patterns. So, I wrote a SKILL script to run the simulation but it looks like the output value is not changing. If you want I can send you the whole code and then you can understand the whole picture. Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to rijalomkar
    rijalomkar said:
    If you want I can send you the whole code and then you can understand the whole picture. Thank you.

    Given that the problem is almost certainly in your code, unless you provide enough information to diagnose it, I'm not really sure how you think anyone can help. Try reading what you've posted and imagine that you knew nothing about what you'd implemented - do you think anyone would be able to answer it?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • rijalomkar
    rijalomkar over 3 years ago in reply to Andrew Beckett

    I am sorry for all the confusion Mr. Becket. My code looks like this, please let me know if you understand what I am trying to implement.

    output = outfile("MY_output.txt" "w")
    input = infile("/home/grad/siu856384584/Desktop/input.txt")
    cellid = dbOpenCellViewByType("My_Project" "new_test_10_curr_new" "schematic" "schematic" "a")
    insid1 = dbFindAnyInstByName(cellid "I361")
    insid2 = dbFindAnyInstByName(cellid "I362")
    insid3 = dbFindAnyInstByName(cellid "I363")
    insid4 = dbFindAnyInstByName(cellid "I364")
    insid5 = dbFindAnyInstByName(cellid "I365")
    insid6 = dbFindAnyInstByName(cellid "I366")
    insid7 = dbFindAnyInstByName(cellid "I367")
    insid8 = dbFindAnyInstByName(cellid "I368")
    insid9 = dbFindAnyInstByName(cellid "I369")
    insid10 = dbFindAnyInstByName(cellid "I370")
    time = 31.5n
    while( ! isPortAtEOF(input)
    fscanf( input "%s %s %s %s %s %s %s %s %s %s" d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 )
    dbReplaceInstParamList(insid1 list(list("idc" "string" d1)))
    dbReplaceInstParamList(insid2 list(list("idc" "string" d2)))
    dbReplaceInstParamList(insid3 list(list("idc" "string" d3)))
    dbReplaceInstParamList(insid4 list(list("idc" "string" d4)))
    dbReplaceInstParamList(insid5 list(list("idc" "string" d5)))
    dbReplaceInstParamList(insid6 list(list("idc" "string" d6)))
    dbReplaceInstParamList(insid7 list(list("idc" "string" d7)))
    dbReplaceInstParamList(insid8 list(list("idc" "string" d8)))
    dbReplaceInstParamList(insid9 list(list("idc" "string" d9)))
    dbReplaceInstParamList(insid10 list(list("idc" "string" d10)))
    schCheck(cellid)
    dbSave(cellid)
    simulator( 'spectre )
    design( "/home/grad/siu856384584/simulation/new_test_10_curr_new/spectre/schematic/netlist/netlist")
    resultsDir( "/home/grad/siu856384584/simulation/new_test_10_curr_new/spectre/schematic" )
    modelFile(
    '("/cadence/GPDK/gpdk045_v_2_0/gpdk045/../models/spectre/gpdk045.scs" "mc")
    )
    analysis('tran ?stop "40n" ?errpreset "conservative" )
    envOption(
    'analysisOrder list("tran")
    )
    temp( 27 )
    run()
    selectResult( 'tran )
    out = i("/V62/MINUS" ?result "tran")
    out_val = value(out, time)
    fprintf(output "%.9f\n" out_val)
    )
    close(input)
    close(output)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to rijalomkar

    OK, it's not surprising that your code is having no effect. You are simulating with the design specified as a netlist - and so there's nothing to cause the design to be re-netlisted after your changes to the design!

    design( "/home/grad/siu856384584/simulation/new_test_10_curr_new/spectre/schematic/netlist/netlist")

    Instead you should use:

    design("My_Project" "new_test_10_curr_new" "schematic" "r")

    This shows why it's important to see the bigger picture; the snippets of code you showed earlier were not the problem.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • rijalomkar
    rijalomkar over 3 years ago in reply to Andrew Beckett

    Thank you Mr Becket, it worked.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • rijalomkar
    rijalomkar over 3 years ago in reply to Andrew Beckett

    Thank you Mr Becket, it worked.

    • 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