Simulation with SpectreS


 In this tutorial, we are going to perform analog simulation using Cadence's SpectreS simulator since it  is best supported simulator with NCSU models (other optional simulator are Hspice, Spectre, and SPICE). Compared to Verilog-XL, Spectres lets you perform detailed transistor level simulations with emphasis on analog characteristics.
We are going to do transient analysis under Analog Environment on the inverter you designed in previous labs. For every component to be tested, you will build a testbench schematic. In this case, create a schematic cellview called 'inverter_test' in your 'ee103' library. You should draw your testing schematic like this

inverter_test.sch

The inverter shown above is the one you created in the previous lab, in which you designed transistor level schematic and drew symbol for it. Place an instance for the piece-wise linear voltage source (vpwl), which you can find in the NCSU_Analog_Parts library under Voltage_Sources. View and edit its 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.

vpwl_properties

The above entry specifies voltage source at three points with (time, voltage) values of (0us, 0V), (3us, 0V) and (3.001us, 3V) respectively. In other words we entered a voltage source with a rise transition from 0 to 3V at 3us, with the rise time of 0.001us. Place an instance of a capacitor, which you can find under NCSU_Analog_Parts -> R_L_C -> 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. Place an instance of a DC voltage supply, which you can find under NCSU_Analog_Parts -> Voltage_Sources -> vdc.  In the properties window, set the value of the DC voltage to whatever power supply you desire.  For our purposes, we will set this value to 3V.  Using the wire mode, connect the bottom node of the 3V power supply to the ground net (gnd!).

To start SpectreS, click on Tools ->Analog Environment -> Simulation in the CIW window. If your schematic window is already open, you may click on Tools -> Environment in the schematic window.  A window will pop-up. This window is the Affirma Analog Environment Simulation window.
analog_environ

1. Click on the Setup -> Design. This will pop-up a window, which should show you the design library as ee103 and the cell name as "inverter_test" for your simulation. If not, update the fields appropriately.
2. Click on Setup -> Simulator/Directory/Host. Enter the fields as shown below. Choose SpectreS as your simulator. You can specify running simulation in a temporary directory such as ~/tmp/simulation or choose any valid pathname and filename as you like. 
choose SpectreS

3. Click on Setup -> Model Path. Enter '/loc/packages/cadence/ic50/local/models/spectre/nom' in the New Directory field and press 'Add Above' button.
model path


4. Click on  Setup -> Set Model Corner. Select 'Nominal' and press 'OK' button.
set madel corner

5. Click on the second button from the top at the right hand side of the Analog Environment Simulation window. Or you can click on Analyses -> Choose. A menu will pop-up. You can perform either dc analysis (which lets you sweep a DC voltage source) or you can perform a 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 focus on transient analysis. Enter the time limits for simulation as shown below. Don't forget to choose Enabled at the bottom of the screen. Input '10u' in the 'Stop Time' field. Press "OK' button to finish transient setup.
trans_setup

6. Click on Outputs ->  To Be Plotted ->   Seleted On Schematic ,  go back to schematic to select two point by clicking on two nets, i.e. the input net and output net of the inverter, on which you want to observe the result.  Then two new 'net''s(in my case there are net3 and net6)  will shown in output panel in the analog enviroment window. Now you can start up the simulation by pressing the upper "trafic light" button on right hand side of Analog Enviroment window(third one if you count from the bottom). A waveform window will pop up if the simulation goes smoothly.
Result

previoushomenext

Adapted from  Sameer Sonkusale's  Cadence tutorial of IC 4.4.3   by Jiong Xie on Sept. 13, 2004