Is it possible to use internal device data in a bsource equation?
Like:
~~~
B1 pos_node neg_node V=@dev[param]
~~~
Some user wanted to put in a circuit a non linear resistor (implemented with a bsource) that uses the gm of one of the MOS transistors in the circuit.
Example (assuming @m.xm2.msky130_fd_pr__nfet_01v8[gm]
is a valid device node that can be saved in raw file with a save line):
B1 XXX 0 V = @m.xm2.msky130_fd_pr__nfet_01v8[gm]
The above of course is not a resistor, the B source just creates a voltage equal to the gm of a mos transistor. Just to see if it works.
Ngspice does not accept my above attempt.
Last edit: stefan 2022-08-28
I will have to recap the setting up of the B source parse tree.
I guess this feature is not implemented, but have not yet any idea if easily possible.