Merge pull request #141 from betrusted-io/dev-asid

Dev asid
This commit is contained in:
Dolu1990 2020-10-04 15:20:02 +02:00 committed by GitHub
commit 8bd1785233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -92,11 +92,12 @@ class MmuPlugin(ioRange : UInt => Bool,
}
val satp = new Area {
val mode = RegInit(False)
val asid = Reg(Bits(9 bits))
val ppn = Reg(UInt(20 bits))
}
for(offset <- List(CSR.MSTATUS, CSR.SSTATUS)) csrService.rw(offset, 19 -> status.mxr, 18 -> status.sum, 17 -> status.mprv)
csrService.rw(CSR.SATP, 31 -> satp.mode, 0 -> satp.ppn)
csrService.rw(CSR.SATP, 31 -> satp.mode, 22 -> satp.asid, 0 -> satp.ppn)
}
val core = pipeline plug new Area {