pmp_setter: fix mask generation

This commit is contained in:
occheung 2021-10-19 11:39:25 +08:00
parent c3c3a94c5d
commit df03c99ab2
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class PmpSetter(cutoff : Int) extends Component with Pmp {
val ones = io.addr & ~(io.addr + 1)
io.base := io.addr(xlen - 3 downto cutoff - 2) ^ ones(xlen - 3 downto cutoff - 2)
io.mask := ~ones(xlen - 2 downto cutoff - 1)
io.mask := ~(ones(xlen - 4 downto cutoff - 2) @@ U"1")
}
case class ProtectedMemoryTranslatorPort(bus : MemoryTranslatorBus)