[Prev]

2.2 OCEAN file

When running a cadence within the Virtuoso analog design environment you can create an OCEAN script using the menu command Session->Save Script ...

In order to use the OCEAN script in the EDDA environment you need to modify the script according to the following steps:

  1. Move corner definitions to a corner file

  2. Create a symbolic link to the netlist in the testbench directory

  3. Remove information regarding simulator and result directory

  4. Add commands to log simulation results

The steps will be described in more detail below:

A typical automatic generated OCEAN script can look like this:

ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design( "/home/fjon/simulation/simple/spectre/schematic/netlist/netlist")
resultsDir( "/home/fjon/simulation/simple/spectre/schematic" )
modelFile( 
    '("/pkg/designkits/umc/MM018/MM180_REG18_V123.lib.scs" "tt")
)
analysis('ac ?start "1k"  ?stop "100M"  )
analysis('dc ?saveOppoint t  )
desVar(	  "Vsupply" 1.8	)
temp( 27 ) 
run()
ACmag = dB20(VF("/out"))
plot( ACmag ?expr '( "ACmag" ) )
Vdc = VDC("/out")
plot( Vdc ?expr '( "Vdc" ) )

This example script run an simple AC and a DC simulation and plots the result. We will now copy this file to the testbench directory and modify it to be compatible with EDDA.

2.2.1 Corner file

In order to use the script in the EDDA environment we first extract the corner definition. The corner definition files are located in the corners directory. The corner file can have any name, but the the name typ is reserved for the typical corner.

Extracting the corner information from the example OCEAN file into a corner file. The final file corners/typ may look like this:

 modelFile(
     '("/pkg/designkits/umc/MM018/MM180_REG18_V123.lib.scs" "tt")
 )
 desVar("Vsupply" 1.8)
 temp( 27 )

2.2.2 Create symbolic link

The sim script will look for a link to the netlist in the test bench directory. When not using EDDA the design will be loaded using the line

 design( "/home/fjon/simulation/simple/spectre/schematic/netlist/netlist")

in the ocean script. The actual location of the design file of course depend on the cadence configuration and the user. The design definition must be removed from the script file and be replaced by a symbolic link.

The symbolic link is created using the Unix command

 > cd testbench1
 > ln -s home/fjon/simulation/simple/spectre/schematic/netlist/netlist .

Don't forget the . at the end of the line.

2.2.3 Remove simulator and directory information

The sim script automatically configures the simulator and results directory so this information can be removed from the scripts file.

Remove the lines

 ocnWaveformTool( 'wavescan )
 simulator( 'spectre )
 design( "/home/fjon/simulation/simple/spectre/schematic/netlist/netlist")
 resultsDir( "/home/fjon/simulation/simple/spectre/schematic" )

from the script file.

The sim script will use the directory /tmp/USER/simulation/SCRIPT to store simulation results, where USER and SCRIPT will be replaced by the user name and name of the script file.

2.2.4 Log simulation results

The EDDA system have a set of skill functions to log simulation results. Scalar data can be stored using log_data and waveforms are stored using log_wave. Data from simulation loops can be combined to generate a waveform using log_data_point.

The simulation results are stored as text files within the testbench directory. A subdirectory for each corner will be generated.

To log the DC voltage and the AC response in the example ocean script we can use the following lines:

 log_data(VDC("/out") "Vdc")
 log_wave(dB20(VF("/out")) "ACmag")

If simulation is performed using these commands in the typ corner the files testbench1/typ/Vdc and testbench1/typ/ACmag will be created.

Plot commands from the original ocean script can be removed.

Now all the modifications to the script file is ready and the final script testbench1/script.ocn may look like this:

analysis('ac ?start "1k"  ?stop "100M"  )
analysis('dc ?saveOppoint t  )

run()

log_data(VDC("/out") "Vdc")
log_wave(dB20(VF("/out")) "ACmag")

[Prev | Next]