Coldberg has quit [Read error: Connection reset by peer]
Coldberg has joined #litex
Guest6487 has quit [Ping timeout: 256 seconds]
Degi_ has joined #litex
Degi has quit [Ping timeout: 252 seconds]
Degi_ is now known as Degi
Guest53 has joined #litex
FabM has joined #litex
FabM has joined #litex
FabM has quit [Changing host]
Coldberg has quit [Read error: Connection reset by peer]
C-Man has joined #litex
C-Man has quit [Ping timeout: 268 seconds]
<mm001>
Am 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?
<mm001>
*clock
<mm001>
I also noticed some "glitches" with the RX example we discussed on 2021-09-22. Some packets seem not to arrive.
<mm001>
Can this be a clock domain problem?
<zyp>
no, you can provide data as soon as you have it, and should set valid=1 whenever you're presenting valid data
<mm001>
ok, but then, if valid is 1 for more than one clock cycle, the data will be put multiple times into the fifo?
<zyp>
data will be put into the fifo when both valid and ready is 1 in the same cycle
<zyp>
i.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 cycle
<mm001>
Ah, 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?
<zyp>
yes
<mm001>
but what happens if i don't set valid=0 soon enough? will the same data be put into the fifo once more?
<zyp>
yes
<zyp>
a fifo will consume data every cycle both sink.valid and sink.ready is 1
<mm001>
and 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?
<mm001>
in this case, I should rather loose some packets and not have duplicates...
<zyp>
depends what sort of fifo you have and what clock domain it's in
<zyp>
which I can't answer for your particular case
<zyp>
but yes, to get sane behavior its write port need to be in the same clock domain as you're using
<mm001>
I'm using the LiteEthUDPStreamer
<zyp>
I'm not sure what clock domain that defaults to
<mm001>
As _florent_ uses self.sync in the bench/arty.py example, I guess that's the correct clock domain...
<zyp>
you generally always use self.sync and wrap the module in a ClockDomainsRenamer() to move the entire module to a different domain
jryans has quit [Quit: Bridge terminating on SIGTERM]
shoragan[m] has quit [Quit: Bridge terminating on SIGTERM]
Las[m] has quit [Quit: Bridge terminating on SIGTERM]
dcallagh has quit [Quit: Bridge terminating on SIGTERM]
david-sawatzke[m has quit [Quit: Bridge terminating on SIGTERM]
dmiller[m] has quit [Quit: Bridge terminating on SIGTERM]
a3f has quit [Quit: Bridge terminating on SIGTERM]
OmkarBhilare[m] has quit [Quit: Bridge terminating on SIGTERM]
jevinskie[m] has quit [Quit: Bridge terminating on SIGTERM]
DerekKozel[m] has quit [Quit: Bridge terminating on SIGTERM]
Crofton[m] has quit [Quit: Bridge terminating on SIGTERM]
leons has quit [Quit: Bridge terminating on SIGTERM]
hjimenez93[m] has quit [Quit: Bridge terminating on SIGTERM]
promach[m] has quit [Quit: Bridge terminating on SIGTERM]
willcode4[m] has quit [Quit: Bridge terminating on SIGTERM]
vomoniyi[m] has quit [Quit: Bridge terminating on SIGTERM]
sajattack[m] has quit [Quit: Bridge terminating on SIGTERM]
CarlosEDP has quit [Quit: Bridge terminating on SIGTERM]
amstan has quit [Quit: Bridge terminating on SIGTERM]
kaji has quit [Quit: Bridge terminating on SIGTERM]
bluecmd has quit [Quit: Bridge terminating on SIGTERM]
<mm001>
ok, thanks a lot for your help! I'll try now to wait for ready to be 1 to set valid back to 0
jryans has joined #litex
<mm001>
another 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?
<zyp>
yes
sajattack[m] has joined #litex
shoragan[m] has joined #litex
dcallagh has joined #litex
david-sawatzke[m has joined #litex
CarlosEDP has joined #litex
DerekKozel[m] has joined #litex
vomoniyi[m] has joined #litex
leons has joined #litex
a3f has joined #litex
Las[m] has joined #litex
jevinskie[m] has joined #litex
promach[m] has joined #litex
Crofton[m] has joined #litex
amstan has joined #litex
OmkarBhilare[m] has joined #litex
willcode4[m] has joined #litex
HumbertoJimenez[ has joined #litex
kaji has joined #litex
dmiller[m] has joined #litex
bluecmd has joined #litex
<mm001>
Thanks!
cr1901 has quit [Ping timeout: 260 seconds]
<mm001>
Is there a doc somewhere where such things are described?
<mm001>
Ah, 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."
<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.»
<mm001>
yes, just seen :-)
<zyp>
IIRC the rules states that ready can combinatiorally depend on valid, but not the other way around
<tpb>
Title: Documentation – Arm Developer (at developer.arm.com)
<mm001>
thanks!
<mm001>
And 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?
<mm001>
I'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 grateful
<mm001>
at least, I think so. I don't change it, so it should be the default dw=8
C-Man has joined #litex
<mm001>
with tx_fifo_depth=1, it does also not work...
<mm001>
with tx_fifo_depth=256 it sends data, but with the same problem as described (duplicates, malformed packets, skipped data)
<mm001>
and at sometime it freezes.
<leons>
That 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 between
<mm001>
Some packets have the data repeated multiple times
<mm001>
leons: yes, I'll try that
<mm001>
so you don't see any obvious mistake in the pastebin?