<@U01SBMJT5BP> Thanks for the help. It looks like ...
# xyce
m
@User Thanks for the help. It looks like I've got basic support up and running. Delays match almost exactly, but power numbers are a bit different. I tend to get more variation in those numbers from simulator to simulator though. Your numbers are closer to hspice than ngspice, which is probably good?
👍 1
k
This isn't sky130 yet, right? What's the transistor model you're trying? (We've been investigating simulator differences recently, so I'm curious)
m
No, good question. This is just with PTM models.
k
I looked through a few model cards and see level=72, i.e. BSIM-CMG. Since that's a Verilog-A model I'd usually expect fairly good agreement, but of course the solvers are different
m
For what? PTM? There are many versions of these. Right now I'm using the 45nm ones with FreePDK45
Delays match almost exactly, but since power is aggregate the error tends to accumulate in one direction so it is off more.
k
Ok, then I was looking at the wrong one. Looks like that's BSIM 4.0 then for the 45nm PTM model cards? I know at least ngspice just sliently swaps in BSIM4.5 instead of 4.0. IIRC xyce uses 4.6.1 by default. There are slight differences between those models, so that might help, but of course getting exactly matching results is not likely
m
I'm fine with "close" in this case. Since they are predictive, they are suspect as it is. 🙂
k
👍 in our work we really wanted to make sure we got the models right, so we looked quite closely at this, but it rarely matters in practice
e
Are you doing these comparisons for transient or DC? If transient, then time integration error can be very different between simulators. For that reason, the CMC doesn’t do transient comparisons for models. Just DC, AC and noise. If you want to do a fair transient comparison, I’d recommend cranking down the time integration tolerances for both codes and much as possible. Or, another more work-intensive option (which I used to do a lot years ago) is to hack both codes to force them to (1) use the same integration method and (2) use exact same time step. That way, you at least eliminate that difference between the simulators.
Regarding Xyce being closer to Hspice than ngspice; in recent years we’ve spent a lot more time attempting to be similar to Hspice. We’ve never really targeted ngspice for comparisons, but in the old days (15-20 years ago) we used to compare with Spice3 a lot, and ngspice is basically fork of spice3. In general, I can’t say which of the two codes (ngspice or Hspice) is “better” in an absolute numerical sense. I know that Hspice takes a LOT of shortcuts to improve its speed, and I have occasionally observed them simply getting the wrong answer on some circuits. On the other hand, most commercial PDKs are setup to work with commercial EDA tools such as Hspice and Spectre, so they tend to be treated by most companies as the gold standard.
One other small comment; a lot of older SPICE models are numerically kind of bad. Lots of discontinuities, inaccurate derivatives, occasional simplifications to run more efficiently on 1970s era computers. They also often contain details that aren’t good or bad, but are undocumented. People generally expect those models to behave exactly the same as they always have. So, we coined the term “bug-compatible software”, to describe what we had to do there. Fortunately, most newer SPICE models don’t tend to have these issues (“newer” meaning the last 20 years). But the newer models are often harder for people to understand (the BSIM models have 100s of parameters, for example). As a result, the old “buggy” models are still popular for some uses.
PTM and Sky130 should both use relatively new MOSFET models, so my comment about the old buggy spice models is mostly moot. But I thought I’d mention it as it can be relevant for simulator comparisons.
m
@Eric Keiter Thanks for those suggestions. We'll think about that in the future.
👍 1