[WIP] [gen] Update baseline configuration for rmw#1578
[WIP] [gen] Update baseline configuration for rmw#1578ShaleXIONG wants to merge 22 commits intoherd:masterfrom
rmw#1578Conversation
3d3204a to
e0f68d2
Compare
chacon01
left a comment
There was a problem hiding this comment.
Thanks @ShaleXIONG! A couple of comments.
|
There might a few things I might do before merge this pull, which might take a while:
However, I am planning to leave this pull request open so you (@chacon01) can use it. |
259dcd8 to
c6b88af
Compare
56142b2 to
5243912
Compare
chacon01
left a comment
There was a problem hiding this comment.
Amo and LxSx become tedious to enumerate the more the configuration file is restricted to prevent additional ordering. I see two issues:
- Several cases where an existing effect could be an
AmoorLxSxwithout changing the meaning - We can't create a general
RmworAmorelaxation because it will include e.g.Amo.LdClrwhich has the value collision problem.
Perhaps the generator could support "user-defined" relaxations to help here e.g.
-define LdRmw LxSx|Amo.Swp|Amo.Cas|Amo.LdAdd
-define Rmw LdRmw|Amo.StAdd
...
-safe [A LdRmw PodW* ExpObs]
-safe [ExpObs PodWR Rmw L]
which would reduce the duplication everywhere else.
Additionally, perhaps an operation to make a relaxation "optional" e.g.
-safe [A Rmw? Pod** Rmw? ExpObs]
which would be equivalent to
-safe [A Pod** ExpObs]
-safe [A Rmw Pod** ExpObs]
-safe [A Pod** Rmw ExpObs]
-safe [A Rmw Pod** Rmw ExpObs]
| # let ctrl = [Exp & R]; basic-dep; [BCC]; po | ||
| # let dob = ctrl; [Exp & W | HU | TLBI | DC.CVAU | IC] | ||
| -safe DpCtrldW | ||
| -safe [DpCtrldW ExpObs] |
There was a problem hiding this comment.
Be aware that tying to ExpObs here will prevent it from combining with other relaxations that begin with ExpObs or Hat. We will need some way to allow ExpObs to combine with itself and with Hat e.g. [DpCtrldW ExpObs] + [ExpObs PodRW L] -> DpCtrldW Fre PodRWPL or [DpCtrlIsbdR ExpObs] + [Hat LxSx] -> DpCtrlIsbdR Hat LxSx. I think expressing the possible combinations in the configuration file would be tedious and error-prone, so it'll likely need to be some option for the generator.
| -safe [A Amo.Cas L PodW* ExpObs] [A Amo.Cas L PosWR ExpObs] | ||
| -safe [A Amo.StAdd L PodW* ExpObs] [A Amo.StAdd L PosWR ExpObs] | ||
| -safe [A Amo.LdAdd L PodW* ExpObs] [A Amo.LdAdd L PosWR ExpObs] | ||
| -safe [A LxSx L PodW* ExpObs] [A LxSx L PosWR ExpObs] |
There was a problem hiding this comment.
[range([A];amo;[L])]; po; [Exp & M | Imp & Tag & R | MMU & FAULT] does not apply for LxSx, so this relaxation can be removed. While this will not produce allowed tests because we would need it to compose with a free Pod*R (that doesn't exist), it is inconsistent with the justifying comment.
For the Amo variants (and LxSx too), the generator will only compose these with the other relaxations which are properly ordered into the acquire read effect, so all the forbidden combinations will also be forbidden without the L.
User define is a good idea. I will probably use the |
39a693a to
5c750cc
Compare
90986fd to
d133b19
Compare
b1dc3c1 to
3dca6a9
Compare
3171945 to
aa45f4d
Compare
aa45f4d to
bbe9774
Compare
Replace the old `LexUtil` split-based relax parser with a proper lexer/parser pipeline that builds `Ast.t`. This adds support for: - top-level and grouped choice with `|`. For example `PosWR|DpAddrdW` means either `PosWR` or `DpAddrdW`. - optional relaxations with `?` For example `PosWR?`, means either `PosWR` or `` (empty). - canonical AST normalization plus expansion to concrete sequences Update `diy7`, `diycross7`, `diyone7`, `norm7`, `readRelax`, `logRelax`, `edge`, and `relax` to consume the new AST-based parser, and remove the old `lexUtil.mli` split API.
Add unit tests `gen/tests/test_parser.ml` and `.expected`. - tests for three parsers - tests for remove invalid relaxes.
…d both-type- communication.
…tests. For `...;po` and `...;po;[M]` in cat, we append the external communication edges `Obs` in the translation. Similarly for `po;...` and `[M];po;...`, we prefix `Obs`.
Add back `Amo.StAdd` and `Amo.LdAdd` as the representation for all other atomic operation. We also remove `[Q Amo.* ***]` as `Q` cannot apply to `Amo.*`
Add more consecutive none fault check. This rule out undesired situations where a memory access does not fault but the consecutive one faults.
bbe9774 to
126495f
Compare
126495f to
6a507fa
Compare
Add several missing
rmwrelaxations since such relaxation can match memory access such asM,R, andW.this pull requisition contains #1569 too.