Hello everyone. I'm trying to implement a satura...
# xschem
e
Hello everyone. I'm trying to implement a saturation block for Quadratic programming optimization problem Please I'd like the sweep variable to be the difference between the two input voltage sources of the OTA. Please how do I do that on Xschem? @Stefan Schippers
s
there are 2 possibilities. 1. save the differential voltage in the raw file using ngspice 2. create the differential voltage in the raw file from xschem. 1): this will create a
vdiff
voltage that is the difference `v(plus) - v(minus)`: dc vminus 2.3 2.7 0.001 let vdiff = v(plus) - v(minus) settype voltage vdiff write cmos_example_ngspice.raw 2): from the xschem prompt do this:
xschem raw add vdiff {plus minus -}
This will create a new
vdiff
vector in the loaded raw file, in addition to the nodes saved by ngspice. then either if using 1) or 2) you can use
vdiff
as the sweep variable in the graph
e
Thank you very much @Stefan Schippers. 🙏 It worked.