• 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. How to use stimulusFile in Ocean Script

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 13979
  • 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 use stimulusFile in Ocean Script

Carmichaeli
Carmichaeli over 11 years ago

Hi there,

I got a question when using Ocean Script. I wrote a script and it works fine for one stimulus file like below,

simulator( 'spectre )
design(...)
resultsDir( ...)
modelFile( ...)
out=outfile("..." "w")
stimulusFile("tb_1.txt" ?xlate nil)
for( cntrl 5 7
analysis('tran ?stop "30n"  )
desVar(  "vdd_adj" 1.0+0.1*cntrl)
envOption(
'analysisOrder  list("tran")
)
save( 'i "/V3/PLUS" )
temp( 27 )
run() 
...
)
...

If I change the stimulusFile statement into ("tb_2.txt" ?xlate nil) , I will also get the good result.But when I use For Loop, some errors happened, like

for(i 1 2
stimulusFile(sprintf(nil ".../tb_%d.txt" i) ?xlate nil)
... 

ERROR (SFE-401): "/homes/grad/lw-1022/cadence/lab2/tb_1.txt" 126: Duplicate
instantiation of `V9' in `top-level'.

ERROR (SFE-401): "/homes/grad/lw-1022/cadence/lab2/tb_1.txt" 127: Duplicate
instantiation of `V8' in `top-level'.

....

-------------

In netlist, I intentionally remove some lines such as

V127 (B\<3\> 0) vsource type=pulse dc=1.800000e+00 val0=0 val1=1.800000e+00 period=20n delay=5n rise=100p fall=100p width=10n

V126 (B\<4\> 0) vsource type=pulse dc=1.800000e+00 val0=0 val1=1.800000e+00 period=20n delay=5n rise=100p fall=100p width=10n 
......

and copy these lines into some stimulus files (tb_1.txt and tb_2.txt) with different values. I just want to use these different stimulus files to simulate different condition (just different delay). But it can't work at all. Can somebody tell me why this happened? What should I do if I want to use different stimulus files with For Loop and get correct results? I even don't understand how stimulusFile works.

Regard,

Wayne. 

  • Cancel
  • Carmichaeli
    Carmichaeli over 11 years ago

    Well, I found a very similar question in this forum and it is pretty useful:

    http://www.cadence.com/Community/forums/p/23667/1315087.aspx 

    I am going to try asiSetEnvOptionVal(asiGetCurrentSession() 'stimulusFile list(stimFile)) in my simulation.

     

    Thanks Andrew. 

    ---------------- 

    • 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