Add SrpV3Emulation module for software-only SRPv3 CI testing (ESROGUE-493)#1174
Conversation
Software SRPv3 server that receives SRP request frames and produces response frames against an internal memory emulation. Enables CI regression testing of the SrpV3 client without FPGA/ASIC hardware. Uses a worker thread to avoid deadlock from synchronous frame processing within the SrpV3 transaction lock scope. Memory is allocated on demand in 4 KiB pages. Includes 7 pytest regression tests and documentation updates.
There was a problem hiding this comment.
Pull request overview
This PR adds a software-only SRPv3 endpoint (SrpV3Server) to enable CI/regression testing of the existing SrpV3 client path without requiring FPGA/ASIC hardware, and includes new pytest coverage plus documentation and build/module wiring.
Changes:
- Added
rogue::protocols::srp::SrpV3ServerC++ implementation + Python bindings to emulate an SRPv3 hardware endpoint in software. - Wired the new module into the SRP build/module initialization and added Sphinx docs pages.
- Added a pytest suite that validates SRPv3 read/write behavior through a
SrpV3 <-> SrpV3Serverloopback.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/protocols/test_srpv3_server.py | New pytest suite exercising SRPv3 client/server round-trips via software-only loopback |
| src/rogue/protocols/srp/SrpV3Server.cpp | New server implementation: frame queue + worker thread, memory paging, request decode/response generation |
| include/rogue/protocols/srp/SrpV3Server.h | Public C++ API and detailed class documentation for the server |
| src/rogue/protocols/srp/module.cpp | Exposes SrpV3Server to Python via Boost.Python setup |
| src/rogue/protocols/srp/CMakeLists.txt | Adds SrpV3Server.cpp to the rogue-core build |
| docs/src/built_in_modules/protocols/srp/srpV3Server.rst | New conceptual/built-in module documentation page |
| docs/src/built_in_modules/protocols/srp/index.rst | Adds srpV3Server to built-in SRP docs index |
| docs/src/api/python/rogue/protocols/srp/srpv3server.rst | New Python API doc stub for the exported class |
| docs/src/api/python/rogue/protocols/srp/index.rst | Adds srpv3server to Python API docs index |
| docs/src/api/cpp/protocols/srp/srpV3Server.rst | New C++ API doc page for the class |
| docs/src/api/cpp/protocols/srp/index.rst | Adds srpV3Server to C++ API docs index |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace raw new[]/delete[] with std::vector<uint8_t> for exception safety, and add a null check on calloc for page allocation.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace zero-initialized memory with random data to better emulate uninitialized hardware SRAM. Both read and write paths now use a shared allocatePage() helper that fills new 4K pages with random data, ensuring consistent behavior between the two paths.
Rename to clarify this is a memory emulation module, not a real hardware server endpoint. Updates class name, files, tests, docs, and all references across the codebase.
Summary
SrpV3Emulation— a software SRPv3 endpoint that receives SRP request frames, processes them against internal memory emulation, and sends response framesSrpV3client without FPGA/ASIC hardware (ESROGUE-493)Test plan
tests/protocols/test_srpv3_emulation.py— all passing./scripts/run_linters.sh)