From 13d0bf68085644c99bc1d8b641b2caca5751c9e9 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Mon, 30 Oct 2017 11:25:59 -0700 Subject: [PATCH] tilelink: Monitor now enforces spec-defined error rules --- src/main/scala/tilelink/Monitor.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/scala/tilelink/Monitor.scala b/src/main/scala/tilelink/Monitor.scala index 9b258684..d15c5bbe 100644 --- a/src/main/scala/tilelink/Monitor.scala +++ b/src/main/scala/tilelink/Monitor.scala @@ -364,12 +364,14 @@ class TLMonitor(args: TLMonitorArgs) extends TLMonitorBase(args) val size = Reg(UInt()) val source = Reg(UInt()) val address = Reg(UInt()) + val error = RegEnable(c.bits.error, c.fire()) when (c.valid && !c_first) { assert (c.bits.opcode === opcode, "'C' channel opcode changed within multibeat operation" + extra) assert (c.bits.param === param, "'C' channel param changed within multibeat operation" + extra) assert (c.bits.size === size, "'C' channel size changed within multibeat operation" + extra) assert (c.bits.source === source, "'C' channel source changed within multibeat operation" + extra) assert (c.bits.address=== address,"'C' channel address changed with multibeat operation" + extra) + assert (c.bits.error || !error, "'C' channel burst lowered error" + extra) } when (c.fire() && c_first) { opcode := c.bits.opcode @@ -387,12 +389,14 @@ class TLMonitor(args: TLMonitorArgs) extends TLMonitorBase(args) val size = Reg(UInt()) val source = Reg(UInt()) val sink = Reg(UInt()) + val error = RegEnable(d.bits.error, d.fire()) when (d.valid && !d_first) { assert (d.bits.opcode === opcode, "'D' channel opcode changed within multibeat operation" + extra) assert (d.bits.param === param, "'D' channel param changed within multibeat operation" + extra) assert (d.bits.size === size, "'D' channel size changed within multibeat operation" + extra) assert (d.bits.source === source, "'D' channel source changed within multibeat operation" + extra) assert (d.bits.sink === sink, "'D' channel sink changed with multibeat operation" + extra) + assert (d.bits.error || !error, "'D' channel burst lowered error" + extra) } when (d.fire() && d_first) { opcode := d.bits.opcode