To run some cadence/matlab sims you can first go to your standard setup for simulation in cadence.
Set it up such that it runs properly. Then go to the AFE > File > Save script ...

That will create a file, oceanScript.ocn that is by default saved in your $USERAREA/sim/ocean directory.

This file you need to access from matlab. To do this you can create a shell script first, for example runScript.sh in e.g. tste16Top/bin directory:

module load TSTE16
source $HOME/.tste16Proj_rc
cd # some path where you store oceanScript.ocn
ocean < oceanScript.ocn > oceanScript.log

Then call from Matlab (double check the path):

unix([getenv('PROJAREA') 'tste16Top/bin/runScript.sh'])

You might need to debug this further to fit your environement.

Notice now that you can add a lot of features to that script ( runScript.sh ) above. You can for example do manipulations of the oceanScript.ocn file before it is called. This means that you can, say, set the design variables through matlab rather than through cadence.

Effectively you have now closed the loop:

  • generate values (vectors and parameters) in matlab.
  • send to spectre engine
  • read simulated data
  • read back into matlab and post process

2 thoughts on “TSTE16:Cadence/Matlab

    • Thanks, I suppose it should be that nasty “less than” and “greater than”, redirecting to the oceanScript.log file.

      ocean < oceanScript.ocn > oceanScript.log

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s