[Libre-soc-bugs] [Bug 50] nmigen pinmux
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Mon Nov 15 14:28:03 GMT 2021
https://bugs.libre-soc.org/show_bug.cgi?id=50
--- Comment #27 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
https://git.libre-soc.org/?p=pinmux.git;a=commitdiff;h=b65a08d04f740bb04db2f4e06728efd1281ff4ec
Andrey i have to say, "very much good luck working this out" :)
there are 4 things: they have to be wired together. i have
no idea which it is, or which direction: that's down to you
to work out. i am partially-dsylexic when it comes to these
things. it could be:
comb += pin.i.eq(io.core.i)
comb += io.pad.i.eq(self._invert_if(invert, port))
it could be like that, it could be completely the other way round.
the 4 things needing connecting are:
* self._invert_if(invert, port)
* pin.i
* io.pad.i
* io.core.i
the existing code is:
comb += pin.i.eq(self._invert_if(invert, port))
so that already tells you that it is going to be:
comb += pin.i.eq(SOMETHING1)
and:
comb += SOMETHING2.eq(self._invert_if(invert, port)
this took 5 months for me to get completely wrong, but that was
because of litex. hopefully with nmigen you will get "driver
conflict errors" immediately if you get it wrong the first time,
because, here, line 587, the wrong thing will conflict with this
https://git.libre-soc.org/?p=c4m-jtag.git;a=blob;f=c4m/nmigen/jtag/tap.py;h=1f3d424cbd7451c0434e0c71168f5aa0935af860;hb=c2bf4810f9f91ced7fcda777b92b86ab353da288#l587
586 if conn._iotype == IOType.In:
587 m.d.comb += conn.core.i.eq(Mux(bd2core, io_bd[idx],
conn.pad.i))
that, actually, should be enough to work out what to do.
once done set_input, set_output can also be done, and that really
should be all that's needed. no need for the tristate ones.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list