fix(cache): 修复fault信号的wait阶段复位

This commit is contained in:
Liphen 2024-01-20 14:32:18 +08:00
parent 6fb565b51f
commit 3b330cf8d7
2 changed files with 5 additions and 1 deletions

View File

@ -533,6 +533,8 @@ class DCache(cacheConfig: CacheConfig)(implicit cpuConfig: CpuConfig) extends Mo
ptw_scratch.dcache_wait := true.B
when(io.cpu.complete_single_request) {
ptw_scratch.dcache_wait := false.B
access_fault := false.B // 清除access_fault
page_fault := false.B // 清除page_fault
state := s_idle
}
}

View File

@ -307,7 +307,9 @@ class ICache(cacheConfig: CacheConfig)(implicit cpuConfig: CpuConfig) extends Mo
is(s_wait) {
// 等待流水线的allow_to_go信号防止多次发出读请求
when(io.cpu.complete_single_request) {
state := s_idle
access_fault := false.B // 清除access_fault
page_fault := false.B // 清除page_fault
state := s_idle
(0 until instFetchNum).foreach(i => rdata_in_wait(i).valid := false.B)
}
}