udb 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. checksums.yaml +4 -4
  2. data/.data/cfgs/example_rv64_with_overlay.yaml +20 -24
  3. data/.data/cfgs/mc100-32-full-example.yaml +2 -2
  4. data/.data/cfgs/qc_iu.yaml +7 -3
  5. data/.data/cfgs/rv32-riscv-tests.yaml +8 -5
  6. data/.data/cfgs/rv32-vector.yaml +8 -5
  7. data/.data/cfgs/rv64-riscv-tests.yaml +8 -5
  8. data/.data/cfgs/rv64-vector.yaml +8 -5
  9. data/.data/spec/custom/isa/qc_iu/ext/Xqccmi.yaml +107 -36
  10. data/.data/spec/custom/isa/qc_iu/inst/Xqccmi/qc.cm.ilut.yaml +52 -69
  11. data/.data/spec/custom/isa/qc_iu/isa/globals.isa +27 -5
  12. data/.data/spec/schemas/README.adoc +3 -0
  13. data/.data/spec/schemas/config_schema.json +1 -1
  14. data/.data/spec/schemas/mmr_schema.json +3 -3
  15. data/.data/spec/schemas/schema_defs.json +8 -3
  16. data/.data/spec/std/isa/csr/H/hcounteren.layout +3 -3
  17. data/.data/spec/std/isa/csr/H/hcounteren.yaml +31 -31
  18. data/.data/spec/std/isa/csr/H/henvcfg.yaml +25 -0
  19. data/.data/spec/std/isa/csr/H/htinst.yaml +3 -3
  20. data/.data/spec/std/isa/csr/H/htval.yaml +3 -3
  21. data/.data/spec/std/isa/csr/H/mtinst.yaml +1 -1
  22. data/.data/spec/std/isa/csr/I/pmpaddr0.yaml +6 -4
  23. data/.data/spec/std/isa/csr/I/pmpaddr1.yaml +6 -4
  24. data/.data/spec/std/isa/csr/I/pmpaddr10.yaml +6 -4
  25. data/.data/spec/std/isa/csr/I/pmpaddr11.yaml +6 -4
  26. data/.data/spec/std/isa/csr/I/pmpaddr12.yaml +6 -4
  27. data/.data/spec/std/isa/csr/I/pmpaddr13.yaml +6 -4
  28. data/.data/spec/std/isa/csr/I/pmpaddr14.yaml +6 -4
  29. data/.data/spec/std/isa/csr/I/pmpaddr15.yaml +6 -4
  30. data/.data/spec/std/isa/csr/I/pmpaddr16.yaml +6 -4
  31. data/.data/spec/std/isa/csr/I/pmpaddr17.yaml +6 -4
  32. data/.data/spec/std/isa/csr/I/pmpaddr18.yaml +6 -4
  33. data/.data/spec/std/isa/csr/I/pmpaddr19.yaml +6 -4
  34. data/.data/spec/std/isa/csr/I/pmpaddr2.yaml +6 -4
  35. data/.data/spec/std/isa/csr/I/pmpaddr20.yaml +6 -4
  36. data/.data/spec/std/isa/csr/I/pmpaddr21.yaml +6 -4
  37. data/.data/spec/std/isa/csr/I/pmpaddr22.yaml +6 -4
  38. data/.data/spec/std/isa/csr/I/pmpaddr23.yaml +6 -4
  39. data/.data/spec/std/isa/csr/I/pmpaddr24.yaml +6 -4
  40. data/.data/spec/std/isa/csr/I/pmpaddr25.yaml +6 -4
  41. data/.data/spec/std/isa/csr/I/pmpaddr26.yaml +6 -4
  42. data/.data/spec/std/isa/csr/I/pmpaddr27.yaml +6 -4
  43. data/.data/spec/std/isa/csr/I/pmpaddr28.yaml +6 -4
  44. data/.data/spec/std/isa/csr/I/pmpaddr29.yaml +6 -4
  45. data/.data/spec/std/isa/csr/I/pmpaddr3.yaml +6 -4
  46. data/.data/spec/std/isa/csr/I/pmpaddr30.yaml +6 -4
  47. data/.data/spec/std/isa/csr/I/pmpaddr31.yaml +6 -4
  48. data/.data/spec/std/isa/csr/I/pmpaddr32.yaml +6 -4
  49. data/.data/spec/std/isa/csr/I/pmpaddr33.yaml +6 -4
  50. data/.data/spec/std/isa/csr/I/pmpaddr34.yaml +6 -4
  51. data/.data/spec/std/isa/csr/I/pmpaddr35.yaml +6 -4
  52. data/.data/spec/std/isa/csr/I/pmpaddr36.yaml +6 -4
  53. data/.data/spec/std/isa/csr/I/pmpaddr37.yaml +6 -4
  54. data/.data/spec/std/isa/csr/I/pmpaddr38.yaml +6 -4
  55. data/.data/spec/std/isa/csr/I/pmpaddr39.yaml +6 -4
  56. data/.data/spec/std/isa/csr/I/pmpaddr4.yaml +6 -4
  57. data/.data/spec/std/isa/csr/I/pmpaddr40.yaml +6 -4
  58. data/.data/spec/std/isa/csr/I/pmpaddr41.yaml +6 -4
  59. data/.data/spec/std/isa/csr/I/pmpaddr42.yaml +6 -4
  60. data/.data/spec/std/isa/csr/I/pmpaddr43.yaml +6 -4
  61. data/.data/spec/std/isa/csr/I/pmpaddr44.yaml +6 -4
  62. data/.data/spec/std/isa/csr/I/pmpaddr45.yaml +6 -4
  63. data/.data/spec/std/isa/csr/I/pmpaddr46.yaml +6 -4
  64. data/.data/spec/std/isa/csr/I/pmpaddr47.yaml +6 -4
  65. data/.data/spec/std/isa/csr/I/pmpaddr48.yaml +6 -4
  66. data/.data/spec/std/isa/csr/I/pmpaddr49.yaml +6 -4
  67. data/.data/spec/std/isa/csr/I/pmpaddr5.yaml +6 -4
  68. data/.data/spec/std/isa/csr/I/pmpaddr50.yaml +6 -4
  69. data/.data/spec/std/isa/csr/I/pmpaddr51.yaml +6 -4
  70. data/.data/spec/std/isa/csr/I/pmpaddr52.yaml +6 -4
  71. data/.data/spec/std/isa/csr/I/pmpaddr53.yaml +6 -4
  72. data/.data/spec/std/isa/csr/I/pmpaddr54.yaml +6 -4
  73. data/.data/spec/std/isa/csr/I/pmpaddr55.yaml +6 -4
  74. data/.data/spec/std/isa/csr/I/pmpaddr56.yaml +6 -4
  75. data/.data/spec/std/isa/csr/I/pmpaddr57.yaml +6 -4
  76. data/.data/spec/std/isa/csr/I/pmpaddr58.yaml +6 -4
  77. data/.data/spec/std/isa/csr/I/pmpaddr59.yaml +6 -4
  78. data/.data/spec/std/isa/csr/I/pmpaddr6.yaml +6 -4
  79. data/.data/spec/std/isa/csr/I/pmpaddr60.yaml +6 -4
  80. data/.data/spec/std/isa/csr/I/pmpaddr61.yaml +6 -4
  81. data/.data/spec/std/isa/csr/I/pmpaddr62.yaml +6 -4
  82. data/.data/spec/std/isa/csr/I/pmpaddr63.yaml +6 -4
  83. data/.data/spec/std/isa/csr/I/pmpaddr7.yaml +6 -4
  84. data/.data/spec/std/isa/csr/I/pmpaddr8.yaml +6 -4
  85. data/.data/spec/std/isa/csr/I/pmpaddr9.yaml +6 -4
  86. data/.data/spec/std/isa/csr/I/pmpaddrN.layout +6 -4
  87. data/.data/spec/std/isa/csr/I/pmpcfg0.yaml +120 -144
  88. data/.data/spec/std/isa/csr/I/pmpcfg1.yaml +60 -72
  89. data/.data/spec/std/isa/csr/I/pmpcfg10.yaml +120 -144
  90. data/.data/spec/std/isa/csr/I/pmpcfg11.yaml +60 -72
  91. data/.data/spec/std/isa/csr/I/pmpcfg12.yaml +120 -144
  92. data/.data/spec/std/isa/csr/I/pmpcfg13.yaml +60 -72
  93. data/.data/spec/std/isa/csr/I/pmpcfg14.yaml +120 -144
  94. data/.data/spec/std/isa/csr/I/pmpcfg15.yaml +60 -72
  95. data/.data/spec/std/isa/csr/I/pmpcfg2.yaml +120 -144
  96. data/.data/spec/std/isa/csr/I/pmpcfg3.yaml +60 -72
  97. data/.data/spec/std/isa/csr/I/pmpcfg4.yaml +120 -144
  98. data/.data/spec/std/isa/csr/I/pmpcfg5.yaml +60 -72
  99. data/.data/spec/std/isa/csr/I/pmpcfg6.yaml +120 -144
  100. data/.data/spec/std/isa/csr/I/pmpcfg7.yaml +60 -72
  101. data/.data/spec/std/isa/csr/I/pmpcfg8.yaml +120 -144
  102. data/.data/spec/std/isa/csr/I/pmpcfg9.yaml +60 -72
  103. data/.data/spec/std/isa/csr/I/pmpcfgN.layout +15 -18
  104. data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfg.yaml +1 -1
  105. data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfgh.yaml +1 -1
  106. data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfg.yaml +1 -1
  107. data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfgh.yaml +1 -1
  108. data/.data/spec/std/isa/csr/Sscofpmf/scountovf.layout +1 -1
  109. data/.data/spec/std/isa/csr/Sscofpmf/scountovf.yaml +29 -29
  110. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10.yaml +4 -4
  111. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10h.yaml +1 -1
  112. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11.yaml +4 -4
  113. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11h.yaml +1 -1
  114. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12.yaml +4 -4
  115. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12h.yaml +1 -1
  116. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13.yaml +4 -4
  117. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13h.yaml +1 -1
  118. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14.yaml +4 -4
  119. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14h.yaml +1 -1
  120. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15.yaml +4 -4
  121. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15h.yaml +1 -1
  122. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16.yaml +4 -4
  123. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16h.yaml +1 -1
  124. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17.yaml +4 -4
  125. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17h.yaml +1 -1
  126. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18.yaml +4 -4
  127. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18h.yaml +1 -1
  128. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19.yaml +4 -4
  129. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19h.yaml +1 -1
  130. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20.yaml +4 -4
  131. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20h.yaml +1 -1
  132. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21.yaml +4 -4
  133. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21h.yaml +1 -1
  134. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22.yaml +4 -4
  135. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22h.yaml +1 -1
  136. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23.yaml +4 -4
  137. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23h.yaml +1 -1
  138. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24.yaml +4 -4
  139. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24h.yaml +1 -1
  140. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25.yaml +4 -4
  141. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25h.yaml +1 -1
  142. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26.yaml +4 -4
  143. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26h.yaml +1 -1
  144. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27.yaml +4 -4
  145. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27h.yaml +1 -1
  146. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28.yaml +4 -4
  147. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28h.yaml +1 -1
  148. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29.yaml +4 -4
  149. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29h.yaml +1 -1
  150. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3.yaml +4 -4
  151. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30.yaml +4 -4
  152. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30h.yaml +1 -1
  153. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31.yaml +4 -4
  154. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31h.yaml +1 -1
  155. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3h.yaml +1 -1
  156. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4.yaml +4 -4
  157. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4h.yaml +1 -1
  158. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5.yaml +4 -4
  159. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5h.yaml +1 -1
  160. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6.yaml +4 -4
  161. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6h.yaml +1 -1
  162. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7.yaml +4 -4
  163. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7h.yaml +1 -1
  164. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8.yaml +4 -4
  165. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8h.yaml +1 -1
  166. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9.yaml +4 -4
  167. data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9h.yaml +1 -1
  168. data/.data/spec/std/isa/csr/Zihpm/mhpmcounterN.layout +4 -4
  169. data/.data/spec/std/isa/csr/Zihpm/mhpmcounterNh.layout +1 -1
  170. data/.data/spec/std/isa/csr/hstatus.yaml +1 -1
  171. data/.data/spec/std/isa/csr/jvt.yaml +1 -0
  172. data/.data/spec/std/isa/csr/mcycle.yaml +6 -6
  173. data/.data/spec/std/isa/csr/menvcfg.yaml +20 -0
  174. data/.data/spec/std/isa/csr/minstret.yaml +3 -3
  175. data/.data/spec/std/isa/csr/minstreth.yaml +1 -1
  176. data/.data/spec/std/isa/csr/mstatus.yaml +21 -25
  177. data/.data/spec/std/isa/csr/mtvec.yaml +16 -57
  178. data/.data/spec/std/isa/csr/senvcfg.yaml +26 -0
  179. data/.data/spec/std/isa/csr/sie.yaml +30 -4
  180. data/.data/spec/std/isa/csr/sip.yaml +16 -2
  181. data/.data/spec/std/isa/csr/stvec.yaml +11 -12
  182. data/.data/spec/std/isa/csr/vstval.yaml +1 -1
  183. data/.data/spec/std/isa/csr/vstvec.yaml +14 -15
  184. data/.data/spec/std/isa/ext/Q.yaml +1 -1
  185. data/.data/spec/std/isa/ext/Shlcofideleg.yaml +24 -0
  186. data/.data/spec/std/isa/ext/Shvstvecd.yaml +2 -2
  187. data/.data/spec/std/isa/ext/Sspm.yaml +5 -0
  188. data/.data/spec/std/isa/ext/Sstvecd.yaml +2 -2
  189. data/.data/spec/std/isa/ext/Sstvecv.yaml +2 -2
  190. data/.data/spec/std/isa/ext/Supm.yaml +17 -0
  191. data/.data/spec/std/isa/ext/Zcb.yaml +3 -0
  192. data/.data/spec/std/isa/ext/Zfbfmin.yaml +3 -5
  193. data/.data/spec/std/isa/ext/Ziccid.yaml +29 -0
  194. data/.data/spec/std/isa/ext/Zicfilp.yaml +5 -1
  195. data/.data/spec/std/isa/ext/Zicfiss.yaml +20 -1
  196. data/.data/spec/std/isa/ext/Zihpm.yaml +3 -0
  197. data/.data/spec/std/isa/ext/Zilx.yaml +58 -0
  198. data/.data/spec/std/isa/ext/Zkt.yaml +33 -1
  199. data/.data/spec/std/isa/ext/Zvabd.yaml +21 -0
  200. data/.data/spec/std/isa/ext/Zvbc.yaml +3 -0
  201. data/.data/spec/std/isa/ext/Zvkb.yaml +3 -0
  202. data/.data/spec/std/isa/ext/Zvkg.yaml +3 -0
  203. data/.data/spec/std/isa/ext/Zvkned.yaml +3 -0
  204. data/.data/spec/std/isa/ext/Zvknha.yaml +3 -0
  205. data/.data/spec/std/isa/ext/Zvknhb.yaml +4 -2
  206. data/.data/spec/std/isa/ext/Zvksed.yaml +3 -0
  207. data/.data/spec/std/isa/ext/Zvksh.yaml +3 -0
  208. data/.data/spec/std/isa/ext/Zvkt.yaml +3 -0
  209. data/.data/spec/std/isa/inst/B/andn.yaml +10 -12
  210. data/.data/spec/std/isa/inst/B/clmul.yaml +9 -11
  211. data/.data/spec/std/isa/inst/B/clmulh.yaml +9 -11
  212. data/.data/spec/std/isa/inst/B/orn.yaml +9 -11
  213. data/.data/spec/std/isa/inst/B/rev8.yaml +1 -1
  214. data/.data/spec/std/isa/inst/B/rol.yaml +9 -11
  215. data/.data/spec/std/isa/inst/B/rolw.yaml +9 -11
  216. data/.data/spec/std/isa/inst/B/ror.yaml +9 -11
  217. data/.data/spec/std/isa/inst/B/rorw.yaml +9 -11
  218. data/.data/spec/std/isa/inst/B/xnor.yaml +9 -11
  219. data/.data/spec/std/isa/inst/C/c.add.yaml +1 -0
  220. data/.data/spec/std/isa/inst/C/c.addi.yaml +1 -0
  221. data/.data/spec/std/isa/inst/C/c.addiw.yaml +1 -0
  222. data/.data/spec/std/isa/inst/C/c.addw.yaml +1 -0
  223. data/.data/spec/std/isa/inst/C/c.and.yaml +1 -0
  224. data/.data/spec/std/isa/inst/C/c.andi.yaml +1 -0
  225. data/.data/spec/std/isa/inst/C/c.ldsp.yaml +3 -3
  226. data/.data/spec/std/isa/inst/C/c.lui.yaml +1 -0
  227. data/.data/spec/std/isa/inst/C/c.mv.yaml +1 -0
  228. data/.data/spec/std/isa/inst/C/c.nop.yaml +13 -2
  229. data/.data/spec/std/isa/inst/C/c.or.yaml +1 -0
  230. data/.data/spec/std/isa/inst/C/c.slli.yaml +1 -0
  231. data/.data/spec/std/isa/inst/C/c.srai.yaml +1 -0
  232. data/.data/spec/std/isa/inst/C/c.srli.yaml +1 -0
  233. data/.data/spec/std/isa/inst/C/c.sub.yaml +1 -0
  234. data/.data/spec/std/isa/inst/C/c.subw.yaml +1 -0
  235. data/.data/spec/std/isa/inst/C/c.xor.yaml +1 -0
  236. data/.data/spec/std/isa/inst/D/fld.yaml +1 -0
  237. data/.data/spec/std/isa/inst/D/fsd.yaml +1 -0
  238. data/.data/spec/std/isa/inst/F/fadd.s.yaml +1 -1
  239. data/.data/spec/std/isa/inst/F/fcvt.l.s.yaml +1 -1
  240. data/.data/spec/std/isa/inst/F/fcvt.lu.s.yaml +1 -1
  241. data/.data/spec/std/isa/inst/F/fcvt.s.l.yaml +1 -1
  242. data/.data/spec/std/isa/inst/F/fcvt.s.lu.yaml +1 -1
  243. data/.data/spec/std/isa/inst/F/fcvt.s.wu.yaml +1 -1
  244. data/.data/spec/std/isa/inst/F/fcvt.w.s.yaml +1 -1
  245. data/.data/spec/std/isa/inst/F/fcvt.wu.s.yaml +1 -1
  246. data/.data/spec/std/isa/inst/F/fdiv.s.yaml +1 -1
  247. data/.data/spec/std/isa/inst/F/feq.s.yaml +1 -1
  248. data/.data/spec/std/isa/inst/F/fle.s.yaml +1 -1
  249. data/.data/spec/std/isa/inst/F/fleq.s.yaml +1 -1
  250. data/.data/spec/std/isa/inst/F/flt.s.yaml +1 -1
  251. data/.data/spec/std/isa/inst/F/fltq.s.yaml +1 -1
  252. data/.data/spec/std/isa/inst/F/flw.yaml +2 -1
  253. data/.data/spec/std/isa/inst/F/fmadd.s.yaml +1 -1
  254. data/.data/spec/std/isa/inst/F/fmax.s.yaml +1 -1
  255. data/.data/spec/std/isa/inst/F/fmin.s.yaml +1 -1
  256. data/.data/spec/std/isa/inst/F/fmsub.s.yaml +1 -1
  257. data/.data/spec/std/isa/inst/F/fmul.s.yaml +1 -1
  258. data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +1 -1
  259. data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +1 -1
  260. data/.data/spec/std/isa/inst/F/fnmadd.s.yaml +1 -1
  261. data/.data/spec/std/isa/inst/F/fnmsub.s.yaml +1 -1
  262. data/.data/spec/std/isa/inst/F/fsgnj.s.yaml +1 -1
  263. data/.data/spec/std/isa/inst/F/fsgnjn.s.yaml +1 -1
  264. data/.data/spec/std/isa/inst/F/fsgnjx.s.yaml +1 -1
  265. data/.data/spec/std/isa/inst/F/fsqrt.s.yaml +1 -1
  266. data/.data/spec/std/isa/inst/F/fsub.s.yaml +1 -1
  267. data/.data/spec/std/isa/inst/F/fsw.yaml +2 -1
  268. data/.data/spec/std/isa/inst/I/addi.yaml +1 -0
  269. data/.data/spec/std/isa/inst/I/addiw.yaml +1 -0
  270. data/.data/spec/std/isa/inst/I/andi.yaml +1 -0
  271. data/.data/spec/std/isa/inst/I/auipc.yaml +1 -0
  272. data/.data/spec/std/isa/inst/I/lb.yaml +1 -0
  273. data/.data/spec/std/isa/inst/I/lbu.yaml +1 -0
  274. data/.data/spec/std/isa/inst/I/ld.yaml +2 -0
  275. data/.data/spec/std/isa/inst/I/lh.yaml +1 -0
  276. data/.data/spec/std/isa/inst/I/lhu.yaml +1 -0
  277. data/.data/spec/std/isa/inst/I/lui.yaml +1 -0
  278. data/.data/spec/std/isa/inst/I/lw.yaml +1 -0
  279. data/.data/spec/std/isa/inst/I/lwu.yaml +1 -0
  280. data/.data/spec/std/isa/inst/I/ori.yaml +1 -0
  281. data/.data/spec/std/isa/inst/I/sb.yaml +1 -0
  282. data/.data/spec/std/isa/inst/I/sd.yaml +2 -1
  283. data/.data/spec/std/isa/inst/I/sh.yaml +1 -0
  284. data/.data/spec/std/isa/inst/I/slti.yaml +1 -0
  285. data/.data/spec/std/isa/inst/I/sltiu.yaml +1 -0
  286. data/.data/spec/std/isa/inst/I/sw.yaml +1 -0
  287. data/.data/spec/std/isa/inst/I/xori.yaml +1 -0
  288. data/.data/spec/std/isa/inst/Q/fadd.q.yaml +2 -2
  289. data/.data/spec/std/isa/inst/Q/fclass.q.yaml +5 -5
  290. data/.data/spec/std/isa/inst/Q/fleq.q.yaml +0 -1
  291. data/.data/spec/std/isa/inst/Q/fli.q.yaml +1 -1
  292. data/.data/spec/std/isa/inst/Q/flq.yaml +1 -0
  293. data/.data/spec/std/isa/inst/Q/fltq.q.yaml +0 -1
  294. data/.data/spec/std/isa/inst/Q/fmaxm.q.yaml +0 -1
  295. data/.data/spec/std/isa/inst/Q/fminm.q.yaml +0 -1
  296. data/.data/spec/std/isa/inst/Q/fmvp.q.x.yaml +1 -1
  297. data/.data/spec/std/isa/inst/Q/fsq.yaml +1 -0
  298. data/.data/spec/std/isa/inst/V/vadc.vim.yaml +1 -0
  299. data/.data/spec/std/isa/inst/V/vadd.vi.yaml +1 -0
  300. data/.data/spec/std/isa/inst/V/vand.vi.yaml +1 -0
  301. data/.data/spec/std/isa/inst/V/vle8.v.yaml +1 -0
  302. data/.data/spec/std/isa/inst/V/vmadc.vi.yaml +1 -0
  303. data/.data/spec/std/isa/inst/V/vmadc.vim.yaml +1 -0
  304. data/.data/spec/std/isa/inst/V/vmerge.vim.yaml +1 -0
  305. data/.data/spec/std/isa/inst/V/vmseq.vi.yaml +1 -0
  306. data/.data/spec/std/isa/inst/V/vmsgt.vi.yaml +1 -0
  307. data/.data/spec/std/isa/inst/V/vmsgtu.vi.yaml +1 -0
  308. data/.data/spec/std/isa/inst/V/vmsle.vi.yaml +1 -0
  309. data/.data/spec/std/isa/inst/V/vmsleu.vi.yaml +1 -0
  310. data/.data/spec/std/isa/inst/V/vmsne.vi.yaml +1 -0
  311. data/.data/spec/std/isa/inst/V/vmv.v.i.yaml +1 -0
  312. data/.data/spec/std/isa/inst/V/vor.vi.yaml +1 -0
  313. data/.data/spec/std/isa/inst/V/vrsub.vi.yaml +1 -0
  314. data/.data/spec/std/isa/inst/V/vsadd.vi.yaml +1 -0
  315. data/.data/spec/std/isa/inst/V/vsaddu.vi.yaml +1 -0
  316. data/.data/spec/std/isa/inst/V/vse8.v.yaml +1 -0
  317. data/.data/spec/std/isa/inst/Zawrs/wrs.nto.yaml +4 -2
  318. data/.data/spec/std/isa/inst/Zba/add.uw.yaml +9 -11
  319. data/.data/spec/std/isa/inst/Zbb/orc.b.yaml +1 -1
  320. data/.data/spec/std/isa/inst/Zbkb/brev8.yaml +3 -3
  321. data/.data/spec/std/isa/inst/Zbkb/unzip.yaml +2 -2
  322. data/.data/spec/std/isa/inst/Zbkb/zip.yaml +2 -2
  323. data/.data/spec/std/isa/inst/Zbkx/xperm4.yaml +2 -2
  324. data/.data/spec/std/isa/inst/Zbkx/xperm8.yaml +2 -2
  325. data/.data/spec/std/isa/inst/Zcb/c.mul.yaml +1 -0
  326. data/.data/spec/std/isa/inst/Zcb/c.not.yaml +1 -0
  327. data/.data/spec/std/isa/inst/Zcb/c.zext.b.yaml +2 -7
  328. data/.data/spec/std/isa/inst/Zcb/c.zext.w.yaml +1 -1
  329. data/.data/spec/std/isa/inst/Zcmop/c.mop.1.yaml +2 -0
  330. data/.data/spec/std/isa/inst/Zcmop/c.mop.5.yaml +2 -0
  331. data/.data/spec/std/isa/inst/Zcmop/c.mop.N.layout +7 -0
  332. data/.data/spec/std/isa/inst/Zfa/fli.s.yaml +1 -1
  333. data/.data/spec/std/isa/inst/Zfa/fmaxm.s.yaml +1 -1
  334. data/.data/spec/std/isa/inst/Zfa/fminm.s.yaml +1 -1
  335. data/.data/spec/std/isa/inst/Zfa/fround.s.yaml +1 -1
  336. data/.data/spec/std/isa/inst/Zfa/froundnx.s.yaml +1 -1
  337. data/.data/spec/std/isa/inst/Zfh/flh.yaml +5 -2
  338. data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +3 -1
  339. data/.data/spec/std/isa/inst/Zfh/fmv.x.h.yaml +3 -1
  340. data/.data/spec/std/isa/inst/Zfh/fsh.yaml +4 -1
  341. data/.data/spec/std/isa/inst/Zicbop/prefetch.i.yaml +2 -0
  342. data/.data/spec/std/isa/inst/Zicbop/prefetch.r.yaml +2 -0
  343. data/.data/spec/std/isa/inst/Zicbop/prefetch.w.yaml +2 -0
  344. data/.data/spec/std/isa/inst/Zicfiss/c.sspopchk.yaml +30 -0
  345. data/.data/spec/std/isa/inst/Zicfiss/c.sspush.yaml +29 -0
  346. data/.data/spec/std/isa/inst/Zicond/czero.eqz.yaml +1 -1
  347. data/.data/spec/std/isa/inst/Zicond/czero.nez.yaml +1 -1
  348. data/.data/spec/std/isa/inst/Zicsr/csrrw.yaml +12 -0
  349. data/.data/spec/std/isa/inst/Zilx/lxd.yaml +38 -0
  350. data/.data/spec/std/isa/inst/Zilx/lxh.yaml +35 -0
  351. data/.data/spec/std/isa/inst/Zilx/lxhu.yaml +35 -0
  352. data/.data/spec/std/isa/inst/Zilx/lxsb.yaml +40 -0
  353. data/.data/spec/std/isa/inst/Zilx/lxsbu.yaml +40 -0
  354. data/.data/spec/std/isa/inst/Zilx/lxsd.yaml +38 -0
  355. data/.data/spec/std/isa/inst/Zilx/lxsh.yaml +35 -0
  356. data/.data/spec/std/isa/inst/Zilx/lxshu.yaml +35 -0
  357. data/.data/spec/std/isa/inst/Zilx/lxsuwb.yaml +40 -0
  358. data/.data/spec/std/isa/inst/Zilx/lxsuwbu.yaml +40 -0
  359. data/.data/spec/std/isa/inst/Zilx/lxsuwd.yaml +39 -0
  360. data/.data/spec/std/isa/inst/Zilx/lxsuwh.yaml +40 -0
  361. data/.data/spec/std/isa/inst/Zilx/lxsuwhu.yaml +40 -0
  362. data/.data/spec/std/isa/inst/Zilx/lxsuww.yaml +40 -0
  363. data/.data/spec/std/isa/inst/Zilx/lxsuwwu.yaml +40 -0
  364. data/.data/spec/std/isa/inst/Zilx/lxsw.yaml +35 -0
  365. data/.data/spec/std/isa/inst/Zilx/lxswu.yaml +39 -0
  366. data/.data/spec/std/isa/inst/Zilx/lxw.yaml +35 -0
  367. data/.data/spec/std/isa/inst/Zilx/lxwu.yaml +39 -0
  368. data/.data/spec/std/isa/inst/Zks/sm3p0.yaml +1 -1
  369. data/.data/spec/std/isa/inst/Zks/sm3p1.yaml +1 -1
  370. data/.data/spec/std/isa/inst/Zks/sm4ed.yaml +1 -1
  371. data/.data/spec/std/isa/inst/Zks/sm4ks.yaml +1 -1
  372. data/.data/spec/std/isa/inst/Zvabd/vabd.vv.yaml +67 -0
  373. data/.data/spec/std/isa/inst/Zvabd/vabdu.vv.yaml +67 -0
  374. data/.data/spec/std/isa/inst/Zvabd/vabs.v.yaml +61 -0
  375. data/.data/spec/std/isa/inst/Zvabd/vwabda.vv.yaml +72 -0
  376. data/.data/spec/std/isa/inst/Zvabd/vwabdau.vv.yaml +72 -0
  377. data/.data/spec/std/isa/isa/builtin_functions.idl +1 -0
  378. data/.data/spec/std/isa/isa/fp.idl +42 -18
  379. data/.data/spec/std/isa/isa/globals.isa +27 -7
  380. data/.data/spec/std/isa/isa/interrupts.idl +1 -0
  381. data/.data/spec/std/isa/param/CACHE_BLOCK_SIZE.yaml +70 -6
  382. data/.data/spec/std/isa/param/ELEN.yaml +27 -5
  383. data/.data/spec/std/isa/param/HCOUNTENABLE_EN.yaml +13 -0
  384. data/.data/spec/std/isa/param/HPM_COUNTER_EN.yaml +13 -3
  385. data/.data/spec/std/isa/param/HPM_EVENTS.yaml +0 -3
  386. data/.data/spec/std/isa/param/HSTATEEN_CONTEXT_TYPE.yaml +1 -0
  387. data/.data/spec/std/isa/param/MCOUNTENABLE_EN.yaml +8 -0
  388. data/.data/spec/std/isa/param/MSTATEEN_CONTEXT_TYPE.yaml +1 -0
  389. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_DIRECT.yaml +71 -64
  390. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_VECTORED.yaml +71 -64
  391. data/.data/spec/std/isa/param/NUM_PMP_ENTRIES.yaml +11 -22
  392. data/.data/spec/std/isa/param/NUM_USABLE_PMP_ENTRIES.yaml +35 -0
  393. data/.data/spec/std/isa/param/PMP_NA4_SUPPORTED.yaml +23 -0
  394. data/.data/spec/std/isa/param/{STVEC_MODE_VECTORED.yaml → PMP_NAPOT_SUPPORTED.yaml} +9 -9
  395. data/.data/spec/std/isa/param/{MSTATUS_TVM_IMPLEMENTED.yaml → PMP_TOR_SUPPORTED.yaml} +6 -6
  396. data/.data/spec/std/isa/param/PRECISE_SYNCHRONOUS_EXCEPTIONS.yaml +1 -0
  397. data/.data/spec/std/isa/param/STVAL_WIDTH.yaml +3 -2
  398. data/.data/spec/std/isa/param/STVEC_BASE_ALIGNMENT_VECTORED.yaml +100 -0
  399. data/.data/spec/std/isa/param/STVEC_MODES.yaml +31 -0
  400. data/.data/spec/std/isa/param/SV32_VSMODE_TRANSLATION.yaml +1 -1
  401. data/.data/spec/std/isa/param/SXLEN.yaml +2 -2
  402. data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT.yaml +1 -1
  403. data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT.yaml +1 -1
  404. data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT.yaml +1 -1
  405. data/.data/spec/std/isa/param/TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED.yaml +1 -1
  406. data/.data/spec/std/isa/param/TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED.yaml +1 -1
  407. data/.data/spec/std/isa/param/TRAP_ON_EBREAK.yaml +1 -0
  408. data/.data/spec/std/isa/param/TRAP_ON_ECALL_FROM_M.yaml +1 -0
  409. data/.data/spec/std/isa/param/TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY.yaml +1 -0
  410. data/.data/spec/std/isa/param/UXLEN.yaml +1 -1
  411. data/.data/spec/std/isa/param/VLEN.yaml +16 -7
  412. data/.data/spec/std/isa/param/VSTVEC_MODES.yaml +31 -0
  413. data/.data/spec/std/isa/param/ZAWRS_NTO_IS_NOP.yaml +19 -0
  414. data/lib/udb/ESPRESSO_VERSION +1 -1
  415. data/lib/udb/Z3_VERSION +1 -1
  416. data/lib/udb/config.rb +14 -2
  417. data/lib/udb/doc_link.rb +3 -4
  418. data/lib/udb/obj/csr.rb +1 -1
  419. data/lib/udb/obj/csr_field.rb +1 -1
  420. data/lib/udb/obj/extension.rb +1 -1
  421. data/lib/udb/obj/instruction.rb +1 -1
  422. data/lib/udb/obj/non_isa_specification.rb +22 -100
  423. data/lib/udb/version.rb +1 -1
  424. data/lib/udb/version_spec.rb +1 -1
  425. data/lib/udb/z3.rb +31 -9
  426. metadata +42 -9
  427. data/.data/spec/std/isa/param/STVEC_MODE_DIRECT.yaml +0 -21
  428. data/.data/spec/std/isa/param/VSTVEC_MODE_DIRECT.yaml +0 -21
  429. data/.data/spec/std/isa/param/VSTVEC_MODE_VECTORED.yaml +0 -21
