fix(pma): fix pmaAddr regOut and rdata (#4936)

This commit is contained in:
Zhaoyang You 2025-08-18 15:01:39 +08:00 committed by GitHub
parent 5be6ba1b46
commit a4d7d3c638
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,8 @@ trait CSRPMA { self: NewCSR =>
val pmaaddr: Seq[CSRModule[_]] = Range(0, p(PMParameKey).NumPMA).map(num =>
Module(new CSRModule(s"Pmaaddr$num") with HasPMAAddrSink {
// read condition
regOut := addrRData(num)
regOut := addrRegOut(num)
rdata := addrRData(num)
})
.setAddr(CSRConst.PmaaddrBase + num)
)
@ -77,6 +78,7 @@ trait HasPMACfgRSink { self: CSRModule[_] =>
trait HasPMAAddrSink { self: CSRModule[_] =>
val addrRData = IO(Input(Vec(p(PMParameKey).NumPMA, UInt(64.W))))
val addrRegOut = IO(Input(Vec(p(PMParameKey).NumPMA, UInt(64.W))))
}
trait PMAInit extends HasPMParameters with PMAReadWrite {

View File

@ -690,6 +690,7 @@ class NewCSR(implicit val p: Parameters) extends Module
mod match {
case m: HasPMAAddrSink =>
m.addrRData := pmaEntryMod.io.out.pmaAddrRData
m.addrRegOut := pmaEntryMod.io.out.pmaAddrRegOut
case _ =>
}
mod match {

View File

@ -92,6 +92,7 @@ class PMAEntryHandleModule(implicit p: Parameters) extends PMAModule with PMAIni
}
io.out.pmaAddrRData := pmaAddrR
io.out.pmaAddrRegOut := pmaAddr
}
@ -107,6 +108,7 @@ class PMAEntryHandleIOBundle(implicit p: Parameters) extends PMABundle {
val out = Output(new Bundle {
val pmaCfgWdata = UInt(PMXLEN.W)
val pmaAddrRData = Vec(NumPMA, UInt(64.W))
val pmaAddrRegOut = Vec(NumPMA, UInt(64.W))
})
}