Analog Custom Design and Testing Using OCEAN Scripting in Cadence

Similar documents
How To Plot Transconductance and Even More. By Ruida Yun

Basic Analog Simulation in Cadence

Cadence Tips & Tricks

S Exercise 1C Testing the Ring Oscillator

Cadence Tutorial C: Simulating DC and Timing Characteristics 1

Using Cadence Virtuoso, a UNIX based OrCAD PSpice like program, Remotely on a Windows Machine

Figure 1: ADE Test Editor

GETTING STARTED WITH ADS

Revision Notes: July2004 Generate tutorial for single transistor analysis. Based on existing schematic entry tutorial developed for ECE410

Cadence Tutorial D: Using Design Variables and Parametric Analysis Document Contents Introduction Using Design Variables Apply Apply

Cadence Tutorial: Schematic Entry and Circuit Simulation of a CMOS Inverter

CS755 CAD TOOL TUTORIAL

EE 210 Lab Assignment #2: Intro to PSPICE

Alfred Sargezi & Zain Ali. AMS Group - San Jose State University ams.sjsu.edu

PSpice Tutorial. Physics 160 Spring 2006

Cadence Analog Circuit Tutorial

Getting started. Starting Capture. To start Capture. This chapter describes how to start OrCAD Capture.

Cadence Inverter Transistor Sizing Tutorial Cadence Inverter Ocean Introduction Cadence Inverter Corners Tutorial Cadence Inverter VerilogA Tutorial

The original document link is

ESE 570 Cadence Lab Assignment 2: Introduction to Spectre, Manual Layout Drawing and Post Layout Simulation (PLS)

Experiment 0: Introduction to Cadence

GreenPoint Design Simulation Tool

CS/EE 5720/6720 Analog IC Design Tutorial for Schematic Design and Analysis using Spectre

Figure 1: PSpice symbol for a trim pot.

Lab 1: Cadence Custom IC design tools- Setup, Schematic capture and simulation

Analog IC Simulation. Mentor Graphics 2006

EECS 211 CAD Tutorial. 1. Introduction

Lab 1: Analysis of DC and AC circuits using PSPICE

Setting up an initial ".tcshrc" file

Lab 4 LVS and Post layout Simulation

Getting Started with Orcad Lite, Release 9.2

CPE/EE 427, CPE 527, VLSI Design I: Tutorial #2, Schematic Capture, DC Analysis, Transient Analysis (Inverter, NAND2)

DOWNLOAD PDF CADENCE WAVEFORM CALCULATOR USER GUIDE

MENTOR GRAPHICS IC DESIGN MANUAL. Schematic & Simulation. Gun Jun K Praveen Jayakar Thomas Zheng Huan Qun

Cadence Tutorial A: Schematic Entry and Functional Simulation Created for the MSU VLSI program by Andrew Mason and the AMSaC lab group.

Amplifier Simulation Tutorial. Design Kit: Cadence 0.18μm CMOS PDK (gpdk180) (Cadence Version 6.1.5)

How to Get Started. Figure 3

Tutorial 3: Using the Waveform Viewer Introduces the basics of using the waveform viewer. Read Tutorial SIMPLIS Tutorials SIMPLIS provide a range of t

Microelectronica. Full-Custom Design with Cadence Tutorial

ECE 331: Electronics Principles I Fall 2014

Cadence Schematic Tutorial. EEE5320/EEE4306 Fall 2015 University of Florida ECE

PSpice Simulation Using isppac SPICE Models and PAC-Designer

TINA-TI Simulation Software. Application Note

EECE 285 VLSI Design. Cadence Tutorial EECE 285 VLSI. By: Kevin Dick Co-author: Jeff Kauppila Co-author: Dr. Arthur Witulski

EDDA. Fredrik Jonsson. December 7, Electronic Design Description Automation

APPENDIX-A INTRODUCTION TO OrCAD PSPICE

Introduction to CCV and Cadence Virtuoso for Electronic Circuit Simulation

The following is a procedure for extracting a layout, doing a layout vs. schematic check, and then simulating the extracted layout with Cadence.

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

General Guidelines: SAS Analyst

Tutorial on getting started in Cadence. Advanced Analog Circuits Spring 2015 Instructor: Prof. Harish Krishnaswamy TA: Jahnavi Sharma

