udb 0.1.17 → 0.1.18

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 (288) hide show
  1. checksums.yaml +4 -4
  2. data/.data/cfgs/example_rv64_with_overlay.yaml +140 -5
  3. data/.data/cfgs/profile/RVA23S64.yaml +1 -1
  4. data/.data/cfgs/profile/RVA23p1S64.yaml +217 -0
  5. data/.data/cfgs/profile/RVB23S64.yaml +1 -1
  6. data/.data/cfgs/profile/RVB23p1S64.yaml +179 -0
  7. data/.data/cfgs/rv32-riscv-tests.yaml +134 -0
  8. data/.data/cfgs/rv32-vector.yaml +134 -0
  9. data/.data/cfgs/rv64-riscv-tests.yaml +134 -0
  10. data/.data/cfgs/rv64-vector.yaml +134 -0
  11. data/.data/spec/schemas/schema_defs.json +4 -1
  12. data/.data/spec/std/isa/csr/I/mcounteren.layout +7 -0
  13. data/.data/spec/std/isa/csr/I/mcounteren.yaml +7 -0
  14. data/.data/spec/std/isa/csr/Smcdeleg/scountinhibit.layout +111 -0
  15. data/.data/spec/std/isa/csr/Smcdeleg/scountinhibit.yaml +840 -0
  16. data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfg.yaml +2 -0
  17. data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfgh.yaml +2 -0
  18. data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfg.yaml +2 -0
  19. data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfgh.yaml +2 -0
  20. data/.data/spec/std/isa/csr/Sscofpmf/scountovf.layout +7 -0
  21. data/.data/spec/std/isa/csr/Sscofpmf/scountovf.yaml +7 -0
  22. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10.yaml +4 -7
  23. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10h.yaml +2 -4
  24. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11.yaml +4 -7
  25. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11h.yaml +2 -4
  26. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12.yaml +4 -7
  27. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12h.yaml +2 -4
  28. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13.yaml +4 -7
  29. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13h.yaml +2 -4
  30. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14.yaml +4 -7
  31. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14h.yaml +2 -4
  32. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15.yaml +4 -7
  33. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15h.yaml +2 -4
  34. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16.yaml +4 -7
  35. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16h.yaml +2 -4
  36. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17.yaml +4 -7
  37. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17h.yaml +2 -4
  38. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18.yaml +4 -7
  39. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18h.yaml +2 -4
  40. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19.yaml +4 -7
  41. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19h.yaml +2 -4
  42. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20.yaml +4 -7
  43. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20h.yaml +2 -4
  44. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21.yaml +4 -7
  45. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21h.yaml +2 -4
  46. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22.yaml +4 -7
  47. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22h.yaml +2 -4
  48. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23.yaml +4 -7
  49. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23h.yaml +2 -4
  50. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24.yaml +4 -7
  51. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24h.yaml +2 -4
  52. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25.yaml +4 -7
  53. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25h.yaml +2 -4
  54. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26.yaml +4 -7
  55. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26h.yaml +2 -4
  56. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27.yaml +4 -7
  57. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27h.yaml +2 -4
  58. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28.yaml +4 -7
  59. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28h.yaml +2 -4
  60. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29.yaml +4 -7
  61. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29h.yaml +2 -4
  62. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3.yaml +4 -7
  63. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30.yaml +4 -7
  64. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30h.yaml +2 -4
  65. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31.yaml +4 -7
  66. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31h.yaml +2 -4
  67. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3h.yaml +2 -4
  68. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4.yaml +4 -7
  69. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4h.yaml +2 -4
  70. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5.yaml +4 -7
  71. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5h.yaml +2 -4
  72. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6.yaml +4 -7
  73. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6h.yaml +2 -4
  74. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7.yaml +4 -7
  75. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7h.yaml +2 -4
  76. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8.yaml +4 -7
  77. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8h.yaml +2 -4
  78. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9.yaml +4 -7
  79. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9h.yaml +2 -4
  80. data/.data/spec/std/isa/csr/Zihpm/mhpmcounterN.layout +4 -7
  81. data/.data/spec/std/isa/csr/Zihpm/mhpmcounterNh.layout +2 -4
  82. data/.data/spec/std/isa/csr/Zihpm/mhpmevent10.yaml +4 -7
  83. data/.data/spec/std/isa/csr/Zihpm/mhpmevent10h.yaml +4 -4
  84. data/.data/spec/std/isa/csr/Zihpm/mhpmevent11.yaml +4 -7
  85. data/.data/spec/std/isa/csr/Zihpm/mhpmevent11h.yaml +4 -4
  86. data/.data/spec/std/isa/csr/Zihpm/mhpmevent12.yaml +4 -7
  87. data/.data/spec/std/isa/csr/Zihpm/mhpmevent12h.yaml +4 -4
  88. data/.data/spec/std/isa/csr/Zihpm/mhpmevent13.yaml +4 -7
  89. data/.data/spec/std/isa/csr/Zihpm/mhpmevent13h.yaml +4 -4
  90. data/.data/spec/std/isa/csr/Zihpm/mhpmevent14.yaml +4 -7
  91. data/.data/spec/std/isa/csr/Zihpm/mhpmevent14h.yaml +4 -4
  92. data/.data/spec/std/isa/csr/Zihpm/mhpmevent15.yaml +4 -7
  93. data/.data/spec/std/isa/csr/Zihpm/mhpmevent15h.yaml +4 -4
  94. data/.data/spec/std/isa/csr/Zihpm/mhpmevent16.yaml +4 -7
  95. data/.data/spec/std/isa/csr/Zihpm/mhpmevent16h.yaml +4 -4
  96. data/.data/spec/std/isa/csr/Zihpm/mhpmevent17.yaml +4 -7
  97. data/.data/spec/std/isa/csr/Zihpm/mhpmevent17h.yaml +4 -4
  98. data/.data/spec/std/isa/csr/Zihpm/mhpmevent18.yaml +4 -7
  99. data/.data/spec/std/isa/csr/Zihpm/mhpmevent18h.yaml +4 -4
  100. data/.data/spec/std/isa/csr/Zihpm/mhpmevent19.yaml +4 -7
  101. data/.data/spec/std/isa/csr/Zihpm/mhpmevent19h.yaml +4 -4
  102. data/.data/spec/std/isa/csr/Zihpm/mhpmevent20.yaml +4 -7
  103. data/.data/spec/std/isa/csr/Zihpm/mhpmevent20h.yaml +4 -4
  104. data/.data/spec/std/isa/csr/Zihpm/mhpmevent21.yaml +4 -7
  105. data/.data/spec/std/isa/csr/Zihpm/mhpmevent21h.yaml +4 -4
  106. data/.data/spec/std/isa/csr/Zihpm/mhpmevent22.yaml +4 -7
  107. data/.data/spec/std/isa/csr/Zihpm/mhpmevent22h.yaml +4 -4
  108. data/.data/spec/std/isa/csr/Zihpm/mhpmevent23.yaml +4 -7
  109. data/.data/spec/std/isa/csr/Zihpm/mhpmevent23h.yaml +4 -4
  110. data/.data/spec/std/isa/csr/Zihpm/mhpmevent24.yaml +4 -7
  111. data/.data/spec/std/isa/csr/Zihpm/mhpmevent24h.yaml +4 -4
  112. data/.data/spec/std/isa/csr/Zihpm/mhpmevent25.yaml +4 -7
  113. data/.data/spec/std/isa/csr/Zihpm/mhpmevent25h.yaml +4 -4
  114. data/.data/spec/std/isa/csr/Zihpm/mhpmevent26.yaml +4 -7
  115. data/.data/spec/std/isa/csr/Zihpm/mhpmevent26h.yaml +4 -4
  116. data/.data/spec/std/isa/csr/Zihpm/mhpmevent27.yaml +4 -7
  117. data/.data/spec/std/isa/csr/Zihpm/mhpmevent27h.yaml +4 -4
  118. data/.data/spec/std/isa/csr/Zihpm/mhpmevent28.yaml +4 -7
  119. data/.data/spec/std/isa/csr/Zihpm/mhpmevent28h.yaml +4 -4
  120. data/.data/spec/std/isa/csr/Zihpm/mhpmevent29.yaml +4 -7
  121. data/.data/spec/std/isa/csr/Zihpm/mhpmevent29h.yaml +4 -4
  122. data/.data/spec/std/isa/csr/Zihpm/mhpmevent3.yaml +4 -7
  123. data/.data/spec/std/isa/csr/Zihpm/mhpmevent30.yaml +4 -7
  124. data/.data/spec/std/isa/csr/Zihpm/mhpmevent30h.yaml +4 -4
  125. data/.data/spec/std/isa/csr/Zihpm/mhpmevent31.yaml +4 -7
  126. data/.data/spec/std/isa/csr/Zihpm/mhpmevent31h.yaml +4 -4
  127. data/.data/spec/std/isa/csr/Zihpm/mhpmevent3h.yaml +4 -4
  128. data/.data/spec/std/isa/csr/Zihpm/mhpmevent4.yaml +4 -7
  129. data/.data/spec/std/isa/csr/Zihpm/mhpmevent4h.yaml +4 -4
  130. data/.data/spec/std/isa/csr/Zihpm/mhpmevent5.yaml +4 -7
  131. data/.data/spec/std/isa/csr/Zihpm/mhpmevent5h.yaml +4 -4
  132. data/.data/spec/std/isa/csr/Zihpm/mhpmevent6.yaml +4 -7
  133. data/.data/spec/std/isa/csr/Zihpm/mhpmevent6h.yaml +4 -4
  134. data/.data/spec/std/isa/csr/Zihpm/mhpmevent7.yaml +4 -7
  135. data/.data/spec/std/isa/csr/Zihpm/mhpmevent7h.yaml +4 -4
  136. data/.data/spec/std/isa/csr/Zihpm/mhpmevent8.yaml +4 -7
  137. data/.data/spec/std/isa/csr/Zihpm/mhpmevent8h.yaml +4 -4
  138. data/.data/spec/std/isa/csr/Zihpm/mhpmevent9.yaml +4 -7
  139. data/.data/spec/std/isa/csr/Zihpm/mhpmevent9h.yaml +4 -4
  140. data/.data/spec/std/isa/csr/Zihpm/mhpmeventN.layout +4 -7
  141. data/.data/spec/std/isa/csr/Zihpm/mhpmeventNh.layout +4 -4
  142. data/.data/spec/std/isa/csr/Zkr/seed.yaml +75 -0
  143. data/.data/spec/std/isa/csr/hcontext.yaml +4 -4
  144. data/.data/spec/std/isa/csr/mcontext.yaml +4 -4
  145. data/.data/spec/std/isa/csr/mcycle.yaml +2 -0
  146. data/.data/spec/std/isa/csr/mcycleh.yaml +2 -0
  147. data/.data/spec/std/isa/csr/medeleg.yaml +72 -36
  148. data/.data/spec/std/isa/csr/menvcfg.yaml +12 -1
  149. data/.data/spec/std/isa/csr/menvcfgh.yaml +12 -0
  150. data/.data/spec/std/isa/csr/mideleg.yaml +13 -36
  151. data/.data/spec/std/isa/csr/mie.yaml +3 -6
  152. data/.data/spec/std/isa/csr/minstret.yaml +2 -0
  153. data/.data/spec/std/isa/csr/minstreth.yaml +2 -0
  154. data/.data/spec/std/isa/csr/mip.yaml +3 -6
  155. data/.data/spec/std/isa/csr/misa.yaml +3 -23
  156. data/.data/spec/std/isa/csr/mseccfg.yaml +27 -1
  157. data/.data/spec/std/isa/csr/mstatus.yaml +8 -2
  158. data/.data/spec/std/isa/csr/scontext.yaml +8 -4
  159. data/.data/spec/std/isa/csr/tcontrol.yaml +6 -2
  160. data/.data/spec/std/isa/csr/tdata2.yaml +6 -2
  161. data/.data/spec/std/isa/csr/tdata3.yaml +6 -2
  162. data/.data/spec/std/isa/ext/Sdext.yaml +58 -2
  163. data/.data/spec/std/isa/ext/Sm.yaml +2 -2
  164. data/.data/spec/std/isa/ext/Smcdeleg.yaml +7 -0
  165. data/.data/spec/std/isa/ext/Smmpm.yaml +8 -0
  166. data/.data/spec/std/isa/ext/Smnpm.yaml +19 -0
  167. data/.data/spec/std/isa/ext/Smpmpdeleg.yaml +33 -0
  168. data/.data/spec/std/isa/ext/Ssccfg.yaml +7 -0
  169. data/.data/spec/std/isa/ext/Ssnpm.yaml +8 -0
  170. data/.data/spec/std/isa/ext/Sspmp.yaml +44 -0
  171. data/.data/spec/std/isa/ext/Sspmpen.yaml +30 -0
  172. data/.data/spec/std/isa/ext/Zvabd.yaml +5 -1
  173. data/.data/spec/std/isa/ext/Zvfbdota32f.yaml +23 -0
  174. data/.data/spec/std/isa/ext/Zvzip.yaml +24 -0
  175. data/.data/spec/std/isa/inst/C/c.bnez.yaml +2 -2
  176. data/.data/spec/std/isa/inst/H/hlv.b.yaml +1 -1
  177. data/.data/spec/std/isa/inst/H/hlv.bu.yaml +1 -1
  178. data/.data/spec/std/isa/inst/H/hlv.d.yaml +1 -1
  179. data/.data/spec/std/isa/inst/H/hlv.h.yaml +1 -1
  180. data/.data/spec/std/isa/inst/H/hlv.hu.yaml +1 -1
  181. data/.data/spec/std/isa/inst/H/hlv.w.yaml +1 -1
  182. data/.data/spec/std/isa/inst/H/hlv.wu.yaml +1 -1
  183. data/.data/spec/std/isa/inst/H/hlvx.hu.yaml +1 -1
  184. data/.data/spec/std/isa/inst/H/hlvx.wu.yaml +1 -1
  185. data/.data/spec/std/isa/inst/H/hsv.b.yaml +1 -1
  186. data/.data/spec/std/isa/inst/H/hsv.d.yaml +1 -1
  187. data/.data/spec/std/isa/inst/H/hsv.h.yaml +1 -1
  188. data/.data/spec/std/isa/inst/H/hsv.w.yaml +1 -1
  189. data/.data/spec/std/isa/inst/I/ld.yaml +9 -8
  190. data/.data/spec/std/isa/inst/I/sd.yaml +9 -8
  191. data/.data/spec/std/isa/inst/Q/fcvt.q.d.yaml +1 -1
  192. data/.data/spec/std/isa/inst/Q/flq.yaml +1 -1
  193. data/.data/spec/std/isa/inst/Sdext/dret.yaml +72 -6
  194. data/.data/spec/std/isa/inst/V/vfncvt.f.f.w.yaml +2 -2
  195. data/.data/spec/std/isa/inst/V/vfncvt.f.x.w.yaml +2 -2
  196. data/.data/spec/std/isa/inst/V/vfncvt.f.xu.w.yaml +2 -2
  197. data/.data/spec/std/isa/inst/V/vfncvt.rod.f.f.w.yaml +2 -2
  198. data/.data/spec/std/isa/inst/V/vfncvt.rtz.x.f.w.yaml +2 -2
  199. data/.data/spec/std/isa/inst/V/vfncvt.rtz.xu.f.w.yaml +2 -2
  200. data/.data/spec/std/isa/inst/V/vfncvt.x.f.w.yaml +2 -2
  201. data/.data/spec/std/isa/inst/V/vfncvt.xu.f.w.yaml +2 -2
  202. data/.data/spec/std/isa/inst/V/vnclip.wi.yaml +2 -2
  203. data/.data/spec/std/isa/inst/V/vnclip.wv.yaml +2 -2
  204. data/.data/spec/std/isa/inst/V/vnclip.wx.yaml +2 -2
  205. data/.data/spec/std/isa/inst/V/vnclipu.wi.yaml +2 -2
  206. data/.data/spec/std/isa/inst/V/vnclipu.wv.yaml +2 -2
  207. data/.data/spec/std/isa/inst/V/vnclipu.wx.yaml +2 -2
  208. data/.data/spec/std/isa/inst/V/vnsra.wi.yaml +2 -2
  209. data/.data/spec/std/isa/inst/V/vnsra.wv.yaml +2 -2
  210. data/.data/spec/std/isa/inst/V/vnsra.wx.yaml +2 -2
  211. data/.data/spec/std/isa/inst/V/vnsrl.wi.yaml +2 -2
  212. data/.data/spec/std/isa/inst/V/vnsrl.wv.yaml +2 -2
  213. data/.data/spec/std/isa/inst/V/vnsrl.wx.yaml +2 -2
  214. data/.data/spec/std/isa/inst/Zfh/fcvt.h.s.yaml +28 -20
  215. data/.data/spec/std/isa/inst/Zfh/fcvt.s.h.yaml +35 -20
  216. data/.data/spec/std/isa/inst/Zvabd/vabd.vv.yaml +3 -3
  217. data/.data/spec/std/isa/inst/Zvabd/vabd.vx.yaml +69 -0
  218. data/.data/spec/std/isa/inst/Zvabd/vabdu.vv.yaml +3 -3
  219. data/.data/spec/std/isa/inst/Zvabd/{vabs.v.yaml → vabdu.vx.yaml} +17 -11
  220. data/.data/spec/std/isa/inst/Zvabd/vwabda.vv.yaml +1 -1
  221. data/.data/spec/std/isa/inst/Zvabd/vwabda.vx.yaml +73 -0
  222. data/.data/spec/std/isa/inst/Zvabd/vwabdau.vv.yaml +1 -1
  223. data/.data/spec/std/isa/inst/Zvabd/vwabdau.vx.yaml +74 -0
  224. data/.data/spec/std/isa/inst/Zvfbdota32f/vfbdota.vv.yaml +68 -0
  225. data/.data/spec/std/isa/inst/Zvzip/vpaire.vv.yaml +36 -0
  226. data/.data/spec/std/isa/inst/Zvzip/vpairo.vv.yaml +37 -0
  227. data/.data/spec/std/isa/inst/Zvzip/vunzipe.v.yaml +33 -0
  228. data/.data/spec/std/isa/inst/Zvzip/vunzipo.v.yaml +33 -0
  229. data/.data/spec/std/isa/inst/Zvzip/vzip.vv.yaml +37 -0
  230. data/.data/spec/std/isa/isa/builtin_functions.idl +51 -0
  231. data/.data/spec/std/isa/isa/globals.isa +117 -5
  232. data/.data/spec/std/isa/param/HCONTEXT_IMPLEMENTED.yaml +29 -0
  233. data/.data/spec/std/isa/param/{MCONTEXT_AVAILABLE.yaml → MCONTEXT_IMPLEMENTED.yaml} +3 -3
  234. data/.data/spec/std/isa/param/MEDELEG_DELEGATABLE.yaml +121 -0
  235. data/.data/spec/std/isa/param/MEI_INTR_IMPL.yaml +1 -1
  236. data/.data/spec/std/isa/param/MIDELEG_DELEGATABLE.yaml +177 -0
  237. data/.data/spec/std/isa/param/MSI_INTR_IMPL.yaml +1 -1
  238. data/.data/spec/std/isa/param/MTI_INTR_IMPL.yaml +1 -1
  239. data/.data/spec/std/isa/param/SCONTEXT_IMPLEMENTED.yaml +18 -0
  240. data/.data/spec/std/isa/param/SDTRIG_BREAKPOINT_REENTRANCY.yaml +45 -0
  241. data/.data/spec/std/isa/param/SDTRIG_ETRIGGER_SUPPORTED_EXCEPTIONS.yaml +37 -0
  242. data/.data/spec/std/isa/param/SDTRIG_ETRIGGER_SUPPORTED_TRIGGERS.yaml +25 -0
  243. data/.data/spec/std/isa/param/SDTRIG_ICOUNT_COUNT_HARDWIRED_1.yaml +23 -0
  244. data/.data/spec/std/isa/param/SDTRIG_ICOUNT_SELF_WRITE_SETS_PENDING.yaml +23 -0
  245. data/.data/spec/std/isa/param/SDTRIG_ICOUNT_SUPPORTED_TRIGGERS.yaml +25 -0
  246. data/.data/spec/std/isa/param/SDTRIG_ITRIGGER_SUPPORTED_INTERRUPTS.yaml +37 -0
  247. data/.data/spec/std/isa/param/SDTRIG_ITRIGGER_SUPPORTED_TRIGGERS.yaml +25 -0
  248. data/.data/spec/std/isa/param/SDTRIG_MAX_CHAIN_LENGTH.yaml +33 -0
  249. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_EXECUTE_WRITABLE.yaml +22 -0
  250. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_LOAD_WRITABLE.yaml +22 -0
  251. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_MASKMAX6.yaml +26 -0
  252. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_MATCH_LEGAL_VALUES.yaml +41 -0
  253. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_SELECT_WRITABLE.yaml +22 -0
  254. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_SIZE_LEGAL_VALUES.yaml +38 -0
  255. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_STORE_WRITABLE.yaml +22 -0
  256. data/.data/spec/std/isa/param/SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS.yaml +25 -0
  257. data/.data/spec/std/isa/param/SDTRIG_M_WRITABLE.yaml +17 -0
  258. data/.data/spec/std/isa/param/SDTRIG_NUM_TRIGGERS.yaml +22 -0
  259. data/.data/spec/std/isa/param/SDTRIG_S_WRITABLE.yaml +19 -0
  260. data/.data/spec/std/isa/param/SDTRIG_TEXTRA_MHSELECT_MCONTEXT_MATCH.yaml +24 -0
  261. data/.data/spec/std/isa/param/SDTRIG_TEXTRA_MHSELECT_VMID_MATCH.yaml +23 -0
  262. data/.data/spec/std/isa/param/SDTRIG_TEXTRA_MHVALUE_LEN.yaml +26 -0
  263. data/.data/spec/std/isa/param/SDTRIG_TEXTRA_SSELECT_ASID_MATCH.yaml +23 -0
  264. data/.data/spec/std/isa/param/SDTRIG_TEXTRA_SSELECT_SCONTEXT_MATCH.yaml +26 -0
  265. data/.data/spec/std/isa/param/SDTRIG_TEXTRA_SVALUE_LEN.yaml +26 -0
  266. data/.data/spec/std/isa/param/SDTRIG_U_WRITABLE.yaml +19 -0
  267. data/.data/spec/std/isa/param/SDTRIG_VS_WRITABLE.yaml +19 -0
  268. data/.data/spec/std/isa/param/SDTRIG_VU_WRITABLE.yaml +19 -0
  269. data/.data/spec/std/isa/param/SEI_INTR_IMPL.yaml +1 -1
  270. data/.data/spec/std/isa/param/SSEED_READ_ONLY_ZERO.yaml +28 -0
  271. data/.data/spec/std/isa/param/SSI_INTR_IMPL.yaml +1 -1
  272. data/.data/spec/std/isa/param/STI_INTR_IMPL.yaml +1 -1
  273. data/.data/spec/std/isa/param/TCONTROL_IMPLEMENTED.yaml +16 -0
  274. data/.data/spec/std/isa/param/TDATA2_IMPLEMENTED.yaml +26 -0
  275. data/.data/spec/std/isa/param/TDATA3_IMPLEMENTED.yaml +29 -0
  276. data/.data/spec/std/isa/param/USEED_READ_ONLY_ZERO.yaml +28 -0
  277. data/.data/spec/std/isa/profile/RVA23p1S64.yaml +37 -0
  278. data/.data/spec/std/isa/profile/RVB23p1S64.yaml +39 -0
  279. data/.data/spec/std/isa/profile_family/RVA.yaml +3 -1
  280. data/.data/spec/std/isa/profile_family/RVB.yaml +3 -1
  281. data/.data/spec/std/isa/profile_release/RVA23p1.yaml +30 -0
  282. data/.data/spec/std/isa/profile_release/RVB23p1.yaml +30 -0
  283. data/lib/udb/version.rb +1 -1
  284. metadata +65 -8
  285. data/.data/spec/std/isa/param/HCONTEXT_AVAILABLE.yaml +0 -19
  286. data/.data/spec/std/isa/param/VSEI_INTR_IMPL.yaml +0 -28
  287. data/.data/spec/std/isa/param/VSSI_INTR_IMPL.yaml +0 -28
  288. data/.data/spec/std/isa/param/VSTI_INTR_IMPL.yaml +0 -33
