gen: add UDP raw listen-port selection - #141
Open
rowanG077 wants to merge 2 commits into
Open
Conversation
rowanG077
force-pushed
the
udpraw-fix-port-selection
branch
from
July 24, 2023 14:51
d03e33b to
8740aaf
Compare
Keep Rowan Goemans' original udpraw listen-port idea, but make the generated interface explicit and robust on current master. The raw UDP RX crossbar now listens on a static udp_port when configured, or on a dedicated udp_listen_port IO when left dynamic. The TX sink_dst_port remains packet metadata and no longer doubles as the receive selector. Also reject unsupported raw ip_address configuration with ValueError and add generator tests for static, dynamic, and invalid raw-port configurations.
enjoy-digital
force-pushed
the
udpraw-fix-port-selection
branch
from
July 2, 2026 13:49
8740aaf to
b03d9c9
Compare
Owner
|
Rebased this PR on current The cleaned-up version keeps the original intent but avoids using I also fixed the dynamic-port ordering issue, changed the unsupported raw Tested with:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This rebases Rowan Goemans' original
udprawlisten-port fix on current master and adds a small cleanup commit on top.Background: enjoy-digital/litex#1733
Purpose
udprawshould not use the TX-sidesink_dst_portsignal as its RX crossbar selector. The receive/listen port and transmitted destination port are different concepts:udp_portin the YAML config now selects the static UDP port received by the raw endpoint.udp_portis omitted, the generated raw endpoint exposes a dynamicudp_listen_portIO.sink_dst_portremains per-packet TX metadata only.ip_addressis rejected for raw ports since raw mode already carries per-packet IP metadata.Credit
Tested
python3 -m unittest test.test_genpython3 -m py_compile liteeth/gen.py test/test_gen.pygit diff --check