Open Keno opened 2 years ago
(I can submit a PR for this at some point, but I haven't tested that this actually works yet, so I'll do that once I get around to doing that, unless somebody beats me to it).
These two documents could be useful;
@Keno Does that also imply that the temperature integrator is wrong as well?
Yes, sorry should have specified. Also it's not "wrong" as much as "bad"/"unsound". For integrators without adaptive time stepping or dynamic error detection, it will probably give sensible answers.
So basically we should remove all the unsound integrators, and replace them with custom disciplines and ODEs.
Yes, though the "custom disciplines" part of that is optional (and I wouldn't be surprised if many simulators chocked on those) and of course thermal
is already a standard discipline. But yes, replace all manual integration with proper ODE representations. Plus you'll be able to remove the time step bounding
so your simulations will both be faster and more accurate :)
@Keno - Looking forward to your pull request! It would be great if we could add some spice simulations which produce the graphs found in the documentation too.
@Keno Is there a way to cap the growth of Tfilament? Tfilament is supposed to be limited to between 3.3nm and 4.9nm. Using the Growth(Tfilament) construct, it grows without bound.
The Verilog-A model does a manual integration of the filament thickness here:
https://github.com/google/skywater-pdk-libs-sky130_fd_pr_reram/blob/6574676cbbd062d63be0f090013d59ced7302349/cells/reram_cell/sky130_fd_pr_reram__reram_cell.va#L96
This is not a mathematically sound way to do this, because it makes the solution dependent on the simulator's chosen timestep. Such trajectory-dependent models will confuse adaptive integrators and generally cause more sophisticated simulators to error. The correct way to handle something like this is to give this as a separate ODE to the integrator, e.g. as
Of course, Tfilament isn't actually a voltage, so if one was bothered by that, one could do a custom discipline
which would let you write the above as: