Segmentation Fault (Core Dump)

Fahim
2012-08-16
2014-06-15
  • Fahim

    Fahim - 2012-08-16

    Hi,
    I have created the netlist as below when I am trying to run it it is giving me segmentation fault error. Please let me know if there is any issue with my netlist as I cant see any syntax error.

    FIVE INVERTER RING OSCILLATOR
    V1 n1 0 DC 2.0
    .ic v(n8) = 0
    MP1 n2 n8 n1 n1 MODP L=1.8u W=7.2u
    MN1 n2 n8 0 0 MODN L=1.8u W=3.6u
    MP2 n3 n2 n1 n1 MODP L=1.8u W=7.2u
    MN2 n3 n2 0 0 MODN L=1.8u W=3.6u
    MP3 n4 n3 n1 n1 MODP L=1.8u W=7.2u
    MN3 n4 n3 0 0 MODN L=1.8u W=3.6u
    MP4 n5 n4 n1 n1 MODP L=1.8u W=7.2u
    MN4 n5 n4 0 0 MODN L=1.8u W=3.6u
    *** adc ***
    adc1 [n5] [n6] adc
    ***Inverter****
    inv1 n6 n7 inverter
    ***dac*****
    dac1 [n7] [n8]  dac
    ***Models******
    .model adc adc_bridge ( in_low =0.5 in_high =1.0
    +                   rise_delay =1.0e-12 fall_delay =1.0e-12)
    .model dac dac_bridge(out_low = 0.5 out_high = 1.0 out_undef = 2.2
    +                      input_load = 5.0e-12 t_rise = 50e-9
    +                      t_fall = 20e-9)
    .model inverter d_inverter(rise_delay = 0.5e-9 fall_delay = 0.3e-9
    +                      input_load = 0.5e-12)
    .model MODN NMOS
    .model MODP PMOS
    .END
    .CONTROL
    tran .1n 50n
    .ENDC
    
     
  • Holger Vogt

    Holger Vogt - 2012-08-16

    Fahim,

    most recent ngspice from git would not segfault, but give an error message, which at first site is difficult to understand:
    ERROR - node n6 cannot be both analog and digital

    But it nevertheless gives a hint. ngspice determines the type of a device in the circuit by its first letter. v is a voltage source, i a current source, m is a MOS transistor etc.

    All xspice code model instances (devices in your circuit) have to have a name starting with letter 'a'!
    Like:
    ainv1 n6 n7 inverter
    and
    adac1   dac

    ngspice has thought of inv1 being some current source (starting letter 'i') and some analog nodes following (e.g. n6, which is also declared digital by adc1).

    Holger

     
  • Fahim

    Fahim - 2012-08-16

    Hi Holger,

    Thanks for you help.

    I have changed the netlist accordingly now I got the tran simulation failure.

    Reducing trtol to 1 for xspice 'A' devices
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
    Warning: Pd = 0 is less than W.
    Warning: Ps = 0 is less than W.
    Warning: Too many analog/event-driven solution alternations
    WARNING: Convergence problems at node (n6).  
        Instance: aadc1
        Connection: out
        Port: 0
    Transient solution failed -
    Last Node Voltages
    ------------------
    Node                                   Last Voltage        Previous Iter
    ----                                   ------------        -------------
    n1                                                2                    2
    n2                                         0.112984             0.112984
    n8                                                1                    1
    n3                                                2                    2
    n4                                      1.04426e-08          1.04426e-08
    n5                                                2                    2
    v1#branch                              -2.86325e-05         -2.86325e-05
    adac1#branch_1_0                             -1e+10               -1e+10
    doAnalyses: iteration limit reached
    tran simulation(s) aborted
    
     
    • Biren

      Biren - 2014-06-15

      Hi Fahim,

      How can i solved same error"Node can not be both digital and analog"

       
  • Holger Vogt

    Holger Vogt - 2012-08-16

    Fahim,

    the one below will oscillate (setting
    option noopalter
    at top of .control section).

    Holger

    <code>FIVE INVERTER RING OSCILLATOR

    V1 n1 0 DC 4.0
    *V2 n55 n56 DC 0 pwl(0 0 10n 0 20n 2 40n 2 50n 0 1 0)

    MP1 n2 n8 n1 n1 MODP L=1.8u W=7.2u
    MN1 n2 n8 0 0 MODN L=1.8u W=3.6u

    MP2 n3 n2 n1 n1 MODP L=1.8u W=7.2u
    MN2 n3 n2 0 0 MODN L=1.8u W=3.6u

    MP3 n4 n3 n1 n1 MODP L=1.8u W=7.2u
    MN3 n4 n3 0 0 MODN L=1.8u W=3.6u

    MP4 n5 n4 n1 n1 MODP L=1.8u W=7.2u
    MN4 n5 n4 0 0 MODN L=1.8u W=3.6u

    MP5 n55 n5 n1 n1 MODP L=1.8u W=7.2u
    MN5 n55 n5 0 0 MODN L=1.8u W=3.6u

    *** adc ***
    adc1   adc

    ***Inverter****

    ainv1 n6 n7 inverter

    ***dac*****

    adac1    dac

    ***Models******

    .model adc adc_bridge( in_low =2 in_high =2
    +                   rise_delay =1.0e-9 fall_delay =1.0e-9)

    .model dac dac_bridge(out_low = 0.0 out_high = 4.0 out_undef = 0.5
    +                      input_load = 5.0e-12 t_rise = 1e-9
    +                      t_fall = 1e-9)

    .model inverter d_inverter(rise_delay = 5e-9 fall_delay = 3e-9
    +                      input_load = 0.5e-12)

    .model MODN NMOS Level=8  version=3.3.0
    .model MODP PMOS Level=8 version=3.3.0

    .CONTROL
    option noopalter
    *iplot n4
    tran .1n 0.5u
    plot allv
    .ENDC

    .END
    </code>

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks