Menu

#59 Issue in running an simple inverter spice code.

v1.0 (example)
open
nobody
7
2023-02-02
2023-01-30
KumaranS
No

Dear Support team,
May I have your support in running the specter netlist .
Finding compatibility issue with the specter model,

Simple inverter spice code,

vdd 3 0 dc 5v
c1 2 0 5pf
set ngbehavior=spe
vin 1 0 pulse 0v 5v 1ns 1ns 1ns 10ns 20ns
m2 2 1 0 0 nfet w=1u l=40n
m1 2 1 3 3 pfet w=2u l=40n

.include "/cad/tech//MODELS/current_version/Spectre/models/design.scs"
.include "/cad/tech//MODELS/current_version/Spectre/models/include_fet_models.scs"
.tran 0.1ns 100ns
.control
run

.save v(1) v(2)
plot v(1) v(2)

.endc
.end
Kindly guide thru,
Thanks

1 Attachments

Discussion

  • Holger Vogt

    Holger Vogt - 2023-01-30

    set ngbehavior=spe
    has to be moved into user definable initialization file .spiceinit

    There is no dot command allowed inside of a .control section.

    ngspice does not find models named nfet and pfet. As you do not show us what is insinde of the model files you are including, we cannot give any clue to this problem.

     
  • KumaranS

    KumaranS - 2023-01-30

    Dear Holger,

    As suggested, I placed the

    set ngbehavior=spe in . spiceinit initialization file. ,hope the tool accepts the spectre Model.
    When I include the direct FET models , may I know why ngspice can`t able to find the model .
    Kindly let me know , Thanks

    vdd 3 0 dc 5v
    c1 2 0 5pf

    vin 1 0 pulse 0v 5v 1ns 1ns 1ns 10ns 20ns
    m2 2 1 0 0 nfet w=1u l=40n
    m1 2 1 3 3 pfet w=2u l=40n

    include "/cad/tech//MODELS/current_version/Spectre/models/design.scs"
    include "/cad/tech//MODELS/current_version/Spectre/models/include_fet_models.scs"
    include "/cad/tech//MODELS/current_version/Spectre/models/FET/nfet.scs"
    include "/cad/tech//MODELS/current_version/Spectre/models/FET/pfet.scs"
    tran 0.1ns 100ns

    run

    save v(1) v(2)
    plot v(1) v(2)

    endc
    end

     
  • Holger Vogt

    Holger Vogt - 2023-01-30

    Instead of using the spectre models, you may start a first simulation with the ngspice intrinsic models

    .model nfet NMOS level=54 version=4.8
    .model pfet PMOS level=54 version=4.8
    

    Next you have too look at your model files. Do they contain model descriptions starting with a line

    .model nfet NMOS ...
    .model pfet PMOS ...
    

    ?
    If you do not find such a model description, then you will need to publish the model files here, or nobody can give you any more help.

     
  • KumaranS

    KumaranS - 2023-01-31

    Dear Holger,
    yes I did the same with the sample model files, but still the issue is same,
    here by attached the model & the spice netlist FYR,

    vdd 3 0 dc 5v
    c1 2 0 5pf
    vin 1 0 pulse 0v 5v 1ns 1ns 1ns 10ns 20ns
    m2 2 1 0 0 N1 w=1u l=40n
    m1 2 1 3 3 P1 w=2u l=40n

    include /home/vlsicad3/open_src/spice/ngspice/ngspice-38/examples/modelcard.nmos
    include /home/vlsicad3/open_src/spice/ngspice/ngspice-38/examples/modelcard.pmos
    tran 0.1ns 100ns
    run
    save v(1) v(2)
    plot v(1) v(2)
    endc
    end
    ERROR:
    Note: Compatibility modes selected: spe

    warning, can't find model 'n1' from line
    m2 2 1 0 0 n1 w=1u l=40n
    warning, can't find model 'p1' from line
    m1 2 1 3 3 p1 w=2u l=40n
    Error: bad syntax of line
    endc
    No circuit loaded!

     
  • Holger Vogt

    Holger Vogt - 2023-01-31

    A ngspice netlist is a mixture of device (instance) lines starting with a letter and lines starting with a dot (.). In your netlist above there no dots. This cannot work.

    In my previous post I have noted two things to do. You did not follw my advice. So please do this first and report your findings. Please also have a look at chapter 11 of the current ngspice manual.

     
  • KumaranS

    KumaranS - 2023-01-31

    Dear Holger ,
    Thanks a lot for the advice , I can able to run the simulation with the example models got from ngspice sync version.
    May I know how the spectre models can be supported by ngspice, as even when we give the compatibility behavior to spe
    set ngbehavior=spe
    my spectre model will be looks like the attached snapshot,kindly advice

     
  • Holger Vogt

    Holger Vogt - 2023-01-31

    Unfortunately ngspice cannot read such a model file, even not with compat mode spe.

    You will have to modify it according to the example model.txt. So first you have to get model.txt up and running, and then try to edit the spectre file accordingly.

     
  • KumaranS

    KumaranS - 2023-02-02

    Dear Holger,
    From Ngspice tutorials I find it can support the BSIM models, so I downloaded the BSIM4 to include the model files but notice to be the C files so May I have your guidance.
    Rgds
    KumaranS

     
  • Holger Vogt

    Holger Vogt - 2023-02-02

    Please have a look at the ngspice manual, chapter 11.2, where you will detect that BSIM4 is already supported with several versions.

     
  • KumaranS

    KumaranS - 2023-02-02

    Dear Holger,
    Yes I do read the chapter , my query is when I untar the BSIM model , the files are in C language .C files so how to use those file , do we have any conversion tool or May I have some example to guide on how to include these models.

     

    Last edit: KumaranS 2023-02-02

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.