TIME_COMPARE
读写64 位 supervisor timer compare 值;在 RV32 中低 32 位通过 stimecmp 访问,高 32 位通过 stimecmph 访问。
这个字段控制什么
- - 64 位 supervisor timer compare 值;在 RV32 中低 32 位通过 stimecmp 访问,高 32 位通过 stimecmph 访问。
stimecmp(0x14D)是 Sstc 定义的 64 位 Supervisor timer compare CSR;menvcfg.STCE=1 时,time 大于等于 stimecmp 产生 STIP 挂起条件;STCE=0 时 STIP 恢复未实现 Sstc 的行为。
64 位 supervisor timer compare 值;在 RV32 中低 32 位通过 stimecmp 访问,高 32 位通过 stimecmph 访问。
stimecmp 是 Sstc 提供的 S 模式定时器比较值。menvcfg.STCE=1 时,STIP 反映 time >= stimecmp,更新最终可见但可能不是立即可见;STCE=0 时 STIP 恢复未实现 Sstc 的行为。
读取 time 或由调度器决定下一次 S 模式 tick。
确认 Sstc 已实现且 menvcfg.STCE 与 mcounteren.TM 都允许 S 模式访问 stimecmp。
写入 stimecmp(RV32 同时维护 stimecmph 高半)设置下一次比较点。
按标准中断使能和委托规则处理 STIP;不要假设 STIP 立即下降。
不是。官方 Sstc 文本定义它是 64 位;RV32 通过 stimecmp 和 stimecmph 分半访问。
写入大于 time 的值会清除比较条件,但 STIP 变化只保证最终反映,不保证立即反映。