From 1aff919c24a80b54e95efa5f1389da1df7b4f1aa Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Wed, 11 Mar 2015 17:32:06 -0700 Subject: [PATCH] added prefetchAck Grant type --- uncore/src/main/scala/memserdes.scala | 6 +++--- uncore/src/main/scala/tilelink.scala | 29 ++++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/uncore/src/main/scala/memserdes.scala b/uncore/src/main/scala/memserdes.scala index eafc44bd..b9786b4c 100644 --- a/uncore/src/main/scala/memserdes.scala +++ b/uncore/src/main/scala/memserdes.scala @@ -249,7 +249,7 @@ class MemIOTileLinkIOConverter(qDepth: Int) extends Module { gnt_arb.io.in(1).valid := Bool(false) gnt_arb.io.in(1).bits.payload := Grant( is_builtin_type = Bool(true), - g_type = Mux(data_from_rel, Grant.voluntaryAckType, Grant.ackType), + g_type = Mux(data_from_rel, Grant.voluntaryAckType, Grant.putAckType), client_xact_id = tag_out >> UInt(1), manager_xact_id = UInt(0)) @@ -414,7 +414,7 @@ class MemIOTileLinkIOConverter(qDepth: Int) extends Module { gnt_arb.io.in(0).bits.payload := Grant( is_builtin_type = tag_in(0), g_type = Mux(tag_in(0), - Grant.dataBlockType, + Grant.getDataBlockType, UInt(0)), // TODO: Assumes MI or MEI protocol client_xact_id = tag_in >> UInt(1), manager_xact_id = UInt(0), @@ -447,7 +447,7 @@ class MemIOTileLinkIOConverter(qDepth: Int) extends Module { gnt_arb.io.in(0).bits.payload := Grant( is_builtin_type = io.mem.resp.bits.tag(0), g_type = Mux(io.mem.resp.bits.tag(0), - Grant.dataBlockType, + Grant.getDataBlockType, UInt(0)), // TODO: Assumes MI or MEI protocol client_xact_id = io.mem.resp.bits.tag >> UInt(1), manager_xact_id = UInt(0), diff --git a/uncore/src/main/scala/tilelink.scala b/uncore/src/main/scala/tilelink.scala index ef0d3307..531d3f52 100644 --- a/uncore/src/main/scala/tilelink.scala +++ b/uncore/src/main/scala/tilelink.scala @@ -121,13 +121,13 @@ class Acquire extends ClientToManagerChannel def requiresSelfProbe(dummy: Int = 0) = isBuiltInType() && a_type === Acquire.getBlockType def getBuiltInGrantType(dummy: Int = 0): UInt = { - MuxLookup(this.a_type, Grant.ackType, Array( - Acquire.getType -> Grant.dataBeatType, - Acquire.getBlockType -> Grant.dataBlockType, - Acquire.putType -> Grant.ackType, - Acquire.putBlockType -> Grant.ackType, - Acquire.putAtomicType -> Grant.dataBeatType, - Acquire.prefetchType -> Grant.ackType)) + MuxLookup(this.a_type, Grant.putAckType, Array( + Acquire.getType -> Grant.getDataBeatType, + Acquire.getBlockType -> Grant.getDataBlockType, + Acquire.putType -> Grant.putAckType, + Acquire.putBlockType -> Grant.putAckType, + Acquire.putAtomicType -> Grant.getDataBeatType, + Acquire.prefetchType -> Grant.prefetchAckType)) } } @@ -389,13 +389,14 @@ class Grant extends ManagerToClientChannel } object Grant { - val nBuiltInTypes = 4 - def voluntaryAckType = UInt("b00") - def ackType = UInt("b01") - def dataBeatType = UInt("b10") - def dataBlockType = UInt("b11") - def typesWithData = Vec(dataBlockType, dataBeatType) - def typesWithMultibeatData= Vec(dataBlockType) + val nBuiltInTypes = 5 + def voluntaryAckType = UInt("b000") + def putAckType = UInt("b001") + def prefetchAckType = UInt("b011") + def getDataBeatType = UInt("b100") + def getDataBlockType = UInt("b101") + def typesWithData = Vec(getDataBlockType, getDataBeatType) + def typesWithMultibeatData= Vec(getDataBlockType) def apply( is_builtin_type: Bool,