udb 0.1.13 → 0.1.15
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/cfgs/example_rv64_with_overlay.yaml +20 -24
- data/.data/cfgs/mc100-32-full-example.yaml +2 -2
- data/.data/cfgs/qc_iu.yaml +7 -3
- data/.data/cfgs/rv32-riscv-tests.yaml +8 -5
- data/.data/cfgs/rv32-vector.yaml +8 -5
- data/.data/cfgs/rv64-riscv-tests.yaml +8 -5
- data/.data/cfgs/rv64-vector.yaml +8 -5
- data/.data/spec/custom/isa/qc_iu/ext/Xqccmi.yaml +107 -36
- data/.data/spec/custom/isa/qc_iu/inst/Xqccmi/qc.cm.ilut.yaml +52 -69
- data/.data/spec/custom/isa/qc_iu/isa/globals.isa +27 -5
- data/.data/spec/schemas/README.adoc +3 -0
- data/.data/spec/schemas/config_schema.json +1 -1
- data/.data/spec/schemas/mmr_schema.json +3 -3
- data/.data/spec/schemas/schema_defs.json +8 -3
- data/.data/spec/std/isa/csr/H/hcounteren.layout +3 -3
- data/.data/spec/std/isa/csr/H/hcounteren.yaml +31 -31
- data/.data/spec/std/isa/csr/H/henvcfg.yaml +25 -0
- data/.data/spec/std/isa/csr/H/htinst.yaml +3 -3
- data/.data/spec/std/isa/csr/H/htval.yaml +3 -3
- data/.data/spec/std/isa/csr/H/mtinst.yaml +1 -1
- data/.data/spec/std/isa/csr/I/pmpaddr0.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr1.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr10.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr11.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr12.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr13.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr14.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr15.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr16.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr17.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr18.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr19.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr2.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr20.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr21.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr22.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr23.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr24.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr25.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr26.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr27.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr28.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr29.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr3.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr30.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr31.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr32.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr33.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr34.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr35.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr36.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr37.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr38.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr39.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr4.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr40.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr41.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr42.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr43.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr44.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr45.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr46.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr47.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr48.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr49.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr5.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr50.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr51.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr52.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr53.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr54.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr55.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr56.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr57.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr58.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr59.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr6.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr60.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr61.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr62.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr63.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr7.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr8.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddr9.yaml +6 -4
- data/.data/spec/std/isa/csr/I/pmpaddrN.layout +6 -4
- data/.data/spec/std/isa/csr/I/pmpcfg0.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg1.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg10.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg11.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg12.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg13.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg14.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg15.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg2.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg3.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg4.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg5.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg6.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg7.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfg8.yaml +120 -144
- data/.data/spec/std/isa/csr/I/pmpcfg9.yaml +60 -72
- data/.data/spec/std/isa/csr/I/pmpcfgN.layout +15 -18
- data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfg.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfgh.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfg.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfgh.yaml +1 -1
- data/.data/spec/std/isa/csr/Sscofpmf/scountovf.layout +1 -1
- data/.data/spec/std/isa/csr/Sscofpmf/scountovf.yaml +29 -29
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounterN.layout +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounterNh.layout +1 -1
- data/.data/spec/std/isa/csr/hstatus.yaml +1 -1
- data/.data/spec/std/isa/csr/jvt.yaml +1 -0
- data/.data/spec/std/isa/csr/mcycle.yaml +6 -6
- data/.data/spec/std/isa/csr/menvcfg.yaml +20 -0
- data/.data/spec/std/isa/csr/minstret.yaml +3 -3
- data/.data/spec/std/isa/csr/minstreth.yaml +1 -1
- data/.data/spec/std/isa/csr/mstatus.yaml +21 -25
- data/.data/spec/std/isa/csr/mtvec.yaml +16 -57
- data/.data/spec/std/isa/csr/senvcfg.yaml +26 -0
- data/.data/spec/std/isa/csr/sie.yaml +30 -4
- data/.data/spec/std/isa/csr/sip.yaml +16 -2
- data/.data/spec/std/isa/csr/stvec.yaml +11 -12
- data/.data/spec/std/isa/csr/vstval.yaml +1 -1
- data/.data/spec/std/isa/csr/vstvec.yaml +14 -15
- data/.data/spec/std/isa/ext/Q.yaml +1 -1
- data/.data/spec/std/isa/ext/Shlcofideleg.yaml +24 -0
- data/.data/spec/std/isa/ext/Shvstvecd.yaml +2 -2
- data/.data/spec/std/isa/ext/Sspm.yaml +5 -0
- data/.data/spec/std/isa/ext/Sstvecd.yaml +2 -2
- data/.data/spec/std/isa/ext/Sstvecv.yaml +2 -2
- data/.data/spec/std/isa/ext/Supm.yaml +17 -0
- data/.data/spec/std/isa/ext/Zcb.yaml +3 -0
- data/.data/spec/std/isa/ext/Zfbfmin.yaml +3 -5
- data/.data/spec/std/isa/ext/Ziccid.yaml +29 -0
- data/.data/spec/std/isa/ext/Zicfilp.yaml +5 -1
- data/.data/spec/std/isa/ext/Zicfiss.yaml +20 -1
- data/.data/spec/std/isa/ext/Zihpm.yaml +3 -0
- data/.data/spec/std/isa/ext/Zilx.yaml +58 -0
- data/.data/spec/std/isa/ext/Zkt.yaml +33 -1
- data/.data/spec/std/isa/ext/Zvabd.yaml +21 -0
- data/.data/spec/std/isa/ext/Zvbc.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkb.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkg.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkned.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvknha.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvknhb.yaml +4 -2
- data/.data/spec/std/isa/ext/Zvksed.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvksh.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkt.yaml +3 -0
- data/.data/spec/std/isa/inst/B/andn.yaml +10 -12
- data/.data/spec/std/isa/inst/B/clmul.yaml +9 -11
- data/.data/spec/std/isa/inst/B/clmulh.yaml +9 -11
- data/.data/spec/std/isa/inst/B/orn.yaml +9 -11
- data/.data/spec/std/isa/inst/B/rev8.yaml +1 -1
- data/.data/spec/std/isa/inst/B/rol.yaml +9 -11
- data/.data/spec/std/isa/inst/B/rolw.yaml +9 -11
- data/.data/spec/std/isa/inst/B/ror.yaml +9 -11
- data/.data/spec/std/isa/inst/B/rorw.yaml +9 -11
- data/.data/spec/std/isa/inst/B/xnor.yaml +9 -11
- data/.data/spec/std/isa/inst/C/c.add.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.addi.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.addiw.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.addw.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.and.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.andi.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.ldsp.yaml +3 -3
- data/.data/spec/std/isa/inst/C/c.lui.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.mv.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.nop.yaml +13 -2
- data/.data/spec/std/isa/inst/C/c.or.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.slli.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.srai.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.srli.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.sub.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.subw.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.xor.yaml +1 -0
- data/.data/spec/std/isa/inst/D/fld.yaml +1 -0
- data/.data/spec/std/isa/inst/D/fsd.yaml +1 -0
- data/.data/spec/std/isa/inst/F/fadd.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.l.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.lu.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.s.l.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.s.lu.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.s.wu.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.w.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.wu.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fdiv.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/feq.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fle.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fleq.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/flt.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fltq.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/flw.yaml +2 -1
- data/.data/spec/std/isa/inst/F/fmadd.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmax.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmin.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmsub.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmul.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fnmadd.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fnmsub.s.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/fsqrt.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsub.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsw.yaml +2 -1
- data/.data/spec/std/isa/inst/I/addi.yaml +1 -0
- data/.data/spec/std/isa/inst/I/addiw.yaml +1 -0
- data/.data/spec/std/isa/inst/I/andi.yaml +1 -0
- data/.data/spec/std/isa/inst/I/auipc.yaml +1 -0
- data/.data/spec/std/isa/inst/I/lb.yaml +1 -0
- data/.data/spec/std/isa/inst/I/lbu.yaml +1 -0
- data/.data/spec/std/isa/inst/I/ld.yaml +2 -0
- data/.data/spec/std/isa/inst/I/lh.yaml +1 -0
- data/.data/spec/std/isa/inst/I/lhu.yaml +1 -0
- data/.data/spec/std/isa/inst/I/lui.yaml +1 -0
- data/.data/spec/std/isa/inst/I/lw.yaml +1 -0
- data/.data/spec/std/isa/inst/I/lwu.yaml +1 -0
- data/.data/spec/std/isa/inst/I/ori.yaml +1 -0
- data/.data/spec/std/isa/inst/I/sb.yaml +1 -0
- data/.data/spec/std/isa/inst/I/sd.yaml +2 -1
- data/.data/spec/std/isa/inst/I/sh.yaml +1 -0
- data/.data/spec/std/isa/inst/I/slti.yaml +1 -0
- data/.data/spec/std/isa/inst/I/sltiu.yaml +1 -0
- data/.data/spec/std/isa/inst/I/sw.yaml +1 -0
- data/.data/spec/std/isa/inst/I/xori.yaml +1 -0
- data/.data/spec/std/isa/inst/Q/fadd.q.yaml +2 -2
- data/.data/spec/std/isa/inst/Q/fclass.q.yaml +5 -5
- data/.data/spec/std/isa/inst/Q/fleq.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fli.q.yaml +1 -1
- data/.data/spec/std/isa/inst/Q/flq.yaml +1 -0
- data/.data/spec/std/isa/inst/Q/fltq.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fmaxm.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fminm.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fmvp.q.x.yaml +1 -1
- data/.data/spec/std/isa/inst/Q/fsq.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vadc.vim.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vadd.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vand.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vle8.v.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmadc.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmadc.vim.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmerge.vim.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmseq.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmsgt.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmsgtu.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmsle.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmsleu.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmsne.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmv.v.i.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vor.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vrsub.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vsadd.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vsaddu.vi.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vse8.v.yaml +1 -0
- data/.data/spec/std/isa/inst/Zawrs/wrs.nto.yaml +4 -2
- data/.data/spec/std/isa/inst/Zba/add.uw.yaml +9 -11
- data/.data/spec/std/isa/inst/Zbb/orc.b.yaml +1 -1
- data/.data/spec/std/isa/inst/Zbkb/brev8.yaml +3 -3
- data/.data/spec/std/isa/inst/Zbkb/unzip.yaml +2 -2
- data/.data/spec/std/isa/inst/Zbkb/zip.yaml +2 -2
- data/.data/spec/std/isa/inst/Zbkx/xperm4.yaml +2 -2
- data/.data/spec/std/isa/inst/Zbkx/xperm8.yaml +2 -2
- data/.data/spec/std/isa/inst/Zcb/c.mul.yaml +1 -0
- data/.data/spec/std/isa/inst/Zcb/c.not.yaml +1 -0
- data/.data/spec/std/isa/inst/Zcb/c.zext.b.yaml +2 -7
- data/.data/spec/std/isa/inst/Zcb/c.zext.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcmop/c.mop.1.yaml +2 -0
- data/.data/spec/std/isa/inst/Zcmop/c.mop.5.yaml +2 -0
- data/.data/spec/std/isa/inst/Zcmop/c.mop.N.layout +7 -0
- data/.data/spec/std/isa/inst/Zfa/fli.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/fmaxm.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/fminm.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/fround.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/froundnx.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfh/flh.yaml +5 -2
- data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +3 -1
- data/.data/spec/std/isa/inst/Zfh/fmv.x.h.yaml +3 -1
- data/.data/spec/std/isa/inst/Zfh/fsh.yaml +4 -1
- data/.data/spec/std/isa/inst/Zicbop/prefetch.i.yaml +2 -0
- data/.data/spec/std/isa/inst/Zicbop/prefetch.r.yaml +2 -0
- data/.data/spec/std/isa/inst/Zicbop/prefetch.w.yaml +2 -0
- data/.data/spec/std/isa/inst/Zicfiss/c.sspopchk.yaml +30 -0
- data/.data/spec/std/isa/inst/Zicfiss/c.sspush.yaml +29 -0
- data/.data/spec/std/isa/inst/Zicond/czero.eqz.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicond/czero.nez.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicsr/csrrw.yaml +12 -0
- data/.data/spec/std/isa/inst/Zilx/lxd.yaml +38 -0
- data/.data/spec/std/isa/inst/Zilx/lxh.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxhu.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxsb.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsbu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsd.yaml +38 -0
- data/.data/spec/std/isa/inst/Zilx/lxsh.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxshu.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwb.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwbu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwd.yaml +39 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwh.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwhu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuww.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwwu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsw.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxswu.yaml +39 -0
- data/.data/spec/std/isa/inst/Zilx/lxw.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxwu.yaml +39 -0
- data/.data/spec/std/isa/inst/Zks/sm3p0.yaml +1 -1
- data/.data/spec/std/isa/inst/Zks/sm3p1.yaml +1 -1
- data/.data/spec/std/isa/inst/Zks/sm4ed.yaml +1 -1
- data/.data/spec/std/isa/inst/Zks/sm4ks.yaml +1 -1
- data/.data/spec/std/isa/inst/Zvabd/vabd.vv.yaml +67 -0
- data/.data/spec/std/isa/inst/Zvabd/vabdu.vv.yaml +67 -0
- data/.data/spec/std/isa/inst/Zvabd/vabs.v.yaml +61 -0
- data/.data/spec/std/isa/inst/Zvabd/vwabda.vv.yaml +72 -0
- data/.data/spec/std/isa/inst/Zvabd/vwabdau.vv.yaml +72 -0
- data/.data/spec/std/isa/isa/builtin_functions.idl +1 -0
- data/.data/spec/std/isa/isa/fp.idl +42 -18
- data/.data/spec/std/isa/isa/globals.isa +27 -7
- data/.data/spec/std/isa/isa/interrupts.idl +1 -0
- data/.data/spec/std/isa/param/CACHE_BLOCK_SIZE.yaml +70 -6
- data/.data/spec/std/isa/param/ELEN.yaml +27 -5
- data/.data/spec/std/isa/param/HCOUNTENABLE_EN.yaml +13 -0
- data/.data/spec/std/isa/param/HPM_COUNTER_EN.yaml +13 -3
- data/.data/spec/std/isa/param/HPM_EVENTS.yaml +0 -3
- data/.data/spec/std/isa/param/HSTATEEN_CONTEXT_TYPE.yaml +1 -0
- data/.data/spec/std/isa/param/MCOUNTENABLE_EN.yaml +8 -0
- data/.data/spec/std/isa/param/MSTATEEN_CONTEXT_TYPE.yaml +1 -0
- data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_DIRECT.yaml +71 -64
- data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_VECTORED.yaml +71 -64
- data/.data/spec/std/isa/param/NUM_PMP_ENTRIES.yaml +11 -22
- data/.data/spec/std/isa/param/NUM_USABLE_PMP_ENTRIES.yaml +35 -0
- data/.data/spec/std/isa/param/PMP_NA4_SUPPORTED.yaml +23 -0
- data/.data/spec/std/isa/param/{STVEC_MODE_VECTORED.yaml → PMP_NAPOT_SUPPORTED.yaml} +9 -9
- data/.data/spec/std/isa/param/{MSTATUS_TVM_IMPLEMENTED.yaml → PMP_TOR_SUPPORTED.yaml} +6 -6
- data/.data/spec/std/isa/param/PRECISE_SYNCHRONOUS_EXCEPTIONS.yaml +1 -0
- data/.data/spec/std/isa/param/STVAL_WIDTH.yaml +3 -2
- data/.data/spec/std/isa/param/STVEC_BASE_ALIGNMENT_VECTORED.yaml +100 -0
- data/.data/spec/std/isa/param/STVEC_MODES.yaml +31 -0
- data/.data/spec/std/isa/param/SV32_VSMODE_TRANSLATION.yaml +1 -1
- data/.data/spec/std/isa/param/SXLEN.yaml +2 -2
- data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED.yaml +1 -1
- data/.data/spec/std/isa/param/TRAP_ON_EBREAK.yaml +1 -0
- data/.data/spec/std/isa/param/TRAP_ON_ECALL_FROM_M.yaml +1 -0
- data/.data/spec/std/isa/param/TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY.yaml +1 -0
- data/.data/spec/std/isa/param/UXLEN.yaml +1 -1
- data/.data/spec/std/isa/param/VLEN.yaml +16 -7
- data/.data/spec/std/isa/param/VSTVEC_MODES.yaml +31 -0
- data/.data/spec/std/isa/param/ZAWRS_NTO_IS_NOP.yaml +19 -0
- data/lib/udb/ESPRESSO_VERSION +1 -1
- data/lib/udb/Z3_VERSION +1 -1
- data/lib/udb/config.rb +14 -2
- data/lib/udb/doc_link.rb +3 -4
- data/lib/udb/obj/csr.rb +1 -1
- data/lib/udb/obj/csr_field.rb +1 -1
- data/lib/udb/obj/extension.rb +1 -1
- data/lib/udb/obj/instruction.rb +1 -1
- data/lib/udb/obj/non_isa_specification.rb +22 -100
- data/lib/udb/version.rb +1 -1
- data/lib/udb/version_spec.rb +1 -1
- data/lib/udb/z3.rb +31 -9
- metadata +42 -9
- data/.data/spec/std/isa/param/STVEC_MODE_DIRECT.yaml +0 -21
- data/.data/spec/std/isa/param/VSTVEC_MODE_DIRECT.yaml +0 -21
- data/.data/spec/std/isa/param/VSTVEC_MODE_VECTORED.yaml +0 -21
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT
|
|
9
9
|
description: |
|
|
10
|
-
Value
|
|
10
|
+
Value written into htinst/mtinst when there is a load guest-page fault on a final translation.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT
|
|
9
9
|
description: |
|
|
10
|
-
Value
|
|
10
|
+
Value written into htinst/mtinst when there is a store/AMO guest-page fault on a final translation.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED
|
|
9
9
|
description: |
|
|
10
|
-
Value written into htinst/mtinst on a
|
|
10
|
+
Value written into htinst/mtinst on a LoadAddressMisaligned exception from VU/VS-mode.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED
|
|
9
9
|
description: |
|
|
10
|
-
Value written into htinst/mtinst on a
|
|
10
|
+
Value written into htinst/mtinst on a StoreAmoAddressMisaligned exception from VU/VS-mode.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: UXLEN
|
|
9
9
|
description: |
|
|
10
|
-
Set of XLENs supported in U-mode. When both 32 and 64 are supported,
|
|
10
|
+
Set of XLENs supported in U-mode. When both 32 and 64 are supported, UXLEN can be changed,
|
|
11
11
|
via mstatus.UXL, between 32 and 64.
|
|
12
12
|
long_name: TODO
|
|
13
13
|
schema:
|
|
@@ -8,15 +8,24 @@ kind: parameter
|
|
|
8
8
|
name: VLEN
|
|
9
9
|
description: |
|
|
10
10
|
The number of bits in a single vector register.
|
|
11
|
-
long_name:
|
|
11
|
+
long_name: vector register bit width
|
|
12
12
|
schema:
|
|
13
13
|
type: integer
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
enum:
|
|
15
|
+
[
|
|
16
|
+
0x20,
|
|
17
|
+
0x40,
|
|
18
|
+
0x80,
|
|
19
|
+
0x100,
|
|
20
|
+
0x200,
|
|
21
|
+
0x400,
|
|
22
|
+
0x800,
|
|
23
|
+
0x1000,
|
|
24
|
+
0x2000,
|
|
25
|
+
0x4000,
|
|
26
|
+
0x8000,
|
|
27
|
+
0x10000,
|
|
28
|
+
]
|
|
20
29
|
definedBy:
|
|
21
30
|
extension:
|
|
22
31
|
name: Zvl32b
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
3
|
+
|
|
4
|
+
# yaml-language-server: $schema=../../../schemas/param_schema.json
|
|
5
|
+
|
|
6
|
+
$schema: param_schema.json#
|
|
7
|
+
kind: parameter
|
|
8
|
+
name: VSTVEC_MODES
|
|
9
|
+
long_name: |
|
|
10
|
+
Modes supported by `vstvec.MODE`
|
|
11
|
+
definedBy:
|
|
12
|
+
extension:
|
|
13
|
+
name: H
|
|
14
|
+
description: |
|
|
15
|
+
Options:
|
|
16
|
+
|
|
17
|
+
0::
|
|
18
|
+
Direct; All traps set `pc` to `vstvec.BASE`
|
|
19
|
+
1::
|
|
20
|
+
Vectored; Asynchronous interrupts set `pc` to `vstvec.BASE` + 4 x cause.
|
|
21
|
+
|
|
22
|
+
If only one mode is given, `vstvec.MODE` is assumed to be read-only with that value.
|
|
23
|
+
Otherwise, `vstvec.MODE` is read-write.
|
|
24
|
+
schema:
|
|
25
|
+
type: array
|
|
26
|
+
items:
|
|
27
|
+
type: integer
|
|
28
|
+
enum: [0, 1]
|
|
29
|
+
minItems: 1
|
|
30
|
+
maxItems: 2
|
|
31
|
+
uniqueItems: true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Copyright (c) 2025-26 Harvey Mudd College
|
|
2
|
+
# Author: Ellen Yu (ellyu@hmc.edu)
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
4
|
+
|
|
5
|
+
# yaml-language-server: $schema=../../../schemas/param_schema.json
|
|
6
|
+
|
|
7
|
+
$schema: param_schema.json#
|
|
8
|
+
kind: parameter
|
|
9
|
+
name: ZAWRS_NTO_IS_NOP
|
|
10
|
+
description: |
|
|
11
|
+
When true, WRS.NTO completes immediately, behaving as a no-op, rather than
|
|
12
|
+
stalling the hart.
|
|
13
|
+
|
|
14
|
+
long_name: TODO
|
|
15
|
+
schema:
|
|
16
|
+
type: boolean
|
|
17
|
+
definedBy:
|
|
18
|
+
extension:
|
|
19
|
+
name: Zawrs
|
data/lib/udb/ESPRESSO_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
espresso-
|
|
1
|
+
espresso-18f59c7
|
data/lib/udb/Z3_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
z3-
|
|
1
|
+
z3-5.0.0
|
data/lib/udb/config.rb
CHANGED
|
@@ -417,13 +417,25 @@ module Udb
|
|
|
417
417
|
else
|
|
418
418
|
@data["implemented_extensions"].map do |e|
|
|
419
419
|
if e.is_a?(Array)
|
|
420
|
-
{ "name" => e[0], "version" => e[1] }
|
|
420
|
+
{ "name" => e[0], "version" => implemented_extension_version(e[1]) }
|
|
421
421
|
elsif e.is_a?(Hash)
|
|
422
|
-
{ "name" => e.fetch("name"), "version" =>
|
|
422
|
+
{ "name" => e.fetch("name"), "version" => implemented_extension_version(e.fetch("version")) }
|
|
423
423
|
end
|
|
424
424
|
end
|
|
425
425
|
end
|
|
426
426
|
end
|
|
427
427
|
|
|
428
|
+
private
|
|
429
|
+
|
|
430
|
+
sig { params(version: String).returns(String) }
|
|
431
|
+
def implemented_extension_version(version)
|
|
432
|
+
version_str = version.strip
|
|
433
|
+
if version_str.start_with?("=")
|
|
434
|
+
RequirementSpec.new(version_str).version_spec.to_s
|
|
435
|
+
else
|
|
436
|
+
VersionSpec.new(version_str).to_s
|
|
437
|
+
end
|
|
438
|
+
end
|
|
439
|
+
|
|
428
440
|
end
|
|
429
441
|
end
|
data/lib/udb/doc_link.rb
CHANGED
|
@@ -33,12 +33,11 @@
|
|
|
33
33
|
module Udb
|
|
34
34
|
class DocLink
|
|
35
35
|
# @param dst_link [String] The documentation link provided in the YAML
|
|
36
|
-
# @param db_obj [
|
|
36
|
+
# @param db_obj [Object] Database object
|
|
37
37
|
def initialize(dst_link, db_obj)
|
|
38
|
-
raise ArgumentError, "
|
|
38
|
+
raise ArgumentError, "Missing documentation link for #{db_obj.name} of kind #{db_obj.kind}" if dst_link.nil?
|
|
39
|
+
raise ArgumentError, "Need String but was passed a #{dst_link.class}" unless dst_link.is_a?(String)
|
|
39
40
|
@dst_link = dst_link
|
|
40
|
-
|
|
41
|
-
raise ArgumentError, "Missing documentation link for #{db_obj.name} of kind #{db_obj.kind}" if @dst_link.nil?
|
|
42
41
|
end
|
|
43
42
|
|
|
44
43
|
# @return [String] Unique ID of the linked to normative rule
|
data/lib/udb/obj/csr.rb
CHANGED
|
@@ -198,7 +198,7 @@ module Udb
|
|
|
198
198
|
# VSXLEN condition applies if VS-mode is possible
|
|
199
199
|
(cfg_arch.mxlen.nil?) || \
|
|
200
200
|
(cfg_arch.possible_extensions.map(&:name).include?("S") && \
|
|
201
|
-
(cfg_arch.param_values["SXLEN"].nil? || cfg_arch.param_values["SXLEN"].size > 1))
|
|
201
|
+
(cfg_arch.param_values["SXLEN"].nil? || cfg_arch.param_values["SXLEN"].size > 1)) || \
|
|
202
202
|
(cfg_arch.possible_extensions.map(&:name).include?("H") && \
|
|
203
203
|
(cfg_arch.param_values["VSXLEN"].nil? || cfg_arch.param_values["VSXLEN"].size > 1))
|
|
204
204
|
else
|
data/lib/udb/obj/csr_field.rb
CHANGED
|
@@ -715,7 +715,7 @@ module Udb
|
|
|
715
715
|
sig { override.returns(T::Boolean) }
|
|
716
716
|
def defined_in_base64? = base != 32
|
|
717
717
|
|
|
718
|
-
sig { params(xlen: Integer).returns(T::Boolean) }
|
|
718
|
+
sig { override.params(xlen: Integer).returns(T::Boolean) }
|
|
719
719
|
def defined_in_base?(xlen) = xlen == 32 ? defined_in_base32? : defined_in_base64?
|
|
720
720
|
|
|
721
721
|
# @return [Boolean] Whether or not this field exists for any XLEN
|
data/lib/udb/obj/extension.rb
CHANGED
|
@@ -403,7 +403,7 @@ module Udb
|
|
|
403
403
|
sig { override.params(other_ext: Object).returns(T.nilable(Integer)).checked(:never) }
|
|
404
404
|
def <=>(other_ext)
|
|
405
405
|
return nil unless other_ext.is_a?(Extension)
|
|
406
|
-
|
|
406
|
+
name <=> other_ext.name
|
|
407
407
|
end
|
|
408
408
|
|
|
409
409
|
# returns list of exception codes that are defined by any version of this extension
|
data/lib/udb/obj/instruction.rb
CHANGED
|
@@ -791,7 +791,7 @@ module Udb
|
|
|
791
791
|
@left_shift = field_data["left_shift"].nil? ? 0 : field_data["left_shift"]
|
|
792
792
|
@sext = field_data["sign_extend"].nil? ? false : field_data["sign_extend"]
|
|
793
793
|
@alias = field_data["alias"].nil? ? nil : field_data["alias"]
|
|
794
|
-
@location = field_data["location"]
|
|
794
|
+
@location = field_data["location"].to_s
|
|
795
795
|
extract_location(field_data["location"])
|
|
796
796
|
@excludes =
|
|
797
797
|
if field_data.key?("not")
|
|
@@ -143,72 +143,19 @@ class NonIsaSpecification
|
|
|
143
143
|
)
|
|
144
144
|
end
|
|
145
145
|
|
|
146
|
-
# Validation methods
|
|
147
|
-
sig { returns(T::Array[String]) }
|
|
148
|
-
# Validate all prose statement IDs and conventions for this spec.
|
|
149
|
-
def validate_prose_ids
|
|
150
|
-
return [] unless valid?
|
|
151
|
-
|
|
152
|
-
issues = []
|
|
153
|
-
statements = extract_prose_statements
|
|
154
|
-
statements.each do |stmt|
|
|
155
|
-
next unless stmt['id']
|
|
156
|
-
id = stmt['id']
|
|
157
|
-
source = stmt[:source] || 'unknown'
|
|
158
|
-
|
|
159
|
-
# Check ID format according to prose-schema conventions
|
|
160
|
-
unless valid_id_format?(id)
|
|
161
|
-
issues << "Invalid ID format '#{id}' in #{source}: must be lowercase with underscores/hyphens only"
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
# Check for non-ISA specification naming convention
|
|
165
|
-
unless valid_id_naming?(id)
|
|
166
|
-
issues << "ID '#{id}' in #{source} should start with '#{name.downcase}-' for non-ISA specifications"
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Check for duplicate IDs
|
|
171
|
-
issues.concat(find_duplicate_ids(statements))
|
|
172
|
-
issues
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
sig { params(include_sections: T::Boolean).returns(T::Array[T::Hash[T.any(String, Symbol), T.untyped]]) }
|
|
176
|
-
# Extract all prose statements from description and sections, tagging their source.
|
|
177
|
-
def extract_prose_statements(include_sections: true)
|
|
178
|
-
statements = []
|
|
179
|
-
# Extract from description
|
|
180
|
-
if spec_description.is_a?(Array)
|
|
181
|
-
spec_description.each_with_index { |stmt, i| statements << stmt.merge(source: "description[#{i}]") if stmt.is_a?(Hash) }
|
|
182
|
-
end
|
|
183
|
-
# Extract from sections
|
|
184
|
-
if include_sections
|
|
185
|
-
sections.each_with_index do |section, section_idx|
|
|
186
|
-
next unless section['content'].is_a?(Array)
|
|
187
|
-
section['content'].each_with_index do |stmt, stmt_idx|
|
|
188
|
-
statements << stmt.merge(source: "sections[#{section_idx}].content[#{stmt_idx}]") if stmt.is_a?(Hash)
|
|
189
|
-
end
|
|
190
|
-
end
|
|
191
|
-
end
|
|
192
|
-
statements
|
|
193
|
-
end
|
|
194
|
-
|
|
195
146
|
# Rendering methods
|
|
196
147
|
sig do
|
|
197
148
|
params(
|
|
198
149
|
cfg_arch: T.untyped,
|
|
199
150
|
base_level: Integer,
|
|
200
|
-
normative: T::Boolean,
|
|
201
|
-
non_normative: T::Boolean
|
|
202
151
|
).returns(String)
|
|
203
152
|
end
|
|
204
153
|
# Configuration-aware rendering
|
|
205
|
-
def render_for_cfg(cfg_arch, base_level: 3
|
|
154
|
+
def render_for_cfg(cfg_arch, base_level: 3)
|
|
206
155
|
return "" unless exists_in_cfg?(cfg_arch)
|
|
207
156
|
|
|
208
157
|
to_asciidoc(
|
|
209
158
|
base_level: base_level,
|
|
210
|
-
normative: normative,
|
|
211
|
-
non_normative: non_normative,
|
|
212
159
|
when_callback: create_when_callback(cfg_arch)
|
|
213
160
|
)
|
|
214
161
|
end
|
|
@@ -216,24 +163,22 @@ class NonIsaSpecification
|
|
|
216
163
|
sig do
|
|
217
164
|
params(
|
|
218
165
|
base_level: Integer,
|
|
219
|
-
normative: T::Boolean,
|
|
220
|
-
non_normative: T::Boolean,
|
|
221
166
|
when_callback: T.nilable(T.proc.params(arg0: T.untyped, arg1: T.untyped).returns(T::Boolean))
|
|
222
167
|
).returns(String)
|
|
223
168
|
end
|
|
224
169
|
# Render the full specification as AsciiDoc, including description, sections, and references.
|
|
225
|
-
def to_asciidoc(base_level: 3,
|
|
170
|
+
def to_asciidoc(base_level: 3, when_callback: nil)
|
|
226
171
|
return create_fallback_content(base_level) unless valid?
|
|
227
172
|
|
|
228
173
|
content = []
|
|
229
174
|
|
|
230
175
|
# Add main description prose
|
|
231
|
-
desc_content = render_structured_prose(spec_description,
|
|
176
|
+
desc_content = render_structured_prose(spec_description, when_callback: when_callback)
|
|
232
177
|
content << desc_content if desc_content && !desc_content.empty?
|
|
233
178
|
content << ""
|
|
234
179
|
|
|
235
180
|
# Process all sections
|
|
236
|
-
content.concat(render_sections(base_level,
|
|
181
|
+
content.concat(render_sections(base_level, when_callback))
|
|
237
182
|
|
|
238
183
|
# Add references section if present
|
|
239
184
|
content.concat(render_references(base_level)) unless references.empty?
|
|
@@ -243,50 +188,22 @@ class NonIsaSpecification
|
|
|
243
188
|
|
|
244
189
|
private
|
|
245
190
|
|
|
246
|
-
# Validation helper methods
|
|
247
|
-
sig { params(id: String).returns(T::Boolean) }
|
|
248
|
-
# IDs must be lowercase, start with a letter, and use only underscores/hyphens.
|
|
249
|
-
def valid_id_format?(id)
|
|
250
|
-
id.match?(/^[a-z][a-z0-9_-]*$/)
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
sig { params(id: String).returns(T::Boolean) }
|
|
254
|
-
# IDs should start with spec name or allowed prefixes for non-ISA specs.
|
|
255
|
-
def valid_id_naming?(id)
|
|
256
|
-
id.start_with?(name.downcase) || id.match?(/^(ext|inst|csr)-/)
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
sig { params(statements: T::Array[T::Hash[T.any(String, Symbol), T.untyped]]).returns(T::Array[String]) }
|
|
260
|
-
# Find duplicate IDs in the statements array.
|
|
261
|
-
def find_duplicate_ids(statements)
|
|
262
|
-
issues = []
|
|
263
|
-
id_counts = Hash.new(0)
|
|
264
|
-
statements.each { |stmt| id_counts[stmt['id']] += 1 if stmt['id'] }
|
|
265
|
-
id_counts.each do |id, count|
|
|
266
|
-
next if count == 1
|
|
267
|
-
issues << "Duplicate ID '#{id}' appears #{count} times"
|
|
268
|
-
end
|
|
269
|
-
issues
|
|
270
|
-
end
|
|
271
|
-
|
|
272
191
|
# Rendering helper methods
|
|
273
192
|
sig do
|
|
274
193
|
params(
|
|
275
194
|
base_level: Integer,
|
|
276
|
-
normative: T::Boolean,
|
|
277
|
-
non_normative: T::Boolean,
|
|
278
195
|
when_callback: T.nilable(T.proc.params(arg0: T.untyped, arg1: T.untyped).returns(T::Boolean))
|
|
279
196
|
).returns(T::Array[String])
|
|
280
197
|
end
|
|
281
198
|
# Render all sections, adjusting heading levels and filtering by callback.
|
|
282
|
-
def render_sections(base_level,
|
|
199
|
+
def render_sections(base_level, when_callback)
|
|
283
200
|
content = []
|
|
284
201
|
sections.each do |section|
|
|
285
202
|
next unless should_include_section?(section, when_callback)
|
|
286
203
|
level = section['level'] || (base_level + 1)
|
|
287
204
|
content << "#{'=' * level} #{section['title']}"
|
|
288
205
|
content << ""
|
|
289
|
-
section_content = render_structured_prose(section['content'],
|
|
206
|
+
section_content = render_structured_prose(section['content'], when_callback: when_callback)
|
|
290
207
|
content << section_content if section_content && !section_content.empty?
|
|
291
208
|
content << ""
|
|
292
209
|
end
|
|
@@ -311,29 +228,34 @@ class NonIsaSpecification
|
|
|
311
228
|
sig do
|
|
312
229
|
params(
|
|
313
230
|
prose_content: T.untyped,
|
|
314
|
-
normative: T::Boolean,
|
|
315
|
-
non_normative: T::Boolean,
|
|
316
231
|
when_callback: T.nilable(T.proc.params(arg0: T.untyped, arg1: T.untyped).returns(T::Boolean))
|
|
317
232
|
).returns(T.nilable(String))
|
|
318
233
|
end
|
|
319
|
-
# Render an array of prose statements as AsciiDoc
|
|
320
|
-
def render_structured_prose(prose_content,
|
|
234
|
+
# Render an array of prose statements as AsciiDoc.
|
|
235
|
+
def render_structured_prose(prose_content, when_callback: nil)
|
|
321
236
|
return nil if prose_content.nil?
|
|
237
|
+
|
|
238
|
+
# Handle simple string (Asciidoc source)
|
|
239
|
+
return prose_content if prose_content.is_a?(String)
|
|
240
|
+
|
|
322
241
|
return "" unless prose_content.is_a?(Array)
|
|
323
242
|
|
|
324
243
|
rendered_statements = []
|
|
325
244
|
prose_content.each do |statement|
|
|
326
|
-
|
|
245
|
+
text = nil
|
|
246
|
+
condition = nil
|
|
247
|
+
|
|
248
|
+
next unless statement.is_a?(Hash)
|
|
249
|
+
|
|
250
|
+
text = statement['text']
|
|
251
|
+
condition = statement['when()']
|
|
327
252
|
|
|
328
|
-
|
|
329
|
-
stmt_normative = statement['normative']
|
|
330
|
-
next if stmt_normative == true && !normative
|
|
331
|
-
next if stmt_normative == false && !non_normative
|
|
253
|
+
next unless text
|
|
332
254
|
|
|
333
255
|
# Filter by when condition
|
|
334
|
-
next if when_callback && !when_callback.call(
|
|
256
|
+
next if when_callback && !when_callback.call(condition, statement)
|
|
335
257
|
|
|
336
|
-
rendered_statements <<
|
|
258
|
+
rendered_statements << text
|
|
337
259
|
end
|
|
338
260
|
rendered_statements.join("\n\n")
|
|
339
261
|
end
|
data/lib/udb/version.rb
CHANGED
data/lib/udb/version_spec.rb
CHANGED
|
@@ -114,7 +114,7 @@ module Udb
|
|
|
114
114
|
sig { params(other: T.untyped).returns(T.nilable(Integer)).checked(:never) }
|
|
115
115
|
def <=>(other)
|
|
116
116
|
if other.is_a?(String)
|
|
117
|
-
VersionSpec.new(other)
|
|
117
|
+
self <=> VersionSpec.new(other)
|
|
118
118
|
elsif other.is_a?(VersionSpec)
|
|
119
119
|
if @major != other.major
|
|
120
120
|
@major <=> other.major
|
data/lib/udb/z3.rb
CHANGED
|
@@ -318,12 +318,13 @@ module Udb
|
|
|
318
318
|
# Supported JSON schema features:
|
|
319
319
|
# - Type constraints (boolean, integer, string, array)
|
|
320
320
|
# - Value constraints (const, enum, minimum, maximum)
|
|
321
|
-
# - Composition (allOf)
|
|
321
|
+
# - Composition (allOf; anyOf for boolean, integer, and string)
|
|
322
322
|
# - References ($ref to uint32/uint64)
|
|
323
323
|
# - Array constraints (items, minItems, maxItems, contains, uniqueItems)
|
|
324
324
|
#
|
|
325
325
|
# Not yet supported (TODO):
|
|
326
|
-
# - anyOf
|
|
326
|
+
# - anyOf for array
|
|
327
|
+
# - oneOf, noneOf
|
|
327
328
|
# - if/then/else (conditional schemas)
|
|
328
329
|
class Z3ParameterTerm
|
|
329
330
|
extend T::Sig
|
|
@@ -341,6 +342,7 @@ module Udb
|
|
|
341
342
|
# - enum: one of several values
|
|
342
343
|
# - minimum/maximum: range bounds (unsigned comparison)
|
|
343
344
|
# - allOf: conjunction of subschemas
|
|
345
|
+
# - anyOf: inclusive disjunction of subschemas (at least one must hold)
|
|
344
346
|
# - $ref: references to uint32/uint64 types
|
|
345
347
|
#
|
|
346
348
|
# @param solver [Z3Solver] The solver to add assertions to
|
|
@@ -385,12 +387,15 @@ module Udb
|
|
|
385
387
|
|
|
386
388
|
if schema_hsh.key?("allOf")
|
|
387
389
|
schema_hsh.fetch("allOf").each do |h|
|
|
388
|
-
assertions += constrain_int(solver, term, h)
|
|
390
|
+
assertions += constrain_int(solver, term, h, assert: false)
|
|
389
391
|
end
|
|
390
392
|
end
|
|
391
393
|
|
|
392
394
|
if schema_hsh.key?("anyOf")
|
|
393
|
-
|
|
395
|
+
branches = schema_hsh.fetch("anyOf").map do |h|
|
|
396
|
+
constrain_int(solver, term, h, assert: false)
|
|
397
|
+
end
|
|
398
|
+
assertions << any_of_constraint(branches)
|
|
394
399
|
end
|
|
395
400
|
|
|
396
401
|
if schema_hsh.key?("oneOf")
|
|
@@ -433,6 +438,7 @@ module Udb
|
|
|
433
438
|
# Handles JSON schema keywords:
|
|
434
439
|
# - const: exact boolean value
|
|
435
440
|
# - allOf: conjunction of subschemas
|
|
441
|
+
# - anyOf: inclusive disjunction of subschemas (at least one must hold)
|
|
436
442
|
#
|
|
437
443
|
# @param solver [Z3Solver] The solver to add assertions to
|
|
438
444
|
# @param term [Z3::BoolExpr] The Z3 boolean term to constrain
|
|
@@ -458,12 +464,15 @@ module Udb
|
|
|
458
464
|
|
|
459
465
|
if schema_hsh.key?("allOf")
|
|
460
466
|
schema_hsh.fetch("allOf").each do |h|
|
|
461
|
-
assertions += constrain_bool(solver, term, h)
|
|
467
|
+
assertions += constrain_bool(solver, term, h, assert: false)
|
|
462
468
|
end
|
|
463
469
|
end
|
|
464
470
|
|
|
465
471
|
if schema_hsh.key?("anyOf")
|
|
466
|
-
|
|
472
|
+
branches = schema_hsh.fetch("anyOf").map do |h|
|
|
473
|
+
constrain_bool(solver, term, h, assert: false)
|
|
474
|
+
end
|
|
475
|
+
assertions << any_of_constraint(branches)
|
|
467
476
|
end
|
|
468
477
|
|
|
469
478
|
if schema_hsh.key?("oneOf")
|
|
@@ -492,6 +501,7 @@ module Udb
|
|
|
492
501
|
# Handles JSON schema keywords:
|
|
493
502
|
# - const: exact string value (compared via hash)
|
|
494
503
|
# - enum: one of several string values (compared via hash)
|
|
504
|
+
# - anyOf: inclusive disjunction of subschemas (at least one must hold)
|
|
495
505
|
#
|
|
496
506
|
# @param solver [Z3Solver] The solver to add assertions to
|
|
497
507
|
# @param term [Z3::IntExpr] The Z3 integer term representing the string hash
|
|
@@ -526,7 +536,10 @@ module Udb
|
|
|
526
536
|
end
|
|
527
537
|
|
|
528
538
|
if schema_hsh.key?("anyOf")
|
|
529
|
-
|
|
539
|
+
branches = schema_hsh.fetch("anyOf").map do |h|
|
|
540
|
+
constrain_string(solver, term, h, assert: false)
|
|
541
|
+
end
|
|
542
|
+
assertions << any_of_constraint(branches)
|
|
530
543
|
end
|
|
531
544
|
|
|
532
545
|
if schema_hsh.key?("oneOf")
|
|
@@ -547,6 +560,15 @@ module Udb
|
|
|
547
560
|
assertions
|
|
548
561
|
end
|
|
549
562
|
|
|
563
|
+
sig { params(branches: T::Array[T::Array[Z3::BoolExpr]]).returns(Z3::BoolExpr) }
|
|
564
|
+
def self.any_of_constraint(branches)
|
|
565
|
+
expressions = branches.map do |branch|
|
|
566
|
+
branch.reduce(Z3.True) { |expression, assertion| expression & assertion }
|
|
567
|
+
end
|
|
568
|
+
expressions.reduce(Z3.False) { |expression, branch| expression | branch }
|
|
569
|
+
end
|
|
570
|
+
private_class_method :any_of_constraint
|
|
571
|
+
|
|
550
572
|
# Extract array constraints from JSON schema
|
|
551
573
|
#
|
|
552
574
|
# Processes JSON schema array keywords and returns an ArrayConstraints object
|
|
@@ -1125,8 +1147,8 @@ module Udb
|
|
|
1125
1147
|
@solver = T.let(Z3::Solver.new, Z3::Solver)
|
|
1126
1148
|
|
|
1127
1149
|
# Stacks for incremental solving with push/pop
|
|
1128
|
-
@ext_vers = T.let([{}], T::Array[T::Hash[
|
|
1129
|
-
@ext_reqs = T.let([{}], T::Array[T::Hash[
|
|
1150
|
+
@ext_vers = T.let([{}], T::Array[T::Hash[Integer, Z3ExtensionVersion]])
|
|
1151
|
+
@ext_reqs = T.let([{}], T::Array[T::Hash[Integer, Z3ExtensionRequirement]])
|
|
1130
1152
|
@param_terms = T.let([{}], T::Array[T::Hash[String, Z3ParameterTerm]])
|
|
1131
1153
|
|
|
1132
1154
|
# Extension version component terms (shared across versions of same extension)
|