udb 0.1.9 → 0.1.13

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 (275) hide show
  1. checksums.yaml +4 -4
  2. data/.data/cfgs/example_rv64_with_overlay.yaml +5 -2
  3. data/.data/cfgs/mc100-32-full-example.yaml +1 -0
  4. data/.data/cfgs/profile/README.adoc +10 -0
  5. data/.data/cfgs/profile/RVA20S64.yaml +26 -6
  6. data/.data/cfgs/profile/RVA20U64.yaml +18 -4
  7. data/.data/cfgs/profile/RVA22S64.yaml +27 -7
  8. data/.data/cfgs/profile/RVA22U64.yaml +18 -4
  9. data/.data/cfgs/profile/RVA23S64.yaml +61 -7
  10. data/.data/cfgs/profile/RVA23U64.yaml +36 -4
  11. data/.data/cfgs/profile/RVB23S64.yaml +27 -7
  12. data/.data/cfgs/profile/RVB23U64.yaml +18 -4
  13. data/.data/cfgs/profile/RVI20U32.yaml +10 -4
  14. data/.data/cfgs/profile/RVI20U64.yaml +10 -4
  15. data/.data/cfgs/qc_iu.yaml +4 -1
  16. data/.data/cfgs/rv32-riscv-tests.yaml +2 -1
  17. data/.data/cfgs/rv32-vector.yaml +2 -1
  18. data/.data/cfgs/rv64-riscv-tests.yaml +2 -1
  19. data/.data/cfgs/rv64-vector.yaml +2 -1
  20. data/.data/spec/custom/isa/qc_iu/csr/Smrnmi/mnepc.yaml +17 -0
  21. data/.data/spec/custom/isa/qc_iu/csr/Xqccmi/qc.itba.yaml +45 -0
  22. data/.data/spec/custom/isa/qc_iu/csr/Xqccmi/qc.itdec.yaml +39 -0
  23. data/.data/spec/custom/isa/qc_iu/csr/jvt.yaml +11 -0
  24. data/.data/spec/custom/isa/qc_iu/csr/mepc.yaml +16 -0
  25. data/.data/spec/custom/isa/qc_iu/ext/Xqccmi.yaml +219 -0
  26. data/.data/spec/custom/isa/qc_iu/ext/Xqccmt.yaml +127 -0
  27. data/.data/spec/custom/isa/qc_iu/inst/Xqccmi/qc.cm.ilut.yaml +153 -0
  28. data/.data/spec/custom/isa/qc_iu/inst/Xqccmt/qc.cm.jalt.yaml +84 -0
  29. data/.data/spec/custom/isa/qc_iu/inst/Xqccmt/qc.cm.jt.yaml +60 -0
  30. data/.data/spec/custom/isa/qc_iu/isa/globals.isa +112 -0
  31. data/.data/spec/schemas/config_schema.json +219 -26
  32. data/.data/spec/schemas/csr_schema.json +0 -6
  33. data/.data/spec/schemas/ext_schema.json +80 -24
  34. data/.data/spec/schemas/inst_schema.json +0 -3
  35. data/.data/spec/schemas/profile_release_schema.json +1 -1
  36. data/.data/spec/schemas/profile_schema.json +0 -3
  37. data/.data/spec/schemas/register_file_schema.json +8 -3
  38. data/.data/spec/schemas/schema_defs.json +8 -27
  39. data/.data/spec/std/isa/csr/I/pmpcfg0.yaml +8 -8
  40. data/.data/spec/std/isa/csr/I/pmpcfg1.yaml +4 -4
  41. data/.data/spec/std/isa/csr/I/pmpcfg10.yaml +8 -8
  42. data/.data/spec/std/isa/csr/I/pmpcfg11.yaml +4 -4
  43. data/.data/spec/std/isa/csr/I/pmpcfg12.yaml +8 -8
  44. data/.data/spec/std/isa/csr/I/pmpcfg13.yaml +4 -4
  45. data/.data/spec/std/isa/csr/I/pmpcfg14.yaml +8 -8
  46. data/.data/spec/std/isa/csr/I/pmpcfg15.yaml +4 -4
  47. data/.data/spec/std/isa/csr/I/pmpcfg2.yaml +8 -8
  48. data/.data/spec/std/isa/csr/I/pmpcfg3.yaml +4 -4
  49. data/.data/spec/std/isa/csr/I/pmpcfg4.yaml +8 -8
  50. data/.data/spec/std/isa/csr/I/pmpcfg5.yaml +4 -4
  51. data/.data/spec/std/isa/csr/I/pmpcfg6.yaml +8 -8
  52. data/.data/spec/std/isa/csr/I/pmpcfg7.yaml +4 -4
  53. data/.data/spec/std/isa/csr/I/pmpcfg8.yaml +8 -8
  54. data/.data/spec/std/isa/csr/I/pmpcfg9.yaml +4 -4
  55. data/.data/spec/std/isa/csr/I/pmpcfgN.layout +1 -1
  56. data/.data/spec/std/isa/csr/Zicntr/mcountinhibit.layout +6 -2
  57. data/.data/spec/std/isa/csr/Zicntr/mcountinhibit.yaml +6 -2
  58. data/.data/spec/std/isa/csr/hstatus.yaml +16 -0
  59. data/.data/spec/std/isa/csr/mcycleh.yaml +1 -1
  60. data/.data/spec/std/isa/csr/misa.yaml +0 -12
  61. data/.data/spec/std/isa/csr/mstatus.yaml +38 -0
  62. data/.data/spec/std/isa/csr/mstatush.yaml +17 -15
  63. data/.data/spec/std/isa/csr/senvcfg.yaml +16 -0
  64. data/.data/spec/std/isa/csr/sstatus.yaml +12 -0
  65. data/.data/spec/std/isa/csr/vsstatus.yaml +24 -0
  66. data/.data/spec/std/isa/ext/A.yaml +5 -7
  67. data/.data/spec/std/isa/ext/S.yaml +12 -0
  68. data/.data/spec/std/isa/ext/Smpmpmt.yaml +52 -0
  69. data/.data/spec/std/isa/ext/Sv32.yaml +7 -19
  70. data/.data/spec/std/isa/ext/Sv39.yaml +7 -19
  71. data/.data/spec/std/isa/ext/Sv48.yaml +4 -20
  72. data/.data/spec/std/isa/ext/Sv57.yaml +4 -20
  73. data/.data/spec/std/isa/ext/Svukte.yaml +71 -0
  74. data/.data/spec/std/isa/ext/Zawrs.yaml +1 -1
  75. data/.data/spec/std/isa/ext/Zihpm.yaml +0 -12
  76. data/.data/spec/std/isa/inst/C/c.addi.yaml +1 -0
  77. data/.data/spec/std/isa/inst/C/c.addi16sp.yaml +1 -0
  78. data/.data/spec/std/isa/inst/C/c.addiw.yaml +1 -0
  79. data/.data/spec/std/isa/inst/C/c.andi.yaml +1 -0
  80. data/.data/spec/std/isa/inst/C/c.ldsp.yaml +1 -1
  81. data/.data/spec/std/isa/inst/C/c.li.yaml +1 -0
  82. data/.data/spec/std/isa/inst/C/c.lui.yaml +1 -0
  83. data/.data/spec/std/isa/inst/C/c.mv.yaml +1 -1
  84. data/.data/spec/std/isa/inst/C/c.sdsp.yaml +1 -1
  85. data/.data/spec/std/isa/inst/D/fsgnj.d.yaml +3 -0
  86. data/.data/spec/std/isa/inst/D/fsgnjn.d.yaml +3 -0
  87. data/.data/spec/std/isa/inst/D/fsgnjx.d.yaml +3 -0
  88. data/.data/spec/std/isa/inst/F/fadd.s.yaml +5 -5
  89. data/.data/spec/std/isa/inst/F/fclass.s.yaml +2 -2
  90. data/.data/spec/std/isa/inst/F/fcvt.l.s.yaml +1 -1
  91. data/.data/spec/std/isa/inst/F/fcvt.lu.s.yaml +1 -1
  92. data/.data/spec/std/isa/inst/F/fcvt.s.l.yaml +1 -1
  93. data/.data/spec/std/isa/inst/F/fcvt.s.lu.yaml +1 -1
  94. data/.data/spec/std/isa/inst/F/fcvt.s.w.yaml +1 -1
  95. data/.data/spec/std/isa/inst/F/fcvt.s.wu.yaml +1 -1
  96. data/.data/spec/std/isa/inst/F/fcvt.w.s.yaml +1 -1
  97. data/.data/spec/std/isa/inst/F/fcvt.wu.s.yaml +1 -1
  98. data/.data/spec/std/isa/inst/F/fdiv.s.yaml +1 -1
  99. data/.data/spec/std/isa/inst/F/feq.s.yaml +2 -2
  100. data/.data/spec/std/isa/inst/F/fle.s.yaml +2 -2
  101. data/.data/spec/std/isa/inst/F/fleq.s.yaml +2 -2
  102. data/.data/spec/std/isa/inst/F/flt.s.yaml +2 -2
  103. data/.data/spec/std/isa/inst/F/fltq.s.yaml +2 -2
  104. data/.data/spec/std/isa/inst/F/flw.yaml +2 -2
  105. data/.data/spec/std/isa/inst/F/fmadd.s.yaml +1 -1
  106. data/.data/spec/std/isa/inst/F/fmax.s.yaml +6 -6
  107. data/.data/spec/std/isa/inst/F/fmin.s.yaml +6 -6
  108. data/.data/spec/std/isa/inst/F/fmsub.s.yaml +1 -1
  109. data/.data/spec/std/isa/inst/F/fmul.s.yaml +1 -1
  110. data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +2 -2
  111. data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +1 -1
  112. data/.data/spec/std/isa/inst/F/fnmadd.s.yaml +2 -2
  113. data/.data/spec/std/isa/inst/F/fnmsub.s.yaml +1 -1
  114. data/.data/spec/std/isa/inst/F/fsgnj.s.yaml +4 -4
  115. data/.data/spec/std/isa/inst/F/fsgnjn.s.yaml +3 -3
  116. data/.data/spec/std/isa/inst/F/fsgnjx.s.yaml +4 -4
  117. data/.data/spec/std/isa/inst/F/fsqrt.s.yaml +1 -1
  118. data/.data/spec/std/isa/inst/F/fsub.s.yaml +1 -1
  119. data/.data/spec/std/isa/inst/F/fsw.yaml +1 -1
  120. data/.data/spec/std/isa/inst/I/addi.yaml +1 -1
  121. data/.data/spec/std/isa/inst/I/addiw.yaml +1 -1
  122. data/.data/spec/std/isa/inst/I/andi.yaml +1 -1
  123. data/.data/spec/std/isa/inst/I/beq.yaml +1 -1
  124. data/.data/spec/std/isa/inst/I/bge.yaml +4 -2
  125. data/.data/spec/std/isa/inst/I/bgeu.yaml +3 -0
  126. data/.data/spec/std/isa/inst/I/blt.yaml +4 -2
  127. data/.data/spec/std/isa/inst/I/bltu.yaml +3 -0
  128. data/.data/spec/std/isa/inst/I/bne.yaml +1 -1
  129. data/.data/spec/std/isa/inst/I/slt.yaml +2 -2
  130. data/.data/spec/std/isa/inst/I/sltiu.yaml +1 -1
  131. data/.data/spec/std/isa/inst/I/sltu.yaml +1 -1
  132. data/.data/spec/std/isa/inst/I/sub.yaml +1 -1
  133. data/.data/spec/std/isa/inst/I/subw.yaml +1 -1
  134. data/.data/spec/std/isa/inst/I/xori.yaml +1 -1
  135. data/.data/spec/std/isa/inst/M/mul.yaml +0 -19
  136. data/.data/spec/std/isa/inst/Q/fsgnj.q.yaml +1 -1
  137. data/.data/spec/std/isa/inst/S/sret.yaml +3 -1
  138. data/.data/spec/std/isa/inst/V/vadd.vv.yaml +1 -5
  139. data/.data/spec/std/isa/inst/V/vfsgnjn.vv.yaml +3 -0
  140. data/.data/spec/std/isa/inst/V/vfsgnjx.vv.yaml +3 -0
  141. data/.data/spec/std/isa/inst/V/vl1re8.v.yaml +3 -0
  142. data/.data/spec/std/isa/inst/V/vl2re8.v.yaml +3 -0
  143. data/.data/spec/std/isa/inst/V/vl4re8.v.yaml +3 -0
  144. data/.data/spec/std/isa/inst/V/vl8re8.v.yaml +3 -0
  145. data/.data/spec/std/isa/inst/V/vle8.v.yaml +3 -8
  146. data/.data/spec/std/isa/inst/V/vmand.mm.yaml +3 -0
  147. data/.data/spec/std/isa/inst/V/vmfle.vv.yaml +3 -0
  148. data/.data/spec/std/isa/inst/V/vmflt.vv.yaml +3 -0
  149. data/.data/spec/std/isa/inst/V/vmnand.mm.yaml +3 -0
  150. data/.data/spec/std/isa/inst/V/vmsgt.vi.yaml +3 -0
  151. data/.data/spec/std/isa/inst/V/vmsgtu.vi.yaml +3 -0
  152. data/.data/spec/std/isa/inst/V/vmsle.vi.yaml +3 -0
  153. data/.data/spec/std/isa/inst/V/vmsle.vv.yaml +3 -0
  154. data/.data/spec/std/isa/inst/V/vmsleu.vi.yaml +3 -0
  155. data/.data/spec/std/isa/inst/V/vmsleu.vv.yaml +3 -0
  156. data/.data/spec/std/isa/inst/V/vmslt.vv.yaml +3 -0
  157. data/.data/spec/std/isa/inst/V/vmsltu.vv.yaml +3 -0
  158. data/.data/spec/std/isa/inst/V/vmv.v.i.yaml +2 -13
  159. data/.data/spec/std/isa/inst/V/vmv.x.s.yaml +1 -1
  160. data/.data/spec/std/isa/inst/V/vmxnor.mm.yaml +3 -0
  161. data/.data/spec/std/isa/inst/V/vmxor.mm.yaml +3 -0
  162. data/.data/spec/std/isa/inst/V/vnsrl.wx.yaml +3 -0
  163. data/.data/spec/std/isa/inst/V/vrsub.vx.yaml +3 -0
  164. data/.data/spec/std/isa/inst/V/vse8.v.yaml +3 -4
  165. data/.data/spec/std/isa/inst/V/vwadd.vx.yaml +3 -0
  166. data/.data/spec/std/isa/inst/V/vwaddu.vx.yaml +3 -0
  167. data/.data/spec/std/isa/inst/V/vxor.vi.yaml +4 -0
  168. data/.data/spec/std/isa/inst/Zalasr/lSIZE.AQRL.layout +40 -5
  169. data/.data/spec/std/isa/inst/Zalasr/lb.aq.yaml +17 -1
  170. data/.data/spec/std/isa/inst/Zalasr/lb.aqrl.yaml +17 -1
  171. data/.data/spec/std/isa/inst/Zalasr/ld.aq.yaml +17 -1
  172. data/.data/spec/std/isa/inst/Zalasr/ld.aqrl.yaml +17 -1
  173. data/.data/spec/std/isa/inst/Zalasr/lh.aq.yaml +17 -1
  174. data/.data/spec/std/isa/inst/Zalasr/lh.aqrl.yaml +17 -1
  175. data/.data/spec/std/isa/inst/Zalasr/lw.aq.yaml +17 -1
  176. data/.data/spec/std/isa/inst/Zalasr/lw.aqrl.yaml +17 -1
  177. data/.data/spec/std/isa/inst/Zalasr/sSIZE.AQRL.layout +46 -5
  178. data/.data/spec/std/isa/inst/Zalasr/sb.aqrl.yaml +16 -1
  179. data/.data/spec/std/isa/inst/Zalasr/sb.rl.yaml +16 -1
  180. data/.data/spec/std/isa/inst/Zalasr/sd.aqrl.yaml +16 -1
  181. data/.data/spec/std/isa/inst/Zalasr/sd.rl.yaml +16 -1
  182. data/.data/spec/std/isa/inst/Zalasr/sh.aqrl.yaml +16 -1
  183. data/.data/spec/std/isa/inst/Zalasr/sh.rl.yaml +16 -1
  184. data/.data/spec/std/isa/inst/Zalasr/sw.aqrl.yaml +16 -1
  185. data/.data/spec/std/isa/inst/Zalasr/sw.rl.yaml +16 -1
  186. data/.data/spec/std/isa/inst/Zbkb/packw.yaml +1 -1
  187. data/.data/spec/std/isa/inst/Zcd/c.fld.yaml +1 -1
  188. data/.data/spec/std/isa/inst/Zcd/c.fldsp.yaml +1 -1
  189. data/.data/spec/std/isa/inst/Zcd/c.fsdsp.yaml +1 -1
  190. data/.data/spec/std/isa/inst/Zcf/c.flwsp.yaml +1 -1
  191. data/.data/spec/std/isa/inst/Zcf/c.fswsp.yaml +1 -1
  192. data/.data/spec/std/isa/inst/Zcmp/cm.pop.yaml +1 -1
  193. data/.data/spec/std/isa/inst/Zcmp/cm.popret.yaml +1 -1
  194. data/.data/spec/std/isa/inst/Zcmp/cm.popretz.yaml +1 -1
  195. data/.data/spec/std/isa/inst/Zcmp/cm.push.yaml +2 -3
  196. data/.data/spec/std/isa/inst/Zfa/fround.s.yaml +1 -1
  197. data/.data/spec/std/isa/inst/Zfh/fcvt.h.s.yaml +6 -6
  198. data/.data/spec/std/isa/inst/Zfh/fcvt.s.h.yaml +5 -5
  199. data/.data/spec/std/isa/inst/Zfh/flh.yaml +1 -1
  200. data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +1 -1
  201. data/.data/spec/std/isa/inst/Zfh/fmv.x.h.yaml +1 -1
  202. data/.data/spec/std/isa/inst/Zfh/fsh.yaml +1 -1
  203. data/.data/spec/std/isa/inst/Zicsr/csrrc.yaml +1 -1
  204. data/.data/spec/std/isa/inst/Zicsr/csrrci.yaml +1 -1
  205. data/.data/spec/std/isa/inst/Zicsr/csrrs.yaml +2 -2
  206. data/.data/spec/std/isa/inst/Zicsr/csrrsi.yaml +1 -1
  207. data/.data/spec/std/isa/inst/Zicsr/csrrw.yaml +1 -1
  208. data/.data/spec/std/isa/inst/Zicsr/csrrwi.yaml +1 -1
  209. data/.data/spec/std/isa/isa/builtin_functions.idl +17 -0
  210. data/.data/spec/std/isa/isa/fp.idl +1 -5
  211. data/.data/spec/std/isa/isa/globals.isa +45 -14
  212. data/.data/spec/std/isa/isa/vec.idl +1 -2
  213. data/.data/spec/std/isa/manual_version/isa/20240411/isa_20240411.yaml +5 -5
  214. data/.data/spec/std/isa/param/COUNTINHIBIT_EN.yaml +8 -2
  215. data/.data/spec/std/isa/param/JVT_BASE_MASK.yaml +1 -1
  216. data/.data/spec/std/isa/param/MCOUNTINHIBIT_IMPLEMENTED.yaml +25 -0
  217. data/.data/spec/std/isa/param/MTVEC_MODES.yaml +10 -3
  218. data/.data/spec/std/isa/param/VLEN.yaml +2 -0
  219. data/.data/spec/std/isa/profile/RVA20S64.yaml +11 -4
  220. data/.data/spec/std/isa/profile/RVA20U64.yaml +14 -5
  221. data/.data/spec/std/isa/profile/RVA22S64.yaml +14 -3
  222. data/.data/spec/std/isa/profile/RVA22U64.yaml +8 -1
  223. data/.data/spec/std/isa/profile/RVA23S64.yaml +13 -0
  224. data/.data/spec/std/isa/profile/RVA23U64.yaml +15 -1
  225. data/.data/spec/std/isa/profile/RVB23S64.yaml +15 -3
  226. data/.data/spec/std/isa/profile/RVB23U64.yaml +8 -1
  227. data/.data/spec/std/isa/profile/RVI20U32.yaml +8 -1
  228. data/.data/spec/std/isa/profile/RVI20U64.yaml +7 -0
  229. data/.data/spec/std/isa/register_file/F.yaml +3 -2
  230. data/.data/spec/std/isa/register_file/V.yaml +2 -2
  231. data/.data/spec/std/isa/register_file/X.yaml +2 -1
  232. data/lib/udb/architecture.rb +4 -25
  233. data/lib/udb/cfg_arch.rb +171 -59
  234. data/lib/udb/cli.rb +10 -1
  235. data/lib/udb/condition.rb +38 -37
  236. data/lib/udb/config.rb +72 -6
  237. data/lib/udb/logic.rb +29 -56
  238. data/lib/udb/obj/csr.rb +23 -5
  239. data/lib/udb/obj/csr_field.rb +36 -21
  240. data/lib/udb/obj/database_obj.rb +2 -5
  241. data/lib/udb/obj/extension.rb +0 -3
  242. data/lib/udb/obj/instruction.rb +1 -4
  243. data/lib/udb/obj/portfolio.rb +75 -20
  244. data/lib/udb/obj/profile.rb +0 -4
  245. data/lib/udb/obj/register_file.rb +63 -2
  246. data/lib/udb/portfolio_design.rb +3 -6
  247. data/lib/udb/resolver.rb +84 -23
  248. data/lib/udb/version.rb +1 -1
  249. data/lib/udb/version_spec.rb +8 -0
  250. data/lib/udb/z3.rb +23 -0
  251. data/lib/udb.rb +0 -3
  252. metadata +25 -37
  253. data/.data/cfgs/profile/RVA23M64.yaml +0 -159
  254. data/.data/cfgs/profile/RVB23M64.yaml +0 -149
  255. data/.data/spec/schemas/proc_cert_class_schema.json +0 -35
  256. data/.data/spec/schemas/proc_cert_model_schema.json +0 -336
  257. data/.data/spec/std/isa/proc_cert_class/AC.yaml +0 -13
  258. data/.data/spec/std/isa/proc_cert_class/MC.yaml +0 -13
  259. data/.data/spec/std/isa/proc_cert_class/RVI.yaml +0 -16
  260. data/.data/spec/std/isa/proc_cert_model/AC100.yaml +0 -72
  261. data/.data/spec/std/isa/proc_cert_model/AC200.yaml +0 -58
  262. data/.data/spec/std/isa/proc_cert_model/MC100-32.yaml +0 -155
  263. data/.data/spec/std/isa/proc_cert_model/MC100-64.yaml +0 -21
  264. data/.data/spec/std/isa/proc_cert_model/MC200-32.yaml +0 -60
  265. data/.data/spec/std/isa/proc_cert_model/MC200-64.yaml +0 -21
  266. data/.data/spec/std/isa/proc_cert_model/MC300-32.yaml +0 -40
  267. data/.data/spec/std/isa/proc_cert_model/MC300-64.yaml +0 -21
  268. data/.data/spec/std/isa/proc_cert_model/RVI20-32.yaml +0 -39
  269. data/.data/spec/std/isa/proc_cert_model/RVI20-64.yaml +0 -19
  270. data/.data/spec/std/isa/profile/RVA23M64.yaml +0 -24
  271. data/.data/spec/std/isa/profile/RVB23M64.yaml +0 -86
  272. data/lib/udb/cert_normative_rule.rb +0 -41
  273. data/lib/udb/obj/certifiable_obj.rb +0 -21
  274. data/lib/udb/obj/certificate.rb +0 -230
  275. data/lib/udb/proc_cert_design.rb +0 -77
@@ -11,7 +11,15 @@ kind: instruction
11
11
  name: sw.aqrl
12
12
  long_name: Store Word Acquire Release
13
13
  description: |
14
- No description available.
14
+ Store the lowest 32 bits of register `xs2` to the address in `xs1`.
15
+
16
+ This instruction has both acquire and release semantics. No subsequent memory
17
+ operations (in program order) from this hart can be observed to occur before
18
+ this store completes, and no previous memory operations can be observed to occur
19
+ after this store completes.
20
+
21
+ The address must be naturally aligned (4-byte aligned); if not, an
22
+ address-misaligned or access-fault exception will be raised.
15
23
  definedBy:
16
24
  extension:
17
25
  name: Zalasr
@@ -30,3 +38,10 @@ access:
30
38
  vu: always
31
39
  data_independent_timing: false
32
40
  operation(): |
41
+ XReg virtual_address = X[xs1];
42
+
43
+ if (!is_naturally_aligned(32, virtual_address)) {
44
+ raise(ExceptionCode::StoreAmoAddressMisaligned, mode(), virtual_address);
45
+ }
46
+
47
+ write_memory_aligned(32, virtual_address, X[xs2][31:0], $encoding, 1'b1, 1'b1);
@@ -11,7 +11,15 @@ kind: instruction
11
11
  name: sw.rl
12
12
  long_name: Store Word Release
13
13
  description: |
14
- No description available.
14
+ Store the lowest 32 bits of register `xs2` to the address in `xs1`.
15
+
16
+ This instruction has release semantics, which means that no previous memory
17
+ operations (in program order) from this hart can be observed to occur after
18
+ this store completes. Release semantics provide ordering guarantees useful for
19
+ synchronization, such as writing a lock variable to release it.
20
+
21
+ The address must be naturally aligned (4-byte aligned); if not, an
22
+ address-misaligned or access-fault exception will be raised.
15
23
  definedBy:
16
24
  extension:
17
25
  name: Zalasr
@@ -30,3 +38,10 @@ access:
30
38
  vu: always
31
39
  data_independent_timing: false
32
40
  operation(): |
41
+ XReg virtual_address = X[xs1];
42
+
43
+ if (!is_naturally_aligned(32, virtual_address)) {
44
+ raise(ExceptionCode::StoreAmoAddressMisaligned, mode(), virtual_address);
45
+ }
46
+
47
+ write_memory_aligned(32, virtual_address, X[xs2][31:0], $encoding, 1'b0, 1'b1);
@@ -32,5 +32,5 @@ access:
32
32
  data_independent_timing: true
33
33
  pseudoinstructions:
34
34
  - when: (xs2 == 0x0)
35
- to: zext.h xd,xs1
35
+ to: zext.h xd, xs1
36
36
  operation(): |
@@ -38,4 +38,4 @@ operation(): |
38
38
 
39
39
  XReg virtual_address = X[creg2reg(xs1)] + imm;
40
40
 
41
- f[fd] = sext(read_memory(64, virtual_address, $encoding), 64);
41
+ F[fd] = sext(read_memory(64, virtual_address, $encoding), 64);
@@ -39,4 +39,4 @@ operation(): |
39
39
 
40
40
  XReg virtual_address = X[2] + imm;
41
41
 
42
- f[fd] = read_memory(64, virtual_address, $encoding);
42
+ F[fd] = read_memory(64, virtual_address, $encoding);
@@ -39,4 +39,4 @@ operation(): |
39
39
 
40
40
  XReg virtual_address = X[2] + imm;
41
41
 
42
- write_memory(64, virtual_address, f[fs2][63:0], $encoding);
42
+ write_memory(64, virtual_address, F[fs2][63:0], $encoding);
@@ -39,4 +39,4 @@ operation(): |
39
39
 
40
40
  XReg virtual_address = X[2] + imm;
41
41
 
42
- f[fd] = read_memory(32, virtual_address, $encoding);
42
+ F[fd] = read_memory(32, virtual_address, $encoding);
@@ -39,4 +39,4 @@ operation(): |
39
39
 
40
40
  XReg virtual_address = X[2] + imm;
41
41
 
42
- write_memory(32, virtual_address, f[fs2][31:0], $encoding);
42
+ write_memory(32, virtual_address, F[fs2][31:0], $encoding);
@@ -20,7 +20,7 @@ description: |
20
20
  definedBy:
21
21
  extension:
22
22
  name: Zcmp
23
- assembly: reg_list, stack_adj
23
+ assembly: "{reg_list}, stack_adj"
24
24
  encoding:
25
25
  match: 10111010------10
26
26
  variables:
@@ -20,7 +20,7 @@ description: |
20
20
  definedBy:
21
21
  extension:
22
22
  name: Zcmp
23
- assembly: reg_list, stack_adj
23
+ assembly: "{reg_list}, stack_adj"
24
24
  encoding:
25
25
  match: 10111110------10
26
26
  variables:
@@ -20,7 +20,7 @@ description: |
20
20
  definedBy:
21
21
  extension:
22
22
  name: Zcmp
23
- assembly: reg_list, stack_adj
23
+ assembly: "{reg_list}, stack_adj"
24
24
  encoding:
25
25
  match: 10111100------10
26
26
  variables:
@@ -21,7 +21,7 @@ description: |
21
21
  definedBy:
22
22
  extension:
23
23
  name: Zcmp
24
- assembly: reg_list, -stack_adj
24
+ assembly: "{reg_list}, -stack_adj"
25
25
  encoding:
26
26
  match: 10111000------10
27
27
  variables:
@@ -30,7 +30,6 @@ encoding:
30
30
  not: [0, 1, 2, 3]
31
31
  - name: spimm
32
32
  location: 3-2
33
- left_shift: 4
34
33
  access:
35
34
  s: always
36
35
  u: always
@@ -45,7 +44,7 @@ operation(): |
45
44
  XReg nreg = (rlist == 15) ? 13 : (rlist - 3);
46
45
  XReg stack_aligned_adj = (nreg * 4 + 15) & ~0xF;
47
46
  XReg virtual_address_sp = X[2];
48
- XReg virtual_address_new_sp = virtual_address_sp - stack_aligned_adj - spimm;
47
+ XReg virtual_address_new_sp = virtual_address_sp - stack_aligned_adj - spimm * 16;
49
48
  XReg virtual_address_base = virtual_address_sp - (nreg * size);
50
49
 
51
50
  write_memory_xlen_aligned(virtual_address_base + 0*size, X[ 1], $encoding);
@@ -37,5 +37,5 @@ data_independent_timing: true
37
37
  operation(): |
38
38
  check_f_ok($encoding);
39
39
  RoundingMode rounding_mode = rm_to_mode(rm, $encoding);
40
- f[fd] = round_f32_to_integral(f[fs1], rounding_mode);
40
+ F[fd] = round_f32_to_integral(F[fs1], rounding_mode);
41
41
  mark_f_state_dirty();
@@ -39,7 +39,7 @@ access:
39
39
  operation(): |
40
40
  check_f_ok($encoding);
41
41
 
42
- Bits<16> hp_value = f[fs1][15:0];
42
+ Bits<16> hp_value = F[fs1][15:0];
43
43
 
44
44
  Bits<1> sign = hp_value[15];
45
45
  Bits<5> exp = hp_value[14:10];
@@ -50,22 +50,22 @@ operation(): |
50
50
  if ((hp_value & 0x0200) != 0) {
51
51
  set_fp_flag(FpFlag::NV);
52
52
  }
53
- f[fd] = HP_CANONICAL_NAN;
53
+ F[fd] = HP_CANONICAL_NAN;
54
54
  } else {
55
- f[fd] = packToF32UI(sign, 0xFF, 0);
55
+ F[fd] = packToF32UI(sign, 0xFF, 0);
56
56
  }
57
57
  } else {
58
58
  if (exp != 0) {
59
59
  if (frac != 0) {
60
- f[fd] = packToF32UI(sign, 0, 0);
60
+ F[fd] = packToF32UI(sign, 0, 0);
61
61
  } else {
62
62
  Bits<6> norm_exp;
63
63
  (norm_exp, frac) = softfloat_normSubnormalF16Sig( frac );
64
64
  exp = norm_exp - 1;
65
- f[fd] = packToF32UI(sign, exp + 0x70, frac << 13);
65
+ F[fd] = packToF32UI(sign, exp + 0x70, frac << 13);
66
66
  }
67
67
  } else {
68
- f[fd] = packToF32UI(sign, exp + 0x70, frac << 13);
68
+ F[fd] = packToF32UI(sign, exp + 0x70, frac << 13);
69
69
  }
70
70
  }
71
71
 
@@ -36,7 +36,7 @@ access:
36
36
  operation(): |
37
37
  check_f_ok($encoding);
38
38
 
39
- Bits<32> sp_value = f[fs1][31:0];
39
+ Bits<32> sp_value = F[fs1][31:0];
40
40
 
41
41
  Bits<1> sign = sp_value[31];
42
42
  Bits<8> exp = sp_value[30:23];
@@ -47,9 +47,9 @@ operation(): |
47
47
  if ((sp_value & 0x00400000) != 0) {
48
48
  set_fp_flag(FpFlag::NV);
49
49
  }
50
- f[fd] = nan_box(16, FLEN, HP_CANONICAL_NAN);
50
+ F[fd] = nan_box(16, FLEN, HP_CANONICAL_NAN);
51
51
  } else {
52
- f[fd] = nan_box(16, FLEN, packToF16UI( sign, 0x1F, 0 ));
52
+ F[fd] = nan_box(16, FLEN, packToF16UI( sign, 0x1F, 0 ));
53
53
  }
54
54
  } else {
55
55
 
@@ -58,10 +58,10 @@ operation(): |
58
58
  # is OR-red with the sticky
59
59
  Bits<16> frac16 = (frac >> 9) | ((frac & 0x1ff) != 0 ? 1 : 0);
60
60
  if ((exp | frac16) == 0) {
61
- f[fd] = nan_box(16, FLEN, packToF16UI( sign, 0, 0 ));
61
+ F[fd] = nan_box(16, FLEN, packToF16UI( sign, 0, 0 ));
62
62
  } else {
63
63
  assert(false, "TODO: implement roundPackToF16");
64
- # f[fd] = soffloat_roundPackToF16(sign, exp - 0x71, frac16 | 0x4000);
64
+ # F[fd] = soffloat_roundPackToF16(sign, exp - 0x71, frac16 | 0x4000);
65
65
  }
66
66
 
67
67
  }
@@ -39,6 +39,6 @@ operation(): |
39
39
 
40
40
  Bits<16> hp_value = read_memory(16, virtual_address, $encoding);
41
41
 
42
- f[fd] = nan_box(16, FLEN, hp_value);
42
+ F[fd] = nan_box(16, FLEN, hp_value);
43
43
 
44
44
  mark_f_state_dirty();
@@ -33,6 +33,6 @@ operation(): |
33
33
 
34
34
  Bits<16> hp_value = X[xs1][15:0];
35
35
 
36
- f[fd] = nan_box(16, FLEN, hp_value);
36
+ F[fd] = nan_box(16, FLEN, hp_value);
37
37
 
38
38
  mark_f_state_dirty();
@@ -35,4 +35,4 @@ access:
35
35
  operation(): |
36
36
  check_f_ok($encoding);
37
37
 
38
- X[xd] = sext(f[fs1][15:0], 16);
38
+ X[xd] = sext(F[fs1][15:0], 16);
@@ -40,6 +40,6 @@ operation(): |
40
40
 
41
41
  XReg virtual_address = X[xs1] + $signed(imm);
42
42
 
43
- Bits<16> hp_value = f[fs2][15:0];
43
+ Bits<16> hp_value = F[fs2][15:0];
44
44
 
45
45
  write_memory(16, virtual_address, hp_value, $encoding);
@@ -41,7 +41,7 @@ access:
41
41
  data_independent_timing: false
42
42
  pseudoinstructions:
43
43
  - when: xd == 0
44
- to: csrc csr,xs1
44
+ to: csrc csr, xs1
45
45
  operation(): |
46
46
  Csr csr_handle = direct_csr_lookup(csr);
47
47
 
@@ -35,7 +35,7 @@ access:
35
35
  data_independent_timing: false
36
36
  pseudoinstructions:
37
37
  - when: xd == 0
38
- to: csrci csr,imm
38
+ to: csrci csr, imm
39
39
  operation(): |
40
40
  Boolean will_write = imm != 0;
41
41
 
@@ -54,9 +54,9 @@ pseudoinstructions:
54
54
  - when: xs1 == 0 && csr == 0xC82
55
55
  to: rdinstreth xd
56
56
  - when: xs1 == 0
57
- to: csrr xd,csr
57
+ to: csrr xd, csr
58
58
  - when: xd == 0
59
- to: csrs csr,xs1
59
+ to: csrs csr, xs1
60
60
  operation(): |
61
61
  Boolean will_write = xs1 != 0;
62
62
 
@@ -35,7 +35,7 @@ access:
35
35
  data_independent_timing: false
36
36
  pseudoinstructions:
37
37
  - when: xd == 0
38
- to: csrsi csr,imm
38
+ to: csrsi csr, imm
39
39
  operation(): |
40
40
  Boolean will_write = imm != 0;
41
41
 
@@ -35,7 +35,7 @@ access:
35
35
  vu: always
36
36
  pseudoinstructions:
37
37
  - when: xd == 0
38
- to: csrw csr,xs1
38
+ to: csrw csr, xs1
39
39
  operation(): |
40
40
  Csr csr_handle = direct_csr_lookup(csr);
41
41
 
@@ -35,7 +35,7 @@ access:
35
35
  vu: always
36
36
  pseudoinstructions:
37
37
  - when: xd == 0
38
- to: csrwi csr,imm
38
+ to: csrwi csr, imm
39
39
  operation(): |
40
40
  Csr csr_handle = direct_csr_lookup(csr);
41
41
 
@@ -280,6 +280,23 @@ builtin function ebreak {
280
280
  }
281
281
  }
282
282
 
