Introduction to Hspice & mWaves Spring 2001 Instructor: Dr. Sandeep Gupta Adapted by Amit Chowdhry Hspice
Hspice is: Mwaves is: A transistor level simulator Used to perform comprehensive circuit analysis A text mode simulator Mwaves is: A graphical interface to view the results generated by HSpice Hspice
Hspice Set-up If you did setup for Magic, you don’t need to do anything for Hspice. < Correct path > which hspice /usr/usc/hspice/2002.1/bin/hspice Hspice
We have the inverter layout already (inv.mag). Make inv.ext file using :ext command. Hspice
Simulation 1) Convert the .ext file to .spice: ext2spice inv 2) Edit the file inv.spice: pico inv.spice (or any text editor, such as vi, emacs...) -------------------------------------------------------------------------------------- * HSPICE file created from inv.ext - technology: scmos .option scale=0.2u m0 out in Vdd Vdd pfet w=12 l=2 + ad=60 pd=34 as=60 ps=34 m1 out in GND GND nfet w=4 l=2 + ad=20 pd=18 as=20 ps=18 C0 Vdd GND 2.1fF ** hspice subcircuit dictionary Hspice
3) Add the following lines at the end of your file: .option post .include tsmc35.spice VVdd Vdd Gnd 3.3v VGnd Gnd 0 0v Vin in Gnd pulse(0v 3.3v 3ns 0.1ns 0.1ns 3ns 9ns) .tran 0.1ns 20ns .DC Vin 0v 3.3v 0.1v .end Be careful: just one ‘Enter’ after .end line 4) Save and exit pico. 5) Run Hspice: hspice inv.spice 6) Run mwaves: mwaves & Your input node label!!! Hspice
7) Open inv.st0 file in the menu (Design:Open…). If you can’t see your .st0 file, click Filter menu in Open Design Window. You should check Listing tab as well as Input tab. Hspice
8) Click your result data in Results Browser window. Transient: * hspice file created from inv.ext - …… DC: * hspice file created from inv.ext - …… 9) Click Types. (Voltages or Currents) Hspice
Hspice
10) Select a curve with the left mouse button and drag it with middle button to the panel in the main window. Or double click! Useful menu Panels, Measure, Tools Hspice
11) Printing Tools:Print... Hspice
Explore other links provided on class website to get acquainted with more command – especially look at different ways to apply stimulus and how to specifiy sub-circuits and save yourself some gruntwork while you do your labs. Hspice
Extensive Hspice Manual Nice Tutorials www-scf.usc.edu/~ee577/cad_frame.html in the Tools menu. *Digital Circuit Simulation Using HSPICE *HSPICE Handout from Fall99 EE577a Simple & easy tutorial of mwaves… http://www.eos.ncsu.edu/eos/info/ece/ece213_info/www/spice/mwaves.html Extensive Hspice Manual www.ece.orst.edu/~moon/hspice98/ Hspice