I am trying to simulate an inverter by using the MOS devices provided by Infineon (Infineon Simulation Models).
The provided .lib contains .SUBCKT definitions and several "levels" of modeling (3 different SUBCKT are defined for each component: BSC0925ND_highside_L0, BSC0925ND_highside_L1 and BSC0925ND_highside).
I got the first circuit (BSC0925ND_highside_L0) working with no issue.
The second circuit (BSC0925ND_lowside_L1) was a little more challenging:
1.- The .param statements used a "limit" function. So I had to add the ".func LIMIT(x,a,b) {min(max(x, a), b)}" statement, as per the manual (16.13.2)
2.- I had to replace all the "if" statements in the .param and .func definitions with equivalent logical operations.
Hello everyone,
I am trying to simulate an inverter by using the MOS devices provided by Infineon (Infineon Simulation Models).
The provided .lib contains .SUBCKT definitions and several "levels" of modeling (3 different SUBCKT are defined for each component: BSC0925ND_highside_L0, BSC0925ND_highside_L1 and BSC0925ND_highside).
I got the first circuit (BSC0925ND_highside_L0) working with no issue.
The second circuit (BSC0925ND_lowside_L1) was a little more challenging:
1.- The .param statements used a "limit" function. So I had to add the ".func LIMIT(x,a,b) {min(max(x, a), b)}" statement, as per the manual (16.13.2)
2.- I had to replace all the "if" statements in the .param and .func definitions with equivalent logical operations.
Before:
After:
My question:
Is this a known limitation? or maybe there is a syntax error (for ngspice) in the original definition that I did not see?
After changing all the if statements the model seems to work. By this I mean I can now simulate and get no more error messages.
Thank you for any help/guidance you can provide,
Gnrfaf
Last edit: Gnrfaf Akmpss 2016-11-30
The IF(a, b, c) can be defined as
or you can directly use ternary_fcn in the C-fashion:
-marcel
PS:
It works!
Thank you very much for the help.
Gnrfaf.