@@ -529,14 +529,9 @@ class LsuBlock(val parameter: LsuBlockParameter)
529529 val dataRWStage = Module (new UDCacheModule (parameter))
530530
531531 // dataRWStage.io.dataAddrPack <> io.dataAddrPack
532- addrTransStage.io.in <> io.in
533- addrTransStage.io.redirect <> io.redirect
534- io.bypass := dataRWStage.io.bypass
535- if (parameter.hasCache) {
536- io.cacheInfo := dataRWStage.io.cacheInfo
537- } else {
538- io.cacheInfo := 0 .U .asTypeOf(io.cacheInfo)
539- }
532+ addrTransStage.io.in <> io.in
533+ addrTransStage.io.redirect <> io.redirect
534+ io.bypass := dataRWStage.io.bypass
540535 io.out <> dataRWStage.io.out
541536 io.storeOut := dataRWStage.io.storeOut
542537 dataRWStage.io.redirect := io.redirect
@@ -555,10 +550,16 @@ class LsuBlock(val parameter: LsuBlockParameter)
555550 dataRWStage.io.storeIn <> addrTransStage.io.storeOut
556551 dataRWStage.io.noLoad <> addrTransStage.io.noLoad
557552 io.icacopOut := dataRWStage.io.icacopOut
558- for (i <- 0 until 3 * parameter.portCount) {
559- io.cacheInfo(i) := dataRWStage.io.cacheInfo(i)
560- }
561- for (i <- 0 until parameter.portCount) {
562- io.cacheInfo(i + 3 * parameter.portCount) := addrTransStage.io.cacheInfo(i)
553+ if (parameter.hasCache) {
554+ for (i <- 0 until 3 * parameter.portCount) {
555+ io.cacheInfo(i) := dataRWStage.io.cacheInfo(i)
556+ }
557+ for (i <- 0 until parameter.portCount) {
558+ io.cacheInfo(i + 3 * parameter.portCount) := addrTransStage.io.cacheInfo(i)
559+ }
560+ } else {
561+ for (ch <- io.cacheInfo) {
562+ ch := Undef .asValid(chiselTypeOf(ch))
563+ }
563564 }
564565}
0 commit comments