Virginia Tech® home

Hspice Tutorial

tutorialHspice1
CMOS Inverter Circuit
  • To perform hspice simulation on the transient analysis file, type the command:

hspice inv_tr_018.sp > inv_tr_018.lis

Four files (inv_tr_018.lis, inv_tr_018.ic0, inv_tr_018.st0, inv_tr_018.tr0) are created. View inv_tr_018.lis, inv_tr_018.ic0 and inv_tr_018.st0 to examine simulation results and status.

  • To plot the results, type the command:

CScope

  • CScope (CosmosScope) window appears. Select File->Open->Plotfiles
    The Open Plotfiles window is defaulted to display PL/AWD files. Set the  Files of Type option to display HSPICE (*.tr*,*.ac*,*.sw*,*.ft*) files. File inv_tr_018.tr0 is then listed. Select inv_tr_018.tr0 and click open.
tutorialHspice2

  • “Signal Manager” window appears. Click the inv_tr_018.tr0 item. Another window entitled “inv_tr_018.tr0” contains the node names and measured values to be plotted. Double click "in" and "out' signals. Waveforms show up in CScope window

  • To update Axis information, double-click on an axis and modify units or zoom factors.

  • To Export the Waveform into an image format, go to File->Export Image and save the waveform in an image format of choice.

  • The output waveforms for the transient analysis of the inverter in 0.18um process looks like this.
  • To measure Power Dissipation Characteristics:
    • Add a measure statement to your spice netlist to measure average power:

    • .measure tran avgpwr AVG power from=1ns to=20ns
    • To measure max power:

    • .measure tran peakpwr MAX power from=1ns to=100ns
    • Add several different size output load capacitances:

    • cload out 0 20fF
                  .alter
      cload out 0 50fF
                   .alter
         cload out 0 200fF
    • The netlist file with power-dissipation measurement: inv_power_018.sp.
    • For HP 0.5um / TSMC 0.35um technologies, the corresponding files are inv_power_050.sp and inv_power_035.sp, respectively
    • Compile the netlist file:
      hspice inv_power_018.sp > inv_power_018.lis
    • Type:
      grep ' avgpwr=' inv_power_018.lis|tail -3

    • The average power will be output for each capacitance value. Take the average of the three values to get the average power dissipated.
    • Repeat the above for peak power:
      grep ' peakpwr=' inv_power_018.lis|tail -3
    • Final Values: Average Power Dissipation: 19.44 uW

    • Peak Power Dissipation: 452.23 uW
  • To measure Nodal Capacitance:
    • Replace your .option statement with the following: (captab = capacitance table)

    • .option captab post
    • This will output the maximum capacitance for each node in your circuit onto the list file (or stty)

Have fun!