<@U016EM8L91B> I was wondering if it would make se...
# chipalooza
a
@Tim Edwards I was wondering if it would make sense to try to put the control block code in a separate non .sch file and how would this look like in the CACE datasheet file. I feel like I am redrawing the same testbench many times just to change the control block. Maybe I am getting something wrong, at some point I thought the test benches would be generated by CACE automatically, but didn't have the time to find out how so I just drew some TBs and copied/pasted some others.
t
Without looking into the options, all I can say right now is that I noticed the same thing, that a number of my testbenches were the same circuit with different control blocks. I'm not sure if ngspice would allow the whole control block to be surrounded by an "if" block, or if xschem has a way (tcl_eval, maybe?) of doing the same thing. What you're suggesting is something like having an
.include
statement that includes a control block, which can then change based on the definition. That would be easy to set up in CACE, but if the control block contains variables that need to be substituted, then CACE probably needs to be coded to find all the
.includes
in a file and determine if any of them require substitution. I think I can come up with a way that works and is not hard to implement. It probably won't get implemented this week, though.
Sorry, some of that response was "thinking out loud".
a
I was thinking something like loading a second spice file with the sim control code, not sure if ngspice allows that
t
Yes, loading a 2nd SPICE file is easy with
.include
. The problem is that your control block will most likely have conditions using CACE variable names, and CACE will need to run variable substitution on that file. The more I think about it, what makes sense to me is that you should be able to put something like
.include {test_code}
in the testbench, and define
test_code
as a condition in the characterization file, and that CACE should just assume that if you use a variable for an included file, it should be in-lined and then run through variable substitution.
a
Currently, I am unable to compare options, but I will try to take a look in the CACE source later to see how variable substitutíon works. At some point, I was using spice .
param
to perform this task on a previous project where I was using Python to automate circuit design (also something I would like to discuss in the near future), but I had too many problems with model parameters expansion failing with something like "no model name" which I believe is related to bining. What I thought would not involve including the control block from the testbench but just loading it from CACE after the testbench was loaded, if the user could just specify a set of files to load instead of a single one.