@@ -58,15 +58,16 @@ access:
58
58
  operation(): |
59
59
  XReg virtual_address = X[xs1] + $signed(imm);
60
60
 
61
- if (xlen() == 32) {
62
- if (implemented?(ExtensionName::Zilsd)) {
63
- Bits<64> data = read_memory(64, virtual_address, $encoding);
64
-
65
- X[xd] = data[31:0];
66
- X[xd+1] = data[63:32];
61
+ if (xlen() == 64) {
62
+ X[xd] = read_memory(64, virtual_address, $encoding);
63
+ } else if (implemented?(ExtensionName::Zilsd)) {
64
+ if (endianness() == Endian::Big) {
65
+ X[xd+1] = read_memory(32, virtual_address, $encoding);
66
+ X[xd] = read_memory(32, virtual_address + 4, $encoding);
67
67
  } else {
68
- raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
68
+ X[xd] = read_memory(32, virtual_address, $encoding);
69
+ X[xd+1] = read_memory(32, virtual_address + 4, $encoding);
69
70
  }
70
71
  } else {
71
- X[xd] = read_memory(64, virtual_address, $encoding);
72
+ raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
72
73
  }
@@ -52,17 +52,18 @@ access:
52
52
  vs: always
53
53
  vu: always
54
54
  operation(): |
55
- Bits<64> data;
56
55
  XReg virtual_address = X[xs1] + $signed(imm);
57
56
 
58
- if (xlen() == 32) {
59
- if (implemented?(ExtensionName::Zilsd)) {
60
- data = {X[xs2 + 1], X[xs2]};
57
+ if (xlen() == 64) {
58
+ write_memory(64, virtual_address, X[xs2], $encoding);
59
+ } else if (implemented?(ExtensionName::Zilsd)) {
60
+ if (endianness() == Endian::Big) {
61
+ write_memory(32, virtual_address, X[xs2 + 1], $encoding);
62
+ write_memory(32, virtual_address + 4, X[xs2], $encoding);
61
63
  } else {
62
- raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
64
+ write_memory(32, virtual_address, X[xs2], $encoding);
65
+ write_memory(32, virtual_address + 4, X[xs2 + 1], $encoding);
63
66
  }
64
67
  } else {
65
- data = X[xs2];
68
+ raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
66
69
  }
67
-
68
- write_memory(64, virtual_address, data, $encoding);
@@ -11,7 +11,7 @@ definedBy:
11
11
  extension:
12
12
  name: Q
13
13
  description: |
14
- `fcvt.d.q` converts a double-precision floating-point number to a quad-precision floating-point number.
14
+ `fcvt.q.d` converts a double-precision floating-point number to a quad-precision floating-point number.
15
15
  assembly: fd, fs1, rm
16
16
  encoding:
17
17
  match: 010001100001-------------1010011
@@ -18,7 +18,7 @@ description: |
18
18
  definedBy:
19
19
  extension:
20
20
  name: Q
21
- assembly: fd, xs1, imm
21
+ assembly: fd, imm(xs1)
22
22
  encoding:
23
23
  match: "-----------------100-----0000111"
24
24
  variables:
@@ -6,9 +6,26 @@
6
6
  $schema: inst_schema.json#
7
7
  kind: instruction
8
8
  name: dret
9
- long_name: No synopsis available
9
+ long_name: Return from Debug Mode
10
10
  description: |
11
- No description available.
11
+ Resumes execution after Debug Mode. `dret` is only legal in Debug Mode;
12
+ executing it in any other mode raises an Illegal Instruction exception.
13
+
14
+ When executed in Debug Mode, `dret`:
15
+
16
+ . Sets the PC to the value in `dpc`.
17
+ . Changes the privilege and virtualization mode to those held in
18
+ `dcsr.PRV` and `dcsr.V`.
19
+ . If the new privilege mode is less privileged than M-mode, clears
20
+ `mstatus.MPRV`.
21
+ . If Smdbltrp is implemented and the new privilege mode is less privileged
22
+ than M-mode, clears `mstatus.MDT`.
23
+ . If Ssdbltrp is implemented and the new privilege mode is U, VS, or VU,
24
+ clears `sstatus.SDT`; if the new mode is VU, also clears `vsstatus.SDT`.
25
+ . If Zicfilp is implemented, sets `ELP` to `dcsr.PELP` if Zicfilp is
26
+ enabled (`xLPE`=1) in the new privilege mode, otherwise to
27
+ `NO_LP_EXPECTED`, and then clears `dcsr.PELP`.
28
+ . Leaves Debug Mode.
12
29
  definedBy:
13
30
  extension:
14
31
  name: Sdext
@@ -17,9 +34,58 @@ encoding:
17
34
  match: "01111011001000000000000001110011"
18
35
  variables: []
19
36
  access:
20
- s: always
21
- u: always
22
- vs: always
23
- vu: always
37
+ s: never
38
+ u: never
39
+ vs: never
40
+ vu: never
24
41
  data_independent_timing: false
25
42
  operation(): |
43
+ # UDB does not yet model Debug Mode state, so the hart can never be in Debug
44
+ # Mode and dret is always illegal, regardless of privilege mode.
45
+ # TODO: once Debug Mode is modeled, raise this only when the hart is not in
46
+ # Debug Mode.
47
+ raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
48
+
49
+ # determine the resume mode from dcsr.PRV/dcsr.V
50
+ PrivilegeMode new_mode = PrivilegeMode::M;
51
+ if (CSR[dcsr].PRV == 2'b11) {
52
+ new_mode = PrivilegeMode::M;
53
+ } else if (CSR[dcsr].PRV == 2'b01) {
54
+ new_mode = PrivilegeMode::S;
55
+ if (implemented?(ExtensionName::H)) {
56
+ if (CSR[dcsr].V == 1'b1) {
57
+ new_mode = PrivilegeMode::VS;
58
+ }
59
+ }
60
+ } else if (CSR[dcsr].PRV == 2'b00) {
61
+ new_mode = PrivilegeMode::U;
62
+ if (implemented?(ExtensionName::H)) {
63
+ if (CSR[dcsr].V == 1'b1) {
64
+ new_mode = PrivilegeMode::VU;
65
+ }
66
+ }
67
+ } else {
68
+ unpredictable("dcsr.PRV holds a reserved encoding; the hart may resume in any supported privilege mode");
69
+ }
70
+
71
+ if (new_mode != PrivilegeMode::M) {
72
+ if (implemented?(ExtensionName::U)) {
73
+ CSR[mstatus].MPRV = 0;
74
+ }
75
+ if (implemented?(ExtensionName::Smdbltrp)) {
76
+ CSR[mstatus].MDT = 1'b0;
77
+ }
78
+ }
79
+
80
+ # TODO: Ssdbltrp: if new_mode is U, VS, or VU, clear sstatus.SDT; if new_mode
81
+ # is VU, also clear vsstatus.SDT. UDB does not yet define the SDT fields.
82
+
83
+ if (implemented?(ExtensionName::Zicfilp)) {
84
+ # TODO: set ELP to dcsr.PELP if xLPE is enabled for new_mode, otherwise to
85
+ # NO_LP_EXPECTED. UDB does not yet model the ELP state, so this restore
86
+ # must happen before dcsr.PELP is cleared below once it is added.
87
+ CSR[dcsr].PELP = 1'b0;
88
+ }
89
+
90
+ set_mode(new_mode);
91
+ $pc = $bits(CSR[dpc]);
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.f.f.w
9
- long_name: "Vector floating-point widening conversion"
9
+ long_name: "Vector floating-point narrowing conversion"
10
10
  description: |
11
- Converts floating-point elements from vector register vs2 to a wider floating-point format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 standards.
11
+ Converts double-width floating-point elements from vector register vs2 to a single-width floating-point format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 standards.
12
12
  definedBy:
13
13
  extension:
14
14
  anyOf:
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.f.x.w
9
- long_name: "Vector integer to floating-point widening conversion"
9
+ long_name: "Vector integer to floating-point narrowing conversion"
10
10
  description: |
11
- Converts signed integer elements from vector register vs2 to a wider floating-point format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 standards.
11
+ Converts double-width signed integer elements from vector register vs2 to a single-width floating-point format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 standards.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.f.xu.w
9
- long_name: "Vector unsigned integer to floating-point widening conversion"
9
+ long_name: "Vector unsigned integer to floating-point narrowing conversion"
10
10
  description: |
11
- Converts unsigned integer elements from vector register vs2 to a wider floating-point format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 standards.
11
+ Converts double-width unsigned integer elements from vector register vs2 to a single-width floating-point format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 standards.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.rod.f.f.w
9
- long_name: "Vector floating-point format conversion with round-to-odd (widening)"
9
+ long_name: "Vector floating-point narrowing conversion with round-to-odd"
10
10
  description: |
11
- Converts floating-point elements from vector register vs2 to a wider floating-point format using round-to-odd mode and stores results in vector register vd, using vector mask vm.
11
+ Converts double-width floating-point elements from vector register vs2 to a single-width floating-point format using round-to-odd mode and stores results in vector register vd, using vector mask vm.
12
12
  definedBy:
13
13
  extension:
14
14
  anyOf:
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.rtz.x.f.w
9
- long_name: "Vector floating-point to integer widening conversion with truncation"
9
+ long_name: "Vector floating-point to integer narrowing conversion with truncation"
10
10
  description: |
11
- Converts floating-point elements from vector register vs2 to a wider integer format using round-toward-zero mode and stores results in vector register vd, using vector mask vm.
11
+ Converts double-width floating-point elements from vector register vs2 to a single-width integer format using round-toward-zero mode and stores results in vector register vd, using vector mask vm.
12
12
  definedBy:
13
13
  extension:
14
14
  anyOf:
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.rtz.xu.f.w
9
- long_name: "Vector floating-point to unsigned integer widening conversion with truncation"
9
+ long_name: "Vector floating-point to unsigned integer narrowing conversion with truncation"
10
10
  description: |
11
- Converts floating-point elements from vector register vs2 to a wider unsigned integer format using round-toward-zero mode and stores results in vector register vd, using vector mask vm.
11
+ Converts double-width floating-point elements from vector register vs2 to a single-width unsigned integer format using round-toward-zero mode and stores results in vector register vd, using vector mask vm.
12
12
  definedBy:
13
13
  extension:
14
14
  anyOf:
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.x.f.w
9
- long_name: "Vector floating-point to integer widening conversion"
9
+ long_name: "Vector floating-point to integer narrowing conversion"
10
10
  description: |
11
- Converts floating-point elements from vector register vs2 to a wider integer format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 rounding rules.
11
+ Converts double-width floating-point elements from vector register vs2 to a single-width integer format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 rounding rules.
12
12
  definedBy:
13
13
  extension:
14
14
  anyOf:
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vfncvt.xu.f.w
9
- long_name: "Vector floating-point to unsigned integer widening conversion"
9
+ long_name: "Vector floating-point to unsigned integer narrowing conversion"
10
10
  description: |
11
- Converts floating-point elements from vector register vs2 to a wider unsigned integer format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 rounding rules.
11
+ Converts double-width floating-point elements from vector register vs2 to a single-width unsigned integer format and stores results in vector register vd, using vector mask vm. The conversion follows IEEE 754 rounding rules.
12
12
  definedBy:
13
13
  extension:
14
14
  anyOf:
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnclip.wi
9
- long_name: "Vector widening signed clip with immediate"
9
+ long_name: "Vector narrowing signed clip with immediate"
10
10
  description: |
11
- Performs widening signed clip operation on elements from vector register vs2 using immediate clip value and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and widens the result.
11
+ Performs narrowing signed clip operation on double-width elements from vector register vs2 using immediate clip value and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and packs the result into a narrower destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnclip.wv
9
- long_name: "Vector widening signed clip"
9
+ long_name: "Vector narrowing signed clip"
10
10
  description: |
11
- Performs widening signed clip operation on elements from vector register vs2 using clip values from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and widens the result.
11
+ Performs narrowing signed clip operation on double-width elements from vector register vs2 using clip values from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and packs the result into a narrower destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnclip.wx
9
- long_name: "Vector widening signed clip with scalar"
9
+ long_name: "Vector narrowing signed clip with scalar"
10
10
  description: |
11
- Performs widening signed clip operation on elements from vector register vs2 using scalar clip value from register xs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and widens the result.
11
+ Performs narrowing signed clip operation on double-width elements from vector register vs2 using scalar clip value from register xs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and packs the result into a narrower destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnclipu.wi
9
- long_name: "Vector widening unsigned clip with immediate"
9
+ long_name: "Vector narrowing unsigned clip with immediate"
10
10
  description: |
11
- Performs widening unsigned clip operation on elements from vector register vs2 using immediate clip value and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and widens the result.
11
+ Performs narrowing unsigned clip operation on double-width elements from vector register vs2 using immediate clip value and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and packs the result into a narrower destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnclipu.wv
9
- long_name: "Vector widening unsigned clip"
9
+ long_name: "Vector narrowing unsigned clip"
10
10
  description: |
11
- Performs widening unsigned clip operation on elements from vector register vs2 using clip values from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and widens the result.
11
+ Performs narrowing unsigned clip operation on double-width elements from vector register vs2 using clip values from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and packs the result into a narrower destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnclipu.wx
9
- long_name: "Vector widening unsigned clip with scalar"
9
+ long_name: "Vector narrowing unsigned clip with scalar"
10
10
  description: |
11
- Performs widening unsigned clip operation on elements from vector register vs2 using scalar clip value from register xs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and widens the result.
11
+ Performs narrowing unsigned clip operation on double-width elements from vector register vs2 using scalar clip value from register xs1 and stores results in vector register vd, using vector mask vm. The operation clips values to a specified range and packs the result into a narrower destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnsra.wi
9
- long_name: "Vector widening signed shift right arithmetic with immediate"
9
+ long_name: "Vector narrowing signed shift right arithmetic with immediate"
10
10
  description: |
11
- Performs widening signed arithmetic right shift on elements from vector register vs2 by immediate shift amount and stores results in vector register vd, using vector mask vm. The operation preserves the sign bit and widens the result.
11
+ Performs narrowing signed arithmetic right shift on double-width elements from vector register vs2 by immediate shift amount and stores results in vector register vd, using vector mask vm. The operation preserves the sign bit and writes a single-width destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnsra.wv
9
- long_name: "Vector widening signed shift right arithmetic"
9
+ long_name: "Vector narrowing signed shift right arithmetic"
10
10
  description: |
11
- Performs widening signed arithmetic right shift on elements from vector register vs2 by shift amounts from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation preserves the sign bit and widens the result.
11
+ Performs narrowing signed arithmetic right shift on double-width elements from vector register vs2 by shift amounts from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation preserves the sign bit and writes a single-width destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnsra.wx
9
- long_name: "Vector widening signed shift right arithmetic with scalar"
9
+ long_name: "Vector narrowing signed shift right arithmetic with scalar"
10
10
  description: |
11
- Performs widening signed arithmetic right shift on elements from vector register vs2 by shift amount from scalar register xs1 and stores results in vector register vd, using vector mask vm. The operation preserves the sign bit and widens the result.
11
+ Performs narrowing signed arithmetic right shift on double-width elements from vector register vs2 by shift amount from scalar register xs1 and stores results in vector register vd, using vector mask vm. The operation preserves the sign bit and writes a single-width destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnsrl.wi
9
- long_name: "Vector widening logical shift right with immediate"
9
+ long_name: "Vector narrowing logical shift right with immediate"
10
10
  description: |
11
- Performs widening logical right shift on elements from vector register vs2 by immediate shift amount and stores results in vector register vd, using vector mask vm. The operation fills with zeros and widens the result.
11
+ Performs narrowing logical right shift on double-width elements from vector register vs2 by immediate shift amount and stores results in vector register vd, using vector mask vm. The operation fills with zeros and writes a single-width destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnsrl.wv
9
- long_name: "Vector widening logical shift right"
9
+ long_name: "Vector narrowing logical shift right"
10
10
  description: |
11
- Performs widening logical right shift on elements from vector register vs2 by shift amounts from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation fills with zeros and widens the result.
11
+ Performs narrowing logical right shift on double-width elements from vector register vs2 by shift amounts from vector register vs1 and stores results in vector register vd, using vector mask vm. The operation fills with zeros and writes a single-width destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,9 +6,9 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: vnsrl.wx
9
- long_name: "Vector widening logical shift right with scalar"
9
+ long_name: "Vector narrowing logical shift right with scalar"
10
10
  description: |
11
- Performs widening logical right shift on elements from vector register vs2 by shift amount from scalar register xs1 and stores results in vector register vd, using vector mask vm. The operation fills with zeros and widens the result.
11
+ Performs narrowing logical right shift on double-width elements from vector register vs2 by shift amount from scalar register xs1 and stores results in vector register vd, using vector mask vm. The operation fills with zeros and writes a single-width destination.
12
12
  definedBy:
13
13
  extension:
14
14
  name: Zvl32b
@@ -6,7 +6,7 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: fcvt.h.s
9
- long_name: Convert half-precision float to a single-precision float
9
+ long_name: Convert single-precision float to a half-precision float
10
10
  definedBy:
11
11
  extension:
12
12
  oneOf:
@@ -14,7 +14,7 @@ definedBy:
14
14
  - name: Zhinxmin
15
15
  assembly: fd, fs1, rm
16
16
  description: |
17
- Converts a half-precision number in floating-point register _fs1_ into a single-precision floating-point number in
17
+ Converts a single-precision number in floating-point register _fs1_ into a half-precision floating-point number in
18
18
  floating-point register _fd_.
19
19
 
20
20
  `fcvt.h.s` rounds according to the _rm_ field.
@@ -39,34 +39,42 @@ access:
39
39
  operation(): |
40
40
  check_f_ok($encoding);
41
41
 
42
- Bits<16> hp_value = F[fs1][15:0];
42
+ # STATUS: INCOMPLETE. Narrowing single -> half loses precision, so it needs
43
+ # IEEE 754 rounding (per _rm_), overflow/underflow and inexact handling.
44
+ # Only the NaN, infinity and zero cases below are handled. Every other
45
+ # input hits the assert(false) TODO. softfloat_roundPackToF16 does not exist
46
+ # in fp.idl yet.
47
+ Bits<32> sp_value = F[fs1][31:0];
43
48
 
44
- Bits<1> sign = hp_value[15];
45
- Bits<5> exp = hp_value[14:10];
46
- Bits<10> frac = hp_value[9:0];
49
+ Bits<1> sign = sp_value[31];
50
+ Bits<8> exp = sp_value[30:23];
51
+ Bits<23> frac = sp_value[22:0];
47
52
 
48
- if (exp == 0x1F) {
53
+ if (exp == 0xFF) {
49
54
  if (frac != 0) {
50
- if ((hp_value & 0x0200) != 0) {
55
+ # NaN. A signaling NaN has the quiet bit (frac[22]) clear and raises NV.
56
+ if ((sp_value & 0x00400000) == 0) {
51
57
  set_fp_flag(FpFlag::NV);
52
58
  }
53
- F[fd] = HP_CANONICAL_NAN;
59
+ F[fd] = nan_box(16, FLEN, HP_CANONICAL_NAN);
54
60
  } else {
55
- F[fd] = packToF32UI(sign, 0xFF, 0);
61
+ F[fd] = nan_box(16, FLEN, packToF16UI( sign, 0x1F, 0 ));
56
62
  }
57
63
  } else {
58
- if (exp != 0) {
59
- if (frac != 0) {
60
- F[fd] = packToF32UI(sign, 0, 0);
61
- } else {
62
- Bits<6> norm_exp;
63
- (norm_exp, frac) = softfloat_normSubnormalF16Sig( frac );
64
- exp = norm_exp - 1;
65
- F[fd] = packToF32UI(sign, exp + 0x70, frac << 13);
66
- }
64
+
65
+ # frac is a 24-bit significand, the bottom 9 bits LSB are extracted and OR-red
66
+ # into a sticky flag, the top 15 MSBs are extracted, the LSB of this top slice
67
+ # is OR-red with the sticky
68
+ Bits<16> frac16 = (frac >> 9) | ((frac & 0x1ff) != 0 ? 1 : 0);
69
+ if ((exp | frac16) == 0) {
70
+ F[fd] = nan_box(16, FLEN, packToF16UI( sign, 0, 0 ));
67
71
  } else {
68
- F[fd] = packToF32UI(sign, exp + 0x70, frac << 13);
72
+ # TODO: finite nonzero inputs need softfloat_roundPackToF16, which is not implemented.
73
+ # The frac16/sticky computation above is unverified draft code.
74
+ assert(false, "TODO: implement roundPackToF16");
75
+ # F[fd] = softfloat_roundPackToF16(sign, exp - 0x71, frac16 | 0x4000);
69
76
  }
77
+
70
78
  }
71
79
 
72
80
  mark_f_state_dirty();
@@ -6,7 +6,7 @@
6
6
  $schema: "inst_schema.json#"
7
7
  kind: instruction
8
8
  name: fcvt.s.h
9
- long_name: Convert single-precision float to a half-precision float
9
+ long_name: Convert half-precision float to a single-precision float
10
10
  definedBy:
11
11
  extension:
12
12
  oneOf:
@@ -14,7 +14,7 @@ definedBy:
14
14
  - name: Zhinxmin
15
15
  assembly: fd, fs1, rm
16
16
  description: |
17
- Converts a single-precision number in floating-point register _fs1_ into a half-precision floating-point number in
17
+ Converts a half-precision number in floating-point register _fs1_ into a single-precision floating-point number in
18
18
  floating-point register _fd_.
19
19
 
20
20
  `fcvt.s.h` will never round, and so the 'rm' field is effectively ignored.
@@ -36,34 +36,49 @@ access:
36
36
  operation(): |
37
37
  check_f_ok($encoding);
38
38
 
39
- Bits<32> sp_value = F[fs1][31:0];
39
+ Bits<16> hp_value = F[fs1][15:0];
40
40
 
41
- Bits<1> sign = sp_value[31];
42
- Bits<8> exp = sp_value[30:23];
43
- Bits<23> frac = sp_value[22:0];
41
+ Bits<1> sign = hp_value[15];
42
+ Bits<5> exp = hp_value[14:10];
43
+ Bits<10> frac = hp_value[9:0];
44
44
 
45
- if (exp == 0xFF) {
45
+ Bits<32> sp_value = 0;
46
+
47
+ # Widening half -> single is always exact, so no rounding is needed.
48
+ if (exp == 0x1F) {
46
49
  if (frac != 0) {
47
- if ((sp_value & 0x00400000) != 0) {
50
+ # NaN. A signaling NaN has the quiet bit (frac[9]) clear and raises NV.
51
+ # Either way the result is the canonical single-precision NaN.
52
+ if ((hp_value & 0x0200) == 0) {
48
53
  set_fp_flag(FpFlag::NV);
49
54
  }
50
- F[fd] = nan_box(16, FLEN, HP_CANONICAL_NAN);
55
+ sp_value = SP_CANONICAL_NAN;
51
56
  } else {
52
- F[fd] = nan_box(16, FLEN, packToF16UI( sign, 0x1F, 0 ));
57
+ sp_value = packToF32UI(sign, 0xFF, 0);
53
58
  }
54
- } else {
55
-
56
- # frac is a 24-bit significand, the bottom 9 bits LSB are extracted and OR-red
57
- # into a sticky flag, the top 15 MSBs are extracted, the LSB of this top slice
58
- # is OR-red with the sticky
59
- Bits<16> frac16 = (frac >> 9) | ((frac & 0x1ff) != 0 ? 1 : 0);
60
- if ((exp | frac16) == 0) {
61
- F[fd] = nan_box(16, FLEN, packToF16UI( sign, 0, 0 ));
59
+ } else if (exp == 0) {
60
+ if (frac == 0) {
61
+ sp_value = packToF32UI(sign, 0, 0);
62
62
  } else {
63
- assert(false, "TODO: implement roundPackToF16");
64
- # F[fd] = soffloat_roundPackToF16(sign, exp - 0x71, frac16 | 0x4000);
63
+ # Subnormal half: value = frac * 2^-24. Shift the leading 1 of frac up to
64
+ # bit 10 (the implicit-bit position), drop it, and rebias the exponent.
65
+ Bits<16> frac16 = frac;
66
+ Bits<8> shift_dist = count_leading_zeros(16, frac16) - 5;
67
+ Bits<32> norm_frac = ((frac16 << shift_dist) & 0x3FF);
68
+ sp_value = packToF32UI(sign, 0x71 - shift_dist, norm_frac << 13);
65
69
  }
70
+ } else {
71
+ # Normal half: rebias the exponent (127 - 15 = 0x70) and widen the fraction
72
+ # from 10 to 23 bits.
73
+ Bits<8> sp_exp = exp;
74
+ Bits<32> frac32 = frac;
75
+ sp_value = packToF32UI(sign, sp_exp + 0x70, frac32 << 13);
76
+ }
66
77
 
78
+ if (implemented?(ExtensionName::D)) {
79
+ F[fd] = nan_box(32, 64, sp_value);
80
+ } else {
81
+ F[fd] = sp_value;
67
82
  }
68
83
 
69
84
  mark_f_state_dirty();
@@ -11,13 +11,13 @@ description: |
11
11
  Computes the element-wise absolute difference of two signed integer SEW-bit
12
12
  source operands vs1 and vs2 and writes the result to vd according to mask vm.
13
13
 
14
- Reserved when SEW is neither 8 nor 16.
14
+ Supports SEW of 8, 16, and 32. If the Zve64x extension is supported, SEW 64 is also supported.
15
15
  definedBy:
16
16
  extension:
17
17
  name: Zvabd
18
18
  assembly: vd, vs2, vs1, vm
19
19
  encoding:
20
- match: 010001-----------010-----1010111
20
+ match: 010101-----------010-----1010111
21
21
  variables:
22
22
  - name: vm
23
23
  location: 25
@@ -35,7 +35,7 @@ access:
35
35
  operation(): |
36
36
  VectorState state = vector_state();
37
37
 
38
- if (state.sew != 8 && state.sew != 16) {
38
+ if (!implemented?(ExtensionName::Zve64x) && state.sew > 32) {
39
39
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
40
40
  }
41
41