Spectre simulation using Cadence' Analog Design Environment
 


 

Follow the Steps :

1. For every cell that needs to be tested, we will generate a test schematic to keep things compartmentalised. For an inverter, create another cell called 'inverter_test' in your current library  'yourUNI'. Create a schematic view for this cell. For your convenience, the steps are mentioned again. Click on File --> New --> CellView in the CIW window (first window that opens with the program - the window named 'virtuoso'). Then enter Library Name as yourUNI,  cellname as inverter_test and View Name as Schematic. This should pop-up an empty schematic creation window. In this window, you will generate a schematic as shown below:


 


To generate a schematic like this,  you will need to go through the following steps. This assumes that you already have an inverter schematic instance and a corresponding symbol instance.

1 a.   Place an instance of inverter by pressing 'i'.  ( how to place an instance has already been discussed in " Cadence Schematic Editor Information" page). Make sure that you choose an inverter symbol from your library as your instance.

1 b.   Place an instance for the dc voltage source. It is located in the 'Analoglib' library and under the cell name 'vdc'. Click on 'symbol' and move your cursor to the schematic to place it down, far left, as in the figure above. Press 'q', then click on the component to enter the DC voltage value. Give it a value of 1V and connect it to Vdd/gnd supply nets as shown.

1 c.   Place an instance for the piece-wise linear voltage source (vpwl), which you can find in the analogLib library and cell vpwl. Enter it's properties using 'q'. The vpwl source enables you to specify voltage source as a piece-wise linear curve. Enter the voltages as discrete entries for different time instants. The number of time instants is specified by the number of pairs of points in the window below.

 



The above entry specifies voltage source at three points with (time, voltage) values of (0,0) , (3us,0) and (3.001us,1) respectively. In other words we entered a voltage source with a rise transition from 0 to 1.0V at 3us, with the rise time of 0.001us.
* Note that the variable box recognizes 'u' as micro, 'n' as nano, 'p' as pico, 'f' as femto, 'a' as atto.

1 d.    Place an instance of a capacitor, which you can find under library AnalogLib and cell cap. A capacitor will simulate the  effect of capacitive loading from the following stages. For illustration purposes, choose a value of 1pf  for the capacitor.

1 e.    Place the ground gnd symbol. It is under the name 'gnd' in the 'Analoglib' library. the ground symbol defines your global ground for this circuit.


So we have created a test setup for the inverter, by giving it an input and having a capacitive load. Notice that by connecting a wire between 'vdc' and the VDD pin of the inverter, we have defined the top voltage value of the inverter to be 1V.

 

2. Now we will simulate this inverter using Spectre in the Cadence Analog Design Environment. Re-open the inverter_test schematic window if you closed it. Choose Launch --> Ade L . You will see a window as shown below.

 

 


3.

1) On the bottom right corner of the ADE window, it should say 'Simulator: spectre'. If it does not, you should probably inform a TA. To change it manually so you can simulate, choose Setup --> Simulator/Directory/Host . A Choosing Simulator/Directory/Host window pops up. Choose 'spectre' as your simulator.

2) On the same screen, we need to specify where the simulation files will be stored. Your simulation files will easily exceed several hundred Megabytes, so you don't want this in your home directory which is uploaded to the server. You can use a directory called '/workdir' instead, which is in the current machine you're using. Next to 'Project directory' enter  ' /workdir/yourUNI ' . Create the directory if you have to. Click on 'Host Mode' 'local', then press OK.

* Note that the /workdir directory is not connected to the server, so if you move to another machine you will not be able to retrieve the simulation files. If you get space limit errors while simulating, try emptying the simulation files located in your machine's /workdir directory.
* Also, if for some reason, ADE throws an error about permissions for /workdir, then something is not set up correctly, and you should let a TA know.

3) We need to tell Cadence where to look to find our component models. These locations should be set by default, but if you wish to check, go to  Setup --> Model Libraries.... A Model library setup window pops up. These three lines should be under 'Global Model files' in the following order:
    /courses/ee4321/tech/cms9flp/IBM_PDK/cms9flp/V1.5.0.6IBM/Spectre/models/design.scs
    /courses/ee4321/tech/cms9flp/IBM_PDK/cms9flp/V1.5.0.6IBM/Spectre/models/fixed_corner.scs
    /courses/ee4321/tech/cms9flp/IBM_PDK/cms9flp/V1.5.0.6IBM/Spectre/models/process.scs

4) Go to Setup --> Temperature  and check that it is set at 27 degrees Celcius.

5) Now you have set up a simulation environment. In order to reuse the current settings in further simulations, go to Session --> Save state  , give it a custom name (which is names 'state1' by default), and OK the window. This state will be tied particularly to your inverter_test schematic; to load it for use with other schematics, search the directory and look for it under this schematic.

 

4. Choose Analyses --> choose...  You can perform either dc analysis which lets you sweep a dc voltage source or you can do  transient analysis by choosing tran to observe the output as a function of time. ac and noise analysis is primarily used by analog designers to measure the frequency response and the noise performance of the circuit.   In this tutorial we will focus on transient analysis. So, on the Choosing analyses window, click on tran and enter the 'stop time' as 5u. Click on 'moderate' for a reasonable measurement speed. Don't forget to choose Enabled at the bottom of the screen.

 

 

