gnucap-devel
[Top][All Lists]
Advanced

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

[Gnucap-devel] kf in mos1 model


From: Felix Salfelder
Subject: [Gnucap-devel] kf in mos1 model
Date: Tue, 6 May 2014 03:23:23 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi there.

kf in the static instance of MODEL_BUILT_IN_MOS1 (initialized in
d_mos1.cc, line 39) depends on the compiler. i think this is bad.

as it seems, g++-4.7 compiled code comes up with a zeroed-out kf
(kf.has_good_value() returns true), although kf._v has been initialized
to NOT_INPUT before. llvm compiled code does retain kf._v == NOT_INPUT
(i.e. !kf.has_good_value()).

adding traces to the respective constructors, this is what i get during startup 
(with g++).
"""
@address@hidden::MODEL_BUILT_IN_DIODE(p)  kf.has_good_value()=0 
intptr_t(&kf)%30011=8786
@address@hidden::MODEL_BUILT_IN_MOS_BASE(p) kf.has_good_value()=0  
intptr_t(&kf)%30011=8786
@address@hidden::MODEL_BUILT_IN_MOS123(p) kf.has_good_value()=0  
intptr_t(&kf)%30011=8786
@address@hidden::MODEL_BUILT_IN_MOS1(p)  kf.has_good_value()=1 
intptr_t(&kf)%30011=8786
"""
it is not something i had expected (p is a BASE_SUBCKT*, 30011 is a prime).

eventually, the output of
"""
gnucap> model m nmos1
gnucap> list
"""
varies (watch out for "kf=", which is only there in the g++ case, because of
kf.has_good_value()).

i tried with these (which compilers do you use?).
"""
$ g++-4.4 --version
g++-4.4 (Debian 4.4.7-2) 4.4.7
$ g++ --version
g++ (Debian 4.7.2-5) 4.7.2
$ g++-4.8 --version
g++-4.8 (Debian 4.8.2-14) 4.8.2
$ clang++ --version
Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
"""

it doesn't look like a gnucap bug, does it?

cheers
felix



reply via email to

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