udb 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.c.mienter.nest.yaml +21 -21
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.c.mienter.yaml +21 -21
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.c.mileaveret.yaml +19 -19
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.lb.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.lbu.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.lh.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.lhu.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.lw.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.sb.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.sh.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.e.sw.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lrb.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lrbu.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lrh.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lrhu.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lrw.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lwm.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.lwmi.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.setwm.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.setwmi.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.srb.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.srh.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.srw.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.swm.yaml +1 -1
- data/.data/spec/custom/isa/qc_iu/inst/Xqci/qc.swmi.yaml +1 -1
- data/.data/spec/std/isa/inst/C/c.ld.yaml +2 -2
- data/.data/spec/std/isa/inst/C/c.ldsp.yaml +1 -1
- data/.data/spec/std/isa/inst/C/c.lw.yaml +1 -1
- data/.data/spec/std/isa/inst/C/c.lwsp.yaml +1 -1
- data/.data/spec/std/isa/inst/C/c.sd.yaml +2 -2
- data/.data/spec/std/isa/inst/C/c.sdsp.yaml +2 -2
- data/.data/spec/std/isa/inst/C/c.sw.yaml +1 -1
- data/.data/spec/std/isa/inst/C/c.swsp.yaml +1 -1
- data/.data/spec/std/isa/inst/F/flw.yaml +2 -2
- data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsgnj.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsgnjn.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsgnjx.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsw.yaml +1 -1
- data/.data/spec/std/isa/inst/I/lb.yaml +1 -1
- data/.data/spec/std/isa/inst/I/lbu.yaml +1 -1
- data/.data/spec/std/isa/inst/I/ld.yaml +2 -2
- data/.data/spec/std/isa/inst/I/lh.yaml +1 -1
- data/.data/spec/std/isa/inst/I/lhu.yaml +1 -1
- data/.data/spec/std/isa/inst/I/lw.yaml +1 -1
- data/.data/spec/std/isa/inst/I/lwu.yaml +1 -1
- data/.data/spec/std/isa/inst/I/sb.yaml +1 -1
- data/.data/spec/std/isa/inst/I/sd.yaml +1 -1
- data/.data/spec/std/isa/inst/I/sh.yaml +1 -1
- data/.data/spec/std/isa/inst/I/sw.yaml +1 -1
- data/.data/spec/std/isa/inst/V/vle8.v.yaml +1 -1
- data/.data/spec/std/isa/inst/V/vse8.v.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoadd.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoand.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomax.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomaxu.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amomin.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amominu.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoor.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoswap.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.SIZE.AQRL.layout +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.d.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.d.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.d.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.d.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.w.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.w.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.w.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zaamo/amoxor.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoadd.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoand.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomax.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomaxu.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amomin.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amominu.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoor.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoswap.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.b.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.b.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.b.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.h.aq.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.h.aqrl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.h.rl.yaml +1 -1
- data/.data/spec/std/isa/inst/Zabha/amoxor.h.yaml +1 -1
- data/.data/spec/std/isa/inst/Zalrsc/lr.SIZE.AQRL.layout +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.d.aq.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.d.aqrl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.d.rl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.d.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.w.aq.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.w.aqrl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.w.rl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/lr.w.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.SIZE.AQRL.layout +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.d.aq.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.d.aqrl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.d.rl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.d.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.w.aq.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.w.aqrl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.w.rl.yaml +2 -2
- data/.data/spec/std/isa/inst/Zalrsc/sc.w.yaml +2 -2
- data/.data/spec/std/isa/inst/Zcb/c.lbu.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcb/c.lh.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcb/c.lhu.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcb/c.sb.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcb/c.sh.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcd/c.fld.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcd/c.fldsp.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcd/c.fsd.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcd/c.fsdsp.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcf/c.flw.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcf/c.flwsp.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcf/c.fsw.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcf/c.fswsp.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcmt/cm.jalt.yaml +2 -2
- data/.data/spec/std/isa/inst/Zcmt/cm.jt.yaml +2 -2
- data/.data/spec/std/isa/inst/Zfh/fcvt.s.h.yaml +3 -3
- data/.data/spec/std/isa/inst/Zfh/flh.yaml +2 -2
- data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfh/fsh.yaml +1 -1
- data/.data/spec/std/isa/isa/builtin_functions.idl +3 -5
- data/.data/spec/std/isa/isa/fetch.idl +2 -2
- data/.data/spec/std/isa/isa/fp.idl +7 -8
- data/.data/spec/std/isa/isa/globals.isa +123 -118
- data/.data/spec/std/isa/isa/util.idl +6 -8
- data/lib/udb/cfg_arch.rb +36 -7
- data/lib/udb/idl/condition_to_udb.rb +7 -7
- data/lib/udb/obj/extension.rb +106 -67
- data/lib/udb/version.rb +1 -1
- data/lib/udb/yaml/yaml_resolver.rb +1 -1
- metadata +2 -2
|
@@ -1545,16 +1545,16 @@ function translate_gstage {
|
|
|
1545
1545
|
return result;
|
|
1546
1546
|
} else if (SV32X4_TRANSLATION && CSR[hgatp].MODE == $bits(HgatpMode::Sv32x4)) {
|
|
1547
1547
|
# Sv39
|
|
1548
|
-
return gstage_page_walk
|
|
1548
|
+
return gstage_page_walk(32, 34, 32, 2, gpaddr, vaddr, op, effective_mode, false, encoding);
|
|
1549
1549
|
} else if (SV39X4_TRANSLATION && CSR[hgatp].MODE == $bits(HgatpMode::Sv39x4)) {
|
|
1550
1550
|
# Sv39
|
|
1551
|
-
return gstage_page_walk
|
|
1551
|
+
return gstage_page_walk(39, 56, 64, 3, gpaddr, vaddr, op, effective_mode, false, encoding);
|
|
1552
1552
|
} else if (SV48X4_TRANSLATION && CSR[hgatp].MODE == $bits(HgatpMode::Sv48x4)) {
|
|
1553
1553
|
# Sv48
|
|
1554
|
-
return gstage_page_walk
|
|
1554
|
+
return gstage_page_walk(48, 56, 64, 4, gpaddr, vaddr, op, effective_mode, false, encoding);
|
|
1555
1555
|
} else if (SV57X4_TRANSLATION && CSR[hgatp].MODE == $bits(HgatpMode::Sv57x4)) {
|
|
1556
1556
|
# Sv57
|
|
1557
|
-
return gstage_page_walk
|
|
1557
|
+
return gstage_page_walk(57, 56, 64, 5, gpaddr, vaddr, op, effective_mode, false, encoding);
|
|
1558
1558
|
} else {
|
|
1559
1559
|
# Invalid mode
|
|
1560
1560
|
if (op == MemoryOperation::Read) {
|
|
@@ -1791,14 +1791,13 @@ function tinst_value {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
|
|
1793
1793
|
function gstage_page_walk {
|
|
1794
|
-
template
|
|
1795
|
-
U32 VA_SIZE, # virtual address size (Sv32 = 32, Sv39 = 39, Sv48 = 48, Sv57 = 57)
|
|
1796
|
-
U32 PA_SIZE, # physical address size (Sv32 = 34, Sv39 = 56, Sv48 = 56, Sv57 = 56)
|
|
1797
|
-
U32 PTESIZE, # length, in bits, of a Page Table Entry (Sv32 = 32, others = 64)
|
|
1798
|
-
U32 LEVELS # levels in the page table (Sv32 = 2, Sv39 = 3, Sv48 = 4, Sv57 = 5)
|
|
1799
1794
|
returns
|
|
1800
1795
|
TranslationResult # the translated address and attributes
|
|
1801
1796
|
arguments
|
|
1797
|
+
U32 VA_SIZE, # virtual address size (Sv32 = 32, Sv39 = 39, Sv48 = 48, Sv57 = 57)
|
|
1798
|
+
U32 PA_SIZE, # physical address size (Sv32 = 34, Sv39 = 56, Sv48 = 56, Sv57 = 56)
|
|
1799
|
+
U32 PTESIZE, # length, in bits, of a Page Table Entry (Sv32 = 32, others = 64)
|
|
1800
|
+
U32 LEVELS, # levels in the page table (Sv32 = 2, Sv39 = 3, Sv48 = 4, Sv57 = 5)
|
|
1802
1801
|
XReg gpaddr, # the guest physical address to translate
|
|
1803
1802
|
XReg vaddr, # the original virtual address to translate
|
|
1804
1803
|
MemoryOperation op, # the operation type
|
|
@@ -1867,33 +1866,35 @@ function gstage_page_walk {
|
|
|
1867
1866
|
}
|
|
1868
1867
|
access_check(pte_paddr, PTESIZE, vaddr, MemoryOperation::Read, access_fault_code, effective_mode);
|
|
1869
1868
|
|
|
1870
|
-
|
|
1869
|
+
XReg pte = read_physical_memory(PTESIZE, pte_paddr);
|
|
1871
1870
|
PteFlags pte_flags = pte[9:0];
|
|
1872
1871
|
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
}
|
|
1878
|
-
if (!implemented?(ExtensionName::Svrsw60t59b)) {
|
|
1879
|
-
if ((PTESIZE >= 64) && pte[60:59] != 0) {
|
|
1880
|
-
# 60:59 are reserved if Svrsw60t59b is not supported
|
|
1872
|
+
if (xlen() == 64) {
|
|
1873
|
+
# check if any reserved bits are set
|
|
1874
|
+
# Sv32 has no reserved bits, and Sv39/48/57 all have reserved bits at 58:54
|
|
1875
|
+
if ((VA_SIZE != 32) && (pte[58:54] != 0)) {
|
|
1881
1876
|
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1882
1877
|
}
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1878
|
+
if (!implemented?(ExtensionName::Svrsw60t59b)) {
|
|
1879
|
+
if ((PTESIZE >= 64) && pte[60:59] != 0) {
|
|
1880
|
+
# 60:59 are reserved if Svrsw60t59b is not supported
|
|
1881
|
+
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
if (!implemented?(ExtensionName::Svnapot)) {
|
|
1885
|
+
if ((PTESIZE >= 64) && pte[63] != 0) {
|
|
1886
|
+
# N is reserved if Svnapot is not supported
|
|
1887
|
+
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
if ((PTESIZE >= 64) && !pbmte && (pte[62:61] != 0)) {
|
|
1891
|
+
# PBMTE is reserved when Svpbmt is not enabled
|
|
1892
|
+
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1893
|
+
}
|
|
1894
|
+
if ((PTESIZE >= 64) && pbmte && (pte[62:61] == 3)) {
|
|
1895
|
+
# PBMTE == 3 is reserved
|
|
1887
1896
|
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1888
1897
|
}
|
|
1889
|
-
}
|
|
1890
|
-
if ((PTESIZE >= 64) && !pbmte && (pte[62:61] != 0)) {
|
|
1891
|
-
# PBMTE is reserved when Svpbmt is not enabled
|
|
1892
|
-
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1893
|
-
}
|
|
1894
|
-
if ((PTESIZE >= 64) && pbmte && (pte[62:61] == 3)) {
|
|
1895
|
-
# PBMTE == 3 is reserved
|
|
1896
|
-
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
1897
1898
|
}
|
|
1898
1899
|
|
|
1899
1900
|
if (pte_flags.V == 0) {
|
|
@@ -1980,7 +1981,7 @@ function gstage_page_walk {
|
|
|
1980
1981
|
} else {
|
|
1981
1982
|
# successful translation and update
|
|
1982
1983
|
result.paddr = pte_paddr;
|
|
1983
|
-
if (PTESIZE >= 64) {
|
|
1984
|
+
if ((xlen() == 64) && (PTESIZE >= 64)) {
|
|
1984
1985
|
result.pbmt = $enum(Pbmt, pte[62:61]);
|
|
1985
1986
|
}
|
|
1986
1987
|
result.pte_flags = pte_flags;
|
|
@@ -2004,14 +2005,16 @@ function gstage_page_walk {
|
|
|
2004
2005
|
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
2005
2006
|
}
|
|
2006
2007
|
|
|
2007
|
-
if ((
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2008
|
+
if (xlen() == 64) {
|
|
2009
|
+
if ((VA_SIZE != 32) && (pte[62:61] != 0)) {
|
|
2010
|
+
# PBMT must be zero in a pointer PTE
|
|
2011
|
+
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
2012
|
+
}
|
|
2011
2013
|
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2014
|
+
if ((VA_SIZE != 32) && pte[63] != 0) {
|
|
2015
|
+
# N must be zero in a pointer PTE
|
|
2016
|
+
raise_guest_page_fault(op, gpaddr, vaddr, tinst, effective_mode);
|
|
2017
|
+
}
|
|
2015
2018
|
}
|
|
2016
2019
|
|
|
2017
2020
|
# fall through to next level
|
|
@@ -2023,14 +2026,13 @@ function gstage_page_walk {
|
|
|
2023
2026
|
|
|
2024
2027
|
|
|
2025
2028
|
function stage1_page_walk {
|
|
2026
|
-
template
|
|
2027
|
-
U32 VA_SIZE, # virtual address size (Sv32 = 32, Sv39 = 39, Sv48 = 48, Sv57 = 57)
|
|
2028
|
-
U32 PA_SIZE, # physical address size (Sv32 = 34, Sv39 = 56, Sv48 = 56, Sv57 = 56)
|
|
2029
|
-
U32 PTESIZE, # length, in bits, of a Page Table Entry (Sv32 = 4, others = 8)
|
|
2030
|
-
U32 LEVELS # levels in the page table (Sv32 = 2, Sv39 = 3, Sv48 = 4, Sv57 = 5)
|
|
2031
2029
|
returns
|
|
2032
2030
|
TranslationResult # the translated address and attributes
|
|
2033
2031
|
arguments
|
|
2032
|
+
U32 VA_SIZE, # virtual address size (Sv32 = 32, Sv39 = 39, Sv48 = 48, Sv57 = 57)
|
|
2033
|
+
U32 PA_SIZE, # physical address size (Sv32 = 34, Sv39 = 56, Sv48 = 56, Sv57 = 56)
|
|
2034
|
+
U32 PTESIZE, # length, in bits, of a Page Table Entry (Sv32 = 4, others = 8)
|
|
2035
|
+
U32 LEVELS, # levels in the page table (Sv32 = 2, Sv39 = 3, Sv48 = 4, Sv57 = 5)
|
|
2034
2036
|
Bits<MXLEN> vaddr, # the virtual address to translate
|
|
2035
2037
|
MemoryOperation op, # the operation type
|
|
2036
2038
|
PrivilegeMode effective_mode, # the mode for this walk (usually effective_ldst_mode(), though different for HLV/HLX/HSV)
|
|
@@ -2094,7 +2096,7 @@ function stage1_page_walk {
|
|
|
2094
2096
|
|
|
2095
2097
|
# Page-based memory type enable?
|
|
2096
2098
|
Boolean pbmte;
|
|
2097
|
-
if (VA_SIZE == 32) {
|
|
2099
|
+
if ((xlen() == 32) || VA_SIZE == 32) {
|
|
2098
2100
|
# not Sv32 (PBMT is not defined for Sv32)
|
|
2099
2101
|
pbmte = false;
|
|
2100
2102
|
} else {
|
|
@@ -2154,7 +2156,7 @@ function stage1_page_walk {
|
|
|
2154
2156
|
# perform access check on the physical address of pte before it's used
|
|
2155
2157
|
access_check(pte_phys.paddr, PTESIZE, vaddr, MemoryOperation::Read, access_fault_code, effective_mode);
|
|
2156
2158
|
|
|
2157
|
-
|
|
2159
|
+
XReg pte = read_physical_memory(PTESIZE, pte_phys.paddr);
|
|
2158
2160
|
PteFlags pte_flags = pte[9:0];
|
|
2159
2161
|
|
|
2160
2162
|
# shadow stack page?
|
|
@@ -2162,7 +2164,7 @@ function stage1_page_walk {
|
|
|
2162
2164
|
|
|
2163
2165
|
# check if any reserved bits are set
|
|
2164
2166
|
# Sv32 has no reserved bits, and Sv39/48/57 all have reserved bits at 58:54
|
|
2165
|
-
if ((VA_SIZE != 32) && (pte[58:54] != 0)) {
|
|
2167
|
+
if ((xlen() == 64) && (VA_SIZE != 32) && (pte[58:54] != 0)) {
|
|
2166
2168
|
raise(page_fault_code, mode(), vaddr);
|
|
2167
2169
|
}
|
|
2168
2170
|
|
|
@@ -2178,29 +2180,31 @@ function stage1_page_walk {
|
|
|
2178
2180
|
}
|
|
2179
2181
|
}
|
|
2180
2182
|
|
|
2181
|
-
if (
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2183
|
+
if (xlen() == 64) {
|
|
2184
|
+
if (pbmte) {
|
|
2185
|
+
# PBMT == 3 is reserved
|
|
2186
|
+
if (pte[62:61] == 3) {
|
|
2187
|
+
raise (page_fault_code, mode(), vaddr);
|
|
2188
|
+
}
|
|
2189
|
+
} else {
|
|
2190
|
+
# PBMT is reserved if Svpbmt is not supported)
|
|
2191
|
+
if ((PTESIZE >= 64) && (pte[62:61] != 0)) {
|
|
2192
|
+
raise (page_fault_code, mode(), vaddr);
|
|
2193
|
+
}
|
|
2190
2194
|
}
|
|
2191
|
-
}
|
|
2192
2195
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2196
|
+
if (!implemented?(ExtensionName::Svrsw60t59b)) {
|
|
2197
|
+
if ((PTESIZE >= 64) && pte[60:59] != 0) {
|
|
2198
|
+
# 60:59 are reserved if Svrsw60t59b is not supported
|
|
2199
|
+
raise (page_fault_code, mode(), vaddr);
|
|
2200
|
+
}
|
|
2197
2201
|
}
|
|
2198
|
-
}
|
|
2199
2202
|
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2203
|
+
if (!implemented?(ExtensionName::Svnapot)) {
|
|
2204
|
+
if ((PTESIZE >= 64) && (pte[63] != 0)) {
|
|
2205
|
+
# N is reserved if Svnapot is not supported
|
|
2206
|
+
raise (page_fault_code, mode(), vaddr);
|
|
2207
|
+
}
|
|
2204
2208
|
}
|
|
2205
2209
|
}
|
|
2206
2210
|
|
|
@@ -2309,7 +2313,9 @@ function stage1_page_walk {
|
|
|
2309
2313
|
encoding
|
|
2310
2314
|
);
|
|
2311
2315
|
result.paddr = pte_phys.paddr;
|
|
2312
|
-
|
|
2316
|
+
if (xlen() == 64) {
|
|
2317
|
+
result.pbmt = pte_phys.pbmt == Pbmt::PMA ? $enum(Pbmt, pte[62:61]) : pte_phys.pbmt;
|
|
2318
|
+
}
|
|
2313
2319
|
result.pte_flags = pte_flags;
|
|
2314
2320
|
return result;
|
|
2315
2321
|
}
|
|
@@ -2329,7 +2335,7 @@ function stage1_page_walk {
|
|
|
2329
2335
|
encoding
|
|
2330
2336
|
);
|
|
2331
2337
|
result.paddr = pte_phys.paddr;
|
|
2332
|
-
if (PTESIZE >= 64) {
|
|
2338
|
+
if (xlen() == 64 && PTESIZE >= 64) {
|
|
2333
2339
|
result.pbmt = pte_phys.pbmt == Pbmt::PMA ? $enum(Pbmt, pte[62:61]) : pte_phys.pbmt;
|
|
2334
2340
|
}
|
|
2335
2341
|
result.pte_flags = pte_flags;
|
|
@@ -2347,12 +2353,12 @@ function stage1_page_walk {
|
|
|
2347
2353
|
raise (page_fault_code, mode(), vaddr);
|
|
2348
2354
|
}
|
|
2349
2355
|
|
|
2350
|
-
if ((VA_SIZE != 32) && (pte[62:61] != 0)) {
|
|
2356
|
+
if ((xlen() == 64) && (VA_SIZE != 32) && (pte[62:61] != 0)) {
|
|
2351
2357
|
# PBMT must be zero in a pointer PTE
|
|
2352
2358
|
raise (page_fault_code, mode(), vaddr);
|
|
2353
2359
|
}
|
|
2354
2360
|
|
|
2355
|
-
if ((VA_SIZE != 32) && pte[63] != 0) {
|
|
2361
|
+
if ((xlen() == 64) && (VA_SIZE != 32) && pte[63] != 0) {
|
|
2356
2362
|
# N must be zero in a pointer PTE
|
|
2357
2363
|
raise (page_fault_code, mode(), vaddr);
|
|
2358
2364
|
}
|
|
@@ -2430,16 +2436,16 @@ function translate {
|
|
|
2430
2436
|
result.paddr = vaddr;
|
|
2431
2437
|
} else if (xlen() == 32 && translation_mode == SatpMode::Sv32) {
|
|
2432
2438
|
# Sv32 page table walk
|
|
2433
|
-
result = stage1_page_walk
|
|
2439
|
+
result = stage1_page_walk(32, 34, 32, 2, vaddr, op, effective_mode, encoding);
|
|
2434
2440
|
} else if (xlen() == 64 && translation_mode == SatpMode::Sv39) {
|
|
2435
2441
|
# Sv39 page table walk
|
|
2436
|
-
result = stage1_page_walk
|
|
2442
|
+
result = stage1_page_walk(39, 56, 64, 3, vaddr, op, effective_mode, encoding);
|
|
2437
2443
|
} else if (xlen() == 64 && translation_mode == SatpMode::Sv48) {
|
|
2438
2444
|
# Sv48 page table walk
|
|
2439
|
-
result = stage1_page_walk
|
|
2445
|
+
result = stage1_page_walk(48, 56, 64, 4, vaddr, op, effective_mode, encoding);
|
|
2440
2446
|
} else if (xlen() == 64 && translation_mode == SatpMode::Sv57) {
|
|
2441
2447
|
# Sv57 page table walk
|
|
2442
|
-
result = stage1_page_walk
|
|
2448
|
+
result = stage1_page_walk(57, 56, 64, 5, vaddr, op, effective_mode, encoding);
|
|
2443
2449
|
} else {
|
|
2444
2450
|
assert(false, "Unexpected SatpMode");
|
|
2445
2451
|
}
|
|
@@ -2517,9 +2523,8 @@ function canonical_gpaddr? {
|
|
|
2517
2523
|
}
|
|
2518
2524
|
|
|
2519
2525
|
function misaligned_is_atomic? {
|
|
2520
|
-
template U32 N
|
|
2521
2526
|
returns Boolean
|
|
2522
|
-
arguments Bits<PHYS_ADDR_WIDTH> physical_address
|
|
2527
|
+
arguments U32 N, Bits<PHYS_ADDR_WIDTH> physical_address
|
|
2523
2528
|
description {
|
|
2524
2529
|
Returns true if an access starting at +physical_address+ that is +N+ bits long is atomic.
|
|
2525
2530
|
|
|
@@ -2532,16 +2537,16 @@ function misaligned_is_atomic? {
|
|
|
2532
2537
|
return false if MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE == 0;
|
|
2533
2538
|
|
|
2534
2539
|
if (pma_applies?(PmaAttribute::MAG16, physical_address, N) &&
|
|
2535
|
-
in_naturally_aligned_region
|
|
2540
|
+
in_naturally_aligned_region?(128, physical_address, N)) {
|
|
2536
2541
|
return true;
|
|
2537
2542
|
} else if (pma_applies?(PmaAttribute::MAG8, physical_address, N) &&
|
|
2538
|
-
in_naturally_aligned_region
|
|
2543
|
+
in_naturally_aligned_region?(64, physical_address, N)) {
|
|
2539
2544
|
return true;
|
|
2540
2545
|
} else if (pma_applies?(PmaAttribute::MAG4, physical_address, N) &&
|
|
2541
|
-
in_naturally_aligned_region
|
|
2546
|
+
in_naturally_aligned_region?(32, physical_address, N)) {
|
|
2542
2547
|
return true;
|
|
2543
2548
|
} else if (pma_applies?(PmaAttribute::MAG2, physical_address, N) &&
|
|
2544
|
-
in_naturally_aligned_region
|
|
2549
|
+
in_naturally_aligned_region?(16, physical_address, N)) {
|
|
2545
2550
|
return true;
|
|
2546
2551
|
} else {
|
|
2547
2552
|
# not saved by a Misaligned Atomicity Granule
|
|
@@ -2551,9 +2556,9 @@ function misaligned_is_atomic? {
|
|
|
2551
2556
|
}
|
|
2552
2557
|
|
|
2553
2558
|
function read_memory_aligned {
|
|
2554
|
-
|
|
2555
|
-
returns Bits<LEN>
|
|
2559
|
+
returns XReg
|
|
2556
2560
|
arguments
|
|
2561
|
+
U32 LEN,
|
|
2557
2562
|
XReg virtual_address,
|
|
2558
2563
|
Bits<INSTR_ENC_SIZE> encoding # the encoding of an instruction causing this access
|
|
2559
2564
|
description {
|
|
@@ -2571,14 +2576,14 @@ function read_memory_aligned {
|
|
|
2571
2576
|
# may raise an exception
|
|
2572
2577
|
access_check(result.paddr, LEN, virtual_address, MemoryOperation::Read, ExceptionCode::LoadAccessFault, effective_ldst_mode());
|
|
2573
2578
|
|
|
2574
|
-
return read_physical_memory
|
|
2579
|
+
return read_physical_memory(LEN, result.paddr);
|
|
2575
2580
|
}
|
|
2576
2581
|
}
|
|
2577
2582
|
|
|
2578
2583
|
function read_memory {
|
|
2579
|
-
|
|
2580
|
-
returns Bits<LEN>
|
|
2584
|
+
returns XReg
|
|
2581
2585
|
arguments
|
|
2586
|
+
U32 LEN,
|
|
2582
2587
|
XReg virtual_address,
|
|
2583
2588
|
Bits<INSTR_ENC_SIZE> encoding # the encoding of an instruction causing this access, or 0 if a fetch
|
|
2584
2589
|
description {
|
|
@@ -2586,11 +2591,11 @@ function read_memory {
|
|
|
2586
2591
|
|
|
2587
2592
|
}
|
|
2588
2593
|
body {
|
|
2589
|
-
Boolean aligned = is_naturally_aligned
|
|
2594
|
+
Boolean aligned = is_naturally_aligned(LEN, virtual_address);
|
|
2590
2595
|
XReg physical_address;
|
|
2591
2596
|
|
|
2592
2597
|
if (aligned) {
|
|
2593
|
-
return read_memory_aligned
|
|
2598
|
+
return read_memory_aligned(LEN, virtual_address, encoding);
|
|
2594
2599
|
}
|
|
2595
2600
|
|
|
2596
2601
|
# access isn't naturally aligned, but it still might be atomic if this hart supports
|
|
@@ -2605,9 +2610,9 @@ function read_memory {
|
|
|
2605
2610
|
? translate(virtual_address, MemoryOperation::Read, effective_ldst_mode(), encoding).paddr
|
|
2606
2611
|
: virtual_address;
|
|
2607
2612
|
|
|
2608
|
-
if (misaligned_is_atomic
|
|
2613
|
+
if (misaligned_is_atomic?(LEN, physical_address)) {
|
|
2609
2614
|
access_check(physical_address, LEN, virtual_address, MemoryOperation::Read, ExceptionCode::LoadAccessFault, effective_ldst_mode());
|
|
2610
|
-
return read_physical_memory
|
|
2615
|
+
return read_physical_memory(LEN, physical_address);
|
|
2611
2616
|
}
|
|
2612
2617
|
}
|
|
2613
2618
|
|
|
@@ -2627,9 +2632,9 @@ function read_memory {
|
|
|
2627
2632
|
|
|
2628
2633
|
# misaligned, must break into multiple reads
|
|
2629
2634
|
if (MISALIGNED_SPLIT_STRATEGY == "sequential_bytes") {
|
|
2630
|
-
|
|
2635
|
+
XReg result = 0;
|
|
2631
2636
|
for (U32 I = 0; I < (LEN/8); I++) {
|
|
2632
|
-
result = result | (read_memory_aligned
|
|
2637
|
+
result = result | (read_memory_aligned(8, virtual_address + I, encoding) `<< (8*I));
|
|
2633
2638
|
}
|
|
2634
2639
|
return result;
|
|
2635
2640
|
} else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
|
|
@@ -2649,9 +2654,9 @@ function read_memory_xlen {
|
|
|
2649
2654
|
}
|
|
2650
2655
|
body {
|
|
2651
2656
|
if (xlen() == 32) {
|
|
2652
|
-
return read_memory
|
|
2657
|
+
return read_memory(32, virtual_address, encoding);
|
|
2653
2658
|
} else {
|
|
2654
|
-
return read_memory
|
|
2659
|
+
return read_memory(64, virtual_address, encoding);
|
|
2655
2660
|
}
|
|
2656
2661
|
}
|
|
2657
2662
|
}
|
|
@@ -2666,9 +2671,9 @@ function write_memory_xlen {
|
|
|
2666
2671
|
}
|
|
2667
2672
|
body {
|
|
2668
2673
|
if (xlen() == 32) {
|
|
2669
|
-
return write_memory
|
|
2674
|
+
return write_memory(32, virtual_address, value, encoding);
|
|
2670
2675
|
} else {
|
|
2671
|
-
return write_memory
|
|
2676
|
+
return write_memory(64, virtual_address, value, encoding);
|
|
2672
2677
|
}
|
|
2673
2678
|
}
|
|
2674
2679
|
}
|
|
@@ -2694,9 +2699,9 @@ function read_memory_xlen_aligned {
|
|
|
2694
2699
|
access_check(result.paddr, xlen(), virtual_address, MemoryOperation::Read, ExceptionCode::LoadAccessFault, effective_ldst_mode());
|
|
2695
2700
|
|
|
2696
2701
|
if (xlen() == 32) {
|
|
2697
|
-
return read_physical_memory
|
|
2702
|
+
return read_physical_memory(32, result.paddr);
|
|
2698
2703
|
} else {
|
|
2699
|
-
return read_physical_memory
|
|
2704
|
+
return read_physical_memory(64, result.paddr);
|
|
2700
2705
|
}
|
|
2701
2706
|
}
|
|
2702
2707
|
}
|
|
@@ -2757,9 +2762,9 @@ function register_reservation_set {
|
|
|
2757
2762
|
}
|
|
2758
2763
|
|
|
2759
2764
|
function load_reserved {
|
|
2760
|
-
|
|
2761
|
-
returns Bits<N> # the value of memory at virtual_address
|
|
2765
|
+
returns XReg # the value of memory at virtual_address
|
|
2762
2766
|
arguments
|
|
2767
|
+
U32 N, # the number of bits being loaded
|
|
2763
2768
|
Bits<MXLEN> virtual_address, # the virtual address to load
|
|
2764
2769
|
Bits<1> aq, # acquire semantics? 0=no, 1=yes
|
|
2765
2770
|
Bits<1> rl, # release semantics? 0=no, 1=yes
|
|
@@ -2798,14 +2803,14 @@ function load_reserved {
|
|
|
2798
2803
|
reservation_virtual_address = virtual_address;
|
|
2799
2804
|
}
|
|
2800
2805
|
|
|
2801
|
-
return read_memory_aligned
|
|
2806
|
+
return read_memory_aligned(N, physical_address, encoding);
|
|
2802
2807
|
}
|
|
2803
2808
|
}
|
|
2804
2809
|
|
|
2805
2810
|
function store_conditional {
|
|
2806
|
-
template U32 N # number of bits being stored
|
|
2807
2811
|
returns Boolean # whether or not the store conditional succeeded
|
|
2808
2812
|
arguments
|
|
2813
|
+
U32 N, # number of bits being stored
|
|
2809
2814
|
Bits<MXLEN> virtual_address, # the virtual address to store to
|
|
2810
2815
|
Bits<MXLEN> value, # the value to store
|
|
2811
2816
|
Bits<1> aq, # acquire semantics? 0=no, 1=yes
|
|
@@ -2869,18 +2874,18 @@ function store_conditional {
|
|
|
2869
2874
|
}
|
|
2870
2875
|
|
|
2871
2876
|
# success. perform the store
|
|
2872
|
-
write_physical_memory
|
|
2877
|
+
write_physical_memory(N, physical_address, value);
|
|
2873
2878
|
|
|
2874
2879
|
return true;
|
|
2875
2880
|
}
|
|
2876
2881
|
}
|
|
2877
2882
|
|
|
2878
2883
|
function amo {
|
|
2879
|
-
|
|
2880
|
-
returns Bits<N>
|
|
2884
|
+
returns XReg
|
|
2881
2885
|
arguments
|
|
2886
|
+
U32 N, # number of bits being loaded/stored
|
|
2882
2887
|
XReg virtual_address, # the virtual address to load from/store to
|
|
2883
|
-
|
|
2888
|
+
XReg value, # the value for the second half of the atomic operation
|
|
2884
2889
|
AmoOperation op, # atomic operation to apply
|
|
2885
2890
|
Bits<1> aq, # acquire semantics? 0=no, 1=yes
|
|
2886
2891
|
Bits<1> rl, # release semantics? 0=no, 1=yes
|
|
@@ -2894,7 +2899,7 @@ function amo {
|
|
|
2894
2899
|
If +rl+ is 1, then the amo also acts as a memory model release.
|
|
2895
2900
|
}
|
|
2896
2901
|
body {
|
|
2897
|
-
Boolean aligned = is_naturally_aligned
|
|
2902
|
+
Boolean aligned = is_naturally_aligned(N, virtual_address);
|
|
2898
2903
|
|
|
2899
2904
|
if (!aligned && MISALIGNED_LDST_EXCEPTION_PRIORITY == "high") {
|
|
2900
2905
|
raise(ExceptionCode::StoreAmoAddressMisaligned, mode(), virtual_address);
|
|
@@ -2924,7 +2929,7 @@ function amo {
|
|
|
2924
2929
|
|
|
2925
2930
|
# pma alignment checks
|
|
2926
2931
|
if (!aligned &&
|
|
2927
|
-
!misaligned_is_atomic
|
|
2932
|
+
!misaligned_is_atomic?(N, physical_address)) {
|
|
2928
2933
|
raise (ExceptionCode::StoreAmoAddressMisaligned, mode(), virtual_address);
|
|
2929
2934
|
}
|
|
2930
2935
|
|
|
@@ -2940,10 +2945,10 @@ function amo {
|
|
|
2940
2945
|
|
|
2941
2946
|
|
|
2942
2947
|
function write_memory_aligned {
|
|
2943
|
-
template U32 LEN
|
|
2944
2948
|
arguments
|
|
2949
|
+
U32 LEN,
|
|
2945
2950
|
XReg virtual_address,
|
|
2946
|
-
|
|
2951
|
+
XReg value,
|
|
2947
2952
|
Bits<INSTR_ENC_SIZE> encoding # encoding of the instruction causing this access
|
|
2948
2953
|
description {
|
|
2949
2954
|
Write to virtual memory using a known aligned address.
|
|
@@ -2958,25 +2963,25 @@ function write_memory_aligned {
|
|
|
2958
2963
|
# may raise an exception
|
|
2959
2964
|
access_check(physical_address, LEN, virtual_address, MemoryOperation::Write, ExceptionCode::StoreAmoAccessFault, effective_ldst_mode());
|
|
2960
2965
|
|
|
2961
|
-
write_physical_memory
|
|
2966
|
+
write_physical_memory(LEN, physical_address, value);
|
|
2962
2967
|
}
|
|
2963
2968
|
}
|
|
2964
2969
|
|
|
2965
2970
|
function write_memory {
|
|
2966
|
-
template U32 LEN
|
|
2967
2971
|
arguments
|
|
2972
|
+
U32 LEN,
|
|
2968
2973
|
XReg virtual_address,
|
|
2969
|
-
|
|
2974
|
+
XReg value,
|
|
2970
2975
|
Bits<INSTR_ENC_SIZE> encoding # encoding of the instruction causing this access
|
|
2971
2976
|
description {
|
|
2972
2977
|
Write to virtual memory
|
|
2973
2978
|
}
|
|
2974
2979
|
body {
|
|
2975
|
-
Boolean aligned = is_naturally_aligned
|
|
2980
|
+
Boolean aligned = is_naturally_aligned(LEN, virtual_address);
|
|
2976
2981
|
XReg physical_address;
|
|
2977
2982
|
|
|
2978
2983
|
if (aligned) {
|
|
2979
|
-
write_memory_aligned
|
|
2984
|
+
write_memory_aligned(LEN, virtual_address, value, encoding);
|
|
2980
2985
|
return;
|
|
2981
2986
|
}
|
|
2982
2987
|
|
|
@@ -2992,9 +2997,9 @@ function write_memory {
|
|
|
2992
2997
|
? translate(virtual_address, MemoryOperation::Write, effective_ldst_mode(), encoding).paddr
|
|
2993
2998
|
: virtual_address;
|
|
2994
2999
|
|
|
2995
|
-
if (misaligned_is_atomic
|
|
3000
|
+
if (misaligned_is_atomic?(LEN, physical_address)) {
|
|
2996
3001
|
access_check(physical_address, LEN, virtual_address, MemoryOperation::Write, ExceptionCode::StoreAmoAccessFault, effective_ldst_mode());
|
|
2997
|
-
write_physical_memory
|
|
3002
|
+
write_physical_memory(LEN, physical_address, value);
|
|
2998
3003
|
return;
|
|
2999
3004
|
}
|
|
3000
3005
|
}
|
|
@@ -3015,7 +3020,7 @@ function write_memory {
|
|
|
3015
3020
|
# misaligned, must break into multiple reads
|
|
3016
3021
|
if (MISALIGNED_SPLIT_STRATEGY == "sequential_bytes") {
|
|
3017
3022
|
for (U32 I = 0; I < (LEN/8); I++) {
|
|
3018
|
-
write_memory_aligned
|
|
3023
|
+
write_memory_aligned(8, virtual_address + I, (value >> (8*I))[7:0], encoding);
|
|
3019
3024
|
}
|
|
3020
3025
|
} else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
|
|
3021
3026
|
unpredictable("An implementation is free to break a misaligned access any way, leading to unpredictable behavior when any part of the misaligned access causes an exception");
|
|
@@ -3043,9 +3048,9 @@ function write_memory_xlen_aligned {
|
|
|
3043
3048
|
access_check(physical_address, xlen(), virtual_address, MemoryOperation::Write, ExceptionCode::StoreAmoAccessFault, effective_ldst_mode());
|
|
3044
3049
|
|
|
3045
3050
|
if (xlen() == 32) {
|
|
3046
|
-
write_physical_memory
|
|
3051
|
+
write_physical_memory(32, physical_address, value);
|
|
3047
3052
|
} else {
|
|
3048
|
-
write_physical_memory
|
|
3053
|
+
write_physical_memory(64, physical_address, value);
|
|
3049
3054
|
}
|
|
3050
3055
|
}
|
|
3051
3056
|
}
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
# generic utility functions
|
|
7
7
|
|
|
8
8
|
function power_of_2? {
|
|
9
|
-
template U32 N
|
|
10
9
|
returns Boolean
|
|
11
|
-
arguments
|
|
10
|
+
arguments XReg value
|
|
12
11
|
description {
|
|
13
12
|
Returns true if value is a power of two, false otherwise
|
|
14
13
|
}
|
|
@@ -127,11 +126,11 @@ function bit_length {
|
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
function count_leading_zeros {
|
|
130
|
-
template U32 N
|
|
131
129
|
returns
|
|
132
|
-
|
|
130
|
+
XReg # Number of leading zeros in +value+
|
|
133
131
|
arguments
|
|
134
|
-
|
|
132
|
+
U32 N, # bit width
|
|
133
|
+
XReg value # value to count zero in
|
|
135
134
|
description {
|
|
136
135
|
Returns the number of leading 0 bits before the most-significant 1 bit of +value+,
|
|
137
136
|
or N if value is zero.
|
|
@@ -174,9 +173,8 @@ function sext {
|
|
|
174
173
|
}
|
|
175
174
|
|
|
176
175
|
function is_naturally_aligned {
|
|
177
|
-
template U32 N
|
|
178
176
|
returns Boolean
|
|
179
|
-
arguments XReg value
|
|
177
|
+
arguments U32 N, XReg value
|
|
180
178
|
description {
|
|
181
179
|
Checks if value is naturally aligned to N bits.
|
|
182
180
|
}
|
|
@@ -189,9 +187,9 @@ function is_naturally_aligned {
|
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
function in_naturally_aligned_region? {
|
|
192
|
-
template U32 N
|
|
193
190
|
returns Boolean
|
|
194
191
|
arguments
|
|
192
|
+
U32 N, # alignment size in bits
|
|
195
193
|
XReg address, # starting address
|
|
196
194
|
U32 length # length of the access
|
|
197
195
|
description {
|