From fa8075570ab7a5f1fc28ca3c8695dcad5997ef36 Mon Sep 17 00:00:00 2001 From: Huy Vo Date: Thu, 27 Sep 2012 12:59:45 -0700 Subject: [PATCH] move srcs into src dir, factoring out uncore consts into consts --- uncore/{ => src}/coherence.scala | 2 +- uncore/src/consts.scala | 28 ++++++++++++++++++++++++++++ uncore/{ => src}/llc.scala | 2 +- uncore/{ => src}/uncore.scala | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) rename uncore/{ => src}/coherence.scala (99%) create mode 100644 uncore/src/consts.scala rename uncore/{ => src}/llc.scala (99%) rename uncore/{ => src}/uncore.scala (99%) diff --git a/uncore/coherence.scala b/uncore/src/coherence.scala similarity index 99% rename from uncore/coherence.scala rename to uncore/src/coherence.scala index 04843fec..e4f85436 100644 --- a/uncore/coherence.scala +++ b/uncore/src/coherence.scala @@ -1,4 +1,4 @@ -package rocket +package uncore import Chisel._ import Constants._ diff --git a/uncore/src/consts.scala b/uncore/src/consts.scala new file mode 100644 index 00000000..8ebf5c49 --- /dev/null +++ b/uncore/src/consts.scala @@ -0,0 +1,28 @@ +package uncore + +import Chisel._ + +object Constants +{ + + val X_INIT_TYPE_MAX_BITS = 2 + val X_REP_TYPE_MAX_BITS = 3 + val P_REQ_TYPE_MAX_BITS = 2 + val P_REP_TYPE_MAX_BITS = 3 + + val PADDR_BITS = 40; + val VADDR_BITS = 43; + val PGIDX_BITS = 13; + val PPN_BITS = PADDR_BITS-PGIDX_BITS; + val VPN_BITS = VADDR_BITS-PGIDX_BITS; + val ASID_BITS = 7; + val PERM_BITS = 6; + + + val COHERENCE_DATA_BITS = (1 << OFFSET_BITS)*8 + val TILE_ID_BITS = log2Up(NTILES)+1 + val TILE_XACT_ID_BITS = log2Up(NMSHR)+3 + val NGLOBAL_XACTS = 8 + val GLOBAL_XACT_ID_BITS = log2Up(NGLOBAL_XACTS) + +} diff --git a/uncore/llc.scala b/uncore/src/llc.scala similarity index 99% rename from uncore/llc.scala rename to uncore/src/llc.scala index a2a5d361..2bb2b62a 100644 --- a/uncore/llc.scala +++ b/uncore/src/llc.scala @@ -1,4 +1,4 @@ -package rocket +package uncore import Chisel._ import Node._ diff --git a/uncore/uncore.scala b/uncore/src/uncore.scala similarity index 99% rename from uncore/uncore.scala rename to uncore/src/uncore.scala index 7ffef155..56acece0 100644 --- a/uncore/uncore.scala +++ b/uncore/src/uncore.scala @@ -1,4 +1,4 @@ -package rocket +package uncore import Chisel._ import Constants._