@@ -30,44 +30,38 @@ import xiangshan.cache.mmu.TlbCmd
30
30
import xiangshan .cache .mmu .ValidHoldBypass // FIXME: should move this to utility?
31
31
import xiangshan .frontend .ExceptionType
32
32
33
- class ICacheMainPipeInterface (implicit p : Parameters ) extends ICacheBundle {
34
- val hartId : UInt = Input (UInt (hartIdLen.W ))
35
-
36
- /** * internal interface ***/
37
- val dataArray : ICacheDataReqBundle = new ICacheDataReqBundle
38
- val metaArrayFlush : Vec [Valid [ICacheMetaFlushBundle ]] = Vec (PortNumber , ValidIO (new ICacheMetaFlushBundle ))
39
- val touch : Vec [Valid [ReplacerTouch ]] = Vec (PortNumber , ValidIO (new ReplacerTouch ))
40
- val wayLookupRead : DecoupledIO [WayLookupInfo ] = Flipped (DecoupledIO (new WayLookupInfo ))
41
- val mshr : ICacheMSHRBundle = new ICacheMSHRBundle
42
- val ecc_enable : Bool = Input (Bool ())
43
-
44
- /** * outside interface ***/
45
- // FTQ
46
- val fetch : ICacheMainPipeBundle = new ICacheMainPipeBundle
47
- val flush : Bool = Input (Bool ())
48
- // PMP
49
- val pmp : Vec [ICachePMPBundle ] = Vec (PortNumber , new ICachePMPBundle )
50
- // IFU
51
- val respStall : Bool = Input (Bool ())
52
- // backend/BEU
53
- val errors : Vec [Valid [L1CacheErrorInfo ]] = Output (Vec (PortNumber , ValidIO (new L1CacheErrorInfo )))
54
-
55
- /** * PERF ***/
56
- val perfInfo : ICachePerfInfo = Output (new ICachePerfInfo )
57
- }
58
-
59
- // class ICacheDB(implicit p: Parameters) extends ICacheBundle {
60
- // val blk_vaddr: UInt = UInt((VAddrBits - blockOffBits).W)
61
- // val blk_paddr: UInt = UInt((PAddrBits - blockOffBits).W)
62
- // val hit: Bool = Bool()
63
- // }
64
-
65
33
class ICacheMainPipe (implicit p : Parameters ) extends ICacheModule
66
34
with ICacheECCHelper
67
35
with ICacheAddrHelper
68
36
with ICacheDataSelHelper {
69
37
70
- val io : ICacheMainPipeInterface = IO (new ICacheMainPipeInterface )
38
+ class ICacheMainPipeIO (implicit p : Parameters ) extends ICacheBundle {
39
+ val hartId : UInt = Input (UInt (hartIdLen.W ))
40
+
41
+ /** * internal interface ***/
42
+ val dataArray : ICacheDataReqBundle = new ICacheDataReqBundle
43
+ val metaArrayFlush : Vec [Valid [ICacheMetaFlushBundle ]] = Vec (PortNumber , ValidIO (new ICacheMetaFlushBundle ))
44
+ val touch : Vec [Valid [ReplacerTouch ]] = Vec (PortNumber , ValidIO (new ReplacerTouch ))
45
+ val wayLookupRead : DecoupledIO [WayLookupInfo ] = Flipped (DecoupledIO (new WayLookupInfo ))
46
+ val mshr : ICacheMSHRBundle = new ICacheMSHRBundle
47
+ val ecc_enable : Bool = Input (Bool ())
48
+
49
+ /** * outside interface ***/
50
+ // FTQ
51
+ val fetch : ICacheMainPipeBundle = new ICacheMainPipeBundle
52
+ val flush : Bool = Input (Bool ())
53
+ // PMP
54
+ val pmp : Vec [ICachePMPBundle ] = Vec (PortNumber , new ICachePMPBundle )
55
+ // IFU
56
+ val respStall : Bool = Input (Bool ())
57
+ // backend/BEU
58
+ val errors : Vec [Valid [L1CacheErrorInfo ]] = Output (Vec (PortNumber , ValidIO (new L1CacheErrorInfo )))
59
+
60
+ /** * PERF ***/
61
+ val perfInfo : ICachePerfInfo = Output (new ICachePerfInfo )
62
+ }
63
+
64
+ val io : ICacheMainPipeIO = IO (new ICacheMainPipeIO )
71
65
72
66
/** Input/Output port */
73
67
private val (fromFtq, toIFU) = (io.fetch.req, io.fetch.resp)
0 commit comments