Hello <@U016EM8L91B>, I finally got back around t...
# ieee-sscs-dc-22
m
Hello @Tim Edwards, I finally got back around to working on Xspice like you recommended in the last meeting. Thank you for the
spi2xspice.py
script; that is super awesome. I found your post https://open-source-silicon.slack.com/archives/C016HUV935L/p1654049119452869?thread_ts=1654009288.441639&amp;cid=C016HUV935L and I tried to follow the directions with this little dmux toy problem, but I don’t have something quite right. The spice executes, but the outputs are 0. Could you perhaps take a look? I have attached the spice subckt, the generated xspice subckt and the test with the xspice subckt pasted in. It looks to me like the the generated xspice circuit isn’t actually wiring in any of the AND or INV xspice models… Also, do you maybe have any good examples of mixed signal simulations with xspice and sky130? I would like to learn more about how to do this well. Thanks a lot for your help! Micah
t
I'm not sure what went wrong with the python script, but your xspice circuit has models for the and and invert gates, but doesn't instantiate them anywhere. Only the interface (analog->digital and digital->analog) is instantiated.
m
t
Yeah, I get the same behavior, so there's something about the SkyWater PDK files that the script doesn't like. I'll need to investigate.
m
Ah, Thank you. I appreciate your help!
t
I think it most likely has to do with the
.include
statement in the original SPICE file being inside the subcircuit definition. The python script, unlike ngspice, depends on the line ordering, as it will see the calls to the subcircuits before it sees the subcircuit definitions. I modified
demux2.spice
to put the include line at the top, and I got this output, which differs only by having the three
A
lines near the top that instantiate the three standard cell models (
and2
,
and2
, and
inv
):
m
Ah, interesting. Ok. That makes sense! Testing that works for me. Thank you very much!
@Tim Edwards I have one more question related to this: Just to verify the
spi2xspice.py
script is designed to only work if there is one
subckt
spice statement in the input spice file? So a file with some hierarchy (all std cells) will fail?
t
I'm pretty sure that the script is only going to handle one level of hierarchy in the standard cell design. I don't think it would be a huge effort to get the script to handle arbitrarily deep hierarchies, but it's not a five-minute fix, either.
m
Yeah, I thought so from reading the code quickly...I've started on working on a higherarchical version...thanks for verifying!