Repository navigation
rtl: connect uDMA I2C status event - #372
MikeOpenHWGroup merged 2 commits into
Conversation
Signed-off-by: Shivam Tiwari <shivamtiwari020505@gmail.com>
|
Hi @shivamtiwari020505, thanks for this PR! This is big one so it will take several days to review. In the meantime, I have several comments:
|
There was a problem hiding this comment.
Pull request overview
This PR completes the uDMA I2C “status event” path by exposing BUSY-rise and arbitration-lost-rise, synchronizing them into the system clock domain, wiring sticky STATUS bits, and routing the resulting status event into the SoC event vector (IDs 19 and 23).
Changes:
- Added a dedicated
udma_i2c_statusCDC block (edge-propagator based) and connected it inudma_i2c_topto driveerr_oand STATUS inputs. - Updated the I2C register interface so STATUS bits are sticky, clear-on-read, and “set” wins over simultaneous clear-on-read.
- Added focused Icarus/FuseSoC test targets and updated documentation for STATUS semantics and event mapping.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rtl/udma/udma_i2c/udma_i2c.core | Adds new RTL source and two FuseSoC test targets/filesets for status verification. |
| rtl/udma/udma_i2c/tb/udma_i2c_status_tb.sv | New testbench validating CDC behavior and sticky/clear-on-read STATUS semantics under async clocks. |
| rtl/udma/udma_i2c/tb/udma_i2c_control_status_tb.sv | New testbench validating BUSY/AL source pulses and legacy err_o meaning at controller level. |
| rtl/udma/udma_i2c/tb/README.md | Documents how to run the new FuseSoC/Icarus status tests. |
| rtl/udma/udma_i2c/rtl/udma_i2c_top.sv | Wires new status CDC module, connects STATUS inputs, and drives err_o from synchronized event. |
| rtl/udma/udma_i2c/rtl/udma_i2c_status.sv | New CDC module using edge_propagator to transfer pulses to sys_clk_i. |
| rtl/udma/udma_i2c/rtl/udma_i2c_reg_if.sv | Ensures new status conditions are not lost on simultaneous STATUS read (set priority). |
| rtl/udma/udma_i2c/rtl/udma_i2c_control.sv | Exposes BUSY-rise and arbitration-lost-rise separately while preserving legacy err_o. |
| rtl/core-v-mcu/udma_subsystem/udma_subsystem.sv | Routes I2C status event into the SoC peripheral event vector slot for each I2C instance. |
| docs/doc-src/ip-blocks/udma_i2cm.rst | Updates STATUS register and err_o semantics documentation and event ID mapping. |
| docs/doc-src/ip-blocks/apb_event_cntrl.rst | Updates peripheral event table: IDs 19 and 23 now defined for I2C status event. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks Mike. I have signed the ECA and pushed the requested updates. The new files now use my copyright, and I renamed the CDC helper to While checking the source lists, I added the renamed module to |
Claim the new-file copyright for Shivam Tiwari, rename the helper to udma_i2c_status_ep, document its clock-domain crossing role, and keep both source manifests in sync. Signed-off-by: Shivam Tiwari <shivamtiwari020505@gmail.com>
ee101b6 to
c800628
Compare
|
Thanks @shivamtiwari020505, looks good. Once you have a look at the comment from Copilot I can approve and merge. |
What changed
The uDMA I2C controller already generated a legacy
err_opulse asbusy_rise | arbitration_lost_rise, butudma_i2c_topleft it disconnected. The STATUS register inputs were also tied low, and the parent subsystem did not place the signal in the SoC event vector.This PR completes that path while preserving the established signal meaning:
udma_i2c_controlperiph_clk_itosys_clk_iwith the existing acknowledgededge_propagatorCDC patternerr_ofrom the synchronized legacy composite eventAlthough the port is named
err_o, BUSY rises on a normal START. The documentation therefore describes it as a status event and tells software to read STATUS for the cause.Backward compatibility
Software that intentionally unmasked a formerly reserved event slot can now observe the newly defined event; software using the documented existing events continues unchanged.
Verification
udma_i2c_control_status_tbpassesudma_i2c_status_tbpasses with asynchronous clocksudma_i2c_tophierarchy; reported warnings are pre-existing legacy/vendor warnings.git diff --checkpasses.The two tests are available as FuseSoC targets and documented under
rtl/udma/udma_i2c/tb.Fixes #356