Ace4ComplianceChecker constructor
- Axi4SystemInterface sIntf,
- Ace4Cluster ace, {
- required Component parent,
- int? cacheLineBytes,
- bool requireDrained = false,
- bool reportViolations = true,
- String name = 'ace4ComplianceChecker',
Creates an ACE4 checker.
Supply cacheLineBytes in ACE4 signal mode for exact CD lengths and
same-line ordering of coherent and cache-maintenance requests (D6.2).
Otherwise only the permitted CD burst lengths are checked.
Implementation
Ace4ComplianceChecker(this.sIntf, this.ace,
{required Component parent,
int? cacheLineBytes,
this.requireDrained = false,
this.reportViolations = true,
String name = 'ace4ComplianceChecker'})
: _cacheLineBytes = cacheLineBytes,
super(name, parent) {
final snoopBytes = ace.snoop.cdIntf.dataWidth ~/ 8;
if (cacheLineBytes != null &&
(ace.legacyMode ||
cacheLineBytes < 16 ||
cacheLineBytes > 2048 ||
cacheLineBytes * 8 > 16 * ace.read.rIntf.dataWidth ||
cacheLineBytes * 8 > 16 * ace.write.wIntf.dataWidth ||
cacheLineBytes % snoopBytes != 0 ||
!_snoopLengths.contains(cacheLineBytes ~/ snoopBytes))) {
throw ArgumentError.value(cacheLineBytes, 'cacheLineBytes',
'Use a legal ACE4 cache line composed of whole CD beats.');
}
_lineBeats = cacheLineBytes == null ? null : cacheLineBytes ~/ snoopBytes;
}