<@U016EM8L91B> I was looking at the analog switche...
# analog-design
t
@Tim Edwards I was looking at the analog switches in frigate and some transistors in there have Source and Drain connected and driven with the inverse enable signal and I'm not sure what their purpose is TBH 😅
t
Which ones are you looking at, specifically? I think what you're talking about is the charge injection mitigation. Every time a switch closes, there is charge that gets injected into both sides. If every switch has a half-sized transistor of the opposite type on either side of it, then the half-sized transistor injects the opposite amount of charge in the other direction, canceling out the charge injection from the switch itself. It is really only needed where one side of the switch is high-impedance, effectively for a sampling switch. In many cases in Frigate, it is not knowable beforehand whether the switch is driving a high-impedance net or not. Also, it's easier to over-design a switch and drop it everywhere than to have to think about whether that kind of switch is really needed or not in any given place. I'm sure that I'm using that type of switch in many places where it has no purpose, but I haven't had the time to go through and check how each switch might be connected. For reference, see Behzad Razavi, Design of Analog CMOS Integrated Circuits, 2nd ed., Section 13.2 "Sampling Switches", 13.2.4, "Charge Injection Cancellation".
Thanks the for reference !
t
As Razavi points out, it's not a terribly good technique, but it will remove some of the charge injection. There is no point in having dummy devices on the grounded side of the switch other than that I was doing a lot of rapid layout with copy-and-paste methods. I need to go through the design and do a lot of cleanup. I'm not sure I have the time to do a proper job of it before the April tape-out.
c
Hmmm. I was about to make some comments on the sizing of the dummy transistors until I noticed that you sorted them by gate, not mos polarity. In loosely related news: At the moment, I have way more time than money, and I need the latter …