FFY00 has quit [Remote host closed the connection]
FFY00 has joined #amaranth-lang
frgo_ has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
oter has quit [Remote host closed the connection]
oter has joined #amaranth-lang
Darius has quit [Quit: Bye]
Darius has joined #amaranth-lang
frgo has joined #amaranth-lang
frgo_ has quit [Read error: Connection reset by peer]
Darius has quit [Quit: Bye]
Darius has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
frgo has joined #amaranth-lang
Psentee has quit [Quit: Off]
Psentee has joined #amaranth-lang
PatD has joined #amaranth-lang
Psentee has quit [Client Quit]
Psentee has joined #amaranth-lang
Wanda[cis] has quit [Quit: Idle timeout reached: 172800s]
<PatD>
Greetings, a question about inout pins.
<PatD>
I'm integrating with a set of 3rd party verilog/ilang modules. I've created numerous wrappers using m.submodules.instance = Instance(...) without issue, but this particular one uses some inout pins, which internally, eventually get used as SB_IO PACKAGE_PINs.
<PatD>
I tried many things to no avail and cannot figure out how to pass in an io_pin = ... to the Instance.
<PatD>
Closest I've come comes down to
<PatD>
io_inoutpin = IOPort(1, name="my_pin")
<PatD>
but it dies with cryptic errors.
<PatD>
Here, "my_pin" is defined as a resource in the platform
<PatD>
Not certain what else to try at this point.
<PatD>
Can anyone provide a link to any examples of using Instance with bidir/inout pins or even just a complete example of IOPort usage using arbitrary pins, mapped for the platform, as above?
<whitequark[cis]>
PatD: do I understand it correctly that you want to connect an FPGA pin directly to some Verilog module, which instantiates `SB_IO` itself?
<PatD>
Yeah, looks that way. Just want to pass it the raw pin, or use the equivalent of a pcf or somesuch.
<PatD>
Thought I found the way with the IOPort stuff, but can't seem to grok what it wants.
<whitequark[cis]>
use this: Instance("your_thing", io_whatever=platform.request("pin", dir="-").io)
<whitequark[cis]>
re: cryptic errors, could you file that as a usability issue please?
<PatD>
Oh! Damn, should have pinged here sooner, stayed up way too long debugging this. Works for one pin, will try out the whole design.
<whitequark[cis]>
and I guess the overall thing is a documentation issue, since I don't think we have any place where integration with Verilog is explained
<whitequark[cis]>
technically this is documented
<whitequark[cis]>
but the documentation requires you to understand the whole system in depth in a way that's not really reasonable to expect
<whitequark[cis]>
I mean, in order to answer this question
<whitequark[cis]>
I think for the time being we could probably just stick it into lib.io docs
<PatD>
Yeah, had found my way to the first, and reviewed many times, and some parts of the second but never figured it out. The fact the .io attrib gags with "'Pin' object has no attribute 'io'." unless you have the dir="-" had me mystified. Not certain that's anywhere in there. In any case, will try and summarize/put the issue up.
<PatD>
Seems to have solved all my issues, module works great. Thanks again.
<whitequark[cis]>
the dir="-" thing is something that's in the middle of a major deprecation/redesign cycle, which is why it's confusing
<whitequark[cis]>
we're making it less confusing, but that takes a lot of time and effort
<whitequark[cis]>
lib.io itself is the culmination of a major design effort we've had a few months ago that covers most of the issues, though not all
frgo has quit [Quit: Leaving...]
frgo has joined #amaranth-lang
frgo has quit [Remote host closed the connection]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 276 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 255 seconds]
pie_ has quit []
bl0x[m] has quit [Quit: Idle timeout reached: 172800s]