Home
A Brief User's Guide to Hspice
Contents
1. ara P1H 9H A Brief User s Guide to Hspice Sameer Sonkusale sameers ee upenn edu Introduction Hspice is a spice simulation software available on Sun Unix platforms on eniac pender machines for e g DSL 100 Moore Bldg The syntax for writing the hspice files is same as for the most commonly used PSpice except that you would be manually writing the spice netlist file for simulation You don t have the schematic editor and the probe as in Pspice The basic tutorial on spice can be found at Prof Jan Van der Spiegels Spice tutorial webpage In this tutorial we will cover some of the extra features provided by hspice which are most commonly used A complete manual can be found at pkg hspice 98 2 docs hspice pdf on seas ee machines Warning Please don t print this reference manual on any of the ee seas printers since it is a very very huge file You can also follow this link at an external site for a complete reference manual Selected Features This section will only talk about some of the advanced features provided by hspice The basic spice tutorial should be your first visit before continuing with this section Some of these advanced features may also be available in Pspice Please consult the manual for more information about each of the following features 1 Node names Instead of using numbers to represent nodes character strings can now be used This will enable labe
2. VTO 0 8311 DELTA 3 1900E 00 LD 9 0910E 10 KP 1 9344E 05 UO 170 3 THETA 1 0050E 01 RSH 3 3060E 01 GAMMA 0 3046 NSUB 3 6060E 15 NFS 5 9090E 11 VMAX 1 6930E 05 ETA 8 5870E 02 KAPPA 9 9940E 00 CGDO 5 0000E 11 CGSO 5 0000E 11 CGBO 3 2737E 10 CJ 2 9597E 04 MJ 4 4146E 01 CJSW 1 4645E 10 MJSW 1 0000E 01 PB 7 4913E 01 Weff Wdrawn Delta W The suggested Delta_W is 8 2900E 07 ENDL PMOS Then if you needed to include a PMOS model file in your spice netlist you could say lib home4 sameers Spice Models mos lib PMOS or if you needed just the NMOS models you could say lib home4 sameers Spice Models mos lib NMOS The difference between INC and LIB is that inc includes everything from a file whereas LIB can include only a section of the file defined by the entryname 5 PARAM statement The Param statement lets you create a parameter and assign algebraic mathematical expressions to it Syntax PARAM lt parametername gt lt Expression gt Example PARAM width 20u PARAM length sqrt width 1 65 This is useful if you want to say make the length and the width of the transistor related to each other in a certain fashion You would then make a MOS statement call as M1 3 2 0 0 NMOS width length http www seas upenn edu ee562 hspice html 2005 6 30 Paran P4H sO instead of fixed numbers for W and L This makes the W and the L of the transistors as p
3. currents or element variables from a DC AC TRAN NOISE or DISTO analysis The limit for the number of output variables in a single PROBE statements is 32 Additional PROBE statements may be used to deal with more output variables Example PROBE DC V 4 V 5 I Vin beta PAR T1 Q1 2 Q2 9 MEASURE statement The MEASURE statement has several different formats depending on the application You can use it for either DC AC or transient analysis Fundamental measurement modes are http www seas upenn edu ee562 hspice html 2005 6 30 eran HOH 9 e Rise Fall Delay syntax MEASURE lt DC AC TRAN gt result TRIG TARG where result is the name given to the measured output trig targ identifies the beginning of the trigger and target specs There are few other options that come with MEASURE which not have been discussed TRIG trigger syntax TRIG trig var VAL trig_val lt TD time delay gt lt CROSS c gt lt RISE r gt lt FALL f gt or TRIG AT val TARG target syntax TARG targ_var VAL targ_val lt TD time delay gt lt CROSS c LAST gt lt RISE r LAST gt lt FALL f LAST gt where TRIG and TARG specifies the beginning of the trigger and of the target signal specs trig_var is the name of the output variable which determines the beginning of the measurement trig val is the value of the trig_var at which the counter for crossing rises or falls is in
4. LL or RISE event causes a measurement to be performed find selects the FIND function last Measurement is performed when the last CROSS FALL or RISE event occurs result is the name of the measurement out_var is the name of the variable that is measured http www seas upenn edu ee562 hspice html 2005 6 30 Params mS A st9 td identifies the time at which measurement is to start when selects the WHEN function Equation evaluation Use this statement to evaluate an equation that is a function of the results of the previous MEASURE statements syntax MEASURE lt DC AC TRAN gt result PARAM equation Derivative evaluation The DERIVATIVE function provides the derivative of an output variable at a given time or frequency or for any sweep variable depending on the type of analysis It also provides the derivative of a specified output variable when some specific event occurs syntax MEASURE lt DC AC TRAN gt result DERIVATIVE out_var AT val or MEASURE lt DC AC TRAN gt result DERIVATIVE out_ var WHEN var2 val lt RISE r LAST gt lt FALL f LAST gt lt CROSS c LAST gt lt TD tdval gt or MEASURE lt DC AC TRAN gt result DERIVATIVE out_ var WHEN var2 var3 lt RISE r LAST gt lt FALL f LAST gt lt CROSS c LAST gt lt TD tdval gt where at val the value of out_var at which the derivative is to be found cross c rise r fall f The numbers in
5. and AC analyis for the values of width 60u length 10u and RL 10K and finally it would do the analyses for the 3rd set of data values Note that width length and RL have been declared using a PARAM statement 7 OPTIONS statement This helps in specifying simulation input and output control options for the hspice There are lots of different keywords associated with the options statement Please visit the reference manual for complete entries Example options post gt to store the simulation results This option is needed to view the results using awaves options probe gt to save the output variables only 8 PROBE statement The PROBE statement saves output variables into the interface and graph data files Hspice usually saves all voltages and supply currents in addition to the output variables Set the OPTION PROBE to save the output variables only Use the PROBE statement to specify which quantities are to be printed in the output listing This is very useful when simulating huge circuits where hspice simulations may run for hours if we didn t use the PROBE statement Using such a statement would save time and memory since it outputs only a few signals of interest in the whole circuit Syntax PROBE lt analysis type gt varl lt var32 gt analysis type the type of analysis for the specified plots Analysis types are DC AC TRAN NOISE and DISTO varl output variables to be plotted stored These cane be voltages
6. arameters Another example of a frequency dependent resistor would be PARAM HERTZ 100 PARAM R 1K log HERTZ rl32R The above declaration creates a resistor rl whose value is a parameter R which depends on the parameter HERTZ The ability to sweep through the different parameters is discussed in the following section on DATA statement 6 DATA statement Data driven analysis allows the user to modify any number of parameters then perform an operating DC AC or transient analysis using the new parameter values The DATA statement specifies the parameters for which values are to be changed and gives the sets of values that are to be assigned during each simulation Lets look at an example Example Say you want to perform a transient analysis and an AC analysis of your circuit for different set of values for width length and load resitance RL Then your spice netlist may look something like this PARAM width 10u PARAM length 6u MI 3 2 0 0 NMOS width length Rload 3 5 RL TRAN lIn 1000n SWEEP DATA D1 ACDEC 10 Ihz 1GHz SWEEP DATA D1 DATA D1 width length RL ag 50u 20u IK F 60u 10u 10K F 100u 25u IK ENDDATA The simulation program would then run the transient analyis and the AC analysis first for the values of width 50u length 20u and RL 1Kohms Then during the http www seas upenn edu ee562 hspice html 2005 6 30 aren mA sO next run it would perform the transient
7. cremented by one targ_var is the name of the output variable whose propagation delay is determined with respect to trig_var targ_val specifies the value of the targ var at which the counter for crossing rise or falls is incremented by one time_delay amount of delay before the measurement should start cross c rise r fall f indicates which occurences of CROSS FALL or RISE event causes a measurement to be performed last indicates that the measurement is performed when the last CROSS FALL or RISE event occurs at val is a case where val indicates the time for TRAN frequency for AC and parameter for DC when measurement should start example MEASURE TRAN tdlay TRIG V 1 VAL 2 5 TD 10n RISE 2 TARG V 2 VAL 2 5 FALL 2 This example specifies that a propagation delay measurement is taken between nodes 1 and 2 for transient analysis The measurement is done between the second rising edge of the voltage at node and the second falling edge of the voltage at node 2 The VAL 2 5 specifies the exact voltage when the measurement should begin and end Average RMS min max peak to peak and integral syntax MEASURE lt DC AC TRAN gt result func out_var lt FROM val gt lt TO val gt where result is the name given to the meaurement http www seas upenn edu ee562 hspice html 2005 6 30 ara ba 7 Fl 2k 9 from specifies the initial value for the func calculation For transient it
8. dicate which occurrence of a CROSS FALL or RISE event causes a measurement to be performed derivative selects the derivative function last Measurement is performed when the last CROSS FALL or RISE event occurs out_var is the variable for which the derivative is to be found result is the name given to the measurement td identifies the time at which measurement 1s to start var 2 3 variables used to establish conditions at which measurement is to take place when selects the WHEN function example MEAS TRAN slewrate DERIV V out AT 25ns The output of the measure statement is stored in the mt file where the can be any number starting from 0 http www seas upenn edu ee562 hspice html 2005 6 30 Sameer Sonkusale lt sameers ee upenn edu gt Last updated 22nd March 2001 http www seas upenn edu ee562 hspice html 2005 6 30
9. is in units of time to specifies the end of the func calculation func indicates the type of measurement like avg gt average max gt maximum min gt minimum pp gt peak to peak rms gt root mean square integ gt integral out_var is the name of the output variable whose function is to be measureed in the simulation example MEAS TRAN avgval AVG V 10 FROM 10ns TO 55ns Find when This allows any indep variables time freq parameter any dependent variables voltage or current or the derivative of any dependant variables to be measured when specific event occurs These measure statements are useful in the unity gain frequency or phase measurements syntax MEASURE lt DC TRAN AC gt result WHEN out_var val lt TD val gt lt RISE r LAST gt lt FALL f LAST gt lt CROSS c LAST gt or MEASURE lt DC TRAN AC gt result WHEN out_varl out_var2 lt TD val gt lt RISE LAST gt lt FALL f LAST gt lt CROSS c LAST gt or MEASURE lt DC TRAN AC gt result FIND out_varl WHEN out_var2 val lt TD val gt lt RISE r LAST gt lt FALL f LAST gt or MEASURE lt DC TRAN AC gt result FIND out_varl WHEN out_var2 out _var3 lt TD val gt lt RISE r LAST gt lt FALL f LAST gt lt CROSS c LAST gt or MEASURE lt DC TRAN AC gt result FIND out_varl AT val Parameter Definitions cross c rise r fall fThe numbers indicate which occurrence of a CROSS FA
10. ling the nodes with a name which is more appropriate for that node e g input output rather than using numbers making it easier to read Also it will enable you to locate the signals in your circuit with a name when viewing your output using awaves 2 PRINT Statement The syntax is same as before but now you could have mathematical expressions involving signals to be printed as well http www seas upenn edu ee562 hspice html 2005 6 30 Ie 2A S99 A Example 1 PRINT TRAN V 3 I VIN PAR V OUT V IN This example prints out the results of a transient analysis for the nodal voltage named 3 and the current through the voltage source named VIN The ratio of the nodal voltage at node OUT and node IN is also printed Note that the nodes have been represented by names OUT and IN instead of numbers Example 2 print varname PAR sqrt v3 This instructs HSPICE to print the square root of the voltage v3 and assign it the variable name varname The results can be found in the output file as well as in the awaves graphical interface options Apart from square root other useful functions such as log sin and tan are supported Consult the HSPICE manual pkg hspice 98 2 docs hspice pdf for a complete listing Awaves can directly be used to compute the mathematical expressions as well 3 INCLUDEStatement Syntax INCLUDE lt filepath gt filename or INC lt filepath gt filena
11. me where filename is the name of the file to be included in the present file which makes use of the above statement filepath is optional provides a tree structure representation of the directory in which the file exists Example inc home4 sameers Spice Models mos lib 4 LIB Statement Syntax lib lt filepath gt filename entryname where filename is the name of the library file to be included filepath is the path to the file entryname is the entry name for the section of the library file to included The first name of the entryname cannot be an integer Every lib statement should be followed by a ENDL statement Example Say you have a file named mos lib in home4 sameers Spice Models directory which look ssomething like this LIB NMOS MODEL CMOSN NMOS LEVEL 3 PHI 0 700000 TOX 3 0400E 08 XJ 0 200000U TPG 1 VTO 0 6081 DELTA 1 3700E 00 LD 9 0910E 10 KP 7 4209E 05 UO 653 3 THETA 9 5780E 02 RSH 5 1480E 01 GAMMA 0 6166 NSUB 1 4780E 16 NFS 5 9090E 11 VMAX 1 8150E 05 ETA 7 7500E 02 http www seas upenn edu ee562 hspice html 2005 6 30 eran PIA sO KAPPA 2 4680E 01 CGDO 5 0000E 11 CGSO 5 0000E 11 CGBO 3 4138E 10 CJ 2 8065E 04 MJ 5 3057E 01 CJSW 1 4649E 10 MJSW 1 0000E 01 PB 9 7858E 01 Weff Wdrawn Delta W The suggested Delta_W is 8 9440E 07 ENDL NMOS LIB PMOS MODEL CMOSP PMOS LEVEL 3 PHI 0 700000 TOX 3 0400E 08 XJ 0 200000U TPG 1
Download Pdf Manuals
Related Search
Related Contents
"取扱説明書" Sirius Satellite Radio EQ-SIRRCV Satellite Radio User Manual Manuel d`utilisation USER`S MANUAL Danby DAR440BL User's Manual Trevi DJ 683 Evopower Generator User Manual User`s Manual - Goodson Imports Descargue El Manual de Instrucciones Copyright © All rights reserved.
Failed to retrieve file