fix(dcache): wait状态转移错误
This commit is contained in:
parent
3277f13a3f
commit
7a32abba57
|
@ -331,8 +331,10 @@ class DCache(cacheConfig: CacheConfig)(implicit cpuConfig: CpuConfig) extends Mo
|
||||||
writeFifo.io.enq.bits.strb := io.cpu.wstrb
|
writeFifo.io.enq.bits.strb := io.cpu.wstrb
|
||||||
writeFifo.io.enq.bits.data := io.cpu.wdata
|
writeFifo.io.enq.bits.data := io.cpu.wdata
|
||||||
|
|
||||||
|
when(!io.cpu.complete_single_request) {
|
||||||
state := s_wait
|
state := s_wait
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}.elsewhen(!writeFifo_busy) {
|
}.elsewhen(!writeFifo_busy) {
|
||||||
ar.addr := io.cpu.tlb.paddr
|
ar.addr := io.cpu.tlb.paddr
|
||||||
ar.len := 0.U
|
ar.len := 0.U
|
||||||
|
@ -351,7 +353,7 @@ class DCache(cacheConfig: CacheConfig)(implicit cpuConfig: CpuConfig) extends Mo
|
||||||
(0 until nbank).map(i => bank_replication(i) := data(i)(replace_way))
|
(0 until nbank).map(i => bank_replication(i) := data(i)(replace_way))
|
||||||
}
|
}
|
||||||
}.otherwise {
|
}.otherwise {
|
||||||
when(io.cpu.dcache_ready) {
|
when(!dcache_stall) {
|
||||||
// update lru and mark dirty
|
// update lru and mark dirty
|
||||||
replace_way := ~select_way
|
replace_way := ~select_way
|
||||||
when(io.cpu.wen.orR) {
|
when(io.cpu.wen.orR) {
|
||||||
|
@ -620,8 +622,8 @@ class DCache(cacheConfig: CacheConfig)(implicit cpuConfig: CpuConfig) extends Mo
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
val ptw_addr = paddrApply(ppn, vpnn).asTypeOf(pAddr)
|
val ptw_addr = paddrApply(ppn, vpnn).asTypeOf(pAddr)
|
||||||
val uncached = AddressSpace.isMMIO(ptw_addr.asUInt)
|
val pte_uncached = AddressSpace.isMMIO(ptw_addr.asUInt)
|
||||||
when(uncached) {
|
when(pte_uncached) {
|
||||||
arvalid := true.B
|
arvalid := true.B
|
||||||
ar.addr := ptw_addr.asUInt
|
ar.addr := ptw_addr.asUInt
|
||||||
ar.size := log2Ceil(AXI_DATA_WID / 8).U // 一个pte的大小是8字节
|
ar.size := log2Ceil(AXI_DATA_WID / 8).U // 一个pte的大小是8字节
|
||||||
|
|
Loading…
Reference in New Issue