Skip to content

Conversation

@ShaleXIONG
Copy link
Collaborator

@ShaleXIONG ShaleXIONG commented Oct 23, 2025

This pull request introduce some new wildcard syntax so it matches better to the cat file. For better usage, all wildcard syntax now are only accepted in diycross7 and diy7.

For example, it is now allowed to use relaxation syntax like [DpAddr Po**W] which will be unfolded to [DpAddrdW PodWW] [DpAddrdW PosWW] [DpAddrsW PodWW] [DpAddrsW PosWW] [DpAddrdR PodRW] [DpAddrdR PosRW] [DpAddrsR PodRW] [DpAddrsR PosRW]. This provides closer syntax to those used in cat file.

The new wildcard syntax that automatically expanded as the following:

  • wildcard * for different and same location, this can be used in Po*WR or DMB.SY*W* for example.
  • Amo -> Amo.Swp, Amo.Cas, Amo.LdAdd, Amo.LdSub .....
  • Po for (1) all possible location, different or same, and (2) all possible read and write combinations.
  • DpAddr, DpData, DpCtrl, DpAddrCsel, DpDataCsel, DpCtrlCsel, for all possible location and all possible second memory event. However, DpData only have write hence it only unfold to DpDatasW and DpDatadW.
  • Any fence for example ISB*** (1) all possible location, different or same, and (2) all possible read and write combinations. Note that here it MUST explicit write *** as ISB is already used for peudo-edge (i.e., no memory event edge)
  • Co will be unfolded to Coe and Coi, similar to Fr and Rf.

We fix an inconsistent between the backward capability syntax of Dp and Ctrl. Now they all have wildcard syntax (while previously it only exists for Ctrl).

@ShaleXIONG ShaleXIONG marked this pull request as ready for review October 23, 2025 12:36
@ShaleXIONG ShaleXIONG requested a review from artkhyzha October 23, 2025 12:38
@murzinv
Copy link
Collaborator

murzinv commented Oct 27, 2025

It looks like PR has side effect on forbidden_ifetch.conf

Commit [gen] Flag `allow_back` in diy7 by default, which is consistent with diyone7 slightly increases number of generated tests from 269 to 272, and it looks like new 3 tests are allowed.

Next, commit [gen] Allow generate pseudo edge followed by communication by default in diy increases number of generated tests further to 1506, 11 of which are allowed and 3 seems have unreachable final clause (herd7 reports Observation Never if run with -through all)

Copy link
Member

@relokin relokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone through the 1st and the 2nd commits. Some comments thus far.

Copy link
Member

@relokin relokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this [gen] Allow pseudo edges followed by internal communication edges. relevant to this PR?

More generally, some of the syntax additions only apply to diy7 and there has to be a way to exclude them from the implementation of diyone7.

@ShaleXIONG
Copy link
Collaborator Author

ShaleXIONG commented Oct 28, 2025

How is this [gen] Allow pseudo edges followed by internal communication edges. relevant to this PR?

More generally, some of the syntax additions only apply to diy7 and there has to be a way to exclude them from the implementation of diyone7.

I will remove that commit to a separate place. I think I use it in the vmsa. I will add a flag to only introduce wildcard edges, or syntax '*' for location and RW.

@ShaleXIONG
Copy link
Collaborator Author

It looks like PR has side effect on forbidden_ifetch.conf

Commit [gen] Flag `allow_back` in diy7 by default, which is consistent with diyone7 slightly increases number of generated tests from 269 to 272, and it looks like new 3 tests are allowed.

Next, commit [gen] Allow generate pseudo edge followed by communication by default in diy increases number of generated tests further to 1506, 11 of which are allowed and 3 seems have unreachable final clause (herd7 reports Observation Never if run with -through all)

Let me pend these two commits to another pull. It seems I need to fix the ifetch configuration file first.

@ShaleXIONG
Copy link
Collaborator Author

ShaleXIONG commented Oct 30, 2025

@murzinv @relokin I will make this pull request draft for now and revisit later. Please refer #1534 for the update only for forbidden config.

[update] I just re-open it as now it only introduces wildcard syntax in diy7 and diycross7.

@ShaleXIONG ShaleXIONG changed the title [gen] Update the baseline forbidden configuration file for diy7. [WIP][gen] Update the baseline forbidden configuration file for diy7. Oct 30, 2025
@ShaleXIONG ShaleXIONG marked this pull request as draft October 30, 2025 09:49
@ShaleXIONG ShaleXIONG changed the title [WIP][gen] Update the baseline forbidden configuration file for diy7. [WIP][gen] Introduce more wildcard syntax in diy Nov 7, 2025
@ShaleXIONG ShaleXIONG marked this pull request as ready for review November 10, 2025 10:15
@ShaleXIONG ShaleXIONG changed the title [WIP][gen] Introduce more wildcard syntax in diy [gen] Introduce more wildcard syntax in diy Nov 10, 2025
Shale Xiong added 4 commits November 12, 2025 11:27
Introduce wildcard for dependency addr, data, and ctrl. The wildcard
symbal can be used for (1) same and different locations and (2) write and
read events.
- Allow `diy7` accept `P` relaxation.
- Remove a few duplication in building the look-up table for parsing
  edges.
@fsestini
Copy link
Collaborator

Could you please add the wildcard syntax for communication edges to the PR description? (Co* or Co, etc.)

@ShaleXIONG
Copy link
Collaborator Author

Could you please add the wildcard syntax for communication edges to the PR description? (Co* or Co, etc.)

I just double checked and updated the last commit, which introduces Co Fr and Fr as the wildcard. However those only exists in diy7 and diycross7.

- Remove `assert false` in `code.ml`.
- Introduce `is_diff_loc`
- Change `seq_sd` return `option`.
Copy link
Collaborator

@fsestini fsestini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShaleXIONG ShaleXIONG merged commit 03b6578 into herd:master Nov 24, 2025
3 checks passed
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