Cadence Tutorial A: Schematic Entry and Functional Simulation Created for the MSU VLSI program by Professor A. Mason and the AMSaC lab group.

All textures produced with Texture Maker. Not Applicable. Beginner.

EE115C Digital Electronic Circuits. Tutorial 2: Hierarchical Schematic and Simulation

AMS 0.18 µm PDK Setup and Cadence Tutorial Contributors

One possible window configuration preferences for debug cycles

Hardware Verification Group. Department of Electrical and Computer Engineering, Concordia University, Montreal, Canada. CAD Tool Tutorial.

Creating LEF File. Abstract Generation: Creating LEF Tutorial File Release Date: 01/13/2004. Export GDS:

Copyright 2008 Linear Technology. All rights reserved. Getting Started

Parameter Sweep. Description. Setup. Parameters. Modified by on 13-Sep-2017

Top Producer 7i Tips & Tricks Volume 1

ECEN 474 Homework #2 Notes

SmartSpice Analog Circuit Simulator Product Update. Yokohama, June 2004 Workshop

Tutorial For LamTopo

1. Working with PSpice:

A Crash Course on Using Agilent Advanced Design System (ADS)

EE 330 Laboratory Experiment Number 11

Previous versions supported SIMPLIS only. Now DVM has been enhanced to allow design verification using the SIMetrix simulator.

University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Science

PSpice with Orcad 10

EE 330 Fall 2017 Lab 1: Cadence Custom IC design tools - Setup, Schematic capture and simulation

EE 330 Spring 2018 Lab 1: Cadence Custom IC design tools Setup, Schematic capture and simulation

FACULTY OF ENGINEERING MULTIMEDIA UNIVERSITY LAB SHEET DIGITAL INTEGRATED CIRCUIT

ELEC 301 Lab 2: Cadence Basic

EEC 118 Spring 2011 Lab #5 Manchester Carry-Chain Adder

DMMEasyControl Software Guide

Lab 2: Functional Simulation Using. Affirma Analog Simulator

Simulation with Verilog-XL

Mentor Graphics VLSI CAD Tutorials

Cadence Tutorial. Introduction to Cadence 0.18um, Implementation and Simulation of an inverter. A. Moradi, A. Miled et M. Sawan

Lab III: MD II & Analysis Linux & OS X. In this lab you will:

Introduction to Minitab 1

R Commander Tutorial

Cadence IC Design Manual

Intro to Cadence. Brady Salz. ECE483 Spring 17

CADENCE TUTORIAL. San Diego State University, Department of Electrical and Computer Engineering. Amith Dharwadkar and Ashkan Ashrafi

DC Circuit Simulation

SOUTHERN POLYTECHNIC S. U.

More information can be found in the Cadence manuals Virtuoso Layout Editor User Guide and Cadence Hierarchy Editor User Guide.

Tutorial 1.5: The Design and Simulation of a D Flip-flop (Last updated: Sept. 8, 2008)

Lab 2. Standard Cell layout.

Simulation examples Chapter overview

Opening a Document: Printer Selection:

Experiment 1 Introduction to PSpice

Boise State University Digital Systems Laboratory

Introduction to laboratory exercises in Digital IC Design.

How to Start with Cadence ECE721 Project. Instructor: Prof. Steve Bibyk Prepared by: Golsa Ghiaasi Hafezi Spring 2005 Ohio State University

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

EE 330 Spring Laboratory 2: Basic Boolean Circuits

Click on the SwCAD III shortcut created by the software installation.

Transcription:

Analog Custom Design and Testing Using OCEAN Scripting in Cadence Mostafa Rahimi Azghadi School of Electrical and Electronic Engineering, The University of Adelaide, Adelaide, SA 5005, Australia Email: mostafa@eleceng.adelaide.edu.au 1) Introduction This is a crash tutorial for new cadence users who require post-processing on their simulation data in their design performed in Cadence. One of the main drawbacks of the ADE is the fact that there is no powerful command or option in its Graphic User Interface (GUI), to perform repetitive tasks. In addition, ADE has no direct solution in order to perform usual design verifications, which are needed for various situations such as various process corners, temperatures, and supply voltage. Instead the user has to run each simulation manually, which seems inapplicable for large scale simulations. OCEAN that stands for Open Command Environment for Analysis is a powerful programming language that can automate your simulations within Cadence. It is a subset of SKILL language and uses this language to configure the design environment. SKILL is a full language which possesses all features of programming languages such as data types, operators, etc. However, SKILL is not the focus of this tutorial. OCEAN helps the Cadence Analog Design Environment (ADE) user, to facilitate required simulations for the target design. It allows you to perform the simulation from the command line and control it from start to finish. Utilising OCEAN will save you a lot of time performing post-processing and simulations. The OCEAN script that is fairly complicated can be automatically generated by the ADE. However, you can easily modify it and precisely control all aspects of your simulation. Here are some of the cases that you could use OCEAN and it helps your simulation and postprocessing become very simple. 1) Repetitive simulations This is usually helpful when there are needs for PVT analysis i.e. multiple Processes, Voltages, and Temperatures. 2) Parametric analysis

Usually you are not able to perform parametric analysis using the GUI of the ADE. Therefore, you will need to do different parametric simulations manually, if you do not use OCEAN. 3) Post-processing your simulation data Once you need to use commands such as measure, you will find OCEAN very helpful. It will let you sweep the parameters and process your simulation output as you wish. 4) Documenting and saving your simulation results. This is interesting how you could save your simulation results in a spread sheet format and perform lots of operations on it. As an example, one is easily able to write a script to run the required simulation, save the needed data, and even email them to an address! There are many other instances that OCEAN can be useful in performing simulations. 2) Generating an OCEAN script using ADE Open you ADE GUI and set up your required simulation. In this GUI, you are able to determine the simulation type (i.e. DC, AC, Tran), simulation time, and other required details for your simulation. For more information regarding to ADE, the reader is directed to cadence manual. Fig. 1. Analog Design Environment GUI. Using this GUI you can use the right column, or the related options, to set up your simulation as required.

After setting up your simulation in the GUI, hit simulation run button as shown in Fig. 1. If there is no error your simulation should run and you should see a run window, showing various stages of your simulation. If you wanted to see an output from your simulation, which can be easily picked from your schematic using the GUI, the output should pop up after the simulation ended and be shown on an output waveform. The good news is you now have your OCEAN script produced by ADE. Simply click on Session > Save Ocean Script This option of your ADE and you will save your OCEAN script command under a preferred name. Now you see your OCEAN script file which tells you about most of the facts that you have already determined when running your simulation, such as the simulator, the design directory, your results directory, etc. The sample OCEAN file is shown in Fig. 2. The listed information in the OCEAN script is as follows: 1) simulator( 'spectre ) that chooses the simulator. 2) design("/address/to/yourdesign") that points to the netlist of the design. 3) resultsdir("/address/to/yourresults") specifies the results directory. 4) modelfile("/address/to/yourmodelfiles") specifies the model files for your design. 5) analysis('tran?stop "60m") lets the user to set the simulation type, start and stop times, step size and accuracy of the simulation. 6) desvar() allows the user to set all the design variables just like in the GUI. 7) temp( 27 ) sets the simulation temperature. 8) run() simply runs the simulation and it has been created because you pressed the simulation button on the GUI. simulator( 'spectre ) design("/address/to/yourdesign" ) resultsdir("/address/to/yourresults" ) modelfile("/address/to/yourmodelfiles" ) analysis('tran?stop "60m" ) desvar( "RI" 10K ) desvar( "RF" 40K ) temp( 27 ) run() Fig. 2. Sample OCEAN Script produced by ADE. Different lines in this script perform various tasks.

