feat(cache): DSS Cache driver implementation and host unit tests #110
No reviewers
Labels
No labels
Category
App
Category
Documentation
Category
Firmware
Category
Hardware
Category
Qms
PR_Size
L
PR_Size
M
PR_Size
S
PR_Size
XL
PR_Size
XS
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Priority
Very Low Priority
Size
Epic
Size
Feature
Size
Task
Status
Blocked
Status
Draft
Status
Needs-review
Team
Board
Team
Dev
Team
Management
Type
Bug
Type
Capa
Type
Improvement
Type
New-feature
Type
Regulatory
Type
Usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
opendutchsolutions.public/hal_awr6843!110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/109-dss-cache-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Adds
hal/dss/cache/hal_dss_cache.c/.h— a deliberately narrow driver for the C674x DSP's L1P/L1D/L2 cache module: read-only access toL1PCFG.L1PMODE/L1DCFG.L1DMODE/L2CFG.L2MODE(hal_dss_cache_l1p_mode()/_l1d_mode()/_l2_mode()), the seven documented self-clearing global coherence-operation triggers (hal_dss_cache_l1p_invalidate(),_l1d_invalidate(),_l1d_writeback(),_l1d_writeback_invalidate(),_l2_invalidate(),_l2_writeback(),_l2_writeback_invalidate()— each a bounded poll-for-completion, same#define-timeout pattern ashal_adcbuf.c's ECC-init poll), and bounds-checked indexed read/write of the 256-entry Memory Attribute Register array (hal_dss_cache_mar_read()/_mar_write()).Flagged in its own top-of-file comment as the least-verified, lowest-confidence driver in this project so far: register layout is unusually well corroborated (SPRUFK5A, TI's auto-generated
reg_dspicfg.h, and the Linux kernel's C64x+ cache device trees all agree on every address/reserved-gap), but this project has no source for the operational-sequencing guidance TI's separate Cache User's Guide (SPRUG82) would normally provide. The driver deliberately stays out of that territory — no cache-mode writes, no block/address-range coherence operations, no freeze-mode controls, and no invented multi-register "safe flush" sequence; composing these primitives is left entirely to the caller.Why
Continues the DSS-side driver batch (Mailbox, EDMA, VIM, DSS ADCBUF, DSS INTC already landed).
Related Issue
Closes #109
Type of Change
Impact Assessment
Testing
testing/dss/cache/test_dss_cache_functionallocally (4 test cases, 29 assertions, all passing) alongside the full existingctestsuite (377/377 passing, no regressions); ran a full MISRA C:2025 pass (0 unsuppressed findings,-DENABLE_DSS_CACHE_MODULEadded); reformatted and re-verified against the exact clang-format 18.1.3 the CI runner uses; sanity-checked by swappinghal_dss_cache_l2_invalidate()'s target register fromL2INVtoL2WB, confirming the test suite fails (1 assertion), then reverting.PR Size
Size justification / exemption (if L or XL):
611 raw lines across 6 files, all hand-reviewed (no mechanically-generated content). Not split further — the driver (
hal_dss_cache.c/.h, 414 lines, most of it the.h's doc comments and the extensive confidence-boundary explanation) and its Catch2 spec (test_dss_cache.c, 188 lines) don't decompose into independently-reviewable sub-PRs, same rationale as every prior driver PR in this project. The remaining files are small CMake/MISRA wiring diffs, also not independently reviewable apart from the driver they enable.Checklist
type(scope): descriptionconvention withRelates to #<issue>footerSummary
hal/dss/cache/hal_dss_cache.c/.h: DSS Cache driver — read-only cache-mode queries, 7 global coherence-operation triggers, bounds-checked MAR array accesstesting/dss/cache/test_dss_cache.c(+CMakeLists.txt, target namedtest_dss_cache_functionalto avoid a collision withti_hal_comparison/test_dss_cache.c): Catch2 functional test suitetesting/CMakeLists.txt:add_subdirectory(dss/cache)andENABLE_DSS_CACHE_MODULEin the sharedhw_fakescompile definitionstools/misra/run_misra.sh:-DENABLE_DSS_CACHE_MODULEadded