help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] Several problems: convergence failure, segment fault,


From: al davis
Subject: Re: [Help-gnucap] Several problems: convergence failure, segment fault, params error
Date: Mon, 8 Feb 2010 13:46:29 -0500
User-agent: KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; )

On Friday 05 February 2010, Rubén Gómez Antolí wrote:
> 1· Problems with params:
> 
> gnucap> param periodo=50us
> gnucap> param llano=0.7*periodo
> param llano=0.7*periodo
>                 ^ ? syntax error
> 
> According to wiki page (0) are correct, but fails.

For now, put it in quotes, as Hspice requires.

Without quotes, the parser sees it as a number, not as an 
expression.  If you put the variable first it works.

I need to look into what is the correct behavior.  In spice 
syntax, common sense doesn't always apply.

> 2· Convergence failure:
> 
> gnucap> print tran v(*) i(l1)
> gnucap> tran 0 5ms 1u > S01.dat
> non-recoverable convergence failure, reducing (itl4)
> newtime=8.500000e-05  rejectedtime=8.500001e-05 
>  oldtime=8.500000e-05 using=8.500000e-05
> tried everything, still doesn't work, giving up
> 
> I'm tried setting itl4 bigger and smaller without sucess.

Looking at the netlist, I see some points that are always 
trouble prone.  Some of the component values are unreasonable.  
Changing to more realistic values should fix the problem.  This 
is common when using idealized devices.

In particular, your switch specifies ron=0.01 and roff=10Meg.  
This is a ratio of 10^9, which is asking for trouble.

Another factor is the rise and fall times of VG, 1p, 
particularly when combined with the option dtmin, which has a 
default value of 1p. 

The value of dtmin should be much smaller than the shortest time 
you care about.

Non-recoverable convergence errors in transient analysis are 
usually caused by a bifurcation in the response of a circuit.  
In this case, you have a switch driven by a fast changing 
signal, and settings that do not allow sufficient resolution in 
time, so it alternates between on and off.  You need to either 
make VG slower or dtmin faster.  Since I doubt if your circuit 
really has 1 ps response, I recommend making VG slower by 
setting rise and fall to something close to what a real circuit 
does.

> 3· Segment fault
> 
> I tried to change diode with alter command; when I run tran
>  command, gnucap dies with a segment fault:
> 
> gnucap> alter D1 (0 3) D
> gnucap> tran 0 5ms 1u > S01.dat
> Violación de segmento
> 
> or
> 
> gnucap> alter D1 (0 3) D
> gnucap> print tran v(*) i(l1)
> Violación de segmento
> 
> Will help a strace output of this?

There is both a bug and a user error.

The user error is that alter doesn't work that way.  (although 
maybe it should).

For what you want to do, delete the old D1 and make a new one.

The bug is that gnucap should have given you a reasonable error 
message and not crashed.

Alter is one of those spice commands that is implemented in a 
different incompatible way in different versions of spice.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]