283
+ builtin function execute_instruction {
284
+ arguments
285
+ Bits<32> encoding
286
+ description {
287
+ Fetch and execute the instruction with the given 32-bit encoding in the current hart
288
+ context. The instruction executes as if it were a normal instruction, with the
289
+ following differences:
290
+
291
+ * The PC is not advanced after execution (the calling instruction is responsible
292
+ for PC management).
293
+ * If the instruction raises an exception, the exception propagates normally.
294
+
295
+ This builtin is intended for use by instructions that dynamically dispatch
296
+ sub-instructions fetched from memory (e.g., instruction lookup table instructions).
297
+ }
298
+ }
299
+
283
300
  builtin function prefetch_instruction {
284
301
  arguments
285
302
  XReg virtual_address # virtual cache block address
@@ -9,11 +9,7 @@
9
9
  # Files in berkely-softfloat-3 repository are licensed under BSD-3-clause.
10
10
 
11
11
  # floating point register file
12
- U32 FLEN = 64; # implemented?(ExtensionName::D) ? 7'd64 : 7'd32;
13
- Bits<FLEN> f[32] = [0, 0, 0, 0, 0, 0, 0, 0,
14
- 0, 0, 0, 0, 0, 0, 0, 0,
15
- 0, 0, 0, 0, 0, 0, 0, 0,
16
- 0, 0, 0, 0, 0, 0, 0, 0];
12
+ U32 FLEN = implemented?(ExtensionName::Q) ? 8'd128 : (implemented?(ExtensionName::D) ? 7'd64 : 7'd32);
17
13
 
18
14
  # FP constants
19
15
  Bits<32> SP_POS_INF = 32'b0_11111111_00000000000000000000000;
@@ -327,8 +327,7 @@ function exception_handling_mode {
327
327
  } else {
328
328
  return PrivilegeMode::M;
329
329
  }
330
- } else {
331
- assert(implemented?(ExtensionName::H) && ((mode() == PrivilegeMode::VS) || (mode() == PrivilegeMode::VU)), "Unexpected mode");
330
+ } else if (implemented?(ExtensionName::H) && ((mode() == PrivilegeMode::VS) || (mode() == PrivilegeMode::VU)) ) {
332
331
  if (($bits(CSR[medeleg]) & (MXLEN'1 << $bits(exception_code))) != 0) {
333
332
  if (($bits(CSR[hedeleg]) & (MXLEN'1 << $bits(exception_code))) != 0) {
334
333
  return PrivilegeMode::VS;
@@ -339,6 +338,8 @@ function exception_handling_mode {
339
338
  # if an exception is not delegated to HS-mode, it can't be delegated to VS-mode
340
339
  return PrivilegeMode::M;
341
340
  }
341
+ } else {
342
+ unreachable();
342
343
  }
343
344
  }
344
345
  }
@@ -717,7 +718,7 @@ function raise_precise {
717
718
  $pc = {CSR[mtvec].BASE, 2'b00};
718
719
  CSR[mcause].INT = 1'b0;
719
720
  CSR[mcause].CODE = $bits(exception_code);
720
- if (CSR[misa].H == 1) {
721
+ if (implemented?(ExtensionName::H) && CSR[misa].H == 1) {
721
722
  # write zero into mtval2 and minst
722
723
  # (when these are non-zero values, raise_guest_page_fault should be callecd)
723
724
  CSR[mtval2].VALUE = 0;
@@ -1196,13 +1197,13 @@ function effective_ldst_mode {
1196
1197
  if (mode() == PrivilegeMode::M) {
1197
1198
  if (CSR[misa].U == 1 && CSR[mstatus].MPRV == 1) {
1198
1199
  if (CSR[mstatus].MPP == 0b00) {
1199
- if (CSR[misa].H == 1 && mpv() == 0b1) {
1200
+ if (implemented?(ExtensionName::H) && CSR[misa].H == 1 && mpv() == 0b1) {
1200
1201
  return PrivilegeMode::VU;
1201
1202
  } else {
1202
1203
  return PrivilegeMode::U;
1203
1204
  }
1204
1205
  } else if (CSR[misa].S == 1 && CSR[mstatus].MPP == 0b01) {
1205
- if (CSR[misa].H == 1 && mpv() == 0b1) {
1206
+ if (implemented?(ExtensionName::H) && CSR[misa].H == 1 && mpv() == 0b1) {
1206
1207
  return PrivilegeMode::VS;
1207
1208
  } else {
1208
1209
  return PrivilegeMode::S;
@@ -1532,7 +1533,7 @@ function translate_gstage {
1532
1533
  body {
1533
1534
  TranslationResult result;
1534
1535
 
1535
- if (effective_mode == PrivilegeMode::S || effective_mode == PrivilegeMode::U) {
1536
+ if (!implemented?(ExtensionName::H) || effective_mode == PrivilegeMode::S || effective_mode == PrivilegeMode::U) {
1536
1537
  # there is no gstage page walk
1537
1538
  result.paddr = gpaddr;
1538
1539
  return result;
@@ -2562,9 +2563,15 @@ function read_memory_aligned {
2562
2563
  arguments
2563
2564
  U32 LEN,
2564
2565
  XReg virtual_address,
2565
- Bits<INSTR_ENC_SIZE> encoding # the encoding of an instruction causing this access
2566
+ Bits<INSTR_ENC_SIZE> encoding, # the encoding of an instruction causing this access
2567
+ Bits<1> aq, # acquire semantics? 0=no, 1=yes
2568
+ Bits<1> rl # release semantics? 0=no, 1=yes
2566
2569
  description {
2567
2570
  Read from virtual memory using a known aligned address.
2571
+
2572
+ If +rl+ is 1, then the load also acts as a memory model release (applied after all
2573
+ checks pass but before the physical read).
2574
+ If +aq+ is 1, then the load also acts as a memory model acquire (applied after the read).
2568
2575
  }
2569
2576
  body {
2570
2577
  TranslationResult result;
@@ -2578,7 +2585,17 @@ function read_memory_aligned {
2578
2585
  # may raise an exception
2579
2586
  access_check(result.paddr, LEN, virtual_address, MemoryOperation::Read, ExceptionCode::LoadAccessFault, effective_ldst_mode());
2580
2587
 
2581
- return read_physical_memory(LEN, result.paddr);
2588
+ if (rl == 1'b1) {
2589
+ memory_model_release();
2590
+ }
2591
+
2592
+ XReg value = read_physical_memory(LEN, result.paddr);
2593
+
2594
+ if (aq == 1'b1) {
2595
+ memory_model_acquire();
2596
+ }
2597
+
2598
+ return value;
2582
2599
  }
2583
2600
  }
2584
2601
 
@@ -2597,7 +2614,7 @@ function read_memory {
2597
2614
  XReg physical_address;
2598
2615
 
2599
2616
  if (aligned) {
2600
- return read_memory_aligned(LEN, virtual_address, encoding);
2617
+ return read_memory_aligned(LEN, virtual_address, encoding, 1'b0, 1'b0);
2601
2618
  }
2602
2619
 
2603
2620
  # access isn't naturally aligned, but it still might be atomic if this hart supports
@@ -2636,7 +2653,7 @@ function read_memory {
2636
2653
  if (MISALIGNED_SPLIT_STRATEGY == "sequential_bytes") {
2637
2654
  XReg result = 0;
2638
2655
  for (U32 I = 0; I < (LEN/8); I++) {
2639
- result = result | (read_memory_aligned(8, virtual_address + I, encoding) `<< (8*I));
2656
+ result = result | (read_memory_aligned(8, virtual_address + I, encoding, 1'b0, 1'b0) `<< (8*I));
2640
2657
  }
2641
2658
  return result;
2642
2659
  } else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
@@ -2805,7 +2822,7 @@ function load_reserved {
2805
2822
  reservation_virtual_address = virtual_address;
2806
2823
  }
2807
2824
 
2808
- return read_memory_aligned(N, physical_address, encoding);
2825
+ return read_memory_aligned(N, physical_address, encoding, 1'b0, 1'b0);
2809
2826
  }
2810
2827
  }
2811
2828
 
@@ -2951,9 +2968,15 @@ function write_memory_aligned {
2951
2968
  U32 LEN,
2952
2969
  XReg virtual_address,
2953
2970
  XReg value,
2954
- Bits<INSTR_ENC_SIZE> encoding # encoding of the instruction causing this access
2971
+ Bits<INSTR_ENC_SIZE> encoding, # encoding of the instruction causing this access
2972
+ Bits<1> aq, # acquire semantics? 0=no, 1=yes
2973
+ Bits<1> rl # release semantics? 0=no, 1=yes
2955
2974
  description {
2956
2975
  Write to virtual memory using a known aligned address.
2976
+
2977
+ If +rl+ is 1, then the store also acts as a memory model release (applied after all
2978
+ checks pass but before the physical write).
2979
+ If +aq+ is 1, then the store also acts as a memory model acquire.
2957
2980
  }
2958
2981
  body {
2959
2982
  XReg physical_address;
@@ -2965,7 +2988,15 @@ function write_memory_aligned {
2965
2988
  # may raise an exception
2966
2989
  access_check(physical_address, LEN, virtual_address, MemoryOperation::Write, ExceptionCode::StoreAmoAccessFault, effective_ldst_mode());
2967
2990
 
2991
+ if (rl == 1'b1) {
2992
+ memory_model_release();
2993
+ }
2994
+
2968
2995
  write_physical_memory(LEN, physical_address, value);
2996
+
2997
+ if (aq == 1'b1) {
2998
+ memory_model_acquire();
2999
+ }
2969
3000
  }
2970
3001
  }
2971
3002
 
@@ -2983,7 +3014,7 @@ function write_memory {
2983
3014
  XReg physical_address;
2984
3015
 
2985
3016
  if (aligned) {
2986
- write_memory_aligned(LEN, virtual_address, value, encoding);
3017
+ write_memory_aligned(LEN, virtual_address, value, encoding, 1'b0, 1'b0);
2987
3018
  return;
2988
3019
  }
2989
3020
 
@@ -3022,7 +3053,7 @@ function write_memory {
3022
3053
  # misaligned, must break into multiple reads
3023
3054
  if (MISALIGNED_SPLIT_STRATEGY == "sequential_bytes") {
3024
3055
  for (U32 I = 0; I < (LEN/8); I++) {
3025
- write_memory_aligned(8, virtual_address + I, (value >> (8*I))[7:0], encoding);
3056
+ write_memory_aligned(8, virtual_address + I, (value >> (8*I))[7:0], encoding, 1'b0, 1'b0);
3026
3057
  }
3027
3058
  } else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
3028
3059
  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");
@@ -11,8 +11,7 @@
11
11
  # - integer arith (vadd/vsub/vrsub(.vv,.vx,.vi), compare, min, max)
12
12
  # - integer widening arith ()
13
13
 
14
- # the vector register file
15
- Bits<128> v[32];
14
+ # the vector register file is populated by the symtab from V.yaml
16
15
 
17
16
  enum VectorLmulType {
18
17
  Divide
@@ -85,7 +85,7 @@ volumes:
85
85
  - { name: Zicond, version: "1.0.0" }
86
86
  - { name: M, version: "2.0.0" }
87
87
  - { name: A, version: "2.1.0" }
88
- - { name: Zawrs, version: "1.0.1" }
88
+ - { name: Zawrs, version: "1.0" }
89
89
  - { name: Zacas, version: "1.0.0" }
90
90
  - { name: Zabha, version: "1.0.0" }
91
91
  # - { name: RVWMO, version: "2.0" }
@@ -207,10 +207,10 @@ volumes:
207
207
  - { name: Smcdeleg, version: "1.0.0" }
208
208
  - { name: S, version: "1.12.0" }
209
209
  - { name: Sm, version: "1.12.0" }
210
- - { name: Sv32, version: "1.12.0" }
211
- - { name: Sv39, version: "1.12.0" }
212
- - { name: Sv48, version: "1.12.0" }
213
- - { name: Sv57, version: "1.12.0" }
210
+ - { name: Sv32, version: "1.0" }
211
+ - { name: Sv39, version: "1.0" }
212
+ - { name: Sv48, version: "1.0" }
213
+ - { name: Sv57, version: "1.0" }
214
214
  - { name: Svnapot, version: "1.0.0" }
215
215
  - { name: Svpbmt, version: "1.0.0" }
216
216
  - { name: Svinval, version: "1.0.0" }
@@ -26,5 +26,11 @@ schema:
26
26
  maxItems: 32
27
27
  minItems: 32
28
28
  definedBy:
29
- extension:
30
- name: Sm
29
+ allOf:
30
+ - extension:
31
+ name: Sm
32
+ - param:
33
+ name: MCOUNTINHIBIT_IMPLEMENTED
34
+ equal: true
35
+ reason: |
36
+ `COUNTINHIBIT_EN` only has effect when the `mcountinhibit` CSR is implemented.
@@ -23,6 +23,6 @@ schema:
23
23
  maximum: 0x7ffffffffffffff # 58 bits
24
24
  requirements:
25
25
  idl(): |
26
- MXLEN == 32 -> JVT_BASE_MASK < 0xffff_ffc0;
26
+ MXLEN == 32 -> JVT_BASE_MASK <= 0xffff_ffc0;
27
27
  reason: |
28
28
  Includes the implicitly-zero bits of jvt.BASE, so JVT_BASE_MASK[5:0] must always be 0.
@@ -0,0 +1,25 @@
1
+ # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ # yaml-language-server: $schema=../../../schemas/param_schema.json
5
+
6
+ $schema: param_schema.json#
7
+ kind: parameter
8
+ name: MCOUNTINHIBIT_IMPLEMENTED
9
+ long_name: |
10
+ Whether or not the `mcountinhibit` CSR is implemented
11
+ description: |
12
+ Options:
13
+
14
+ true::
15
+ The `mcountinhibit` CSR is implemented and can be accessed in M-mode.
16
+
17
+ false::
18
+ The `mcountinhibit` CSR is not implemented.
19
+ Accessing the CSR will cause an IllegalInstruction trap or enter an unpredictable state,
20
+ depending on TRAP_ON_UNIMPLEMENTED_CSR.
21
+ schema:
22
+ type: boolean
23
+ definedBy:
24
+ extension:
25
+ name: Sm
@@ -30,6 +30,13 @@ schema:
30
30
  maxItems: 2
31
31
  uniqueItems: true
32
32
  requirements:
33
- idl(): |
34
- (MTVEC_ACCESS == "ro") -> ($array_size(MTVEC_MODES) == 1);
35
- reason: If `mtvec` is read-only, the mode cannot be changed.
33
+ # If `mtvec` is read-only, the mode cannot be changed.
34
+ if:
35
+ param:
36
+ name: MTVEC_ACCESS
37
+ equal: ro
38
+ then:
39
+ param:
40
+ name: MTVEC_MODES
41
+ size: true
42
+ equal: 1
@@ -11,6 +11,8 @@ description: |
11
11
  long_name: TODO
12
12
  schema:
13
13
  type: integer
14
+ minimum: 32
15
+ maximum: 65536
14
16
  # requirements:
15
17
  # idl(): |
16
18
  # -> (VLEN >= ELEN) && (VLEN <='h10000) && (popcount(VLEN) == 1);