HSPICE � Introduction by 969J7X

VIEWS: 0 PAGES: 31

									                                           ®
  HSPICE
Introduction


        Autumn 2006
 Islamic Azad University - Qazvin Branch       1
                         SPICE History
   SPICE  Simulation Program Integrated Circuit
    Emphasis

                                                      1971 : CANCER
                                                      1972 – SPICE1
Prof. Ronald A. Rohrer
                                                      1981 – HSPICE®
     (SPICE’s father)

                                                      1983 – SPICE2G6
                                                       ...
                                                      Present : Star-HSPICE®
    Prof. Larry Nagel



                          Islamic Azad University - Qazvin Branch              2
     Star-HSPICE Characteristics

   Simulation in Stable, Transient, Frequency
    Domain Modes
   Simulation from DC to Microwave frequencies
    Greater than 100GHz
   Number of Elements Only Limited by Computer
    Memory
   Using from AvanWaves to Waveforms Display
    and Analysis
   Circuits and Models Optimization

                    Islamic Azad University - Qazvin Branch   3
             Simulation Process

   Using from a Text Editor Program to Generating
    an Input File. This File consist Information about
    Circuit and Called NETLIST. This File Type is
    “.SP”

   HSPICE.EXE Running to Circuit Simulation and
    Output Data Generating

   AvanWaves Running to Output Graphs Display

                    Islamic Azad University - Qazvin Branch   4
Creating A “.SP” File




     Islamic Azad University - Qazvin Branch   5
HSPICE Program Running




      Islamic Azad University - Qazvin Branch   6
                    HSPICE Menus
 .SP File
 Path
1st Line of
NETLIST

.LIS File
Path




                                           Edit .LIS
        Open .SP   Simulatio                         Edit           Quit
        Files      n               Display File      NETLIS         from
                                   Graphs            T              Progra
                                                                    m
                          Islamic Azad University - Qazvin Branch            7
 Example 1 – An RC Network AC
 Analysis            NETLIST
    1
             R1                     A Simple AC Run
             1K
                                    * Elements Statements
    V1
10 Vdc            2                 V1 1 0 10 AC 1
 1 Vac
             R2   C1
                                    R1 1 2 1K
             1K   0.001 uF
                                    R2 2 0 1K
                                    C1 2 0 0.001u
         0
                                    * Control Statements

 Always “0” is GND                  .OP
                                    .AC DEC 10 1K 1MEG
                                    .PRINT AC V(1) V(2) I(R2) I(C1)
                                    .END



                         Islamic Azad University - Qazvin Branch      8
Circuit Simulation




   Islamic Azad University - Qazvin Branch   9
AvanWaves Running




    Islamic Azad University - Qazvin Branch   10
              Graphs Displaying




Mouse Right
Click




                 Islamic Azad University - Qazvin Branch   11
 Example 2 – An RC Network Transient
 Analysis
    1
                                                              NETLIST
             R1                     A Simple Transient Run
             1K
                                    * Elements Statements
    V1
10 Vdc            2                 V1 1 0 10 AC 1 PULSE 0 5 10N 20N 20N 500N 2U
 1 Vac
             R2   C1
                                    R1 1 2 1K
             1K   0.001 uF
                                    R2 2 0 1K
                                    C1 2 0 0.001U
         0
                                    * Control Statements

 Always “0” is GND                  .OP
                                    .TRAN 10N 2U
                                    .PRINT TRAN V(1) V(2) I(R2) I(C1)
                                    .END



                         Islamic Azad University - Qazvin Branch             12
Graphs Displaying




   Islamic Azad University - Qazvin Branch   13
 Example 3 – Id-Vds characteristics in NMOS

       Vdd                                            NETLIST
Vgg         1
                            (Vds,Id) for n-Channel
                            .op
  2                         Vdd 1 0 dc 2
                            Vgg 2 0 dc 1.15
                            M1 1 2 0 0 MNMOS L=1u W=30u
        0                   .MODEL MNMOS NMOS VTO=0.7 KP=110U
                            +LAMBDA=0.04 GAMMA=0.4 PHI=0.7
                            .dc Vdd 0 1.2 0.05 (Vgg 1.2 1.6 0.1)
 Always “0” is GND          .print dc Id=par("-I(Vdd)")
                            .end




                 Islamic Azad University - Qazvin Branch        14
Graphs Displaying




   Islamic Azad University - Qazvin Branch   15
 Example 4 – Temperature effect in NMOS Id-Vgs
 characteristics

       Vdd                                               NETLIST
Vgg      1
                               (Vgg,Id) for n-Channel (temp. effect)
             M                 .op
  2                            Vdd 1 0 dc 2
             1                 Vgg 2 0 dc 1.15
                               M1 1 2 0 0 MNMOS L=1u W=30u
         0                     .MODEL MNMOS NMOS VTO=0.7 KP=110U
                               +LAMBDA=0.04 GAMMA=0.4 PHI=0.7
                               .temp -10 20 45
 Always “0” is GND             .dc Vgg 0 1.8 0.05
                               .probe dc Id=par("-I(Vdd)")
                               .end




                    Islamic Azad University - Qazvin Branch        16
Graphs Displaying




   Islamic Azad University - Qazvin Branch   17
             Example 5 – CMOS Inverter

        Vdd                                                    NETLIST
                                CMOS Inverter Circuit
                                M1 OUT IN VDD VDD MPMOS L=1U W=20U
                                M2 OUT IN 0 0 MNMOS L=1U W=20U
         m1                     VDD VDD 0 5
   in          out              VIN IN 0 0 PULSE 0.2 4.8 2N 1N 1N 5N 20N
                                CLOAD OUT 0 0.75P
   +     m2                     .MODEL MNMOS NMOS VTO=0.7 KP=25U
                Cload           +LAMBDA=0.01 GAMMA=0.8 PHI=0.6
