From 01a89aa7dd540730c62cd77e6efbad323527ef4f Mon Sep 17 00:00:00 2001 From: John Ingalls Date: Wed, 21 Oct 2020 19:22:05 -0700 Subject: [PATCH 1/2] TileLink Monitor: C-Channel ProbeAckData/ReleaseData from Trunk permission param to any Trunk/Branch/None --- src/main/scala/tilelink/Monitor.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/tilelink/Monitor.scala b/src/main/scala/tilelink/Monitor.scala index c8c62cfff75..8c616bbf163 100644 --- a/src/main/scala/tilelink/Monitor.scala +++ b/src/main/scala/tilelink/Monitor.scala @@ -8,7 +8,7 @@ import chisel3.internal.sourceinfo.SourceLine import chisel3.experimental.chiselName import freechips.rocketchip.config.Parameters import freechips.rocketchip.diplomacy._ -import freechips.rocketchip.util.PlusArg +import freechips.rocketchip.util.{PlusArg, UIntIsOneOf} import freechips.rocketchip.formal._ case class TLMonitorArgs(edge: TLEdge) @@ -255,7 +255,7 @@ class TLMonitor(args: TLMonitorArgs, monitorDir: MonitorDirection = MonitorDirec monAssert (source_ok, "'C' channel ProbeAckData carries invalid source ID" + extra) monAssert (bundle.size >= log2Ceil(edge.manager.beatBytes).U, "'C' channel ProbeAckData smaller than a beat" + extra) monAssert (is_aligned, "'C' channel ProbeAckData address not aligned to size" + extra) - monAssert (TLPermissions.isReport(bundle.param), "'C' channel ProbeAckData carries invalid report param" + extra) + monAssert (bundle.param.isOneOf(TLPermissions.TtoT, TLPermissions.TtoB, TLPermissions.TtoN), "'C' channel ProbeAckData carries invalid trunk param" + extra) } when (bundle.opcode === TLMessages.Release) { @@ -274,7 +274,7 @@ class TLMonitor(args: TLMonitorArgs, monitorDir: MonitorDirection = MonitorDirec monAssert (source_ok, "'C' channel ReleaseData carries invalid source ID" + extra) monAssert (bundle.size >= log2Ceil(edge.manager.beatBytes).U, "'C' channel ReleaseData smaller than a beat" + extra) monAssert (is_aligned, "'C' channel ReleaseData address not aligned to size" + extra) - monAssert (TLPermissions.isShrink(bundle.param), "'C' channel ReleaseData carries invalid shrink param" + extra) + monAssert (bundle.param.isOneOf(TLPermissions.TtoT, TLPermissions.TtoB, TLPermissions.TtoN), "'C' channel ReleaseData carries invalid trunk param" + extra) } when (bundle.opcode === TLMessages.AccessAck) { From f9f9f50b5668a0a966af40b90604046cbe6f2b1b Mon Sep 17 00:00:00 2001 From: John Ingalls Date: Wed, 21 Oct 2020 21:46:27 -0700 Subject: [PATCH 2/2] TileLink Monitor: C-Channel allow Release report param --- src/main/scala/tilelink/Monitor.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/tilelink/Monitor.scala b/src/main/scala/tilelink/Monitor.scala index 8c616bbf163..f1910d472d2 100644 --- a/src/main/scala/tilelink/Monitor.scala +++ b/src/main/scala/tilelink/Monitor.scala @@ -8,7 +8,7 @@ import chisel3.internal.sourceinfo.SourceLine import chisel3.experimental.chiselName import freechips.rocketchip.config.Parameters import freechips.rocketchip.diplomacy._ -import freechips.rocketchip.util.{PlusArg, UIntIsOneOf} +import freechips.rocketchip.util.PlusArg import freechips.rocketchip.formal._ case class TLMonitorArgs(edge: TLEdge) @@ -255,7 +255,7 @@ class TLMonitor(args: TLMonitorArgs, monitorDir: MonitorDirection = MonitorDirec monAssert (source_ok, "'C' channel ProbeAckData carries invalid source ID" + extra) monAssert (bundle.size >= log2Ceil(edge.manager.beatBytes).U, "'C' channel ProbeAckData smaller than a beat" + extra) monAssert (is_aligned, "'C' channel ProbeAckData address not aligned to size" + extra) - monAssert (bundle.param.isOneOf(TLPermissions.TtoT, TLPermissions.TtoB, TLPermissions.TtoN), "'C' channel ProbeAckData carries invalid trunk param" + extra) + monAssert (TLPermissions.isReport(bundle.param), "'C' channel ProbeAckData carries invalid report param" + extra) } when (bundle.opcode === TLMessages.Release) { @@ -264,7 +264,7 @@ class TLMonitor(args: TLMonitorArgs, monitorDir: MonitorDirection = MonitorDirec monAssert (source_ok, "'C' channel Release carries invalid source ID" + extra) monAssert (bundle.size >= log2Ceil(edge.manager.beatBytes).U, "'C' channel Release smaller than a beat" + extra) monAssert (is_aligned, "'C' channel Release address not aligned to size" + extra) - monAssert (TLPermissions.isShrink(bundle.param), "'C' channel Release carries invalid shrink param" + extra) + monAssert (TLPermissions.isReport(bundle.param), "'C' channel Release carries invalid report param" + extra) monAssert (!bundle.corrupt, "'C' channel Release is corrupt" + extra) } @@ -274,7 +274,7 @@ class TLMonitor(args: TLMonitorArgs, monitorDir: MonitorDirection = MonitorDirec monAssert (source_ok, "'C' channel ReleaseData carries invalid source ID" + extra) monAssert (bundle.size >= log2Ceil(edge.manager.beatBytes).U, "'C' channel ReleaseData smaller than a beat" + extra) monAssert (is_aligned, "'C' channel ReleaseData address not aligned to size" + extra) - monAssert (bundle.param.isOneOf(TLPermissions.TtoT, TLPermissions.TtoB, TLPermissions.TtoN), "'C' channel ReleaseData carries invalid trunk param" + extra) + monAssert (TLPermissions.isReport(bundle.param), "'C' channel ReleaseData carries invalid report param" + extra) } when (bundle.opcode === TLMessages.AccessAck) {