tools/litex_server: Add DevMem (/dev/mem) interface - #2497
Merged
Conversation
Add CommDevMem, a mmap-based /dev/mem backend for litex_server, for LiteX SoCs directly memory-mapped from a Hard CPU running Linux (ex Zynq7000's GP0 at 0x40000000 or Cyclone V HPS's H2F LW bridge at 0xff200000). Running litex_server --devmem on the Hard CPU then allows remote litex_cli/litescope accesses: litex_server --devmem [--devmem-base 0xff200000] [--devmem-size 0x200000] Addresses are physical addresses; base/size define the mmap'ed window (defaults match the Cyclone V HPS H2F LW bridge).
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.
Add
CommDevMem, a mmap-based/dev/membackend forlitex_server, for LiteX SoCs directly memory-mapped from a Hard CPU running Linux (ex Zynq7000's GP0 at0x4000_0000or Cyclone V HPS's H2F LW bridge at0xff20_0000, see #2496).Running
litex_server --devmemon the Hard CPU then allows remotelitex_cli/litescope accesses over the network:Addresses are physical addresses; base/size define the mmap'ed window (defaults match the Cyclone V HPS H2F LW bridge). Modeled on
CommPCIe(same mmap/ctypes access pattern), with a window check on accesses.Functionally tested against a regular file through the
devparameter (write/read/burst/window-check); on-target test on a MiSTer/DE10-Nano is the next step together with the Cyclone V HPS bring-up.