Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully support the Write-Back mode of the HPDcache in the CVA6 #2691

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cfuguet
Copy link

@cfuguet cfuguet commented Jan 8, 2025

This PR modifies some components in the CVA6 to fully support the WB mode of the HPDcache.

When on WB mode, there may be coherency issues between the Instruction Cache and the Data Cache. This may happen when the software writes on instruction segments (e.g. to relocate a code in memory).

This PR contains the following modifications:

  • The CVA6 controller module rises the flush signal to the caches when executing a fence or fence.i instruction.
  • The HPDcache cache subsystem translates this fence signal to a FLUSH request to the cache (when the HPDcache is in WB mode).
  • Add new parameters in the CVA6 configuration packages:
    • DcacheFlushOnInvalidate: It changes the behavior of the CVA6 controller. When this parameter is set, the controller rises the Flush signal on fence instructions.
    • DcacheInvalidateOnFlush: It changes the behavior of the HPDcache request adapter. When issuing a flush, it also asks the HPDcache to invalidate the cachelines.
    • Add additional values to the DcacheType enum: HPDCACHE_WT, HPDCACHE_WB, HPDCACHE_WT_WB

In addition, it also fixes some issues with the rvfi_mem_paddr signal from the store_buffer.

core/cache_subsystem/cva6_hpdcache_if_adapter.sv Outdated Show resolved Hide resolved
core/cache_subsystem/cva6_hpdcache_if_adapter.sv Outdated Show resolved Hide resolved
core/cache_subsystem/cva6_hpdcache_if_adapter.sv Outdated Show resolved Hide resolved
core/cache_subsystem/cva6_hpdcache_if_adapter.sv Outdated Show resolved Hide resolved
core/cache_subsystem/cva6_hpdcache_if_adapter.sv Outdated Show resolved Hide resolved
core/cache_subsystem/cva6_hpdcache_subsystem.sv Outdated Show resolved Hide resolved
core/cache_subsystem/cva6_hpdcache_wrapper.sv Outdated Show resolved Hide resolved
core/controller.sv Outdated Show resolved Hide resolved
core/include/config_pkg.sv Outdated Show resolved Hide resolved
core/store_buffer.sv Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

1 similar comment
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet force-pushed the ft/flush_hpdcache_wb branch from 1814312 to 905af11 Compare January 8, 2025 09:31
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

2 similar comments
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet marked this pull request as draft January 8, 2025 14:46
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet force-pushed the ft/flush_hpdcache_wb branch from 7cb69cb to fbec8ef Compare January 8, 2025 16:05
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet force-pushed the ft/flush_hpdcache_wb branch from fbec8ef to 9aa0f74 Compare January 8, 2025 16:17
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet force-pushed the ft/flush_hpdcache_wb branch from dbc6379 to a4f9e6a Compare January 8, 2025 16:23
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

1 similar comment
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet marked this pull request as ready for review January 8, 2025 17:19
* There are new cache subsystem subtypes: HPDCACHE_WT, HPDCACHE_WB, or
  HPDCACHE_WT_WB
  * HPDCACHE_WT uses the HPDcache with the write-through policy
  * HPDCACHE_WB uses the HPDcache with the write-back policy
  * HPDCACHE_WT_WB uses the HPDcache with both write-trough and
    write-back policies

* New parameter to indicate if the Dcache shall be flushed on a fence
  instruction

* New parameter to indicate if the Dcache shall be invalidated after
  flushing the cachelines
@cfuguet cfuguet force-pushed the ft/flush_hpdcache_wb branch from a4f9e6a to d787601 Compare January 8, 2025 20:46
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

@cfuguet cfuguet force-pushed the ft/flush_hpdcache_wb branch from d787601 to 0ea2596 Compare January 8, 2025 20:58
Copy link
Contributor

github-actions bot commented Jan 8, 2025

❌ failed run, report available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant