udb 0.1.14 → 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.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/.data/cfgs/example_rv64_with_overlay.yaml +5 -6
  3. data/.data/cfgs/mc100-32-full-example.yaml +2 -2
  4. data/.data/cfgs/qc_iu.yaml +2 -2
  5. data/.data/cfgs/rv32-riscv-tests.yaml +4 -4
  6. data/.data/cfgs/rv32-vector.yaml +4 -4
  7. data/.data/cfgs/rv64-riscv-tests.yaml +4 -4
  8. data/.data/cfgs/rv64-vector.yaml +4 -4
  9. data/.data/spec/schemas/README.adoc +3 -0
  10. data/.data/spec/schemas/schema_defs.json +3 -3
  11. data/.data/spec/std/isa/csr/H/hcounteren.layout +3 -3
  12. data/.data/spec/std/isa/csr/H/hcounteren.yaml +31 -31
  13. data/.data/spec/std/isa/csr/H/htinst.yaml +3 -3
  14. data/.data/spec/std/isa/csr/H/htval.yaml +3 -3
  15. data/.data/spec/std/isa/csr/H/mtinst.yaml +1 -1
  16. data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfg.yaml +1 -1
  17. data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfgh.yaml +1 -1
  18. data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfg.yaml +1 -1
  19. data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfgh.yaml +1 -1
  20. data/.data/spec/std/isa/csr/Sscofpmf/scountovf.layout +1 -1
  21. data/.data/spec/std/isa/csr/Sscofpmf/scountovf.yaml +29 -29
  22. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10.yaml +4 -4
  23. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10h.yaml +1 -1
  24. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11.yaml +4 -4
  25. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11h.yaml +1 -1
  26. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12.yaml +4 -4
  27. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12h.yaml +1 -1
  28. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13.yaml +4 -4
  29. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13h.yaml +1 -1
  30. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14.yaml +4 -4
  31. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14h.yaml +1 -1
  32. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15.yaml +4 -4
  33. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15h.yaml +1 -1
  34. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16.yaml +4 -4
  35. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16h.yaml +1 -1
  36. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17.yaml +4 -4
  37. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17h.yaml +1 -1
  38. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18.yaml +4 -4
  39. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18h.yaml +1 -1
  40. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19.yaml +4 -4
  41. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19h.yaml +1 -1
  42. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20.yaml +4 -4
  43. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20h.yaml +1 -1
  44. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21.yaml +4 -4
  45. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21h.yaml +1 -1
  46. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22.yaml +4 -4
  47. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22h.yaml +1 -1
  48. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23.yaml +4 -4
  49. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23h.yaml +1 -1
  50. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24.yaml +4 -4
  51. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24h.yaml +1 -1
  52. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25.yaml +4 -4
  53. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25h.yaml +1 -1
  54. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26.yaml +4 -4
  55. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26h.yaml +1 -1
  56. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27.yaml +4 -4
  57. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27h.yaml +1 -1
  58. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28.yaml +4 -4
  59. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28h.yaml +1 -1
  60. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29.yaml +4 -4
  61. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29h.yaml +1 -1
  62. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3.yaml +4 -4
  63. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30.yaml +4 -4
  64. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30h.yaml +1 -1
  65. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31.yaml +4 -4
  66. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31h.yaml +1 -1
  67. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3h.yaml +1 -1
  68. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4.yaml +4 -4
  69. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4h.yaml +1 -1
  70. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5.yaml +4 -4
  71. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5h.yaml +1 -1
  72. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6.yaml +4 -4
  73. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6h.yaml +1 -1
  74. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7.yaml +4 -4
  75. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7h.yaml +1 -1
  76. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8.yaml +4 -4
  77. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8h.yaml +1 -1
  78. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9.yaml +4 -4
  79. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9h.yaml +1 -1
  80. data/.data/spec/std/isa/csr/Zihpm/mhpmcounterN.layout +4 -4
  81. data/.data/spec/std/isa/csr/Zihpm/mhpmcounterNh.layout +1 -1
  82. data/.data/spec/std/isa/csr/hstatus.yaml +1 -1
  83. data/.data/spec/std/isa/csr/mcycle.yaml +6 -6
  84. data/.data/spec/std/isa/csr/minstret.yaml +3 -3
  85. data/.data/spec/std/isa/csr/minstreth.yaml +1 -1
  86. data/.data/spec/std/isa/csr/mstatus.yaml +13 -19
  87. data/.data/spec/std/isa/csr/mtvec.yaml +16 -57
  88. data/.data/spec/std/isa/csr/sie.yaml +30 -4
  89. data/.data/spec/std/isa/csr/sip.yaml +16 -2
  90. data/.data/spec/std/isa/csr/stvec.yaml +11 -12
  91. data/.data/spec/std/isa/csr/vstval.yaml +1 -1
  92. data/.data/spec/std/isa/csr/vstvec.yaml +14 -15
  93. data/.data/spec/std/isa/ext/Q.yaml +1 -1
  94. data/.data/spec/std/isa/ext/Shlcofideleg.yaml +24 -0
  95. data/.data/spec/std/isa/ext/Shvstvecd.yaml +2 -2
  96. data/.data/spec/std/isa/ext/Sspm.yaml +5 -0
  97. data/.data/spec/std/isa/ext/Sstvecd.yaml +2 -2
  98. data/.data/spec/std/isa/ext/Sstvecv.yaml +2 -2
  99. data/.data/spec/std/isa/ext/Supm.yaml +17 -0
  100. data/.data/spec/std/isa/ext/Zcb.yaml +3 -0
  101. data/.data/spec/std/isa/ext/Zfbfmin.yaml +3 -5
  102. data/.data/spec/std/isa/ext/Ziccid.yaml +29 -0
  103. data/.data/spec/std/isa/ext/Zicfilp.yaml +5 -1
  104. data/.data/spec/std/isa/ext/Zicfiss.yaml +20 -1
  105. data/.data/spec/std/isa/ext/Zihpm.yaml +3 -0
  106. data/.data/spec/std/isa/ext/Zilx.yaml +58 -0
  107. data/.data/spec/std/isa/ext/Zkt.yaml +33 -1
  108. data/.data/spec/std/isa/ext/Zvabd.yaml +21 -0
  109. data/.data/spec/std/isa/ext/Zvbc.yaml +3 -0
  110. data/.data/spec/std/isa/ext/Zvkb.yaml +3 -0
  111. data/.data/spec/std/isa/ext/Zvkg.yaml +3 -0
  112. data/.data/spec/std/isa/ext/Zvkned.yaml +3 -0
  113. data/.data/spec/std/isa/ext/Zvknha.yaml +3 -0
  114. data/.data/spec/std/isa/ext/Zvknhb.yaml +4 -2
  115. data/.data/spec/std/isa/ext/Zvksed.yaml +3 -0
  116. data/.data/spec/std/isa/ext/Zvksh.yaml +3 -0
  117. data/.data/spec/std/isa/ext/Zvkt.yaml +3 -0
  118. data/.data/spec/std/isa/inst/C/c.add.yaml +1 -0
  119. data/.data/spec/std/isa/inst/C/c.addi.yaml +1 -0
  120. data/.data/spec/std/isa/inst/C/c.addiw.yaml +1 -0
  121. data/.data/spec/std/isa/inst/C/c.addw.yaml +1 -0
  122. data/.data/spec/std/isa/inst/C/c.and.yaml +1 -0
  123. data/.data/spec/std/isa/inst/C/c.andi.yaml +1 -0
  124. data/.data/spec/std/isa/inst/C/c.lui.yaml +1 -0
  125. data/.data/spec/std/isa/inst/C/c.mv.yaml +1 -0
  126. data/.data/spec/std/isa/inst/C/c.nop.yaml +13 -2
  127. data/.data/spec/std/isa/inst/C/c.or.yaml +1 -0
  128. data/.data/spec/std/isa/inst/C/c.slli.yaml +1 -0
  129. data/.data/spec/std/isa/inst/C/c.srai.yaml +1 -0
  130. data/.data/spec/std/isa/inst/C/c.srli.yaml +1 -0
  131. data/.data/spec/std/isa/inst/C/c.sub.yaml +1 -0
  132. data/.data/spec/std/isa/inst/C/c.subw.yaml +1 -0
  133. data/.data/spec/std/isa/inst/C/c.xor.yaml +1 -0
  134. data/.data/spec/std/isa/inst/D/fld.yaml +1 -0
  135. data/.data/spec/std/isa/inst/D/fsd.yaml +1 -0
  136. data/.data/spec/std/isa/inst/F/fadd.s.yaml +1 -1
  137. data/.data/spec/std/isa/inst/F/fcvt.l.s.yaml +1 -1
  138. data/.data/spec/std/isa/inst/F/fcvt.lu.s.yaml +1 -1
  139. data/.data/spec/std/isa/inst/F/fcvt.s.l.yaml +1 -1
  140. data/.data/spec/std/isa/inst/F/fcvt.s.lu.yaml +1 -1
  141. data/.data/spec/std/isa/inst/F/fcvt.s.wu.yaml +1 -1
  142. data/.data/spec/std/isa/inst/F/fcvt.w.s.yaml +1 -1
  143. data/.data/spec/std/isa/inst/F/fcvt.wu.s.yaml +1 -1
  144. data/.data/spec/std/isa/inst/F/fdiv.s.yaml +1 -1
  145. data/.data/spec/std/isa/inst/F/feq.s.yaml +1 -1
  146. data/.data/spec/std/isa/inst/F/fle.s.yaml +1 -1
  147. data/.data/spec/std/isa/inst/F/fleq.s.yaml +1 -1
  148. data/.data/spec/std/isa/inst/F/flt.s.yaml +1 -1
  149. data/.data/spec/std/isa/inst/F/fltq.s.yaml +1 -1
  150. data/.data/spec/std/isa/inst/F/flw.yaml +2 -1
  151. data/.data/spec/std/isa/inst/F/fmadd.s.yaml +1 -1
  152. data/.data/spec/std/isa/inst/F/fmax.s.yaml +1 -1
  153. data/.data/spec/std/isa/inst/F/fmin.s.yaml +1 -1
  154. data/.data/spec/std/isa/inst/F/fmsub.s.yaml +1 -1
  155. data/.data/spec/std/isa/inst/F/fmul.s.yaml +1 -1
  156. data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +1 -1
  157. data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +1 -1
  158. data/.data/spec/std/isa/inst/F/fnmadd.s.yaml +1 -1
  159. data/.data/spec/std/isa/inst/F/fnmsub.s.yaml +1 -1
  160. data/.data/spec/std/isa/inst/F/fsgnj.s.yaml +1 -1
  161. data/.data/spec/std/isa/inst/F/fsgnjn.s.yaml +1 -1
  162. data/.data/spec/std/isa/inst/F/fsgnjx.s.yaml +1 -1
  163. data/.data/spec/std/isa/inst/F/fsqrt.s.yaml +1 -1
  164. data/.data/spec/std/isa/inst/F/fsub.s.yaml +1 -1
  165. data/.data/spec/std/isa/inst/F/fsw.yaml +2 -1
  166. data/.data/spec/std/isa/inst/I/sd.yaml +1 -1
  167. data/.data/spec/std/isa/inst/Q/fadd.q.yaml +2 -2
  168. data/.data/spec/std/isa/inst/Q/fclass.q.yaml +5 -5
  169. data/.data/spec/std/isa/inst/Q/fleq.q.yaml +0 -1
  170. data/.data/spec/std/isa/inst/Q/fli.q.yaml +1 -1
  171. data/.data/spec/std/isa/inst/Q/flq.yaml +1 -0
  172. data/.data/spec/std/isa/inst/Q/fltq.q.yaml +0 -1
  173. data/.data/spec/std/isa/inst/Q/fmaxm.q.yaml +0 -1
  174. data/.data/spec/std/isa/inst/Q/fminm.q.yaml +0 -1
  175. data/.data/spec/std/isa/inst/Q/fmvp.q.x.yaml +1 -1
  176. data/.data/spec/std/isa/inst/Q/fsq.yaml +1 -0
  177. data/.data/spec/std/isa/inst/V/vmv.v.i.yaml +1 -0
  178. data/.data/spec/std/isa/inst/Zcb/c.mul.yaml +1 -0
  179. data/.data/spec/std/isa/inst/Zcb/c.not.yaml +1 -0
  180. data/.data/spec/std/isa/inst/Zcb/c.zext.b.yaml +2 -7
  181. data/.data/spec/std/isa/inst/Zcb/c.zext.w.yaml +1 -1
  182. data/.data/spec/std/isa/inst/Zcmop/c.mop.1.yaml +2 -0
  183. data/.data/spec/std/isa/inst/Zcmop/c.mop.5.yaml +2 -0
  184. data/.data/spec/std/isa/inst/Zcmop/c.mop.N.layout +7 -0
  185. data/.data/spec/std/isa/inst/Zfa/fli.s.yaml +1 -1
  186. data/.data/spec/std/isa/inst/Zfa/fmaxm.s.yaml +1 -1
  187. data/.data/spec/std/isa/inst/Zfa/fminm.s.yaml +1 -1
  188. data/.data/spec/std/isa/inst/Zfa/fround.s.yaml +1 -1
  189. data/.data/spec/std/isa/inst/Zfa/froundnx.s.yaml +1 -1
  190. data/.data/spec/std/isa/inst/Zfh/flh.yaml +5 -2
  191. data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +3 -1
  192. data/.data/spec/std/isa/inst/Zfh/fmv.x.h.yaml +3 -1
  193. data/.data/spec/std/isa/inst/Zfh/fsh.yaml +4 -1
  194. data/.data/spec/std/isa/inst/Zicfiss/c.sspopchk.yaml +30 -0
  195. data/.data/spec/std/isa/inst/Zicfiss/c.sspush.yaml +29 -0
  196. data/.data/spec/std/isa/inst/Zicond/czero.eqz.yaml +1 -1
  197. data/.data/spec/std/isa/inst/Zicond/czero.nez.yaml +1 -1
  198. data/.data/spec/std/isa/inst/Zicsr/csrrw.yaml +12 -0
  199. data/.data/spec/std/isa/inst/Zilx/lxd.yaml +38 -0
  200. data/.data/spec/std/isa/inst/Zilx/lxh.yaml +35 -0
  201. data/.data/spec/std/isa/inst/Zilx/lxhu.yaml +35 -0
  202. data/.data/spec/std/isa/inst/Zilx/lxsb.yaml +40 -0
  203. data/.data/spec/std/isa/inst/Zilx/lxsbu.yaml +40 -0
  204. data/.data/spec/std/isa/inst/Zilx/lxsd.yaml +38 -0
  205. data/.data/spec/std/isa/inst/Zilx/lxsh.yaml +35 -0
  206. data/.data/spec/std/isa/inst/Zilx/lxshu.yaml +35 -0
  207. data/.data/spec/std/isa/inst/Zilx/lxsuwb.yaml +40 -0
  208. data/.data/spec/std/isa/inst/Zilx/lxsuwbu.yaml +40 -0
  209. data/.data/spec/std/isa/inst/Zilx/lxsuwd.yaml +39 -0
  210. data/.data/spec/std/isa/inst/Zilx/lxsuwh.yaml +40 -0
  211. data/.data/spec/std/isa/inst/Zilx/lxsuwhu.yaml +40 -0
  212. data/.data/spec/std/isa/inst/Zilx/lxsuww.yaml +40 -0
  213. data/.data/spec/std/isa/inst/Zilx/lxsuwwu.yaml +40 -0
  214. data/.data/spec/std/isa/inst/Zilx/lxsw.yaml +35 -0
  215. data/.data/spec/std/isa/inst/Zilx/lxswu.yaml +39 -0
  216. data/.data/spec/std/isa/inst/Zilx/lxw.yaml +35 -0
  217. data/.data/spec/std/isa/inst/Zilx/lxwu.yaml +39 -0
  218. data/.data/spec/std/isa/inst/Zvabd/vabd.vv.yaml +67 -0
  219. data/.data/spec/std/isa/inst/Zvabd/vabdu.vv.yaml +67 -0
  220. data/.data/spec/std/isa/inst/Zvabd/vabs.v.yaml +61 -0
  221. data/.data/spec/std/isa/inst/Zvabd/vwabda.vv.yaml +72 -0
  222. data/.data/spec/std/isa/inst/Zvabd/vwabdau.vv.yaml +72 -0
  223. data/.data/spec/std/isa/isa/fp.idl +42 -18
  224. data/.data/spec/std/isa/param/CACHE_BLOCK_SIZE.yaml +70 -6
  225. data/.data/spec/std/isa/param/ELEN.yaml +27 -5
  226. data/.data/spec/std/isa/param/HCOUNTENABLE_EN.yaml +13 -0
  227. data/.data/spec/std/isa/param/HPM_COUNTER_EN.yaml +13 -3
  228. data/.data/spec/std/isa/param/HPM_EVENTS.yaml +0 -3
  229. data/.data/spec/std/isa/param/MCOUNTENABLE_EN.yaml +8 -0
  230. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_DIRECT.yaml +71 -65
  231. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_VECTORED.yaml +71 -65
  232. data/.data/spec/std/isa/param/STVAL_WIDTH.yaml +3 -2
  233. data/.data/spec/std/isa/param/STVEC_BASE_ALIGNMENT_VECTORED.yaml +100 -0
  234. data/.data/spec/std/isa/param/STVEC_MODES.yaml +31 -0
  235. data/.data/spec/std/isa/param/SV32_VSMODE_TRANSLATION.yaml +1 -1
  236. data/.data/spec/std/isa/param/SXLEN.yaml +2 -2
  237. data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT.yaml +1 -1
  238. data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT.yaml +1 -1
  239. data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT.yaml +1 -1
  240. data/.data/spec/std/isa/param/TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED.yaml +1 -1
  241. data/.data/spec/std/isa/param/TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED.yaml +1 -1
  242. data/.data/spec/std/isa/param/UXLEN.yaml +1 -1
  243. data/.data/spec/std/isa/param/VLEN.yaml +16 -7
  244. data/.data/spec/std/isa/param/VSTVEC_MODES.yaml +31 -0
  245. data/lib/udb/Z3_VERSION +1 -1
  246. data/lib/udb/obj/csr.rb +1 -1
  247. data/lib/udb/obj/csr_field.rb +1 -1
  248. data/lib/udb/obj/extension.rb +1 -1
  249. data/lib/udb/version.rb +1 -1
  250. data/lib/udb/version_spec.rb +1 -1
  251. data/lib/udb/z3.rb +29 -7
  252. metadata +37 -8
  253. data/.data/spec/std/isa/param/STVEC_MODE_DIRECT.yaml +0 -21
  254. data/.data/spec/std/isa/param/STVEC_MODE_VECTORED.yaml +0 -19
  255. data/.data/spec/std/isa/param/VSTVEC_MODE_DIRECT.yaml +0 -21
  256. data/.data/spec/std/isa/param/VSTVEC_MODE_VECTORED.yaml +0 -21
@@ -25,73 +25,79 @@ description: |
25
25
  the base, the minimum alignment cannot be less than 4.
26
26
  schema:
27
27
  description: An unsigned power of 2 greater than or equal to 4 that fits in 64 bits
28
- default: 4
28
+ default: 0x4
29
29
  enum:
30
30
  [
31
- 4,
32
- 8,
33
- 16,
34
- 32,
35
- 64,
36
- 128,
37
- 256,
38
- 512,
39
- 1024,
40
- 2048,
41
- 4095,
42
- 8192,
43
- 16384,
44
- 32768,
45
- 65536,
46
- 131072,
47
- 262144,
48
- 524288,
49
- 1048576,
50
- 2097152,
51
- 4194304,
52
- 8388608,
53
- 16777216,
54
- 33554432,
55
- 67108864,
56
- 134217728,
57
- 268435456,
58
- 536870912,
59
- 1073741824,
60
- 2147483648,
61
- 4294967296,
62
- 8589934592,
63
- 17179869184,
64
- 34359738368,
65
- 68719476736,
66
- 137438953472,
67
- 274877906944,
68
- 549755813888,
69
- 1099511627776,
70
- 2199023255552,
71
- 4398046511104,
72
- 8796093022208,
73
- 17592186044416,
74
- 35184372088832,
75
- 70368744177664,
76
- 140737488355328,
77
- 281474976710656,
78
- 562949953421312,
79
- 1125899906842624,
80
- 2251799813685248,
81
- 4503599627370496,
82
- 9007199254740992,
83
- 18014398509481984,
84
- 36028797018963968,
85
- 72057594037927936,
86
- 144115188075855872,
87
- 288230376151711744,
88
- 576460752303423488,
89
- 1152921504606846976,
90
- 2305843009213693952,
91
- 4611686018427387904,
92
- 9223372036854775808,
31
+ 0x4,
32
+ 0x8,
33
+ 0x10,
34
+ 0x20,
35
+ 0x40,
36
+ 0x80,
37
+ 0x100,
38
+ 0x200,
39
+ 0x400,
40
+ 0x800,
41
+ 0x1000,
42
+ 0x2000,
43
+ 0x4000,
44
+ 0x8000,
45
+ 0x10000,
46
+ 0x20000,
47
+ 0x40000,
48
+ 0x80000,
49
+ 0x100000,
50
+ 0x200000,
51
+ 0x400000,
52
+ 0x800000,
53
+ 0x1000000,
54
+ 0x2000000,
55
+ 0x4000000,
56
+ 0x8000000,
57
+ 0x10000000,
58
+ 0x20000000,
59
+ 0x40000000,
60
+ 0x80000000,
61
+ 0x100000000,
62
+ 0x200000000,
63
+ 0x400000000,
64
+ 0x800000000,
65
+ 0x1000000000,
66
+ 0x2000000000,
67
+ 0x4000000000,
68
+ 0x8000000000,
69
+ 0x10000000000,
70
+ 0x20000000000,
71
+ 0x40000000000,
72
+ 0x80000000000,
73
+ 0x100000000000,
74
+ 0x200000000000,
75
+ 0x400000000000,
76
+ 0x800000000000,
77
+ 0x1000000000000,
78
+ 0x2000000000000,
79
+ 0x4000000000000,
80
+ 0x8000000000000,
81
+ 0x10000000000000,
82
+ 0x20000000000000,
83
+ 0x40000000000000,
84
+ 0x80000000000000,
85
+ 0x100000000000000,
86
+ 0x200000000000000,
87
+ 0x400000000000000,
88
+ 0x800000000000000,
89
+ 0x1000000000000000,
90
+ 0x2000000000000000,
91
+ 0x4000000000000000,
92
+ 0x8000000000000000,
93
93
  ]
