Re: Several problems: convergence failure, segment fault, params error

Rubén Gómez Antolí <[email protected]> Tue, 09 Feb 2010 00:31:06 +0100
Newsgroups gmane.comp.gnu.gnucap.general
Message-ID <[email protected]>
Hello:

al davis escribió:
> 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.

Ok, it runs:

gnucap> param llano=periodo*0.7
gnucap> eval llano
llano= 35.E-6
gnucap> param alto='0.3*periodo'
gnucap> eval alto
alto= 15.E-6

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

In certain point of view, is a "language issue", english are order 
inverter that spanish, even in this numerical case. For me, is easiest 
think in modifier*variable than variable*modifier, and I think that is 
common for me view in these order (at class, books, etc). (Only my opinion).

>> 2· Convergence failure:
>>
>> (...)

> 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.

Thanks so much for your tips (I encounter it many educational), it runs 
setting lower rise and fall time.

>> 3· Segment fault
>>
>> (...)

>> 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.

This is my fault, I think that alter can be used in this way, sorry about.

Thanks for all again.

Salud y Revolución.

Lobo.
-- 
Libertad es poder elegir en cualquier momento. Ahora yo elijo GNU/Linux,
para no atar mis manos con las cadenas del soft propietario.
---------
Desde El Ejido, en Almería, usuario registrado Linux #294013
http://www.counter.li.org