Skip to content

Ship tag check fix#698

Merged
ngober merged 10 commits intoChampSim:developfrom
maccoymerrell:ship_tag_check_fix
Mar 16, 2026
Merged

Ship tag check fix#698
ngober merged 10 commits intoChampSim:developfrom
maccoymerrell:ship_tag_check_fix

Conversation

@maccoymerrell
Copy link
Copy Markdown
Contributor

@maccoymerrell maccoymerrell commented Mar 15, 2026

The previous implementation of the sampler-set tag check mechanism was convoluted, and would result in false matches / false mismatches under some cache configurations.

This pr simplifies the check to the block number, functionally equivalent to what should have been implemented but far simpler and avoids any confusion or potential bugs by introducing additional slicing to remove variable amounts of set index and sampler index bits.

A test was added to ensure the matcher was behaving properly.

Fixes issue raised in #697

Copilot AI and others added 9 commits March 13, 2026 19:17
…shamt, add regression test

Co-authored-by: maccoymerrell <[email protected]>
… shamt-based slice_upper

Co-authored-by: maccoymerrell <[email protected]>
Use block_number for SHIP sampler tag comparison
Remove dangling variables that were never exercised by the test:
- mock_ll (do_nothing_MRC) and mock_ul (to_rq_MRP): only used to
  construct the cache, but CACHE can be built without them
- .upper_levels() and .lower_level(): mock-dependent cache builder calls
- .replacement<lru>(): cache replacement policy never used
- cache.initialize(), cache.warmup, cache.begin_phase(): cache never
  operated on; only NUM_SET/NUM_WAY are needed by the ship constructor
- #include "mocks.hpp": no longer needed

Co-authored-by: maccoymerrell <[email protected]>
…externally

Pass ship as the replacement template argument to the cache builder, then
access the internal ship instance via dynamic_cast on the public
repl_module_pimpl for test assertions.

Co-authored-by: maccoymerrell <[email protected]>
…t-variables

Clean up SHIP sampler tag test: remove dangling variables, use cache-owned replacement policy
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 15, 2026

Coverage Status

coverage: 70.044% (+1.1%) from 68.933%
when pulling fbd7a87 on maccoymerrell:ship_tag_check_fix
into 9f84e75 on ChampSim:develop.

Comment thread test/cpp/src/445-ship-replacement.cc Outdated
@ngober ngober merged commit 25c33c4 into ChampSim:develop Mar 16, 2026
32 checks passed
github-actions Bot added a commit that referenced this pull request Mar 16, 2026
Author: maccoymerrell
Committer: GitHub

Ship tag check fix (#698)

The previous implementation of the sampler-set tag check mechanism was
convoluted, and would result in false matches / false mismatches under
some cache configurations.

This pr simplifies the check to the block number, functionally
equivalent to what should have been implemented but far simpler and
avoids any confusion or potential bugs by introducing additional slicing
to remove variable amounts of set index and sampler index bits.

A test was added to ensure the matcher was behaving properly.

Fixes issue raised in #697

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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.

4 participants