Virginia Tech® home

Spice Simulation with Spectre - from Command Line

 Author: Meenatchi Jagasivamani, Carrie Aust


 

Though Cadence Spectre can be used for SPICE simulation, it is generally not as accurate as we would like - and not as feature-rich in terms of measurement statements.  For these reasons, we usually use another SPICE simulator --  Hspice.  Please go to HSpice Simulation page to use HSPICE. However, in case we need to use Spectre, here we go.


 

This tutorial shows Spice simulation of a CMOS inverter. At this point, you should have set up the environment. Otherwise, refer to Setting Up Your Unix Environment.

  • MOSFET models for Spectre  - Please note that Spectre is case sensitive unlike standard SPICE. This file, however, uses SPICE syntax, not Spectre's (notice the "simulator lang" line, if you have the curiosity to read).

1.  Copy the following inverter source file and Spice models for MOSFETs to your working directory.

a.  inv.scs

b.  SPICE model d25.m

2.  Study the netlist. The source file performs a DC analysis.

3.  If you wish to make a transient analysis, comment out the lines under "For DC analysis only," and remove "*" for the lines under "For Transient analysis only."

4.  To peform spice simulation, type the command.

spectre inv.scs

5.  To plot the results, type the command.

awd -dataDir inv.raw

6.  Four windows appear.

7.  Activate "Result Browser" window: Click left buton on inv.raw

8.  Yellow node numbers show up on the right end of the hierarchy: Click right button on nodes 2 and 3.

9.  "Waveform Window" displays the waveform.

10.  To make a hard copy of the plot: Choose hardcopy menu from Windows menu on "Waveform Display" window.

11.  A windows appears.

a.  Verify Laser Writer is chosen as "Plotter Name".

b.  Click "Send Plot Only to File.," and type in the file name. Click apply to generate a postscript file.

Additional Info:

  • For details of Spice and Spectre, refer to the online manuals. They can be opened as:
    • cdsdoc &
    • Choose the following menus in the sequence.
    • IC Tools -> Analog and Mixed Signal Simulation
    • -> For SPICE choose "HSPICE/SPICE Interface ..."
    • -> For Spectre choose "Spectre User Guide."
  • Example Files for Comparator
  • Another inverter example, but this is in Spectre's own syntax. Note that since most people are more familiar with SPICE syntax, perhaps that should be used. Also, this new example makes different simulations from the first one.
  • Run Cadence setup script first. For example, with the NCSU kit, the command would be "source NCSU_setup.csh"
  • To simulate:        spectre compar.scs
  • To view results:    awd -dataDir compar.raw &
  • IMPORTANT: There must be one blank line at end of file.  Spectre is case-sensitive.


Have fun!