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
@@ -20,6 +20,7 @@ encoding:
20
20
  variables:
21
21
  - name: imm
22
22
  location: 31-25|11-7
23
+ sign_extend: true
23
24
  - name: fs2
24
25
  location: 24-20
25
26
  - name: xs1
@@ -29,7 +30,7 @@ access:
29
30
  u: always
30
31
  vs: always
31
32
  vu: always
32
- data_independent_timing: true
33
+ data_independent_timing: false
33
34
  operation(): |
34
35
  check_f_ok($encoding);
35
36
 
@@ -51,7 +51,7 @@ operation(): |
51
51
  XReg virtual_address = X[xs1] + $signed(imm);
52
52
 
53
53
  if (xlen() == 32) {
54
- if (implemented?(ExtensionName::Zclsd)) {
54
+ if (implemented?(ExtensionName::Zilsd)) {
55
55
  data = {X[xs2 + 1], X[xs2]};
56
56
  } else {
57
57
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
@@ -11,8 +11,8 @@ definedBy:
11
11
  extension:
12
12
  name: Q
13
13
  description: |
14
- `fadd.q` is analogous to `fadd.d` and performs double-precision floating-point addition between
15
- `qs1` and `qs2` and writes the final result to `qd`.
14
+ `fadd.q` is analogous to `fadd.d` and performs quad-precision floating-point addition between
15
+ `fs1` and `fs2` and writes the final result to `fd`.
16
16
  assembly: fd, fs1, fs2, rm
17
17
  encoding:
18
18
  match: 0000011------------------1010011
@@ -8,13 +8,13 @@ kind: instruction
8
8
  name: fclass.q
9
9
  long_name: Floating-Point Classify Quad-Precision
10
10
  description: |
11
- The `fclass.q` instruction examines the value in floating-point register `rs1` and writes to integer
12
- register `rd` a 10-bit mask that indicates the class of the floating-point number.
11
+ The `fclass.q` instruction examines the value in floating-point register `fs1` and writes to integer
12
+ register `xd` a 10-bit mask that indicates the class of the floating-point number.
13
13
 
14
- The format of the mask is described in table given below. The corresponding bit in `rd`
15
- will be set if the property is true and clear otherwise. All other bits in `rd` are cleared.
14
+ The format of the mask is described in table given below. The corresponding bit in `xd`
15
+ will be set if the property is true and clear otherwise. All other bits in `xd` are cleared.
16
16
 
17
- Note that exactly one bit in `rd` will be set. `fclass.q` does not set the floating-point
17
+ Note that exactly one bit in `xd` will be set. `fclass.q` does not set the floating-point
18
18
  exception flags.
19
19
 
20
20
  .Format of result of `fclass` instruction.
@@ -13,7 +13,6 @@ description: |
13
13
 
14
14
  `fleq.q` is defined like `fle.q`, except that quiet _NaN_ inputs do not cause the invalid
15
15
  operation exception flag to be set.
16
- This instruction is encoded like its `flt` counterpart, but with instruction bit 14 set to 1.
17
16
  definedBy:
18
17
  extension:
19
18
  allOf:
@@ -9,7 +9,7 @@ name: fli.q
9
9
  long_name: Floating-Point Load Immediate Quad-Precision
10
10
  description: |
11
11
  The `fli.q` instruction loads one of 32 quad-precision floating-point constants, encoded in the `xs1`
12
- field, into floating-point register `rd`.
12
+ field, into floating-point register `fd`.
13
13
  `fli.q` is encoded like `fmv.w.x`, but with _fmt_ = Q.
14
14
  definedBy:
15
15
  extension:
@@ -24,6 +24,7 @@ encoding:
24
24
  variables:
25
25
  - name: imm
26
26
  location: 31-20
27
+ sign_extend: true
27
28
  - name: xs1
28
29
  location: 19-15
29
30
  - name: fd
@@ -13,7 +13,6 @@ description: |
13
13
 
14
14
  `fltq.q` is defined like `flt.q`, except that quiet _NaN_ inputs do not cause the invalid
15
15
  operation exception flag to be set.
16
- This instruction is encoded like its `fle` counterpart, but with instruction bit 14 set to 1.
17
16
  definedBy:
18
17
  extension:
19
18
  allOf:
@@ -13,7 +13,6 @@ description: |
13
13
  If both inputs are _NaN_s, the result is the canonical _NaN_.
14
14
  If either input is _NaN_, the result is the canonical _NaN_.
15
15
  Signaling _NaN_ inputs set the invalid operation exception flag, even when the result is not _NaN_.
16
- This instruction is encoded like its `fminm.q` counterpart, but with instruction bit 14 set to 1.
17
16
  definedBy:
18
17
  extension:
19
18
  allOf:
@@ -13,7 +13,6 @@ description: |
13
13
  If both inputs are _NaN_s, the result is the canonical _NaN_.
14
14
  If either input is _NaN_, the result is the canonical _NaN_.
15
15
  Signaling _NaN_ inputs set the invalid operation exception flag, even when the result is not _NaN_.
16
- This instruction is encoded like its `fminm.q` counterpart, but with instruction bit 14 set to 1.
17
16
  definedBy:
18
17
  extension:
19
18
  allOf:
@@ -8,7 +8,7 @@ kind: instruction
8
8
  name: fmvp.q.x
9
9
  long_name: Floating-Point Move Pair from Integer Registers to Quad-Precision Register
10
10
  description: |
11
- The `fmvp.q.x` instruction moves a double-precision number from a pair of integer registers into
11
+ The `fmvp.q.x` instruction moves a quad-precision number from a pair of integer registers into
12
12
  a floating-point register.
13
13
  Integer registers `xs1` and `xs2` supply bits 63:0 and 127:64, respectively; the result is written to
14
14
  floating-point register `fd`.
@@ -23,6 +23,7 @@ encoding:
23
23
  variables:
24
24
  - name: imm
25
25
  location: 31-25|11-7
26
+ sign_extend: true
26
27
  - name: fs2
27
28
  location: 24-20
28
29
  - name: xs1
@@ -24,6 +24,7 @@ encoding:
24
24
  variables:
25
25
  - name: imm
26
26
  location: 19-15
27
+ sign_extend: true
27
28
  - name: vd
28
29
  location: 11-7
29
30
  access:
@@ -28,6 +28,7 @@ access:
28
28
  u: always
29
29
  vs: always
30
30
  vu: always
31
+ data_independent_timing: true
31
32
  operation(): |
32
33
 
33
34
  if (implemented?(ExtensionName::M) && (CSR[misa].M == 1'b0)) {
@@ -25,6 +25,7 @@ access:
25
25
  u: always
26
26
  vs: always
27
27
  vu: always
28
+ data_independent_timing: true
28
29
  operation(): |
29
30
 
30
31
  if (implemented?(ExtensionName::C) && (CSR[misa].C == 1'b0)) {
@@ -14,9 +14,7 @@ description: |
14
14
 
15
15
  definedBy:
16
16
  extension:
17
- allOf:
18
- - name: Zcb
19
- - name: Zbb
17
+ name: Zcb
20
18
  assembly: xd
21
19
  encoding:
22
20
  match: 100111---1100001
@@ -28,12 +26,9 @@ access:
28
26
  u: always
29
27
  vs: always
30
28
  vu: always
29
+ data_independent_timing: true
31
30
  operation(): |2
32
31
 
33
- if (implemented?(ExtensionName::B) && (CSR[misa].B == 1'b0)) {
34
- raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
35
- }
36
-
37
32
  if (implemented?(ExtensionName::C) && (CSR[misa].C == 1'b0)) {
38
33
  raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
39
34
  }
@@ -17,7 +17,7 @@ definedBy:
17
17
  - extension:
18
18
  allOf:
19
19
  - name: Zcb
20
- - name: Zbb
20
+ - name: Zba
21
21
  assembly: xd
22
22
  encoding:
23
23
  match: 100111---1110001
@@ -28,4 +28,6 @@ access:
28
28
  vs: always
29
29
  vu: always
30
30
  data_independent_timing: false
31
+ hints:
32
+ - { $ref: inst/Zicfiss/c.sspush.yaml# }
31
33
  operation(): "" #do nothing
@@ -28,4 +28,6 @@ access:
28
28
  vs: always
29
29
  vu: always
30
30
  data_independent_timing: false
31
+ hints:
32
+ - { $ref: inst/Zicfiss/c.sspopchk.yaml# }
31
33
  operation(): "" #do nothing
@@ -42,4 +42,11 @@ access:
42
42
  vs: always
43
43
  vu: always
44
44
  data_independent_timing: false
45
+ <% if n == 1 -%>
46
+ hints:
47
+ - { $ref: inst/Zicfiss/c.sspush.yaml# }
48
+ <% elsif n == 5 -%>
49
+ hints:
50
+ - { $ref: inst/Zicfiss/c.sspopchk.yaml# }
51
+ <% end -%>
45
52
  operation(): "" #do nothing
@@ -25,5 +25,5 @@ access:
25
25
  u: always
26
26
  vs: always
27
27
  vu: always
28
- data_independent_timing: true
28
+ data_independent_timing: false
29
29
  operation(): |
@@ -27,5 +27,5 @@ access:
27
27
  u: always
28
28
  vs: always
29
29
  vu: always
30
- data_independent_timing: true
30
+ data_independent_timing: false
31
31
  operation(): |
@@ -27,5 +27,5 @@ access:
27
27
  u: always
28
28
  vs: always
29
29
  vu: always
30
- data_independent_timing: true
30
+ data_independent_timing: false
31
31
  operation(): |
@@ -33,7 +33,7 @@ access:
33
33
  u: always
34
34
  vs: always
35
35
  vu: always
36
- data_independent_timing: true
36
+ data_independent_timing: false
37
37
  operation(): |
38
38
  check_f_ok($encoding);
39
39
  RoundingMode rounding_mode = rm_to_mode(rm, $encoding);
@@ -27,5 +27,5 @@ access:
27
27
  u: always
28
28
  vs: always
29
29
  vu: always
30
- data_independent_timing: true
30
+ data_independent_timing: false
31
31
  operation(): |
@@ -8,7 +8,7 @@ kind: instruction
8
8
  name: flh
9
9
  long_name: Half-precision floating-point load
10
10
  description: |
11
- The `flh` instruction loads a single-precision floating-point value from memory at address _xs1_ + _imm_ into floating-point register _xd_.
11
+ The `flh` instruction loads a half-precision floating-point value from memory at address _xs1_ + _imm_ into floating-point register _xd_.
12
12
 
13
13
  `flh` does not modify the bits being transferred; in particular, the payloads of non-canonical NaNs are preserved.
14
14
 
@@ -16,13 +16,16 @@ description: |
16
16
 
17
17
  definedBy:
18
18
  extension:
19
- name: Zfhmin
19
+ anyOf:
20
+ - name: Zfhmin
21
+ - name: Zfbfmin
20
22
  assembly: fd, imm(xs1)
21
23
  encoding:
22
24
  match: "-----------------001-----0000111"
23
25
  variables:
24
26
  - name: imm
25
27
  location: 31-20
28
+ sign_extend: true
26
29
  - name: xs1
27
30
  location: 19-15
28
31
  - name: fd
@@ -14,7 +14,9 @@ description: |
14
14
  the payloads of non-canonical NaNs are preserved.
15
15
  definedBy:
16
16
  extension:
17
- name: Zfhmin
17
+ anyOf:
18
+ - name: Zfhmin
19
+ - name: Zfbfmin
18
20
  assembly: fd, xs1
19
21
  encoding:
20
22
  match: 111101000000-----000-----1010011
@@ -9,7 +9,9 @@ name: fmv.x.h
9
9
  long_name: Move half-precision value from floating-point to integer register
10
10
  definedBy:
11
11
  extension:
12
- name: Zfhmin
12
+ anyOf:
13
+ - name: Zfhmin
14
+ - name: Zfbfmin
13
15
  assembly: xd, fs1
14
16
  description: |
15
17
  Moves the half-precision value in floating-point register fs1 represented in IEEE 754-2008
@@ -19,13 +19,16 @@ description: |
19
19
 
20
20
  definedBy:
21
21
  extension:
22
- name: Zfhmin
22
+ anyOf:
23
+ - name: Zfhmin
24
+ - name: Zfbfmin
23
25
  assembly: fs2, imm(xs1)
24
26
  encoding:
25
27
  match: "-----------------001-----0100111"
26
28
  variables:
27
29
  - name: imm
28
30
  location: 31-25|11-7
31
+ sign_extend: true
29
32
  - name: xs1
30
33
  location: 19-15
31
34
  - name: fs2
@@ -0,0 +1,30 @@
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/inst_schema.json
5
+
6
+ $schema: inst_schema.json#
7
+ kind: instruction
8
+ name: c.sspopchk
9
+ long_name: Compressed Shadow Stack Pop and Check
10
+ description: |
11
+ C.SSPOPCHK pops a value from the shadow stack and checks it against link
12
+ register `x5`.
13
+
14
+ This instruction uses the `c.mop.5` codepoint provided by Zcmop and expands
15
+ to `sspopchk x5`.
16
+ definedBy:
17
+ extension:
18
+ allOf:
19
+ - name: Zicfiss
20
+ - name: Zcmop
21
+ assembly: x5
22
+ encoding:
23
+ match: "0110001010000001"
24
+ access:
25
+ s: always
26
+ u: always
27
+ vs: always
28
+ vu: always
29
+ data_independent_timing: false
30
+ operation(): |
@@ -0,0 +1,29 @@
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/inst_schema.json
5
+
6
+ $schema: inst_schema.json#
7
+ kind: instruction
8
+ name: c.sspush
9
+ long_name: Compressed Shadow Stack Push
10
+ description: |
11
+ C.SSPUSH pushes link register `x1` to the shadow stack.
12
+
13
+ This instruction uses the `c.mop.1` codepoint provided by Zcmop and expands
14
+ to `sspush x1`.
15
+ definedBy:
16
+ extension:
17
+ allOf:
18
+ - name: Zicfiss
19
+ - name: Zcmop
20
+ assembly: x1
21
+ encoding:
22
+ match: "0110000010000001"
23
+ access:
24
+ s: always
25
+ u: always
26
+ vs: always
27
+ vu: always
28
+ data_independent_timing: false
29
+ operation(): |
@@ -30,6 +30,6 @@ access:
30
30
  u: always
31
31
  vs: always
32
32
  vu: always
33
- data_independent_timing: false
33
+ data_independent_timing: true
34
34
  operation(): |
35
35
  X[xd] = (X[xs2] == 0) ? 0 : X[xs1];
@@ -30,6 +30,6 @@ access:
30
30
  u: always
31
31
  vs: always
32
32
  vu: always
33
- data_independent_timing: false
33
+ data_independent_timing: true
34
34
  operation(): |
35
35
  X[xd] = (X[xs2] != 0) ? 0 : X[xs1];
@@ -34,6 +34,18 @@ access:
34
34
  vs: always
35
35
  vu: always
36
36
  pseudoinstructions:
37
+ - when: xd == 0 && csr == 0x001
38
+ to: fsflags xs1
39
+ - when: xd == 0 && csr == 0x002
40
+ to: fsrm xs1
41
+ - when: xd == 0 && csr == 0x003
42
+ to: fscsr xs1
43
+ - when: csr == 0x001
44
+ to: fsflags xd, xs1
45
+ - when: csr == 0x002
46
+ to: fsrm xd, xs1
47
+ - when: csr == 0x003
48
+ to: fscsr xd, xs1
37
49
  - when: xd == 0
38
50
  to: csrw csr, xs1
39
51
  operation(): |
@@ -0,0 +1,38 @@
1
+ # Copyright (c) RISC-V International
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../../schemas/inst_schema.json
5
+
6
+ $schema: "inst_schema.json#"
7
+ kind: instruction
8
+ name: lxd
9
+ long_name: Load indexed doubleword
10
+ description: |
11
+ Load 64 bits of data into register `xd` from the effective address
12
+ `X[xs2] + X[xs1]`, where `xs2` is the base and `xs1` is the index.
13
+
14
+ This instruction is defined only for RV64.
15
+ definedBy:
16
+ allOf:
17
+ - xlen: 64
18
+ - extension:
19
+ name: Zilx
20
+ assembly: xd, (xs2), xs1
21
+ encoding:
22
+ match: 1001000----------011-----0101111
23
+ variables:
24
+ - name: xs2
25
+ location: 24-20
26
+ - name: xs1
27
+ location: 19-15
28
+ - name: xd
29
+ location: 11-7
30
+ access:
31
+ s: always
32
+ u: always
33
+ vs: always
34
+ vu: always
35
+ operation(): |
36
+ XReg virtual_address = X[xs2] + X[xs1];
37
+
38
+ X[xd] = read_memory(64, virtual_address, $encoding);
@@ -0,0 +1,35 @@
1
+ # Copyright (c) RISC-V International
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../../schemas/inst_schema.json
5
+
6
+ $schema: "inst_schema.json#"
7
+ kind: instruction
8
+ name: lxh
9
+ long_name: Load indexed halfword
10
+ description: |
11
+ Load 16 bits of data into register `xd` from the effective address
12
+ `X[xs2] + X[xs1]`, where `xs2` is the base and `xs1` is the index.
13
+ Sign extend the result to XLEN.
14
+ definedBy:
15
+ extension:
16
+ name: Zilx
17
+ assembly: xd, (xs2), xs1
18
+ encoding:
19
+ match: 1001000----------001-----0101111
20
+ variables:
21
+ - name: xs2
22
+ location: 24-20
23
+ - name: xs1
24
+ location: 19-15
25
+ - name: xd
26
+ location: 11-7
27
+ access:
28
+ s: always
29
+ u: always
30
+ vs: always
31
+ vu: always
32
+ operation(): |
33
+ XReg virtual_address = X[xs2] + X[xs1];
34
+
35
+ X[xd] = sext(read_memory(16, virtual_address, $encoding), 16);
@@ -0,0 +1,35 @@
1
+ # Copyright (c) RISC-V International
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../../schemas/inst_schema.json
5
+
6
+ $schema: "inst_schema.json#"
7
+ kind: instruction
8
+ name: lxhu
9
+ long_name: Load indexed halfword unsigned
10
+ description: |
11
+ Load 16 bits of data into register `xd` from the effective address
12
+ `X[xs2] + X[xs1]`, where `xs2` is the base and `xs1` is the index.
13
+ Zero extend the result to XLEN.
14
+ definedBy:
15
+ extension:
16
+ name: Zilx
17
+ assembly: xd, (xs2), xs1
18
+ encoding:
19
+ match: 1001000----------101-----0101111
20
+ variables:
21
+ - name: xs2
22
+ location: 24-20
23
+ - name: xs1
24
+ location: 19-15
25
+ - name: xd
26
+ location: 11-7
27
+ access:
28
+ s: always
29
+ u: always
30
+ vs: always
31
+ vu: always
32
+ operation(): |
33
+ XReg virtual_address = X[xs2] + X[xs1];
34
+
35
+ X[xd] = read_memory(16, virtual_address, $encoding);
@@ -0,0 +1,40 @@
1
+ # Copyright (c) RISC-V International
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../../schemas/inst_schema.json
5
+
6
+ $schema: "inst_schema.json#"
7
+ kind: instruction
8
+ name: lxsb
9
+ long_name: Load scaled indexed byte
10
+ description: |
11
+ Load 8 bits of data into register `xd` from the effective address
12
+ `X[xs2] + X[xs1]`, where `xs2` is the base and `xs1` is the index.
13
+ Sign extend the result to XLEN.
14
+
15
+ The `lxb` mnemonic is an assembler pseudoinstruction for `lxsb`.
16
+ definedBy:
17
+ extension:
18
+ name: Zilx
19
+ assembly: xd, (xs2), xs1
20
+ encoding:
21
+ match: 1101000----------000-----0101111
22
+ variables:
23
+ - name: xs2
24
+ location: 24-20
25
+ - name: xs1
26
+ location: 19-15
27
+ - name: xd
28
+ location: 11-7
29
+ access:
30
+ s: always
31
+ u: always
32
+ vs: always
33
+ vu: always
34
+ pseudoinstructions:
35
+ - when: "true"
36
+ to: lxb xd, (xs2), xs1
37
+ operation(): |
38
+ XReg virtual_address = X[xs2] + X[xs1];
39
+
40
+ X[xd] = sext(read_memory(8, virtual_address, $encoding), 8);
@@ -0,0 +1,40 @@
1
+ # Copyright (c) RISC-V International
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../../schemas/inst_schema.json
5
+
6
+ $schema: "inst_schema.json#"
7
+ kind: instruction
8
+ name: lxsbu
9
+ long_name: Load scaled indexed byte unsigned
10
+ description: |
11
+ Load 8 bits of data into register `xd` from the effective address
12
+ `X[xs2] + X[xs1]`, where `xs2` is the base and `xs1` is the index.
13
+ Zero extend the result to XLEN.
14
+
15
+ The `lxbu` mnemonic is an assembler pseudoinstruction for `lxsbu`.
16
+ definedBy:
17
+ extension:
18
+ name: Zilx
19
+ assembly: xd, (xs2), xs1
20
+ encoding:
21
+ match: 1101000----------100-----0101111
22
+ variables:
23
+ - name: xs2
24
+ location: 24-20
25
+ - name: xs1
26
+ location: 19-15
27
+ - name: xd
28
+ location: 11-7
29
+ access:
30
+ s: always
31
+ u: always
32
+ vs: always
33
+ vu: always
34
+ pseudoinstructions:
35
+ - when: "true"
36
+ to: lxbu xd, (xs2), xs1
37
+ operation(): |
38
+ XReg virtual_address = X[xs2] + X[xs1];
39
+
40
+ X[xd] = read_memory(8, virtual_address, $encoding);
@@ -0,0 +1,38 @@
1
+ # Copyright (c) RISC-V International
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../../schemas/inst_schema.json
5
+
6
+ $schema: "inst_schema.json#"
7
+ kind: instruction
8
+ name: lxsd
9
+ long_name: Load scaled indexed doubleword
10
+ description: |
11
+ Load 64 bits of data into register `xd` from the effective address
12
+ `X[xs2] + (X[xs1] << 3)`, where `xs2` is the base and `xs1` is the index.
13
+
14
+ This instruction is defined only for RV64.
15
+ definedBy:
16
+ allOf:
17
+ - xlen: 64
18
+ - extension:
19
+ name: Zilx
20
+ assembly: xd, (xs2), xs1
21
+ encoding:
22
+ match: 1101000----------011-----0101111
23
+ variables:
24
+ - name: xs2
25
+ location: 24-20
26
+ - name: xs1
27
+ location: 19-15
28
+ - name: xd
29
+ location: 11-7
30
+ access:
31
+ s: always
32
+ u: always
33
+ vs: always
34
+ vu: always
35
+ operation(): |
36
+ XReg virtual_address = X[xs2] + (X[xs1] `<< 3);
37
+
38
+ X[xd] = read_memory(64, virtual_address, $encoding);