Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ class MLevelPermitModule extends Module {

private val fpVec_EX_II = fpOff_EX_II || vecOff_EX_II

private val rwStimecmp_EX_II = !privState.isModeM && (!mcounterenTM || !menvcfgSTCE) && (addr === CSRs.vstimecmp.U || addr === CSRs.stimecmp.U)
private val rwStimecmp_EX_II = !privState.isModeM &&
(!mcounterenTM && (addr === CSRs.vstimecmp.U || addr === CSRs.stimecmp.U) ||
!menvcfgSTCE && (addr === CSRs.stimecmp.U))

private val accessHPM_EX_II = csrIsHPM && !privState.isModeM && !mcounteren(counterAddr)

Expand Down Expand Up @@ -612,7 +614,7 @@ class xcounterenIO extends Bundle {

class xenvcfgIO extends Bundle {
// Machine environment configuration register.
// Accessing stimecmp or vstimecmp from **Non-M level** will trap EX_II, if menvcfg.STCE=0
// Accessing stimecmp from **Non-M level** will trap EX_II, if menvcfg.STCE=0
val menvcfg = UInt(64.W)
// Hypervisor environment configuration register.
// Accessing vstimecmp from ** V level** will trap EX_VI, if menvcfg.STCE=1 && henvcfg.STCE=0
Expand Down
Loading