<d1b2>
<rwhitby> so I have an I2CInitiatorSubtarget in my build(), and now I need to add a register for the alert signal which is polled by the async task.
<d1b2>
<rwhitby> I can call iface.add_subtarget() twice? Once for I2CInitiator (unchanged) and once to add some new gateware for this alert register connected to the pin on A2?
<d1b2>
<rwhitby> My gateware additional subtarget just needs to connect the input pin A2 to a register bit.
<d1b2>
<rwhitby> How can I see what logic the nmigen has generated in a glasgow build?
d_olex has joined #glasgow
d_olex has quit [Ping timeout: 276 seconds]
jstein has joined #glasgow
egg|anbo|egg__ has quit [Remote host closed the connection]
<d1b2>
<rwhitby> @Attie getting something unexpected here - the i2c transactions in the handle_irq() call in the _monitor_alert() aync task seem to block while the repl() is sitting at the prompt waiting for input.
egg|anbo|egg has joined #glasgow
<d1b2>
<rwhitby> I guess it's because both the async task and the repl task are both waiting on the same FIFO.
jstein has quit [Quit: quit]
siriusfox has quit [Ping timeout: 276 seconds]
siriusfox has joined #glasgow
siriusfox has quit [Read error: Connection reset by peer]
siriusfox has joined #glasgow
d_olex has joined #glasgow
egg|anbo|egg has quit [Remote host closed the connection]
<d1b2>
<rwhitby> here's my conundrum. I have an async task which needs to use the I2CInitiatorSubtarget to read the alert status. Then I also have repl or interact which also needs to use the same I2CInitiatorSubtarget to do stuff. This aint gonna work cause these two coroutines will both put stuff on the FIFO and the two streams will get interleaved and confused by the unexpected responses.
d_olex has quit [Ping timeout: 245 seconds]
siriusfox[m] has joined #glasgow
d_olex has joined #glasgow
<whitequark[m]>
rwhitby: yes, you can add two subtargets. to see the logic you can run `glasgow build -t v <applet>` for example. yes, you have a problem due to FIFO interleaving; use some form of exclusive access, like a mutex
<d1b2>
<rwhitby> thx for the tip
d_olex has quit [Ping timeout: 276 seconds]
d_olex has joined #glasgow
d_olex has quit [Ping timeout: 245 seconds]
d_olex has joined #glasgow
PyroPeter_ has joined #glasgow
PyroPeter has quit [Ping timeout: 276 seconds]
PyroPeter_ is now known as PyroPeter
d_olex has quit [Ping timeout: 240 seconds]
d_olex has joined #glasgow
d_olex has quit [Ping timeout: 245 seconds]
electronic_eel has quit [Ping timeout: 276 seconds]
electronic_eel_ has joined #glasgow
<d1b2>
<rwhitby> Decided to see what could be done without polling the interrupt, and it seems I can achieve a 14ms response from receiving source caps to sending request. So 10ms to spare (of course this is completely dependent on USB request latency).
<d1b2>
<davoid> good idea with cobs, we switched all our various framing protocols over uart/spi to use cobs for efficiency and zero-copy. are you thinking some crc at the end to handle rare glitches -> recovery? or just rely on the usb-phy there?
<whitequark[m]>
rely on usb phy
<whitequark[m]>
we don't currently have any extra crc, don't see why multiplexing must introduce it
<whitequark[m]>
cobs is self-synchronizing anyway
d_olex_ has joined #glasgow
d_olex has quit [Ping timeout: 264 seconds]
d_olex_ has quit [Ping timeout: 264 seconds]
d_olex has joined #glasgow
d_olex has quit [Ping timeout: 276 seconds]
d_olex has joined #glasgow
d_olex has quit [Ping timeout: 240 seconds]
egg|anbo|egg has joined #glasgow
egg|anbo|egg__ has joined #glasgow
egg|anbo|egg__ has quit [Remote host closed the connection]
egg|anbo|egg has quit [Ping timeout: 245 seconds]
d_olex has joined #glasgow
egg|anbo|egg has joined #glasgow
d_olex has quit [Ping timeout: 260 seconds]
thasti has quit [Remote host closed the connection]
electronic_eel_ has quit [Ping timeout: 276 seconds]
electronic_eel has joined #glasgow
d_olex has joined #glasgow
_whitelogger has joined #glasgow
egg|anbo|egg has quit [Remote host closed the connection]
egg|anbo|egg has joined #glasgow
egg|anbo|egg has quit [Remote host closed the connection]
egg|anbo|egg has joined #glasgow
egg|anbo|egg has quit [Remote host closed the connection]
FFY00_ has quit [Ping timeout: 240 seconds]
FFY00 has joined #glasgow
FFY00_ has joined #glasgow
FFY00 has quit [Ping timeout: 260 seconds]
electronic_eel has quit [Ping timeout: 264 seconds]