Vin -                           .MODEL MPMOS PMOS VTO=-0.7 KP=8U
                                +LAMBDA=0.02 GAMMA=0.4 PHI=0.6
                                .OP
         0                      .TRAN 200P 20N
                                .PRINT TRAN V(IN) V(OUT)
                                .END




                     Islamic Azad University - Qazvin Branch             18
Graphs Displaying




   Islamic Azad University - Qazvin Branch   19
Example 6 – Id-Vgs characteristics in NMOS - w/l influence


                                                            NETLIST
                                  V(gg,Id) for n-Channel (W/L effect)
                                  .op
                                  Vdd 1 0 dc 2
              Vdd                 Vgg 2 0 dc 1.15
                                  M1 1 2 0 0 MNMOS L=LM W=WM
     Vgg           1              .MODEL MNMOS NMOS VTO=0.7 KP=110U
                                  +LAMBDA=0.04 GAMMA=0.4 PHI=0.7
                                  .data ratio
        2                         LM WM
                                  1u 10u
                                  1u 20u
               0                  1u 50u
                                  .enddata
                                  .dc Vgg 0 1.8 0.05 data=ratio
                                  .print dc Id=par("-I(Vdd)")
                                  .end




                       Islamic Azad University - Qazvin Branch          20
Graphs Displaying




   Islamic Azad University - Qazvin Branch   21
Scaling Factors in HSPICE
    Scale                  Mark                        Factor
                                                       Name
    1e-15                       f                       femto
    1e-12                       p                       pico
     1e-9                       n                       nano
     1e-6                       u                       micro
     1e-3                      m                         mili
     1e3                        k                        kilo
     1e6                     meg                        mega
     1e9                        g                       giga
    1e12                        t                       tera
   20log10                     db                      decibel

             Islamic Azad University - Qazvin Branch             22
units in HSPICE
     Unit                    Mark
  Angstrom                       a
   ampere                      amp
  centimeter                    cm
   degree                      deg
 Electron-volt                  ev
     farad                        f
    Henry                        h
    meter                        m
     ohm                       ohm
      volt                       v
   second                        s



   Islamic Azad University - Qazvin Branch   23
           Commands Summary
   .TEMP t1 <t2 <t3 ..>>
    for example : .TEMP -55.0 25.0 125.0

 .MODEL mname type <VERSION=version_number>
  + <pname1=val1 pname2=val2 …>
Type : AMP = Op-Amp
       NMOS = n-Ch MOSFET
       PMOS = p-Ch MOSFET
       R = Resistor & …
Pname1… : Parameters Name
  for Example : .MODEL MNMOS NMOS VTO=0.7 KP=110U LAMBDA=0.04
                 +GAMMA=0.4 PHI=0.7


                      Islamic Azad University - Qazvin Branch   24
             Device Defining 1


   Resistor :
Rxxx n1 n2 <mname> <R=>resistance <<TC1=>val>
  +<<TC2=>val> <SCALE=val> <M=val> <AC=val>
  +<DTEMP=val> <L=val> <W=val> <C=val>

Example : RC1 13 17 R=1k TC1=0.001 TC2=0




                 Islamic Azad University - Qazvin Branch   25
             Device Defining 2


   Capacitor :
Cxxx n1 n2 <mname> <C=>capacitance <<TC1=>val>
  +<<TC2=>val> <SCALE=val> <M=val> <IC=val>
  +<DTEMP=val> <L=val> <W=val>

Example : Cshunt out gnd C=100f TC1=0.001 L=0.003




                  Islamic Azad University - Qazvin Branch   26
             Device Defining 3


   MOSFET :
Mxxx nd ng ns <nb> mname <<L=>length> <<W=>width>
  +<AD=val> <AS=val> <PD=val> <PS=val> <NRD=val>
  +<NRS=val> <RDC=val> <RSC=val> <OFF> <IC=Vds,
  +Vgs, Vbs> <M=val> <DTEMP=val> <GEO=val>
  +<DELVTO=val>

Example : M1 vdd vgg 0 0 MNMOS L=1u W=30u




                    Islamic Azad University - Qazvin Branch   27
               Supply Defining 1
   Independent :
    Vxxx n+ n- <<DC=>dcval> <tranfan>
    +<AC=acmag, <acphase>>

    Ixxx n+ n- <<DC=>dcval> <tranfun>
    +<AC=acmag, <acphase>> <M=val>

Tranfun = AM, DC, EXP, PU, SIN, …




                     Islamic Azad University - Qazvin Branch   28
                Supply Defining 2
   Pulse :
    Vxxx n+ n- PU<LSE>
    +<(> V1 V2 <td <tr <tf <pw <per>>>>> <)>

    Ixxx n+ n- PU<LSE>
    +<(> V1 V2 <td <tr <tf <pw <per>>>>> <)>




                      Islamic Azad University - Qazvin Branch   29
               Supply Defining 3
   Sin :
    Vxxx n+ n- SIN
    +<(> Vo Va <freq <td <θ <φ>>>> <)>

    Ixxx n+ n- SIN
    +<(> Vo Va <freq <td <θ <φ>>>> <)>

example : VIN 3 0 SIN (0 1 100MEG 1NS 1e8)




                     Islamic Azad University - Qazvin Branch   30
THANKS A LOT FOR YOUR
      ATTENTION




      Islamic Azad University - Qazvin Branch   31

								
To top