Geoffrey_Coram
|
I don't think there are any books (nor even papers) on how Verilog-A is converted to C. There might be something about how Verilog-A equations are translated to equations and unknowns in the simulator in "The Designer's Guide to Verilog-AMS." (Chapter 3, Analog Modeling, Section 2.1, Conservative Systems)
As for how the simulator runs analyses, "The Designer's Guide to Spice & Spectre" is probably going to cover it for you.
If you click "Books" above, you can get to some links that will chip a few cents (maybe a buck or two?) back to help support this site.
For your actual problem: can you try writing an explicit function for the drain current (maybe the "initial guess" for the iteration)?
Also, check your if() statements carefully. Sometimes people things like: if (x < -100) Iout = 0; else Iout = f(x);
forgetting that Iout = 0 also means dIout/dx = 0, and this would give you a zero output in ac.
|