*** tpb <[email protected]> has joined #litex | 00:00 | |
*** cr1901_ is now known as cr1901 | 00:26 | |
*** xobs[m] <xobs[m]!~xobs@2001:470:69fc:105::6903> has joined #litex | 01:11 | |
xobs[m] | Hi cr1901 , I hear you had questions about Valentyusb. | 01:13 |
---|---|---|
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:8c67:8aef:ceed:b230> has quit IRC (Ping timeout: 240 seconds) | 01:50 | |
*** cr1901_ <cr1901_!~cr1901@2601:8d:8600:911:900e:5f9d:b362:e32a> has joined #litex | 02:00 | |
*** cr1901_ <cr1901_!~cr1901@2601:8d:8600:911:900e:5f9d:b362:e32a> has quit IRC (Ping timeout: 240 seconds) | 02:19 | |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:900e:5f9d:b362:e32a> has joined #litex | 02:22 | |
*** bl0x <bl0x!~bastii@p200300d7a744220019a1368ca31d62ec.dip0.t-ipconnect.de> has quit IRC (Ping timeout: 252 seconds) | 02:29 | |
*** bl0x <bl0x!~bastii@p200300d7a7270a006a6d3bafd22b1305.dip0.t-ipconnect.de> has joined #litex | 02:30 | |
*** Degi_ <[email protected]> has joined #litex | 02:35 | |
*** Degi <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 02:37 | |
*** Degi_ is now known as Degi | 02:37 | |
*** cr1901_ <cr1901_!~cr1901@2601:8d:8600:911:900e:5f9d:b362:e32a> has joined #litex | 03:06 | |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:900e:5f9d:b362:e32a> has quit IRC (Read error: Connection reset by peer) | 03:06 | |
*** cr1901_ is now known as cr1901 | 03:18 | |
cr1901 | Hi xobs[m], I'm here now for a little bit, lemme see if I can find the relevant IRC msg to link | 03:18 |
cr1901 | xobs[m]: So while I'm looking, I'll give some context | 03:20 |
cr1901 | Recently I designed a litex SoC for orangecrab optimized to take advantage of it's feather functionality | 03:20 |
cr1901 | I'm using the Betrusted I2C core and valentyusb: https://github.com/cr1901/orangecrab-feather/tree/main/deps | 03:21 |
xobs[m] | Alright, it's been a while but I can try to answer any questions. | 03:22 |
cr1901 | xobs[m]: I don't think it's a difficult question, just I'm not sure where I should "tack on" the functionality I need | 03:25 |
cr1901 | The problem w/ my SoC as-is is that the UART TX will block until a host opens the USB port | 03:25 |
cr1901 | There is a solution for non-USB UARTs in LiteX: https://libera.irclog.whitequark.org/litex/2022-03-06#1646587326-1646588438; | 03:26 |
tpb | Title: #litex on 2022-03-06 — irc logs at whitequark.org (at libera.irclog.whitequark.org) | 03:26 |
cr1901 | Aaand I'm looking for the follow-up msg and can't seem to find it | 03:27 |
xobs[m] | Are you referring to a `UARTCrossover` implementation? Or is there a new version where it shows up as an actual serial device now? | 03:29 |
cr1901 | In today's LiteX, valentyusb is an actual UART that the SoC can talk to | 03:30 |
cr1901 | https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L1227-L1236 | 03:31 |
cr1901 | https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/uart.py#L281-L298 This is the code to add an automatic TX flusher. It doesn't work for ValentyUSB because ValentyUSB doesn't actually have a stream endpoint w/ the correct name. | 03:32 |
cr1901 | I was looking for an error message in the IRC logs, but I can't seem to find it. Give me a minute to duplicate | 03:32 |
cr1901 | My question is: "How difficult would it be to modify valentyusb to support auto tx flush?" | 03:32 |
cr1901 | xobs[m]: Whoops, sorry for not mentioning you :P ^ | 03:33 |
xobs[m] | I'm not sure right now, I'll need to think. I think what you want is for it to drop data if it hasn't been read in a while, correct? | 03:35 |
cr1901 | yes, because if it doesn't the SoC program will busy wait sending the BIOS banner and status messages until I connect a terminal | 03:36 |
cr1901 | While I have to connect a USB cable, waiting for me to open a terminal for the main SoC program to run is not necessarily what I want (SD card boot, for instance) | 03:37 |
cr1901 | xobs[m]: Take your time, btw. This isn't/wasn't urgent, and I wasn't actually expecting this quick a turnaround time :D | 03:39 |
cr1901 | Just something to send off async and awai- *pulled off the stage by a hook* | 03:39 |
cr1901 | http://gopher.wdj-consulting.com:70/paste/a71cee6d-266b-46b8-9941-5e4f9355f28c.txt\ | 03:45 |
cr1901 | http://gopher.wdj-consulting.com:70/paste/a71cee6d-266b-46b8-9941-5e4f9355f28c.txt | 03:45 |
cr1901 | Yea, this is the error I recall seeing... add_auto_tx_flush would need to be added on the valentyusb side, and I'm not sure how to go about doing it | 03:46 |
xobs[m] | I actually have to go soon as well. But wouldn't it be possible to wrap the `tx_fifo` inside a `ResetInserter()` and add a timer to reset it if `tx_fifo.valid` is 1 for a very long time: https://github.com/litex-hub/valentyusb/blob/912d8e6dc72d45e092e608ffcaabfeaaa6d4580f/valentyusb/usbcore/cpu/cdc_eptri.py#L148-L161 | 03:46 |
xobs[m] | Yeah, that's how I'd do it. Place the `tx_fifo` inside a `ResetInserter()` similarly to how the address field is in one, then reset the whole tx fifo when it is Valid for too long. https://github.com/litex-hub/valentyusb/blob/master/valentyusb/usbcore/cpu/eptri.py#L225-L234 | 03:48 |
*** cr1901__ <cr1901__!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has joined #litex | 03:49 | |
cr1901__ | xobs[m]: Wifi is going to hell rn. | 03:50 |
cr1901__ | Anyways, I didn't think of that. That's a reasonable idea and I'll look into trying it | 03:50 |
cr1901__ | I'll send a PR if it works- no need to be compat w/ litex's add_auto_tx_flush | 03:50 |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:900e:5f9d:b362:e32a> has quit IRC (Ping timeout: 240 seconds) | 03:51 | |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has joined #litex | 03:54 | |
xobs[m] | I think it's possible to still be compatible, and I'm curious to see how well it works. | 03:54 |
*** cr1901__ <cr1901__!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has quit IRC (Ping timeout: 240 seconds) | 03:56 | |
cr1901 | the litex version drains the TX fifo one entry at a time, every interval, after timeout has occurred (without any activity from the PHY) | 03:56 |
cr1901 | your solution sounds like "when timeout has passed, drain the fifo all at once" | 03:57 |
cr1901 | That being said, I see that tx_fifo in CdcUsb is similar to the litex UARTs, so when I get the chance I'll play w/ it | 03:58 |
cr1901 | Thanks for the hint | 03:58 |
cr1901 | xobs[m]: It's midnight here, and while my sleep schedule hasn't been great the past few days, I've also lacked the b/w for most FPGA type stuff :P | 04:04 |
cr1901 | Otherwise I would do it tonight | 04:04 |
*** AndrewD <[email protected]> has joined #litex | 04:48 | |
AndrewD | @mithro: thanks for the spreadsheet link | 04:49 |
AndrewD | I'm intrigued by renode, I've thought about using it but was concerned that it may be another rabbit hole that takes quite a bit of time to get up to speed with. The high level introductory information available makes it look almost too easy to get started with demos, but it only gets useful when you dive into the less trivial stuff. | 04:52 |
*** cr1901_ <cr1901_!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has joined #litex | 04:53 | |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has quit IRC (Killed (NickServ (GHOST command used by cr1901_))) | 04:55 | |
*** cr1901_ is now known as cr1901 | 04:55 | |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has quit IRC (Read error: Connection reset by peer) | 05:04 | |
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:e93d:5782:8b1c:7d32> has joined #litex | 05:04 | |
*** AndrewD <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 06:20 | |
*** sebo <[email protected]> has joined #litex | 09:03 | |
*** sebo_ <sebo_!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has joined #litex | 09:03 | |
*** C-Man <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 09:15 | |
*** sebo_ <sebo_!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has quit IRC (Remote host closed the connection) | 09:54 | |
*** sebo_ <sebo_!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has joined #litex | 09:55 | |
*** sebo <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 09:59 | |
*** sebo_ <sebo_!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has quit IRC (Ping timeout: 240 seconds) | 09:59 | |
*** sebo <sebo!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has joined #litex | 10:32 | |
*** sebo_ <[email protected]> has joined #litex | 10:34 | |
*** sebo <sebo!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has quit IRC (Remote host closed the connection) | 10:50 | |
*** sebo <sebo!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has joined #litex | 10:51 | |
*** sebo <sebo!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has quit IRC (Ping timeout: 240 seconds) | 10:55 | |
*** sebo_ <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 10:55 | |
*** sebo <sebo!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has joined #litex | 10:59 | |
*** sebo_ <[email protected]> has joined #litex | 11:00 | |
*** sebo <sebo!~sebo@2a01:e0a:89b:c0:4539:fc14:caad:dc10> has quit IRC () | 11:13 | |
*** sebo_ <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 11:18 | |
*** lexano_ <[email protected]> has joined #litex | 15:08 | |
*** lexano <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 15:12 | |
*** rektide <[email protected]> has quit IRC (Ping timeout: 250 seconds) | 15:27 | |
*** rektide <[email protected]> has joined #litex | 15:28 | |
*** nats` <nats`!~nats@2001:41d0:8:c634::1> has quit IRC (Ping timeout: 250 seconds) | 15:30 | |
*** nats` <nats`!~nats@2001:41d0:8:c634::1> has joined #litex | 15:31 | |
*** C-Man <[email protected]> has joined #litex | 18:23 | |
*** Coldberg <[email protected]> has joined #litex | 18:24 | |
*** C-Man <[email protected]> has quit IRC (Ping timeout: 260 seconds) | 18:28 | |
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 245 seconds) | 19:10 | |
*** ilia__s <[email protected]> has joined #litex | 19:38 | |
*** sebo <[email protected]> has joined #litex | 20:32 | |
*** sebo <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 20:51 | |
*** ilia__s <[email protected]> has quit IRC (Read error: Connection reset by peer) | 22:20 | |
*** ilia__s6 <[email protected]> has joined #litex | 22:21 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!