frontend: Eliminate external_pending launch deadlock (non-external next_id via rd_swacc)#147
Open
DanielKellerM wants to merge 1 commit into
Open
frontend: Eliminate external_pending launch deadlock (non-external next_id via rd_swacc)#147DanielKellerM wants to merge 1 commit into
DanielKellerM wants to merge 1 commit into
Conversation
…ernal status/done_id Removes the peakrdl external_pending whole-block stall that #134's rd_ack gating deadlocks against. next_id becomes a normal internal register with a rd_swacc read-strobe (declared as a UDP) driving the launch, matching the old reggen hwext+hwre behaviour: no external register, no cpuif_req_stall, one-cycle read. Combined with the native-APB frontend (#131) and internal status/done_id (#135).
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.
Problem
Reading
next_idlaunches a DMA. Since #73 the register frontend modelsnext_id/status/done_idas PeakRDLexternalregisters. peakrdl-regblock emits anexternal_pendinglatch drivingcpuif_req_stall_rd/wr— a whole register-block stall while any external access is outstanding.#134 then gated the external
rd_ackon the decodedreqstrobe. Butexternal_pendingmaskscpuif_req, soreqis high for only one cycle; onceexternal_pendinglatches,reqdrops to 0. If the arbiter grant (arb_ready) is not high in that first cycle,rd_ack = req & arb_readycan never fire again →external_pendingis stuck high → the whole reg block is frozen. When the config port shares interconnect ordering with other traffic (e.g. a mem-tile DMA whose config slave shares a demux/NoC path with CPU stores), this frozen block back-pressures and deadlocks unrelated memory traffic.The pre-0.7.0 (reggen) frontend never had this:
next_idwashwext + hwre(a hardware-external register with a.reread strobe) — noexternal_pending, no whole-block stall; the read stalled only locally via the wrapper's reg-busready.Fix
Model the observation registers as non-
external, reproducing the reggen behaviour in PeakRDL:next_id: a normal internal register (sw=r; hw=w) with ard_swaccread-strobe (declared as a UDP) driving the launch — a combinational one-cycle pulse, exactly like the old.re.status/done_id: internal (from frontend: Model status/done_id as internal status registers #135).With no
externalregister, peakrdl emitsexternal_pending = 0and hardwirescpuif_req_stall = '0— no whole-block stall, no deadlock, and noassert_bad_ext_rd_ack. The frontend fires the launch offrd_swacc; no ack handshake, no hold latch.Relation to other PRs
This branch incorporates:
status/done_id) — required, since all observation regs must be non-external to fully removeexternal_pending.and fixes #134's launch-read deadlock via the
next_id→rd_swaccchange.Suggested merge order: #131 → #135 → this. It can also be merged standalone (it contains all three); if #131/#135 land first, this rebases down to just the
next_id→rd_swaccchange + therd_swaccUDP declaration.Test
Validated on a Gwaihir mem-tile DMA (l2_dma L2↔L2 passthrough), where the config port shares the mem-tile demux/NoC path with CVA6 SPM stores. On
devel+ #134 this hard-deadlocks the SoC; with this fix it runs to completion (SLINK SUCCESS), matching the 0.6.5 baseline, with zero assertions.