gnucap-devel
[Top][All Lists]
Advanced

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

Re: [Qucs/gnucsator] Assertion failed (#9)


From: Felix Salfelder
Subject: Re: [Qucs/gnucsator] Assertion failed (#9)
Date: Wed, 22 Sep 2021 14:15:31 +0200

On Sat, Sep 18, 2021 at 11:56:30AM +0200, Felix Salfelder wrote:
> The bjt wrapper in qucsator looks like this
typo. read gnucsator ^

> """
> parameter npn=1
> parameter pnp=-1
> 
> module BJT(b, c, e, s);
>   parameter Area;
>   parameter Type;
>   parameter Temp;
>   [..]
> 
>   paramset mynpn npn;
>   [..]
>   endparamset
> 
>   paramset mypnp pnp;
>   [..]
>   endparamset
> 
>   mynpn #(.area(Area*(1.+Type)*.5+1e-20) .temp(Temp)) p(c, b, e, s);
>   mypnp #(.area(Area*(1.-Type)*.5+1e-20) .temp(Temp)) p(c, b, e, s); // **
> endmodule
> """

I've had another go at this. Actually, there is a mix of issues here.

- Qucs (0.0.20) hardwires the same name for different devices.
- Verilog does not seem to support conditionals on this level.
- Gnucap only has spice style bjts without a polarity parameter.

And this is where I once gave up. Now there is a solution that fixes
things where they are much easier to fix. The bjt model in Gnucap can be
patched, so that it correctly handles the zero area case.

In the gnucsator/resistor+bjt branch I have included a copy of the bjt
model with the patch applied, and also removed the 1e-20 hack in the
wrapper. For me, this gives the same (correct) result as commenting out
**, but also works for qucs bjt instances of the other polarity.

NB: passing area=0 to the spice bjt (from gnucap-models) is asking for
trouble all the same.



reply via email to

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