catdep
include "aarch64hwreqs.cat"
let ca = fr | co
include "enumerations.cat"
with TLBI-after
from (all-TLBI-Imp_TTD_R-enums local-hw-reqs)
with DC-after
from (all-DC-Exp_W-enums local-hw-reqs)
with IC-after
from (all-IC-Imp_Instr_R-enums local-hw-reqs)
let Exp-haz-ob =
[Exp & R]; po-loc; [Exp & R]; (ca & ext); [Exp & W]
let TTD-read-ordered-before =
TLBI-after; [TLBI]; po; [dsb.full]; po; [~(Imp & M)]
| TLBI-after; [TLBI]; po; [dsb.full]; po; [CSE]; po; [Imp & M]
| (
if "ETS2" then TLBI-after; [TLBI]; po; [dsb.full]; po; [Imp & TTD & M]
else 0)
let TLBI-ob =
TTD-read-ordered-before
| tr-ib^-1; TTD-read-ordered-before & ext
| po-va-loc; TTD-read-ordered-before & ext
let Instr-read-ordered-before =
IC-after; [IC]; po; [dsb.full]; po; [~(Imp & M)]
| (
if "DIC" then ca
else 0)
let IC-ob = [Imp & Instr & R]; po; [Imp & Instr & R]; Instr-read-ordered-before
let haz-ob =
Exp-haz-ob | TLBI-ob | IC-ob
let hw-reqs = local-hw-reqs | haz-ob
let Exp-obs =
[Exp & M]; rf & ext; [Exp & M]
| [Exp & M]; ca & ext; [Exp & M]
let Tag-obs =
[Exp & W]; rf & ext; [Imp & Tag & R]
| [Imp & Tag & R]; ca & ext; [Exp & W]
let TLBuncacheable-pred =
[range([TLBUncacheable & FAULT]; tr-ib^-1)]; (ca & ~intervening(W,ca)); [Exp & W]
let HU-pred =
(ca & ~intervening(W,ca)); [HU]
let TLBI-ca =
[TLBI]; TLBI-after; [Imp & TTD & R]; ca; [W]
let TTD-obs =
[Imp & TTD]; rf | rf; [Imp & TTD]
| TLBuncacheable-pred
| HU-pred
| [HU]; co | co; [HU]
| TLBI-ca
let IC-ca =
(
if not "DIC" &&
not "IDC" then [IC]; IC-after; [Imp & Instr & R]; ca; [W]; DC-after; [DC.CVAU]
else 0)
| (
if not "DIC" &&
"IDC" then [IC]; IC-after; [Imp & Instr & R]; ca; [W]
else 0)
| (
if "DIC" &&
"IDC" then [Imp & Instr & R]; ca; [W]
else 0)
let Instr-obs =
rf; [Imp & Instr & R]
| IC-after
| [DC.CVAU]; DC-after; [W] | [W]; DC-after; [DC.CVAU]
| IC-ca
let obs =
Exp-obs; sca-class?
| Tag-obs; sca-class?
| TTD-obs
| Instr-obs
let rec ob =
hw-reqs
| obs
| ob; ob
irreflexive ob
as external
irreflexive [Exp & R]; (po-loc | rmw); [Exp & W]; rfi; [Exp & R]
as coRW1-Exp
irreflexive [Imp & Tag & R]; po-loc; [Exp & Tag & W]; rfi; [Imp & Tag & R]
as coRW1-MTE
irreflexive [Exp & W]; po-loc; [Exp & W]; (ca & int); [Exp & W]
as coWW-Exp
irreflexive [Exp & W]; po-loc; [Exp & R]; (ca & int); [Exp & W]
as coWR-Exp
irreflexive [Exp & Tag & W]; po-loc; [Imp & Tag & R]; (ca & int)
as coWR-MTE
empty (rmw & (fr; co)) \ (([Exp]; rmw; [Exp]) & (fri ; [Exp & W]; coi))
as atomic
let BBM = ([TTDV]; ca; [TTDINV]; co; [TTDV])
flag ~
empty (TTD-update-needsBBM & ~BBM)
as requires-BBM
let CMODX-conflicts = same-loc & (
(Imp & Instr & R & Within-CMODX-List) * W
| (Imp & Instr & R) * (Within-CMODX-List & W)
| W * (Within-CMODX-List & Imp & Instr & R)
| (Within-CMODX-List & W) * (Imp & Instr & R)
)
let CMODX-ordering =
[Imp & Instr & R]; ob; [W]
| [W]; ob; [Imp & Instr & R]
let CMODX-unordered-conflicts =
CMODX-conflicts \ (CMODX-ordering | CMODX-ordering^-1)
flag ~
empty CMODX-unordered-conflicts
as violates-CMODX-requirements