@@ -0,0 +1,61 @@
1
+ # Copyright (c) Alibaba Damo Academy
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: vabs.v
9
+ long_name: Vector Single-Width Signed Integer Absolute
10
+ description: |
11
+ An absolute value operation is performed on each element of vs2, storing the
12
+ result in vector register vd according to mask vm.
13
+
14
+ vabs.v supports SEW of 8, 16, and 32 when Zve32x is implemented.
15
+ When Zve64x is implemented, vabs.v also supports SEW of 64.
16
+ definedBy:
17
+ extension:
18
+ name: Zvabd
19
+ assembly: vd, vs2, vm
20
+ encoding:
21
+ match: 010010------10000010-----1010111
22
+ variables:
23
+ - name: vm
24
+ location: 25
25
+ - name: vs2
26
+ location: 24-20
27
+ - name: vd
28
+ location: 11-7
29
+ access:
30
+ s: always
31
+ u: always
32
+ vs: always
33
+ vu: always
34
+ operation(): |
35
+ VectorState state = vector_state();
36
+ VectorLmulType lmul_type = state.lmul_type;
37
+
38
+ XReg vlen = VLEN;
39
+ XReg vlmax;
40
+ if (lmul_type == VectorLmulType::Multiply) {
41
+ vlmax = (vlen << state.log2_lmul) >> state.log2_sew;
42
+ } else {
43
+ vlmax = (vlen >> state.log2_lmul) >> state.log2_sew;
44
+ }
45
+
46
+ for (U32 i = CSR[vstart].VALUE; i < CSR[vl].VALUE; i++) {
47
+ U32 start_bit_pos = i * state.sew;
48
+ U32 end_bit_pos = start_bit_pos + state.sew - 1;
49
+ if (vm == 1'b1 || V[0][i:i] == 1'b1) {
50
+ # active element
51
+ if (V[vs2][end_bit_pos:end_bit_pos] == 1'b1) {
52
+ V[vd][end_bit_pos:start_bit_pos] = -$signed(V[vs2][end_bit_pos:start_bit_pos]);
53
+ } else {
54
+ V[vd][end_bit_pos:start_bit_pos] = V[vs2][end_bit_pos:start_bit_pos];
55
+ }
56
+ }
57
+ # inactive element: handled according to vtype.VMA policy
58
+ }
59
+ # tail elements (i >= vl): handled according to vtype.VTA policy
60
+
61
+ CSR[vstart].VALUE = 0;
@@ -0,0 +1,72 @@
1
+ # Copyright (c) Alibaba Damo Academy
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: vwabda.vv
9
+ long_name: Vector Widening Signed Integer Absolute Difference and Accumulate, Overwrite Addend
10
+ description: |
11
+ Computes the element-wise absolute difference of two signed integer SEW-bit
12
+ source operands vs1 and vs2, and accumulates the results into the elements of
13
+ a 2*SEW-bit operand vd.
14
+
15
+ Reserved when SEW is neither 8 nor 16.
16
+ definedBy:
17
+ extension:
18
+ name: Zvabd
19
+ assembly: vd, vs2, vs1, vm
20
+ encoding:
21
+ match: 010101-----------010-----1010111
22
+ variables:
23
+ - name: vm
24
+ location: 25
25
+ - name: vs2
26
+ location: 24-20
27
+ - name: vs1
28
+ location: 19-15
29
+ - name: vd
30
+ location: 11-7
31
+ access:
32
+ s: always
33
+ u: always
34
+ vs: always
35
+ vu: always
36
+ operation(): |
37
+ VectorState state = vector_state();
38
+
39
+ if (state.sew != 8 && state.sew != 16) {
40
+ raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
41
+ }
42
+
43
+ VectorLmulType lmul_type = state.lmul_type;
44
+
45
+ XReg vlen = VLEN;
46
+ XReg vlmax;
47
+ if (lmul_type == VectorLmulType::Multiply) {
48
+ vlmax = (vlen << state.log2_lmul) >> state.log2_sew;
49
+ } else {
50
+ vlmax = (vlen >> state.log2_lmul) >> state.log2_sew;
51
+ }
52
+
53
+ U32 sew2 = state.sew + state.sew;
54
+
55
+ for (U32 i = CSR[vstart].VALUE; i < CSR[vl].VALUE; i++) {
56
+ U32 src_start = i * state.sew;
57
+ U32 src_end = src_start + state.sew - 1;
58
+ U32 dst_start = i * sew2;
59
+ U32 dst_end = dst_start + sew2 - 1;
60
+ if (vm == 1'b1 || V[0][i:i] == 1'b1) {
61
+ # active element
62
+ if ($signed(V[vs2][src_end:src_start]) >= $signed(V[vs1][src_end:src_start])) {
63
+ V[vd][dst_end:dst_start] = V[vd][dst_end:dst_start] + (V[vs2][src_end:src_start] - V[vs1][src_end:src_start]);
64
+ } else {
65
+ V[vd][dst_end:dst_start] = V[vd][dst_end:dst_start] + (V[vs1][src_end:src_start] - V[vs2][src_end:src_start]);
66
+ }
67
+ }
68
+ # inactive element: handled according to vtype.VMA policy
69
+ }
70
+ # tail elements (i >= vl): handled according to vtype.VTA policy
71
+
72
+ CSR[vstart].VALUE = 0;
@@ -0,0 +1,72 @@
1
+ # Copyright (c) Alibaba Damo Academy
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: vwabdau.vv
9
+ long_name: Vector Widening Unsigned Integer Absolute Difference and Accumulate, Overwrite Addend
10
+ description: |
11
+ Computes the element-wise absolute difference of two unsigned integer SEW-bit
12
+ source operands vs1 and vs2, and accumulates the results into the elements of
13
+ a 2*SEW-bit operand vd.
14
+
15
+ Reserved when SEW is neither 8 nor 16.
16
+ definedBy:
17
+ extension:
18
+ name: Zvabd
19
+ assembly: vd, vs2, vs1, vm
20
+ encoding:
21
+ match: 010110-----------010-----1010111
22
+ variables:
23
+ - name: vm
24
+ location: 25
25
+ - name: vs2
26
+ location: 24-20
27
+ - name: vs1
28
+ location: 19-15
29
+ - name: vd
30
+ location: 11-7
31
+ access:
32
+ s: always
33
+ u: always
34
+ vs: always
35
+ vu: always
36
+ operation(): |
37
+ VectorState state = vector_state();
38
+
39
+ if (state.sew != 8 && state.sew != 16) {
40
+ raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
41
+ }
42
+
43
+ VectorLmulType lmul_type = state.lmul_type;
44
+
45
+ XReg vlen = VLEN;
46
+ XReg vlmax;
47
+ if (lmul_type == VectorLmulType::Multiply) {
48
+ vlmax = (vlen << state.log2_lmul) >> state.log2_sew;
49
+ } else {
50
+ vlmax = (vlen >> state.log2_lmul) >> state.log2_sew;
51
+ }
52
+
53
+ U32 sew2 = state.sew + state.sew;
54
+
55
+ for (U32 i = CSR[vstart].VALUE; i < CSR[vl].VALUE; i++) {
56
+ U32 src_start = i * state.sew;
57
+ U32 src_end = src_start + state.sew - 1;
58
+ U32 dst_start = i * sew2;
59
+ U32 dst_end = dst_start + sew2 - 1;
60
+ if (vm == 1'b1 || V[0][i:i] == 1'b1) {
61
+ # active element
62
+ if (V[vs2][src_end:src_start] >= V[vs1][src_end:src_start]) {
63
+ V[vd][dst_end:dst_start] = V[vd][dst_end:dst_start] + (V[vs2][src_end:src_start] - V[vs1][src_end:src_start]);
64
+ } else {
65
+ V[vd][dst_end:dst_start] = V[vd][dst_end:dst_start] + (V[vs1][src_end:src_start] - V[vs2][src_end:src_start]);
66
+ }
67
+ }
68
+ # inactive element: handled according to vtype.VMA policy
69
+ }
70
+ # tail elements (i >= vl): handled according to vtype.VTA policy
71
+
72
+ CSR[vstart].VALUE = 0;
@@ -439,6 +439,7 @@ function read_physical_memory {
439
439
  return read_physical_memory_64(paddr);
440
440
  } else {
441
441
  assert(false, "Invalid len");
442
+ return 0;
442
443
  }
