Skip to content

Commit ddb0cbc

Browse files
Maxpicca-Liywlcode
authored andcommitted
chore: add some function for MemReqSource (#134)
1 parent e3b117c commit ddb0cbc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/scala/utility/TLUtils/BusKeyField.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ object MemReqSource extends Enumeration {
4747

4848
val reqSourceBits = log2Ceil(ReqSourceCount.id)
4949

50+
def isCPUReq(reqSource: UInt): Bool = {
51+
reqSource === CPULoadData.id.U ||
52+
reqSource === CPUStoreData.id.U ||
53+
reqSource === CPUAtomicData.id.U
54+
}
55+
56+
def isL1Prefetch(reqSource: UInt): Bool = {
57+
reqSource === L1InstPrefetch.id.U ||
58+
reqSource === L1DataPrefetch.id.U
59+
}
60+
5061
def isL2Prefetch(reqSource: UInt): Bool = {
5162
reqSource === Prefetch2L2BOP.id.U ||
5263
reqSource === Prefetch2L2PBOP.id.U ||

0 commit comments

Comments
 (0)