From a7fa77c7fc49da7957a4e2d85b23a458d12e106b Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Wed, 13 May 2015 23:28:18 -0700 Subject: [PATCH] track operand size for Gets --- uncore/src/main/scala/consts.scala | 1 + uncore/src/main/scala/tilelink.scala | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/uncore/src/main/scala/consts.scala b/uncore/src/main/scala/consts.scala index 69cdc41f..54000208 100644 --- a/uncore/src/main/scala/consts.scala +++ b/uncore/src/main/scala/consts.scala @@ -16,6 +16,7 @@ trait MemoryOpConstants { val MT_BU = Bits("b100") val MT_HU = Bits("b101") val MT_WU = Bits("b110") + val MT_Q = Bits("b111") val NUM_XA_OPS = 9 val M_SZ = 5 diff --git a/uncore/src/main/scala/tilelink.scala b/uncore/src/main/scala/tilelink.scala index ca80f3c3..f8161783 100644 --- a/uncore/src/main/scala/tilelink.scala +++ b/uncore/src/main/scala/tilelink.scala @@ -283,6 +283,8 @@ object Acquire { * @param client_xact_id client's transaction id * @param addr_block address of the cache block * @param addr_beat sub-block address (which beat) + * @param addr_byte sub-block address (which byte) + * @param operand_size {byte, half, word, double} from [[uncore.MemoryOpConstants]] * @param alloc hint whether the block should be allocated in intervening caches */ object Get { @@ -297,7 +299,22 @@ object Get { client_xact_id = client_xact_id, addr_block = addr_block, addr_beat = addr_beat, - union = Cat(M_XRD, alloc)) + union = Cat(MT_Q, M_XRD, alloc)) + } + def apply( + client_xact_id: UInt, + addr_block: UInt, + addr_beat: UInt, + addr_byte: UInt, + operand_size: UInt, + alloc: Bool): Acquire = { + Acquire( + is_builtin_type = Bool(true), + a_type = Acquire.getType, + client_xact_id = client_xact_id, + addr_block = addr_block, + addr_beat = addr_beat, + union = Cat(addr_byte, operand_size, M_XRD, alloc)) } }