• 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. How to execute runSimulation script not in other paths

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 126
  • Views 5637
  • 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 execute runSimulation script not in other paths

SpiceMonkey
SpiceMonkey over 1 year ago

Deer All, 

I have generated AMS netlist using ADE, there is a ksh script "runSimulation" in "/simPath/designName/ams/config/netlist"

First cd /simPath/designName/ams/config/netlist, then ./runSimulation, simulation run successfully.

While, if current directory is not under "*/netlist", execute "/absultePath/runSimulation" reports many files couldn't be found. Is there an elegant way to run this script in other directories?

Thank you!

  • Cancel
  • ShawnLogan
    ShawnLogan over 1 year ago

    Dear SpiceMonkey,

    SpiceMonkey said:
    While, if current directory is not under "*/netlist", execute "/absultePath/runSimulation" reports many files couldn't be found.

    If you look at the contents of a typical runSimulation command line, you will immediately observe why running it from a different directory results in the errors you report. For example, one of my runSImulation command line files is shown below:

    /tools/bin/spectre input.scs +escchars +log ../psf/spectre.out -format psfxl
    -raw ../psf +aps +mt=lsf +lqtimeout 0 -maxw 5 -maxn 5 -env ade +lorder
    MMSIM:PRODUCT +dcopt +disk_check=100e9 -ahdllibdir
    <path to ahdllibdir>/input.ahdlSimDB +logstatus

    The file has relative paths for the input.scs file, output spectre.out file, and psf directory. You might use a shell variable to include as an argument to runSImulation such that the syntax is:

    runSimulation <path to results directory>

    where the "results" directory has the two subdirectories "psf" and netlist"

    and modify the command line to something like:

    /tools/bin/spectre $1/netlist/input.scs +escchars +log $1/psf/spectre.out -format psfxl
    -raw $1/psf +aps +mt=lsf +lqtimeout 0 -maxw 5 -maxn 5 -env ade +lorder
    MMSIM:PRODUCT +dcopt +disk_check=100e9 -ahdllibdir
    <path to ahdllibdir>/input.ahdlSimDB +logstatus

    You might add these few lines as a reminder of the command syntax:

    f [ $# -ne 1 ]; then

       echo "Usage: runSimulation  <path to results directory>"

       exit 127

    fi

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to ShawnLogan

    First of all, this is not really a supported flow - the runSimulation script is a means to an end in the simulation flow, and it's not really there for you to run batch simulations afterwards. If you want to run AMS simulations (this is a mixed-signal simulation, not a spectre simulation, so the flow is more complex than Shawn was describing, which is for spectre) from batch, the runams utility is a far better way of achieving that. This can then generate the netlist and run the simulation as needed.

    If however you really want to run the runSimulation script (either for AMS or for Spectre) without following the expected flow of running it from the netlist directory (which is what ADE does), then by far the simplest modification is to add 

    cd /path/to/the/netlist/directory

    at the beginning of the runSimulation script (well, after the shebang line). Then you don't have to touch anything else in the script. With AMS it wouldn't be as simple as just editing the command as Shawn suggested - there are other files that would have needed changing too, such as xrunArgs, and you couldn't put $1 in those. So simply changing the working directory at the beginning of the script is by far the simplest modification.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • SpiceMonkey
    SpiceMonkey over 1 year ago in reply to Andrew Beckett

    Thank you, I use runSimulation script because this is recommended AMS-Simulink co-simulation flow from USER Manual. Then I can run co-simulation without start cadence GUI. cd to the netlist directory is indeed the easiest way.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SpiceMonkey
    SpiceMonkey over 1 year ago in reply to ShawnLogan

    Thank you for your reply, actually I tried to modify the paths inside the script, as Andrew said, there are too many...

    • 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