From: <yoi...@to...> - 2013-05-23 04:33:59
|
Dear ngspice developers, As you know, on 5th this month, BSIM6 was released from UCB. Since this model is only shipped with verilog-a code, I tried to compile bsim6 with adms. However, a lot of problems arose and I gave up to compile it. I'd like to report the result, hoping somebody will get rid of. 1. Necessary changes of files in admst directory: - ngspiceMODULE.hxx.xml lacking entry for binary operator '%'. To get rid of, add 'multmod'. <admst:when test="[name='shiftl']"> <admst:return name="bname" value="<<"/> </admst:when> <admst:when test="[name='multmod']"> <--- <admst:return name="bname" value="%"/> <--- </admst:when> <--- - ngspiceVersion.xml As you know, add bsim6 entries by referring to another model (ex. psp102). 2. bsim6.va Because ADMS2.3 does not support all of verilog-a language feature, many lines in bsim6.va had to be rewritten. - In `define directive, calling already defined token never contains newline. e.g. `STROBE2("Warning: (instance %M) Specified RGEO=%d not matched (BSIM6RdsEndSha \ type 2), Rend is set to zero.", rgeo); \ must be `STROBE2("Warning: (instance %M) Specified RGEO=%d not matched (BSIM6RdsEndSha type 2). Rend is set to zero.", rgeo); \ - As is shown in the above, comma ',' cannot be parsed as the part of the text even if it is between two double quotes, so that comma must be replaced with period '.' in that case. - All of 'case' statement must be rewritten with 'if...else if...else' statement. - Also, all of 'for' loop statement must be rewritten with 'while' statement. - Analog function must be replaced with `define directive. That is, analog function real lexp; input x; real x; begin if(x > `EXPL_THRESHOLD) begin lexp = `MAX_EXPL * (1.0+(x)-`EXPL_THRESHOLD); end else if(x < -`EXPL_THRESHOLD) begin lexp = `MIN_EXPL; end else begin lexp = exp(x); end end endfunction must be replaced with `define lexp(x) \ (((x) > `EXPL_THRESHOLD)? `MAX_EXPL * (1.0+(x)-`EXPL_THRESHOLD) \ : (((x) < -`EXPL_THRESHOLD)? `MIN_EXPL : exp(x))) - In generated bsim6guesstopology.c, lines associated to temporary variables T0, T1, T2 etc. are lacked, while those are used frequently to calculate the model parameters. I cannot understand the reason and I gave up to compile bsim6 at this time... Thats all. Sincerely, Y.NIITSU |