94
94
 
95
95
  requirements:
96
- idl(): |
97
- (MXLEN == 32) -> MTVEC_BASE_ALIGNMENT_VECTORED <= 2147483648;
96
+ if:
97
+ param:
98
+ name: MXLEN
99
+ equal: 32
100
+ then:
101
+ param:
102
+ name: MTVEC_BASE_ALIGNMENT_VECTORED
103
+ lessThanOrEqual: 0x80000000
@@ -10,10 +10,11 @@ description: |
10
10
  The number of implemented bits in `stval`.
11
11
 
12
12
  Must be greater than or equal to _max_(`PHYS_ADDR_WIDTH`, `VA_SIZE`)
13
- long_name: TODO
13
+ long_name: "`stval` implemented bits"
14
14
  schema:
15
15
  type: integer
16
- maximum: 18446744073709551615
16
+ minimum: 0
17
+ maximum: 64
17
18
  definedBy:
18
19
  extension:
19
20
  name: S
@@ -0,0 +1,100 @@
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: STVEC_BASE_ALIGNMENT_VECTORED
9
+ long_name: |
10
+ Minimum alignment of `stvec.BASE` when `stvec.MODE` is 1 (Vectored)
11
+ definedBy:
12
+ allOf:
13
+ - extension:
14
+ name: S
15
+ - param:
16
+ name: STVEC_MODES
17
+ includes: 1
18
+ reason: Only relevant when vectored mode is supported
19
+ description: |
20
+ Minimum alignment of the base pointer when `stvec.MODE` is Vectored. Because
21
+ `stvec` excludes the two least-significant bits of the base, the minimum
22
+ alignment cannot be less than 4 bytes.
23
+ schema:
24
+ description: An unsigned power of 2 greater than or equal to 4 that fits in 64 bits
25
+ default: 0x4
26
+ enum:
27
+ [
28
+ 0x4,
29
+ 0x8,
30
+ 0x10,
31
+ 0x20,
32
+ 0x40,
33
+ 0x80,
34
+ 0x100,
35
+ 0x200,
36
+ 0x400,
37
+ 0x800,
38
+ 0x1000,
39
+ 0x2000,
40
+ 0x4000,
41
+ 0x8000,
42
+ 0x10000,
43
+ 0x20000,
44
+ 0x40000,
45
+ 0x80000,
46
+ 0x100000,
47
+ 0x200000,
48
+ 0x400000,
49
+ 0x800000,
50
+ 0x1000000,
51
+ 0x2000000,
52
+ 0x4000000,
53
+ 0x8000000,
54
+ 0x10000000,
55
+ 0x20000000,
56
+ 0x40000000,
57
+ 0x80000000,
58
+ 0x100000000,
59
+ 0x200000000,
60
+ 0x400000000,
61
+ 0x800000000,
62
+ 0x1000000000,
63
+ 0x2000000000,
64
+ 0x4000000000,
65
+ 0x8000000000,
66
+ 0x10000000000,
67
+ 0x20000000000,
68
+ 0x40000000000,
69
+ 0x80000000000,
70
+ 0x100000000000,
71
+ 0x200000000000,
72
+ 0x400000000000,
73
+ 0x800000000000,
74
+ 0x1000000000000,
75
+ 0x2000000000000,
76
+ 0x4000000000000,
77
+ 0x8000000000000,
78
+ 0x10000000000000,
79
+ 0x20000000000000,
80
+ 0x40000000000000,
81
+ 0x80000000000000,
82
+ 0x100000000000000,
83
+ 0x200000000000000,
84
+ 0x400000000000000,
85
+ 0x800000000000000,
86
+ 0x1000000000000000,
87
+ 0x2000000000000000,
88
+ 0x4000000000000000,
89
+ 0x8000000000000000,
90
+ ]
91
+
92
+ requirements:
93
+ if:
94
+ param:
95
+ name: SXLEN
96
+ includes: 32
97
+ then:
98
+ param:
99
+ name: STVEC_BASE_ALIGNMENT_VECTORED
100
+ lessThanOrEqual: 0x80000000
@@ -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: STVEC_MODES
9
+ long_name: |
10
+ Modes supported by `stvec.MODE`
11
+ definedBy:
12
+ extension:
13
+ name: S
14
+ description: |
15
+ Options:
16
+
17
+ 0::
18
+ Direct; All traps set `pc` to `stvec.BASE`
19
+ 1::
20
+ Vectored; Asynchronous interrupts set `pc` to `stvec.BASE` + 4 x cause.
21
+
22
+ If only one mode is given, `stvec.MODE` is assumed to be read-only with that value.
23
+ Otherwise, `stvec.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
@@ -16,7 +16,7 @@ requirements:
16
16
  idl(): |
17
17
  # at least one of Bare, Sv32 must be supported
18
18
  !VSSTAGE_MODE_BARE
19
- -> SV39_VSMODE_TRANSLATION;
19
+ -> SV32_VSMODE_TRANSLATION;
20
20
  reason: at least one of Bare, Sv32 must be supported
21
21
  definedBy:
22
22
  allOf:
@@ -9,8 +9,8 @@ name: SXLEN
9
9
  description: |
10
10
  Set of XLENs supported in S-mode. Can be one of:
11
11
 
12
- * 32: SXLEN is always 32
13
- * 64: SXLEN is always 64
12
+ * [32]: SXLEN is always 32
13
+ * [64]: SXLEN is always 64
14
14
  * [32, 64]: SXLEN can be changed (via mstatus.SXL) between 32 and 64
15
15
  long_name: TODO
16
16
  schema:
@@ -7,7 +7,7 @@ $schema: param_schema.json#
7
7
  kind: parameter
8
8
  name: TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT
9
9
  description: |
10
- Value to write into htval/mtval2 when there is a guest page fault on a final translation.
10
+ Value written into htinst/mtinst when there is an instruction 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_LOAD_GUEST_PAGE_FAULT
9
9
  description: |
10
- Value to write into htval/mtval2 when there is a guest page fault on a final translation.
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 to write into htval/mtval2 when there is a guest page fault on a final translation.
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 VirtualInstruction exception from VU/VS-mode.
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 VirtualInstruction exception from VU/VS-mode.
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, SXLEN can be changed,
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: TODO
11
+ long_name: vector register bit width
12
12
  schema:
13
13
  type: integer
14
- minimum: 32
15
- maximum: 65536
16
- # requirements:
17
- # idl(): |
18
- # -> (VLEN >= ELEN) && (VLEN <='h10000) && (popcount(VLEN) == 1);
19
- # reason: VLEN >= ELEN, which must be a power of 2, and must be no greater than 2^16.
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
data/lib/udb/Z3_VERSION CHANGED
@@ -1 +1 @@
1
- z3-4.16.0
1
+ z3-5.0.0
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
@@ -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
@@ -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
- other_ext.name <=> name
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/version.rb CHANGED
@@ -5,5 +5,5 @@
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module Udb
8
- def self.version = "0.1.14"
8
+ def self.version = "0.1.15"
9
9
  end
@@ -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) <=> self
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, oneOf, noneOf (would require disjunctive constraints)
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
- raise "TODO: anyOf not yet implemented for integer constraints"
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
- raise "TODO: anyOf not yet implemented for boolean constraints"
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
- raise "TODO: anyOf not yet implemented for string constraints"
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