bring back analog_pads specifier, remove reset conditions on VP
authorbunnie <bunnie@kosagi.com>
Mon, 6 Jan 2020 13:47:58 +0000 (21:47 +0800)
committerbunnie <bunnie@kosagi.com>
Mon, 6 Jan 2020 13:47:58 +0000 (21:47 +0800)
commit87d456cae2e1b0abac82d8a88f325e93aa7c3da6
treed46d56496bf76dc86e14355c3f0fd4a57e45f364
parent4dc0a614281968cae3fa579d608d3ef05656e5fd
bring back analog_pads specifier, remove reset conditions on VP

For the "P" side of the analog channels, actually, connecting
a digital line to them has "no meaning". The docs say that
either you connect an analog pin to a pad, or vivado "ties it off
appropriately". I wish it were the case that tying a pin to 0 or 1
would actually connect it to a power or ground, because it means
that even in unipolar mode you have to burn two pins to break out
the signal of interest *and* the ground reference analog pad
(I thought I could just connect it to "0" and the pin would be
grounded, but that doesn't happen -- it's just ignored if it's
not wired to a pad).

For the pad specifier, is it OK to leave it with an optional
argument of analog_pads=None? I tried assigning to the
self.analog property after instantiation, but this doesn't
seem to work, the default values are preferred. It looks like
if you don't want to do the analog_pads= optional argument
the other way to do it would be to add code on the instiating
module that tampers with the properties of the instance directly,
but I think that's sort of ugly.

Also, I noticed you stripped out the layout specifier for
the analog_pads. I thought it would be nice to provide that
in the file, so the caller doesn't have to infer what the
pad layout is by reading the code...what's the motivation for
removing that?
litex/soc/cores/xadc.py