Wednesday, 2021-09-29

*** tpb <[email protected]> has joined #litex00:00
*** Coldberg <[email protected]> has quit IRC (Read error: Connection reset by peer)01:17
*** Coldberg <[email protected]> has joined #litex01:17
*** Guest6487 <[email protected]> has quit IRC (Ping timeout: 256 seconds)01:29
*** Degi_ <[email protected]> has joined #litex03:17
*** Degi <[email protected]> has quit IRC (Ping timeout: 252 seconds)03:18
*** Degi_ is now known as Degi03:18
*** Guest53 <[email protected]> has joined #litex04:16
*** FabM <[email protected]> has joined #litex06:17
*** Coldberg <[email protected]> has quit IRC (Read error: Connection reset by peer)07:05
*** C-Man <[email protected]> has joined #litex07:08
*** C-Man <[email protected]> has quit IRC (Ping timeout: 268 seconds)07:22
mm001Am I understanding right that I have to wait for the ready of the udp_streamser.sink is 1, then I can put data on the udp_streamer.sink.data port and flip the sink.valid to 1 for one click cycle to add the data to the streamer fifo?07:52
mm001*clock07:52
mm001I also noticed some "glitches" with the RX example we discussed on 2021-09-22. Some packets seem not to arrive.07:54
mm001Can this be a clock domain problem?07:55
zypno, you can provide data as soon as you have it, and should set valid=1 whenever you're presenting valid data08:04
mm001ok, but then, if valid is 1 for more than one clock cycle, the data will be put multiple times into the fifo?08:07
zypdata will be put into the fifo when both valid and ready is 1 in the same cycle08:08
zypi.e. if you're providing valid=1 and you also see ready=1, you should consider the data sent, and if you don't have more you set valid=0 in the next cycle08:08
mm001Ah, ok... so the procedure to send one byte to the fifo is: 1. put data on data port, set valid=1, 2. wait for ready == 1 and set valid=0 then. right?08:13
zypyes08:13
mm001but what happens if i don't set valid=0 soon enough? will the same data be put into the fifo once more?08:14
zypyes08:14
zypa fifo will consume data every cycle both sink.valid and sink.ready is 108:15
mm001and the fifo clock is synced to the self.sync? So if valid is 1 for only one clk period, the data will never be put twice into the fifo, right?08:17
mm001in this case, I should rather loose some packets and not have duplicates...08:18
zypdepends what sort of fifo you have and what clock domain it's in08:18
zypwhich I can't answer for your particular case08:19
zypbut yes, to get sane behavior its write port need to be in the same clock domain as you're using08:19
mm001I'm using the LiteEthUDPStreamer08:20
zypI'm not sure what clock domain that defaults to08:20
mm001As _florent_ uses self.sync in the bench/arty.py example, I guess that's the correct clock domain...08:20
zypyou generally always use self.sync and wrap the module in a ClockDomainsRenamer() to move the entire module to a different domain08:21
*** jryans <jryans!~jryans@2001:470:69fc:105::1d> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** shoragan[m] <shoragan[m]!~shoraganm@2001:470:69fc:105::39> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** Las[m] <Las[m]!~lasmatrix@2001:470:69fc:105::74e> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** dcallagh <dcallagh!~dcallagh@2001:470:69fc:105::9c5> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** david-sawatzke[m <david-sawatzke[m!~david-saw@2001:470:69fc:105::1634> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** OmkarBhilare[m] <OmkarBhilare[m]!~ombhilare@2001:470:69fc:105::4e51> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** dmiller[m] <dmiller[m]!~dmillergn@2001:470:69fc:105::e9f6> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** a3f <a3f!~a3f@2001:470:69fc:105::41d> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** DerekKozel[m] <DerekKozel[m]!~dkozelgnu@2001:470:69fc:105::2f14> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** Crofton[m] <Crofton[m]!~croftongn@2001:470:69fc:105::9a7> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** leons <leons!~leons@2001:470:69fc:105::abc> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** hjimenez93[m] <hjimenez93[m]!~hjimenez9@2001:470:69fc:105::fe30> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** promach[m] <promach[m]!~promach@2001:470:69fc:105::ca1> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** willcode4[m] <willcode4[m]!~willcode4@2001:470:69fc:105::e1b3> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** vomoniyi[m] <vomoniyi[m]!~vomoniyig@2001:470:69fc:105::3023> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** sajattack[m] <sajattack[m]!~sajattack@2001:470:69fc:105::1d9> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** CarlosEDP <CarlosEDP!~carlosedp@2001:470:69fc:105::218e> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** amstan <amstan!~amstan@2001:470:69fc:105::1e9> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** kaji <kaji!~kajiryoji@2001:470:69fc:105::405b> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
*** bluecmd <bluecmd!~bluecmd@2001:470:69fc:105::1d44> has quit IRC (Quit: Bridge terminating on SIGTERM)08:22
mm001ok, thanks a lot for your help! I'll try now to wait for ready to be 1 to set valid back to 008:23
*** jryans <jryans!~jryans@2001:470:69fc:105::1d> has joined #litex08:24
mm001another question: if i want e.g. to send one byte at a time in a packet, i can hardwire the "last" signal to 1, right?08:25
zypyes08:25
*** sajattack[m] <sajattack[m]!~sajattack@2001:470:69fc:105::1d9> has joined #litex08:25
*** shoragan[m] <shoragan[m]!~shoraganm@2001:470:69fc:105::39> has joined #litex08:25
*** dcallagh <dcallagh!~dcallagh@2001:470:69fc:105::9c5> has joined #litex08:25
*** david-sawatzke[m <david-sawatzke[m!~david-saw@2001:470:69fc:105::1634> has joined #litex08:25
*** CarlosEDP <CarlosEDP!~carlosedp@2001:470:69fc:105::218e> has joined #litex08:25
*** DerekKozel[m] <DerekKozel[m]!~dkozelgnu@2001:470:69fc:105::2f14> has joined #litex08:26
*** vomoniyi[m] <vomoniyi[m]!~vomoniyig@2001:470:69fc:105::3023> has joined #litex08:26
*** leons <leons!~leons@2001:470:69fc:105::abc> has joined #litex08:26
*** promach[m] <promach[m]!~promach@2001:470:69fc:105::ca1> has joined #litex08:26
*** Las[m] <Las[m]!~lasmatrix@2001:470:69fc:105::74e> has joined #litex08:26
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has joined #litex08:26
*** a3f <a3f!~a3f@2001:470:69fc:105::41d> has joined #litex08:26
*** Crofton[m] <Crofton[m]!~croftongn@2001:470:69fc:105::9a7> has joined #litex08:26
*** amstan <amstan!~amstan@2001:470:69fc:105::1e9> has joined #litex08:26
*** OmkarBhilare[m] <OmkarBhilare[m]!~ombhilare@2001:470:69fc:105::4e51> has joined #litex08:26
*** HumbertoJimenez[ <HumbertoJimenez[!~hjimenez9@2001:470:69fc:105::fe30> has joined #litex08:26
*** kaji <kaji!~kajiryoji@2001:470:69fc:105::405b> has joined #litex08:26
*** willcode4[m] <willcode4[m]!~willcode4@2001:470:69fc:105::e1b3> has joined #litex08:26
*** dmiller[m] <dmiller[m]!~dmillergn@2001:470:69fc:105::e9f6> has joined #litex08:26
*** bluecmd <bluecmd!~bluecmd@2001:470:69fc:105::1d44> has joined #litex08:26
mm001Thanks!08:27
*** cr1901 <cr1901!~William@2601:8d:8600:911:ac7b:1555:3d5f:1f9f> has quit IRC (Ping timeout: 260 seconds)08:29
mm001Is there a doc somewhere where such things are described?08:31
zyphttps://github.com/enjoy-digital/litex/wiki/Streams08:32
mm001Ah, yes, I had seen that. That's why I was waiting for ready to be 1 before setting valid to 1: "When the sink becomes ready (ie the UART is ready to transmit another byte), the ready signal is asserted, and data can be written by setting up the payload data as above and asserting the valid signal. When the valid signal is asserted, the data is read by the module."08:42
zyp«While the UART example above may have been easy to get started with, it violates the Streams protocol: Actually when both valid and ready are asserted, then only may the data 'legally' handed on.»08:43
mm001yes, just seen :-)08:43
zypIIRC the rules states that ready can combinatiorally depend on valid, but not the other way around08:45
tnthttps://developer.arm.com/documentation/ihi0022/c/Channel-Handshake/Dependencies-between-channel-handshake-signals08:49
tpbTitle: Documentation – Arm Developer (at developer.arm.com)08:49
mm001thanks!08:53
mm001And maybe a stupid question, but it's ok for a 'counter = Signal(26)' to do in self.sync: counter.eq(counter + 1) and If(counter == 0, ...), right?09:04
mm001I'm sorry but it seems to be something that should be so easy and I don't know what I am doing wrong. If anyone has a minute to have a look at pastebin.com/U2DebcdB and check if there is something obviously wrong, I would be very grateful09:13
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)09:28
*** TMM_ <[email protected]> has joined #litex09:29
mm001I get some duplicate packets, sometimes three times the same packet09:30
mm001Then, sometimes, there are malformed packets...09:31
mm001strange.09:32
mm001then, often after duplicates, the counter2 is skipped a few values.09:53
mm001with tx_fifo_depth=None, it doesn't work at all.09:58
leonsmm001: what data width is your stream?09:59
mm001810:00
leonsYou might be running into https://github.com/enjoy-digital/litex/pull/100810:01
leonsAh, for 8 it should work :)10:01
mm001at least, I think so. I don't change it, so it should be the default dw=810:02
*** C-Man <[email protected]> has joined #litex10:04
mm001with tx_fifo_depth=1, it does also not work...10:06
mm001with tx_fifo_depth=256 it sends data, but with the same problem as described (duplicates, malformed packets, skipped data)10:17
mm001and at sometime it freezes.10:17
leonsThat does sound like symptoms I’ve experienced with the packetizer and depacketizer. Maybe it‘d be worth a shot to just apply the patches from my PR and test? Maybe it switches to 32bit dw somewhere in between10:22
mm001Some packets have the data repeated multiple times10:22
mm001leons: yes, I'll try that10:23
mm001so you don't see any obvious mistake in the pastebin?10:27
*** Las[m] <Las[m]!~lasmatrix@2001:470:69fc:105::74e> has quit IRC (Quit: Reconnecting)11:08
*** cr1901 <cr1901!~William@2601:8d:8600:911:5120:3edd:7c22:3adb> has joined #litex11:19
*** shorne <[email protected]> has quit IRC (Ping timeout: 246 seconds)12:33
*** shorne <[email protected]> has joined #litex12:41
*** shorne <[email protected]> has quit IRC (Ping timeout: 245 seconds)12:49
*** shorne <[email protected]> has joined #litex12:51
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)12:57
*** TMM_ <[email protected]> has joined #litex12:57
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)14:55
*** awordnot <awordnot!~awordnot@user/awordnot> has quit IRC (Ping timeout: 250 seconds)16:23
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has joined #litex17:04
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Ping timeout: 265 seconds)17:06
*** Guest53 <[email protected]> has quit IRC (Quit: Client closed)17:23
*** Guest53 <[email protected]> has joined #litex17:26
*** indy <[email protected]> has quit IRC (Quit: ZNC 1.8.2 - https://znc.in)17:38
*** indy <[email protected]> has joined #litex17:39
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 252 seconds)19:07
*** ilia__s <[email protected]> has joined #litex19:08
*** Guest53 <[email protected]> has quit IRC (Quit: Client closed)19:23
*** Coldberg <[email protected]> has joined #litex19:48
*** C-Man <[email protected]> has quit IRC (Ping timeout: 265 seconds)19:51
*** Guest53 <[email protected]> has joined #litex19:52
*** Xesxen <Xesxen!~cyber@hackalot/deelnemer/xesxen> has quit IRC (Remote host closed the connection)20:17
*** Xesxen <Xesxen!~cyber@hackalot/deelnemer/xesxen> has joined #litex20:19
*** shorne <[email protected]> has quit IRC (Ping timeout: 265 seconds)20:38
*** shorne <[email protected]> has joined #litex20:40
*** peeps[zen] is now known as peepsalot20:47

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!