There are other commands and features in OCEAN which helps the user to process their simulation data. The first five lines are values from the setup pull-down menu in the ADE. In fact every action that you do in the ADE, has an equivalent function in the OCEAN script file. 3) Executing an OCEAN script There are a few ways to execute the OCEAN script. All these three ways are equal to pressing the simulation button in the ADE. However, we could modify the OCEAN script and make our required changes in the file to do the needed post-processing, saving, and documentation. The simplest way to run an OCEAN script is to simply load it from the command line as follows load thenameofyourscript.ocn This will run the simulation, just like you hit the simulation button on the ADE. The second way to run the OCEAN script is from the OCEAN command line. For that you should bring up a shell window and type elecpg_mostafa> ocean This will bring up the interactive OCEAN command session. Now you could simply load your OCEAN script and run it. So in the ocean command line we type ocean> load thenameofyourscript.ocn This will run the simulation in a similar way. In this command line you have the ability to type and use various commands. Examples of these commands are as follows: average (. ) gives us the average of an specific measurement in the circuit. value (. ) gives us the exact value of a signal at a specific point of time. hardcopyoptions(?hcoutputfile your_outputfile_name.png ) hardcopy() These commands sent a simulation output to a printer or a file. For instance the above mentioned commands, we saving the output to a PNG file.

reportfile=outfile( your_outputfile_name.txt ) fprintf (reportfile output control options required measured value in your simulation) The above mentioned commands firstly open an output file and assign it to reportfile variable, then using fprintf the user could write all their required outputs which are in match with the output control options in your_outputfile_name.txt file. Close(reportFile) closes the output simulation report file after the writing operation was completed. The structure of fprintf command in this language is pretty similar to C programming language. 4) Examples of useful ocean script Another important feature in the OCEAN is the ability of implementing loops in a simulation as shown in Fig. 3. i = 1; foreach(corner corners openresults(strcat(defaultdir "/" corner "/psf" )) selectresult( 'tran ) plot(getdata("/idut/vdd") ) iavg = average(clip(it("/idut/vdd") 0.0006 0.0012))*1e9 printf("%10.5f is the average current at %s and %5.2f \n", iavg, corner,nthelem(i temper) ) i = i +1 ) Fig. 3. Sample for loop implementation command in OCEAN Script. The output will be shown on the screen.

The first two commands in the code determine the loop counter and the loop changing value. The third command opens the results from the specified path. The forth command is to select the transient analysis results. It could also be DC or AC, depending on the user s needs. The fifth command plots any stored waveforms. The sixth command is just a customized function that uses a few predefined functions such as clip and average, to calculate the required value. The seventh command is the output command that print results on the screen. The output of this sample for loop code has been shown in Fig. 4. Fig. 4. Output results of the sample ocean script shown in Fig. 3. This is in result of the printf command that outputs the mentioned values in the mentioned order. Alternatively, the printf command could be a fprintf command and outputs the same results into a predetermined file as described above and shown in Fig. 5. The first command is to open a file in write mode w, and assign it to the file pointer (fp). The second command is to write the words Skew, Temp, and Iavg with a tab between them, into the file with the pointer fp. The loop commands are pretty similar to the previous example. The only difference is, here we write the output into a file, and not on the screen. The output of the code shown in Fig. 5 is shown in Fig. 6.

fp = outfile( "/home/ameya/oceanresult.csv" "w"); fprintf(fp "Skew\tTemp\tIavg\n") i = 1; foreach(corner corners openresults(strcat(defaultdir "/" corner "/psf" )) selectresult( 'tran ) iavg = average(clip(it("/idut/vdd") 0.0006 0.0012))*1e9 fprintf(fp "%s\t%5.2f\t%10.2f\n", corner,nthelem(i temper),iavg ) i = i +1 ) close(fp); Fig. 5. Sample for loop implementation command in OCEAN Script. The output will be shown in the output file. The user can simply read from a file in a similar way to C language. The C-like format of the commands should be highlighted that really helps the user to write their own required commands, more simply. There are also plenty of other useful commands, which could be utilised in your simulation. For a complete list of commands, the reader is directed to the OCEAN Reference provided by Cadence. The above mentioned commands are not usually used in the OCEAN command prompt, but they are usually saved in a script file and then should be executed in one of the above mentioned ways in Section 3, in order to run the simulation.

Fig. 6. Output results of the sample ocean script shown in Fig. 5. This is in result of the fprintf command that outputs the mentioned values in the mentioned order into the output file. One major drawback of ADE is that you could work on one single design simulation at a time and if you do need to run several simulations, you either need to run them sequentially in your single session, or run them in multiple concurrent sessions. Both of these approaches are hard to cope with and very hard to manage. In order to solve this problem, Cadence has introduced ADE XL, and OCEAN XL. These new features are not the concern of this tutorial. 5) References [1] http://www.cadence.com/community