NG Spice current reference

Discussion in 'Programmer's Corner' started by chrismoi, Nov 16, 2015.

  1. chrismoi

    Thread Starter New Member

    Nov 16, 2015
    Ok so i've written this code to plot the I-V characteristic of a NMOS transistor :

    .include "0.25_Cmos_Models"
    .option scale=2u

    M1001 2 1 0 0 CMOSN w=3u l=2u
    + ad=19p pd=18u as=19p ps=18u

    Vgs 1 0 dc 0v
    Vdd 3 0 dc 0v

    *zero voltage source to measure current
    Vz 2 3 dc 0v
    .dc Vdd 0v 2.5v 0.25v *Vvgs 0v 2.5v 0.25v

    plot Vz#branch v(3)


    Then i get this error :

    Scale set
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    Fatal error: m1001: effective channel length less than zero
    doAnalyses: parameter value out of range or the wrong type

    run simulation(s) aborted
    Error: no such vector vz#branch

    How is it possible to calculate the current? I'm using ngspice-26