Before you click 'OK', go to 'Options...' and enter "0.001u" at the tab labeled 'step'.
The above entries asks the circuit to perform transient simulation from 0 to 5us, with a step size of 0.001us.

 

5. Go to Simulation menu in the Analog Design Environment window and click on Netlist and Run. (or you can press the green play button on the toolbar at the right end) This will start simulation. ( It is important to understand what Cadence does, when you hit a Run. It first creates a raw netlist having just the top-level instances and the include files. Next it generates a final netlist by bringing in all transistor level details. And finally, it runs the Spectre simulation. You can also go through these steps manually, by first clicking on Simulation --> Netlist -->Create and then press Run.  Every step will show you an intermediate netlist output for your review. If you just press Run the first and only time, it will do all of this in one step, without showing you the intermediate netlist output) .

This will start the simulation process. 

 

6.  The CIW window should show " Reading Simulation Data ...... Successful", to ensure that simulation was a success. If not go to Simulation --> Output Log in your Analog Design Environment window to find out what the problem was. Your CIW and gray text windows will also contain information about warnings and errors. Now you can still continue with Cadence to view your results, which is mentioned below.

 

7. Go to Tools --> Calculator in the Analog Design Environment Window. A very useful tool "Calculator" will pop-up. It is a powerful graphical user interface used for viewing simulation results.

 

 

8. On the calculator, click on vt. This means you want to select a transient voltage on your schematic. When you click vt, you will see that your schematic window comes in front and has a small message at its bottom border saying 'Select nets' for VT expression. Now you click on one of the nets in your schematic window. You will see that the screen of your calculator shows the name of the net you just selected. Like in the above figure, I have "net2" selected. Now click plot on the calculator. (It is the icon with a calculator and a blue curve.) A new Waveform window will pop up with a Voltage vs. Time plot of the net you selected. To overlap the waveform of another net onto the same plot, go back to the calculator window, click vt, select different net, then click plot. Try showing waveforms of both in and out nets on the same plot.

There is another way to simply view results. Go back to the Analog Design Environment window and go to Results --> Direct Plot --> Transient Signal.  The schematic will come forward and it will let you select as many nets as you want until you press 'esc' on your keyboard. Click on the two nets, in this case, the wires going into and out of the inverter symbol, then press 'esc'. Now you should see a graph of both the input and output.

 

9. Finally, if you plot the in and out nets of your inverter_test schematic, you will see the input and output Voltage vs. Time plots of your inverter with a load of 1pF of capacitance. Try right-clicking your mouse and dragging it to form an area which you want to zoom in. You can always go back by pressing 'f', or clicking the 'zoom to fit' button. The result is shown in the window below. The red waveform shows the input to the inverter while the blue one shows the output which as you can see is delayed due to the finite capacitive loading.

 

 

 


Utilizing Various Tools in ADE

In the example above, we plotted the delay of an inverter as a response to a nearly-step input. However, the transient analysis is only one among many powerful tools provided by ADE. In this part of the tutorial we will briefly go over a few other useful analyses tools.
 


Fig N1

 

Figure N1 shows the ADE window. Notice the 1) Choose analyses button, 2) Edit Variables button.


1. First, by clicking the 'Choose analyses' button on the bar located on the right, you can again select the desired analysis type such as transient, ac, dc, ...

 

Fig N2
 

You can sweep a variable you want by either sweeping over a 'Design Variable' or a 'Component Parameter'. Let's first look at how to use the 'Component Parameter' option. For example, if you would like to make a dc voltage source sweep over a range:
1) select 'Component Parameter' as in the example
2) click on 'Select Component', and when the schematic window comes to the front, choose your voltage source
3) choose what you would like to sweep over: in this case, select 'dc'.
4) define the Sweep Range as needed, press OK.


2. Now let's find out how to define variables. Go to the schematic you are working on, and name a voltage or current source by the name you want. Below (Figure N3) is an example of naming the dc value of a voltage source 'Vds'. By typing in a non-numerical value in the instance properties window, you can define a design variable.

Fig N3

 

Return to the ADE window, and at the 'Design Variables' area right click your mouse, then select 'Copy from Cellview'. You will see all of the variables you have defined in your schematic appear as below (Figure N4). You can sweep one of your design variables by choosing "Sweep Variable ->Design Variable" instead of "Sweep Variable -> Component Parameter" as we did previously in Figure N2.

Fig N4

 

3. You can automate plotting selected outputs by taking advantage of the Outputs menu. Right-click the Outputs area and click Edit. Choose which variables (dc voltage, current, ...) at which nodes (nets) you would like to plot automatically after each simulation. You can even use the calculator to insert these into an output with an equation.
 

4. Finally, we will learn to use an extremely powerful tool called 'Parametric Analysis'. In your ADE window, go to Tools -> Parametric Analysis. A screen like below will appear:

 

Fig N5

 

Double-click 'Add Variable...' and choose the design variable you want to sweep. Define your sweep parameters (type, from, to, step number, etc.) and  click the green play button (Netlist and Run). This tools allows you to execute whatever analysis you have in your ADE window, but multiple times over a third variable. For instance, if you want to see how x vs. y changes over a third variable z, the Parametric Analysis will be most useful. Note that you need to automate plotting by using the 'Outputs' section before you run Parametric Analysis, in order to visualize the effect of the third variable on the recurring simulations.

 

 

[EE4321 HOME]