443
444
  }
444
445
  }
@@ -405,6 +405,9 @@ function f32_muladd {
405
405
  Translated from Berkeley Softfloat softfloat_mulAddF32.
406
406
  }
407
407
  body {
408
+ if (is_sp_signaling_nan?(a) || is_sp_signaling_nan?(b) || is_sp_signaling_nan?(c)) {
409
+ set_fp_flag(FpFlag::NV);
410
+ }
408
411
  Bits<1> signA = signF32UI(a);
409
412
  Bits<16> expA = expF32UI(a);
410
413
  Bits<32> sigA = fracF32UI(a);
@@ -584,8 +587,11 @@ function f32_sqrt {
584
587
  Translated from Berkeley Softfloat f32_sqrt.
585
588
  }
586
589
  body {
590
+ if (is_sp_signaling_nan?(a)) {
591
+ set_fp_flag(FpFlag::NV);
592
+ }
587
593
  Bits<1> signA = signF32UI(a);
588
- Bits<8> expA = expF32UI(a);
594
+ Bits<16> expA = expF32UI(a);
589
595
  Bits<32> fracA = fracF32UI(a);
590
596
 
591
597
  if (expA == 8'hFF) {
@@ -606,7 +612,8 @@ function f32_sqrt {
606
612
  fracA = norm.sig;
607
613
  }
608
614
 
609
- Bits<16> expZ = ((expA - 16'h007F) >> 1) + 16'h007E;
615
+ Bits<16> adjExp = expA - 16'h007F;
616
+ Bits<16> expZ = ((adjExp >> 1) ^ (adjExp & 16'h8000)) + 16'h007E;
610
617
  Bits<1> oddExpA = expA[0];
611
618
  Bits<32> sigA32 = (fracA | 32'h00800000) << 8;
612
619
  Bits<32> sigZ = (sigA32 `* softfloat_approxRecipSqrt32_1(oddExpA, sigA32)) >> 32;
@@ -653,19 +660,22 @@ function softfloat_approxRecip32_1 {
653
660
  arguments
654
661
  Bits<32> a
655
662
  description {
656
- Returns a 32-bit approximation of 1/a, where a is in [1, 2).
657
- Translated from Berkeley Softfloat softfloat_approxRecip32_1.
663
+ Returns floor(0x7FFFFFFFFFFFFFFF / a), matching the platform-specific
664
+ Berkeley SoftFloat macro on 64-bit hosts. Computed via binary long division.
658
665
  }
659
666
  body {
660
- Bits<32> index = (a >> 27) & 0xF;
661
- Bits<16> eps = a >> 11;
662
- Bits<32> r0 = softfloat_approxRecip_1k0s[index]
663
- - ((softfloat_approxRecip_1k1s[index] `* eps) >> 20);
664
- Bits<32> sigma0 = ~((r0 `* a) >> 7);
665
- Bits<32> r = (r0 << 16) + ((r0 `* sigma0) >> 24);
666
- Bits<32> sqrSigma0 = (sigma0 `* sigma0) >> 32;
667
- r = r + ((r `* sqrSigma0) >> 48);
668
- return r;
667
+ Bits<64> a64 = {32'h0, a};
668
+ Bits<64> a_top = a64 << 31;
669
+ Bits<64> rem = 64'h7FFFFFFFFFFFFFFF;
670
+ Bits<32> q = 0;
671
+ for (U32 i = 0; i < 32; i++) {
672
+ Bits<64> d = a_top >> i;
673
+ if (rem >= d) {
674
+ q = q | (32'h1 << (31 - i));
675
+ rem = rem - d;
676
+ }
677
+ }
678
+ return q;
669
679
  }
670
680
  }
671
681
 
@@ -710,6 +720,9 @@ function f32_div {
710
720
  Translated from Berkeley Softfloat f32_div.
711
721
  }
712
722
  body {
723
+ if (is_sp_signaling_nan?(a) || is_sp_signaling_nan?(b)) {
724
+ set_fp_flag(FpFlag::NV);
725
+ }
713
726
  Bits<1> signA = signF32UI(a);
714
727
  Bits<16> expA = expF32UI(a);
715
728
  Bits<32> sigA = fracF32UI(a);
@@ -771,7 +784,7 @@ function f32_div {
771
784
  Bits<32> sigZ = (sigA `* recip32) >> 32;
772
785
  sigZ = sigZ + 2;
773
786
 
774
- if ((sigZ & 0x3F) < 2) {
787
+ if ((sigZ & 7) <= 2) {
775
788
  sigZ = sigZ & ~32'h3;
776
789
  Bits<64> rem = (sigA `<< 31) - (sigZ `* sigB);
777
790
  if ((rem & 64'h8000000000000000) != 0) {
@@ -798,6 +811,9 @@ function f32_mul {
798
811
  Translated from Berkeley Softfloat f32_mul.
799
812
  }
800
813
  body {
814
+ if (is_sp_signaling_nan?(a) || is_sp_signaling_nan?(b)) {
815
+ set_fp_flag(FpFlag::NV);
816
+ }
801
817
  Bits<1> signA = signF32UI(a);
802
818
  Bits<16> expA = expF32UI(a);
803
819
  Bits<23> fracA = fracF32UI(a);
@@ -1326,6 +1342,9 @@ function softfloat_addMagsF32 {
1326
1342
  Returns sum of the magnitudes of 2 floating point numbers
1327
1343
  }
1328
1344
  body {
1345
+ if (is_sp_signaling_nan?(a) || is_sp_signaling_nan?(b)) {
1346
+ set_fp_flag(FpFlag::NV);
1347
+ }
1329
1348
 
1330
1349
  # extract exponents and significands of a and b
1331
1350
  Bits<16> expA = expF32UI(a);
@@ -1433,6 +1452,9 @@ function softfloat_subMagsF32 {
1433
1452
  Returns difference of the magnitudes of 2 floating point numbers
1434
1453
  }
1435
1454
  body {
1455
+ if (is_sp_signaling_nan?(a) || is_sp_signaling_nan?(b)) {
1456
+ set_fp_flag(FpFlag::NV);
1457
+ }
1436
1458
 
1437
1459
  # extract exponents and significands of a and b
1438
1460
  Bits<16> expA = expF32UI(a);
@@ -1886,7 +1908,7 @@ function round_f32_to_integral {
1886
1908
  }
1887
1909
 
1888
1910
  struct ExpAndSig {
1889
- Bits<8> exp;
1911
+ Bits<16> exp;
1890
1912
  Bits<32> sig;
1891
1913
  }
1892
1914
 
@@ -1897,11 +1919,13 @@ function softfloat_normSubnormalF32Sig {
1897
1919
  description {
1898
1920
  Normalize a subnormal F32 significand.
1899
1921
  Returns (exp, sig32) where exp is the adjusted exponent (two's complement
1900
- in Bits<8>) and sig32 is the normalized significand with implicit leading 1
1901
- at bit 23.
1922
+ in Bits<16>) and sig32 is the normalized significand with implicit leading 1
1923
+ at bit 23. The exponent is widened to Bits<16> (rather than the natural
1924
+ Bits<8>) so that callers can add two adjusted exponents together (e.g.
1925
+ expA + expB - bias) without overflow.
1902
1926
  }
1903
1927
  body {
1904
- Bits<8> shiftDist = count_leading_zeros(32, sig) - 8;
1928
+ Bits<16> shiftDist = count_leading_zeros(32, sig) - 8;
1905
1929
  ExpAndSig ret;
1906
1930
  ret.exp = 1 - shiftDist;
1907
1931
  ret.sig = sig << shiftDist;
@@ -307,6 +307,7 @@ function compatible_mode? {
307
307
  (actual_mode == PrivilegeMode::VS) ||
308
308
  (actual_mode == PrivilegeMode::VU);
309
309
  }
310
+ return false;
310
311
  }
311
312
  }
312
313
 
@@ -1180,6 +1181,7 @@ function mpv {
1180
1181
  return (MXLEN == 32) ? CSR[mstatush].MPV : CSR[mstatus].MPV;
1181
1182
  } else {
1182
1183
  assert(false, "TODO");
1184
+ unreachable();
1183
1185
  }
1184
1186
  }
1185
1187
  }
@@ -1605,6 +1607,7 @@ function tinst_value_for_guest_page_fault {
1605
1607
  return tinst_transform(encoding, 0); # all guest page faults are aligned
1606
1608
  } else {
1607
1609
  unpredictable("Custom value written into htinst/mtinst");
1610
+ return 0;
1608
1611
  }
1609
1612
  } else if (op == MemoryOperation::Write || op == MemoryOperation::ReadModifyWrite) {
1610
1613
  if (TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT == "always zero") {
@@ -1619,6 +1622,7 @@ function tinst_value_for_guest_page_fault {
1619
1622
  return tinst_transform(encoding, 0); # all guest page faults are aligned
1620
1623
  } else {
1621
1624
  unpredictable("Custom value written into htinst/mtinst");
1625
+ return 0;
1622
1626
  }
1623
1627
  }
1624
1628
  } else {
@@ -1631,6 +1635,7 @@ function tinst_value_for_guest_page_fault {
1631
1635
  }
1632
1636
  }
1633
1637
  }
1638
+ return 0;
1634
1639
  }
1635
1640
  }
1636
1641
 
@@ -1658,9 +1663,11 @@ function tinst_transform {
1658
1663
  return {encoding[31:20], addr_offset, encoding[14:0]};
1659
1664
  } else {
1660
1665
  assert(false, "Bad transform");
1666
+ unreachable();
1661
1667
  }
1662
1668
  } else {
1663
1669
  assert(false, "TODO: compressed instruction");
1670
+ unreachable();
1664
1671
  }
1665
1672
  }
1666
1673
  }
@@ -1675,7 +1682,7 @@ function transformed_standard_instruction_for_tinst {
1675
1682
  }
1676
1683
  body {
1677
1684
  assert(false, "TODO");
1678
- return 0;
1685
+ unreachable();
1679
1686
  }
1680
1687
  }
1681
1688
 
@@ -1789,6 +1796,7 @@ function tinst_value {
1789
1796
  }
1790
1797
  } else {
1791
1798
  assert(false, "Unhandled exception type");
1799
+ unreachable();
1792
1800
  }
1793
1801
  }
1794
1802
  }
@@ -1974,6 +1982,7 @@ function gstage_page_walk {
1974
1982
  success = atomic_check_then_write_64(pte_paddr, pte, updated_pte);
1975
1983
  } else {
1976
1984
  assert(false, "Unexpected PTESIZE");
1985
+ unreachable();
1977
1986
  }
1978
1987
 
1979
1988
 
@@ -2024,6 +2033,7 @@ function gstage_page_walk {
2024
2033
  ppn = pte[PA_SIZE-3:10] << 12;
2025
2034
  }
2026
2035
  }
2036
+ unreachable();
2027
2037
  }
2028
2038
  }
2029
2039
 
@@ -2298,6 +2308,7 @@ function stage1_page_walk {
2298
2308
  success = atomic_check_then_write_64(pte_phys.paddr, pte, updated_pte);
2299
2309
  } else {
2300
2310
  assert(false, "Unexpected PTESIZE");
2311
+ unreachable();
2301
2312
  }
2302
2313
 
2303
2314
 
@@ -2370,6 +2381,7 @@ function stage1_page_walk {
2370
2381
  ppn = pte[PA_SIZE-3:10];
2371
2382
  }
2372
2383
  }
2384
+ unreachable();
2373
2385
  }
2374
2386
  }
2375
2387
 
@@ -2451,6 +2463,7 @@ function translate {
2451
2463
  result = stage1_page_walk(57, 56, 64, 5, vaddr, op, effective_mode, encoding);
2452
2464
  } else {
2453
2465
  assert(false, "Unexpected SatpMode");
2466
+ unreachable();
2454
2467
  }
2455
2468
 
2456
2469
  maybe_cache_translation(vaddr, op, result);
@@ -2496,6 +2509,7 @@ function canonical_vaddr? {
2496
2509
  } else if ((MXLEN == 64) && satp_mode == SatpMode::Sv57) {
2497
2510
  return eaddr[63:57] == {6{eaddr[56]}};
2498
2511
  }
2512
+ return false;
2499
2513
  }
2500
2514
  }
2501
2515
 
@@ -2522,6 +2536,7 @@ function canonical_gpaddr? {
2522
2536
  } else if ((MXLEN > 32) && (satp_mode == SatpMode::Sv57)) {
2523
2537
  return gpaddr[63:57] == {6{gpaddr[56]}};
2524
2538
  }
2539
+ return false;
2525
2540
  }
2526
2541
  }
2527
2542
 
@@ -2658,8 +2673,10 @@ function read_memory {
2658
2673
  return result;
2659
2674
  } else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
2660
2675
  unpredictable("An implementation is free to break a misaligned access any way, leading to unpredictable behavior when any part of the misaligned access causes an exception");
2676
+ return 0;
2661
2677
  }
2662
2678
  }
2679
+ return 0;
2663
2680
  }
2664
2681
  }
2665
2682
 
@@ -2776,6 +2793,7 @@ function register_reservation_set {
2776
2793
  unpredictable("Implementations may set reservation sets of any size, as long as they cover the reserved accessed");
2777
2794
  } else {
2778
2795
  assert(false, "Unexpected LRSC_RESERVATION_STRATEGY");
2796
+ unreachable();
2779
2797
  }
2780
2798
  }
2781
2799
  }
@@ -2932,12 +2950,14 @@ function amo {
2932
2950
  # PMA Atomicity checks
2933
2951
  if (pma_applies?(PmaAttribute::AmoNone, physical_address, N)) {
2934
2952
  raise(ExceptionCode::StoreAmoAccessFault, mode(), virtual_address);
2935
- } else if (((op == AmoOperation::Add || op == AmoOperation::Max || op == AmoOperation::Maxu || op == AmoOperation::Min || op == AmoOperation::Minu)) &&
2936
- !pma_applies?(PmaAttribute::AmoArithmetic, physical_address, N)) {
2937
- raise(ExceptionCode::StoreAmoAccessFault, mode(), virtual_address);
2938
- } else if (((op == AmoOperation::And || op == AmoOperation::Or || op == AmoOperation::Xor)) &&
2939
- !pma_applies?(PmaAttribute::AmoLogical, physical_address, N)) {
2940
- raise(ExceptionCode::StoreAmoAccessFault, mode(), virtual_address);
2953
+ } else if (((op == AmoOperation::Add || op == AmoOperation::Max || op == AmoOperation::Maxu || op == AmoOperation::Min || op == AmoOperation::Minu))) {
2954
+ if (!pma_applies?(PmaAttribute::AmoArithmetic, physical_address, N)) {
2955
+ raise(ExceptionCode::StoreAmoAccessFault, mode(), virtual_address);
2956
+ }
2957
+ } else if (((op == AmoOperation::And || op == AmoOperation::Or || op == AmoOperation::Xor))) {
2958
+ if (!pma_applies?(PmaAttribute::AmoLogical, physical_address, N)) {
2959
+ raise(ExceptionCode::StoreAmoAccessFault, mode(), virtual_address);
2960
+ }
2941
2961
  } else {
2942
2962
  assert(
2943
2963
  pma_applies?(PmaAttribute::AmoSwap, physical_address, N) &&
@@ -259,6 +259,7 @@ function highest_priority_interrupt {
259
259
  }
260
260
  }
261
261
  assert(false, "There is no valid interrupt");
262
+ unreachable();
262
263
  }
263
264
  }
264
265
 
@@ -6,14 +6,78 @@
6
6
  $schema: param_schema.json#
7
7
  kind: parameter
8
8
  name: CACHE_BLOCK_SIZE
9
- description: "The observable size of a cache block, in bytes
10
-
11
- "
12
- long_name: TODO
9
+ description: The observable size of a cache block, in bytes. A cache block is a
10
+ naturally aligned power-of-two (NAPOT) range of memory.
11
+ long_name: cache block size
13
12
  schema:
14
13
  type: integer
15
- minimum: 1
16
- maximum: 18446744073709551615
14
+ enum:
15
+ [
16
+ 0x1,
17
+ 0x2,
18
+ 0x4,
19
+ 0x8,
20
+ 0x10,
21
+ 0x20,
22
+ 0x40,
23
+ 0x80,
24
+ 0x100,
25
+ 0x200,
26
+ 0x400,
27
+ 0x800,
28
+ 0x1000,
29
+ 0x2000,
30
+ 0x4000,
31
+ 0x8000,
32
+ 0x10000,
33
+ 0x20000,
34
+ 0x40000,
35
+ 0x80000,
36
+ 0x100000,
37
+ 0x200000,
38
+ 0x400000,
39
+ 0x800000,
40
+ 0x1000000,
41
+ 0x2000000,
42
+ 0x4000000,
43
+ 0x8000000,
44
+ 0x10000000,
45
+ 0x20000000,
46
+ 0x40000000,
47
+ 0x80000000,
48
+ 0x100000000,
49
+ 0x200000000,
50
+ 0x400000000,
51
+ 0x800000000,
52
+ 0x1000000000,
53
+ 0x2000000000,
54
+ 0x4000000000,
55
+ 0x8000000000,
56
+ 0x10000000000,
57
+ 0x20000000000,
58
+ 0x40000000000,
59
+ 0x80000000000,
60
+ 0x100000000000,
61
+ 0x200000000000,
62
+ 0x400000000000,
63
+ 0x800000000000,
64
+ 0x1000000000000,
65
+ 0x2000000000000,
66
+ 0x4000000000000,
67
+ 0x8000000000000,
68
+ 0x10000000000000,
69
+ 0x20000000000000,
70
+ 0x40000000000000,
71
+ 0x80000000000000,
72
+ 0x100000000000000,
73
+ 0x200000000000000,
74
+ 0x400000000000000,
75
+ 0x800000000000000,
76
+ 0x1000000000000000,
77
+ 0x2000000000000000,
78
+ 0x4000000000000000,
79
+ 0x8000000000000000,
80
+ ]
17
81
  definedBy:
18
82
  extension:
19
83
  anyOf:
@@ -8,13 +8,35 @@ kind: parameter
8
8
  name: ELEN
9
9
  description: |
10
10
  The maximum size in bits of a vector element that any operation can produce or consume.
11
- long_name: TODO
11
+ long_name: maximum vector element bit width
12
12
  schema:
13
+ description: |
14
+ An unsigned power of 2 that is at least 8. The ISA states no maximum; the
15
+ absolute upper bound is (max VLEN) * (#VRs) = 64Ki * 32 = 2Mi, since an
16
+ element cannot exceed the total vector register state.
13
17
  type: integer
14
- # requirements:
15
- # idl(): |
16
- # -> (ELEN >='h8) && (popcount(ELEN) == 1);
17
- # reason: ELEN >= 8, which must be a power of 2.
18
+ enum:
19
+ [
20
+ 0x8,
21
+ 0x10,
22
+ 0x20,
23
+ 0x40,
24
+ 0x80,
25
+ 0x100,
26
+ 0x200,
27
+ 0x400,
28
+ 0x800,
29
+ 0x1000,
30
+ 0x2000,
31
+ 0x4000,
32
+ 0x8000,
33
+ 0x10000,
34
+ 0x20000,
35
+ 0x40000,
36
+ 0x80000,
37
+ 0x100000,
38
+ 0x200000,
39
+ ]
18
40
  definedBy:
19
41
  extension:
20
42
  name: Zvl32b
@@ -25,3 +25,16 @@ schema:
25
25
  definedBy:
26
26
  extension:
27
27
  name: H
28
+ requirements:
29
+ idl(): |
30
+ for (U32 i = 0; i < 3; i++) {
31
+ !implemented?(ExtensionName::Zicntr) -> !HCOUNTENABLE_EN[i];
32
+ }
33
+ for (U32 i = 3; i < 32; i++) {
34
+ !implemented?(ExtensionName::Zihpm) -> !HCOUNTENABLE_EN[i];
35
+ (!HPM_COUNTER_EN[i]) -> !HCOUNTENABLE_EN[i];
36
+ }
37
+ reason: |
38
+ Counters 0-2 are defined by Zicntr
39
+ Counters 3..31 are defined by Zihpm
40
+ When mhpmcounter[i] is not implemented, it cannot be enabled.
@@ -7,10 +7,20 @@ $schema: param_schema.json#
7
7
  kind: parameter
8
8
  name: HPM_COUNTER_EN
9
9
  description: |
10
- List of HPM counters that are enabled.
11
- There is one entry for each hpmcounter.
10
+ Whether each HPM counter is implemented in hardware.
12
11
 
13
- The first three entries *must* be false (as they correspond to CY, IR, TM in, _e.g._ `mhmpcountinhibit`)
12
+ `HPM_COUNTER_EN[n]` being `false` means `hpmcounter<n>`/`mhpmcounter<n>` and the
13
+ corresponding `mhpmevent<n>` are not implemented and are hardwired read-only zero.
14
+ (It does *not* mean the counter is implemented but currently stopped from counting;
15
+ that is a separate, run-time concept controlled by `mcountinhibit`.)
16
+
17
+ There is one entry for each hpmcounter, indexed 0-31.
18
+
19
+ Indices 0-2 *must* be false: they are placeholders for the three counters
20
+ (`cycle`/`mcycle` (CY), `time` (TM), and `instret`/`minstret` (IR)) whose
21
+ implementation this parameter does not control. These counters are associated
22
+ with indexes 0, 1, and 2. The rest of the HPM counters logically follow at
23
+ indexes 3-31.
14
24
  Index 3 in HPM_COUNTER_EN corresponds to mhpmcounter3.
15
25
  Index 31 in HPM_COUNTER_EN corresponds to mhpmcounter31.
16
26
  long_name: TODO