The autogen configuration is carried out. I fixed this problem by change the c code by hand. Firstly, include the <math.h> in 'ekvsetup.c', and replace the 'ln' function with 'log'. It works. Although it is not a good method.
Thanks and regards.
WANG Hao
------------------ Original ------------------
From: "Dietmar Warning"<dietmar.warning@...>;
Date: Wed, Sep 14, 2011 07:28 PM
To: "wanghaowhu"<wanghaowhu@...>; "ngspice-devel"<ngspice-devel@...>;
Subject: Aw: [Ngspice-devel] adms support for ekv model
Hello,
how you configured ngspice? autogen with --adms or --adms3.
I know this problem and I think in the cvs version it will disappear.
Let me know
D.
----- Original Nachricht ----
Von: ? ?(WANG Hao) <wanghaowhu@...>
An: "ngspice-devel@..." <ngspice-devel@...>
Datum: 14.09.2011 12:04
Betreff: [Ngspice-devel] adms support for ekv model
> Hi,
> I am new to ngspice and trying to use the adms to compile verilog-A
> models. In the latest ngspice-23 and adms-3.0, there seems to be something
> wrong with the ekv model.
>
> ekvsetup.c: In function 'ekvsetup':
> ekvsetup.c:42:5: warning: implicit declaration of function
> 'ln '
> ekvsetup.c:42:5: warning: nested extern declaration of 'ln'
> ekvsetup.c:42:128: error: '__max_' undeclared (first use in
> th is
> function)
> ekvsetup.c:42:128: note: each undeclared identifier is
> reporte d
> only once for each function it appears in
>
> The error seems to be related to the code:
> parameter real PHI=((NSUB>0) ?
> (2*`VT((TNOM+273.15))*ln(max(NSUB,1)*1e6/`NI((TNOM+273.15)))) : 0.7) from
> [0.1:inf)
> However, when this 'max' function is soloved. It stops due to the following
> error:
>
> spicelib/devices/adms/ekv/.libs/libekv.a(ekvsetup.o):ekvsetup.
> c:(.text+0xef9): undefined
> reference to `_ln'
> collect2: ld returned 1 exit status
>
> Is the error due to the wrong version of 'ekv.va' file?
> Thanks and regards.
>
> WANG Hao
>
> --------------------------------
>
</:includetail>
|