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
@@ -10,8 +10,7 @@ kind: architecture configuration
10
10
  type: partially configured
11
11
  name: RVI20U32
12
12
  description:
13
- params:
14
- MXLEN: 32
13
+ params: {}
15
14
  mandatory_extensions:
16
15
  - name: I
17
16
  version: "~> 2.1"
@@ -21,9 +20,9 @@ non_mandatory_extensions:
21
20
  - name: C
22
21
  version: "~> 2.0"
23
22
  - name: D
24
- version: "~> 2.2"
23
+ version: "~> 2.2.0"
25
24
  - name: F
26
- version: "~> 2.2"
25
+ version: "~> 2.2.0"
27
26
  - name: M
28
27
  version: "~> 2.0"
29
28
  - name: Zca
@@ -39,3 +38,10 @@ non_mandatory_extensions:
39
38
  - name: Zihpm
40
39
  version: "~> 2.0"
41
40
  additional_extensions: true
41
+ requirements:
42
+ param:
43
+ allOf:
44
+ - name: U_MODE_ENDIANNESS
45
+ equal: little
46
+ - name: UXLEN
47
+ includes: 32
@@ -10,8 +10,7 @@ kind: architecture configuration
10
10
  type: partially configured
11
11
  name: RVI20U64
12
12
  description:
13
- params:
14
- MXLEN: 64
13
+ params: {}
15
14
  mandatory_extensions:
16
15
  - name: I
17
16
  version: "~> 2.1"
@@ -21,9 +20,9 @@ non_mandatory_extensions:
21
20
  - name: C
22
21
  version: "~> 2.0"
23
22
  - name: D
24
- version: "~> 2.2"
23
+ version: "~> 2.2.0"
25
24
  - name: F
26
- version: "~> 2.2"
25
+ version: "~> 2.2.0"
27
26
  - name: M
28
27
  version: "~> 2.0"
29
28
  - name: Zca
@@ -39,3 +38,10 @@ non_mandatory_extensions:
39
38
  - name: Zihpm
40
39
  version: "~> 2.0"
41
40
  additional_extensions: true
41
+ requirements:
42
+ param:
43
+ allOf:
44
+ - name: U_MODE_ENDIANNESS
45
+ equal: little
46
+ - name: UXLEN
47
+ includes: 64
@@ -5,7 +5,7 @@ kind: architecture configuration
5
5
  type: fully configured
6
6
  name: qc_iu
7
7
  arch_overlay: qc_iu
8
- description: Configuration with the Xqci and Xqccmp custom extensions.
8
+ description: Configuration with the Xqci, Xqccmp, Xqccmt, and Xqccmi custom extensions.
9
9
  implemented_extensions:
10
10
  - { name: Sm, version: "= 1.13" }
11
11
  - { name: Smrnmi, version: "= 1.0" }
@@ -22,6 +22,8 @@ implemented_extensions:
22
22
  - { name: Zicsr, version: "= 2.0" }
23
23
  - { name: Zihpm, version: "= 2.0" }
24
24
  - { name: Xqccmp, version: "= 0.3" }
25
+ - { name: Xqccmt, version: "= 0.1.0" }
26
+ - { name: Xqccmi, version: "= 0.1.0" }
25
27
  - { name: Xqci, version: "= 0.13" }
26
28
  - { name: Xqcia, version: "= 0.7.0" }
27
29
  - { name: Xqciac, version: "= 0.3.0" }
@@ -177,6 +179,7 @@ params:
177
179
  PMA_GRANULARITY: 12
178
180
  M_MODE_ENDIANNESS: little
179
181
  MISA_CSR_IMPLEMENTED: true
182
+ MCOUNTINHIBIT_IMPLEMENTED: true
180
183
  MTVEC_ACCESS: rw
181
184
  MTVEC_ILLEGAL_WRITE_BEHAVIOR: retain
182
185
  MTVEC_BASE_ALIGNMENT_DIRECT: 4
@@ -18,7 +18,7 @@ implemented_extensions:
18
18
  - [S, "1.11.0"]
19
19
  - [U, "1.0.0"]
20
20
  - [Zifencei, "2.0.0"]
21
- - [Sv32, "1.11.0"]
21
+ - [Sv32, "1.0"]
22
22
  - [F, "2.2.0"]
23
23
  - [Zcf, "1.0"]
24
24
 
@@ -55,6 +55,7 @@ params:
55
55
  PMA_GRANULARITY: 12
56
56
  PHYS_ADDR_WIDTH: 34
57
57
  MISA_CSR_IMPLEMENTED: true
58
+ MCOUNTINHIBIT_IMPLEMENTED: true
58
59
  MTVEC_ACCESS: rw
59
60
  MTVEC_MODES: [0, 1]
60
61
  MTVEC_BASE_ALIGNMENT_DIRECT: 4
@@ -22,7 +22,7 @@ implemented_extensions:
22
22
  - [S, "1.11.0"]
23
23
  - [U, "1.0.0"]
24
24
  - [Zifencei, "2.0.0"]
25
- - [Sv32, "1.11.0"]
25
+ - [Sv32, "1.0"]
26
26
  - [V, "1.0.0"]
27
27
  - [Zve64f, "1.0.0"]
28
28
  - [Zve64d, "1.0.0"]
@@ -65,6 +65,7 @@ params:
65
65
  PMA_GRANULARITY: 12
66
66
  PHYS_ADDR_WIDTH: 34
67
67
  MISA_CSR_IMPLEMENTED: true
68
+ MCOUNTINHIBIT_IMPLEMENTED: true
68
69
  MTVEC_ACCESS: rw
69
70
  MTVEC_MODES: [0, 1]
70
71
  MTVEC_BASE_ALIGNMENT_DIRECT: 4
@@ -17,7 +17,7 @@ implemented_extensions:
17
17
  - [S, "1.11.0"]
18
18
  - [U, "1.0.0"]
19
19
  - [Zifencei, "2.0.0"]
20
- - [Sv39, "1.11.0"]
20
+ - [Sv39, "1.0"]
21
21
  - [Zca, "1.0.0"]
22
22
  - [F, "2.2.0"]
23
23
 
@@ -53,6 +53,7 @@ params:
53
53
  PMA_GRANULARITY: 12
54
54
  PHYS_ADDR_WIDTH: 57
55
55
  MISA_CSR_IMPLEMENTED: true
56
+ MCOUNTINHIBIT_IMPLEMENTED: true
56
57
  MTVEC_ACCESS: rw
57
58
  MTVEC_MODES: [0, 1]
58
59
  MTVEC_BASE_ALIGNMENT_DIRECT: 4
@@ -19,7 +19,7 @@ implemented_extensions:
19
19
  - [S, "1.11.0"]
20
20
  - [U, "1.0.0"]
21
21
  - [Zifencei, "2.0.0"]
22
- - [Sv39, "1.11.0"]
22
+ - [Sv39, "1.0"]
23
23
  - [V, "1.0.0"]
24
24
  - [F, "2.2"]
25
25
  - [D, "2.2"]
@@ -64,6 +64,7 @@ params:
64
64
  PMA_GRANULARITY: 12
65
65
  PHYS_ADDR_WIDTH: 57
66
66
  MISA_CSR_IMPLEMENTED: true
67
+ MCOUNTINHIBIT_IMPLEMENTED: true
67
68
  MTVEC_ACCESS: rw
68
69
  MTVEC_MODES: [0, 1]
69
70
  MTVEC_BASE_ALIGNMENT_DIRECT: 4
@@ -0,0 +1,17 @@
1
+ # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ ---
5
+ # Overlay: allow bit 0 of mnepc.PC to be written and read back unchanged.
6
+ #
7
+ # When Xqccmi is present, qc.cm.ilut sets bit 0 of mepc/mnepc to indicate
8
+ # whether an exception originated from the first (bit 0 = 0) or second
9
+ # (bit 0 = 1) packed instruction in an ILUT entry. The standard mnepc
10
+ # definition forces bit 0 to 0 on write and masks it on read; both
11
+ # behaviours are removed here so that bit 0 is preserved faithfully.
12
+ fields:
13
+ PC:
14
+ sw_write(csr_value): |
15
+ return csr_value.PC;
16
+ sw_read(): |
17
+ return CSR[mnepc].PC;
@@ -0,0 +1,45 @@
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/csr_schema.json
5
+
6
+ $schema: csr_schema.json#
7
+ kind: csr
8
+ name: qc.itba
9
+ long_name: Instruction Table Base Address Register
10
+ address: 0x800
11
+ priv_mode: U
12
+ length: MXLEN
13
+ writable: true
14
+ description: |
15
+ The `qc.itba` register holds the base address of the Instruction Lookup Table (ILUT)
16
+ used by the `qc.cm.ilut` instruction.
17
+
18
+ The BASE field specifies bits[XLEN-1:6] of the ILUT base address. The lower 6 bits
19
+ are implicitly zero, so the ILUT base address is always 64-byte aligned.
20
+
21
+ The memory region pointed to by `qc.itba.base` is treated as instruction memory for
22
+ the purpose of executing ILUT instructions, requiring execute (X) access permission.
23
+ Read (R) permission is not required.
24
+
25
+ `qc.itba` adds architectural state to the system software context and must be
26
+ saved and restored on context switches.
27
+ definedBy:
28
+ extension:
29
+ name: Xqccmi
30
+ fields:
31
+ base:
32
+ location_rv32: 31-6
33
+ location_rv64: 63-6
34
+ type: RW
35
+ reset_value: UNDEFINED_LEGAL
36
+ description: |
37
+ Bits[XLEN-1:6] of the ILUT base address. The full base address is formed by
38
+ appending 6 implicit zero bits: `base_addr = {base, 6'b000000}`.
39
+ The base address must be 64-byte aligned.
40
+ mode:
41
+ location: 5-0
42
+ type: RO
43
+ reset_value: 0
44
+ description: |
45
+ Reserved for future use. Always reads as zero. Writes are ignored.
@@ -0,0 +1,39 @@
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/csr_schema.json
5
+
6
+ $schema: csr_schema.json#
7
+ kind: csr
8
+ name: qc.itdec
9
+ long_name: Instruction Table Double Entry Count Register
10
+ address: 0x801
11
+ priv_mode: U
12
+ length: MXLEN
13
+ writable: true
14
+ description: |
15
+ The `qc.itdec` register specifies the number of leading 64-bit double entries
16
+ in the Instruction Lookup Table (ILUT) used by the `qc.cm.ilut` instruction.
17
+
18
+ The DEC field holds an 11-bit count. The first DEC logical ILUT entries
19
+ (indices 0 through DEC−1) are 64-bit double entries. The remaining entries
20
+ (indices DEC through 2047) are 32-bit single entries.
21
+
22
+ The byte offset from the ILUT base address for logical index i is:
23
+ - If i < DEC: offset = i × 8
24
+ - If i ≥ DEC: offset = DEC × 8 + (i − DEC) × 4
25
+
26
+ The reset value of 0 selects backward-compatible mode in which all entries
27
+ are 32-bit single entries.
28
+ definedBy:
29
+ extension:
30
+ name: Xqccmi
31
+ fields:
32
+ dec:
33
+ location: 13-3
34
+ type: RW
35
+ reset_value: 0
36
+ description: |
37
+ 11-bit double entry count. Specifies the number of leading 64-bit entries
38
+ in the ILUT. Legal range: 0..2047. A value of 0 means all entries are
39
+ 32-bit (backward-compatible mode).
@@ -0,0 +1,11 @@
1
+ # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ ---
5
+ # Overlay: extend jvt definedBy to include Xqccmt (custom variant of Zcmt)
6
+ definedBy:
7
+ extension:
8
+ name: null
9
+ anyOf:
10
+ - name: Zcmt
11
+ - name: Xqccmt
@@ -0,0 +1,16 @@
1
+ # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
+ # SPDX-License-Identifier: BSD-3-Clause-Clear
3
+
4
+ ---
5
+ # Overlay: allow bit 0 of mepc.PC to be written and read back unchanged.
6
+ #
7
+ # When Xqccmi is present, qc.cm.ilut sets bit 0 of mepc to indicate whether
8
+ # an exception originated from the first (bit 0 = 0) or second (bit 0 = 1)
9
+ # packed instruction in an ILUT entry. The standard mepc definition forces
10
+ # bit 0 to 0 on write and masks it on read; both behaviours are removed here.
11
+ fields:
12
+ PC:
13
+ sw_write(csr_value): |
14
+ return csr_value.PC;
15
+ sw_read(): |
16
+ return CSR[mepc].PC;
@@ -0,0 +1,219 @@
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/ext_schema.json
5
+
6
+ $schema: ext_schema.json#
7
+ kind: extension
8
+ name: Xqccmi
9
+ long_name: Qualcomm Custom Compressed Instruction Lookup Table
10
+ description: |
11
+ == Xqccmi: Qualcomm Custom Compressed Instruction Lookup Table
12
+
13
+ The Xqccmi extension adds the `qc.cm.ilut` instruction, a 16-bit compressed
14
+ instruction that fetches and executes one or two packed instructions from an
15
+ Instruction Lookup Table (ILUT) stored in memory. The extension also defines
16
+ two new user-level CSRs: `qc.itba` (ILUT Base Address) and `qc.itdec` (ILUT
17
+ Double Entry Count).
18
+
19
+ NOTE: Xqccmi uses the same encoding space as the `c.fld` instruction defined
20
+ by the Zcd extension (bits[1:0]=00, bits[15:13]=001). Therefore, Xqccmi and
21
+ Zcd are mutually exclusive and cannot be implemented together.
22
+
23
+ === Instruction Lookup Table (ILUT)
24
+
25
+ `qc.cm.ilut` is a 16-bit instruction that takes an 11-bit immediate index
26
+ (range 0..2047) into the ILUT. The ILUT base address is held in the `qc.itba`
27
+ CSR (address 0x800). The hardware computes the byte offset of the addressed
28
+ entry from the base address, fetches the entry, parses the packed instructions
29
+ within it, and executes them in order.
30
+
31
+ ILUT memory is treated as instruction memory. It requires execute (X)
32
+ permission and does NOT require read (R) permission. A `fence.i` instruction
33
+ must be executed after any write to ILUT memory to guarantee that subsequent
34
+ `qc.cm.ilut` executions observe the updated contents.
35
+
36
+ === qc.itba CSR (Address 0x800)
37
+
38
+ The `qc.itba` CSR holds the base address of the ILUT.
39
+
40
+ [cols="^1,^1,^3,^3",options="header"]
41
+ |===
42
+ | Bits | Name | Access | Description
43
+ | 31:6 | base | WARL (RW) | 64-byte aligned base address of the ILUT. Bits[5:0] of the physical base address are implicitly zero.
44
+ | 5:0 | mode | Read-only 0 | Reserved for future use. Always reads as zero; writes are ignored.
45
+ |===
46
+
47
+ `qc.itba` is a user-level read/write CSR. Software must save and restore
48
+ `qc.itba` on context switches.
49
+
50
+ === qc.itdec CSR (Address 0x801) — Double Entry Count
51
+
52
+ The `qc.itdec` CSR specifies how many of the leading ILUT entries are 64-bit
53
+ double entries. All remaining entries are 32-bit.
54
+
55
+ [cols="^1,^1,^3,^3",options="header"]
56
+ |===
57
+ | Bits | Name | Access | Description
58
+ | 13:3 | dec | WARL (RW) | 11-bit double entry count. Legal range: 0..2047. Reset value: 0.
59
+ | 31:14 | — | Read-only 0 | Reserved. Always reads as zero; writes are ignored.
60
+ | 2:0 | — | Read-only 0 | Reserved. Always reads as zero; writes are ignored.
61
+ |===
62
+
63
+ `qc.itdec` is a user-level read/write CSR. The default reset value of 0
64
+ selects backward-compatible mode in which all entries are 32-bit.
65
+
66
+ === Table Layout
67
+
68
+ The first DEC logical entries (indices 0 through DEC−1) are 64-bit double
69
+ entries. The remaining entries (indices DEC through 2047) are 32-bit entries.
70
+
71
+ The byte offset from the ILUT base address for logical index _i_ is:
72
+
73
+ * If _i_ < DEC: offset = _i_ × 8
74
+ * If _i_ ≥ DEC: offset = DEC × 8 + (_i_ − DEC) × 4
75
+
76
+ The maximum table size is DEC×8 + (2048−DEC)×4 bytes. This ranges from
77
+ approximately 8 KB (DEC=0, all 32-bit entries) up to approximately 16 KB
78
+ (DEC=2047, nearly all 64-bit entries). No alignment constraint beyond the
79
+ 64-byte base alignment imposed by `qc.itba` is required for individual entries.
80
+
81
+ === Dual-Instruction Packing
82
+
83
+ Each ILUT entry may contain one or two instructions packed together. The
84
+ hardware determines instruction sizes by parsing bits[1:0] of each
85
+ sub-instruction after fetching the full entry.
86
+
87
+ ==== 32-bit Entry Valid Combinations
88
+
89
+ [cols="^1,^3",options="header"]
90
+ |===
91
+ | Combination | Description
92
+ | One 32-bit instruction | bits[1:0] == 2'b11; the entire 32-bit entry is a single RVI instruction.
93
+ | Two 16-bit instructions | bits[1:0] != 2'b11; the first 16-bit RVC instruction occupies bits[15:0] and the second occupies bits[31:16].
94
+ |===
95
+
96
+ ==== 64-bit Entry Valid Combinations
97
+
98
+ [cols="^1,^3",options="header"]
99
+ |===
100
+ | Combination | Description
101
+ | 16 + 32 bits | First instruction is 16-bit (bits[1:0] != 2'b11); second instruction is 32-bit.
102
+ | 16 + 48 bits | First instruction is 16-bit; second instruction is 48-bit.
103
+ | 32 + 16 bits | First instruction is 32-bit (bits[1:0] == 2'b11); second instruction is 16-bit occupying bits[47:32].
104
+ | 32 + 32 bits | Both instructions are 32-bit.
105
+ | Single 48-bit instruction | A single 48-bit instruction occupying bits[47:0]; bits[63:48] must be padded with `c.nop` (16'h0001).
106
+ |===
107
+
108
+ A single 32-bit instruction placed in a 64-bit entry is valid as the 32+16
109
+ case with `c.nop` (16'h0001) padding in bits[63:48].
110
+
111
+ Unused bits in any entry MUST be padded with `c.nop` (16'h0001). Instruction
112
+ combinations that do not fit within the entry size cause an illegal instruction
113
+ exception. Hardware determines instruction sizes by parsing bits[1:0] of each
114
+ sub-instruction after fetching the full entry.
115
+
116
+ === Instruction Restrictions
117
+
118
+ PC-relative instructions are NOT permitted in the ILUT. This includes:
119
+
120
+ * `auipc`
121
+ * All branch instructions (beq, bne, blt, bge, bltu, bgeu, c.beqz, c.bnez, etc.)
122
+ * All jump instructions (jal, jalr, c.j, c.jal, c.jr, c.jalr, etc.)
123
+
124
+ If a PC-relative instruction is fetched from the ILUT, an illegal instruction
125
+ exception is raised. 16-bit compressed instructions (bits[1:0] != 2'b11) are
126
+ otherwise valid in ILUT entries.
127
+
128
+ === Execution Model
129
+
130
+ Logically, the PC points to the `qc.cm.ilut` instruction throughout the
131
+ execution of all instructions contained within the fetched entry. The
132
+ instructions within an entry execute as if they were a single atomic unit from
133
+ the perspective of interrupt handling:
134
+
135
+ * Interrupts cannot be taken between two instructions of the same entry once
136
+ the first instruction has committed.
137
+ * If the first instruction has not yet committed when an interrupt arrives, the
138
+ interrupt is taken with mepc set to the PC of `qc.cm.ilut`.
139
+ * If the first instruction has already committed when an interrupt arrives, the
140
+ interrupt is serviced after the second instruction commits, with mepc pointing
141
+ to the next instruction after `qc.cm.ilut`.
142
+
143
+ === Exception Handling
144
+
145
+ On any exception caused by an instruction fetched from the ILUT:
146
+
147
+ * mepc (or mnepc for a double-trap) is set to the PC of `qc.cm.ilut`.
148
+ * Bit 0 of mepc/mnepc is set to 0 if the first instruction in the entry caused
149
+ the exception.
150
+ * Bit 0 of mepc/mnepc is set to 1 if the second instruction in the entry caused
151
+ the exception.
152
+
153
+ Bit 0 of mepc/mnepc is writable to 0 only; software cannot set it to 1.
154
+ Return-from-trap instructions (`mret`, `mnret`, `qc.c.mret`, `qc.c.mnret`,
155
+ `qc.c.mileaveret`) leave bit 0 of mepc/mnepc unchanged when returning.
156
+
157
+ NOTE: This is an architectural exception to the standard RISC-V requirement
158
+ that *epc bit 0 is always zero. The non-zero bit 0 encodes which instruction
159
+ within the ILUT entry caused the exception, enabling precise exception restart.
160
+
161
+ === Encoding
162
+
163
+ `qc.cm.ilut` uses the same encoding as `c.fld` (bits[1:0]=00,
164
+ bits[15:13]=001). Xqccmi is therefore mutually exclusive with the Zcd
165
+ extension.
166
+
167
+ [cols="^2,^5,^2",options="header"]
168
+ |===
169
+ | Bits[15:13] | Bits[12:2] | Bits[1:0]
170
+ | 001 | ilut_index[10:0] | 00
171
+ |===
172
+
173
+ The 11-bit `ilut_index` field (bits[12:2]) encodes the logical index into the
174
+ ILUT, selecting one of up to 2048 entries.
175
+
176
+ === Instruction Summary
177
+
178
+ [%header,cols="^1,^1,4,8"]
179
+ |===
180
+ |RV32
181
+ |RV64
182
+ |Mnemonic
183
+ |Instruction
184
+
185
+ |yes
186
+ |no
187
+ |qc.cm.ilut _index_
188
+ |<<#insns-qc_cm_ilut>>
189
+
190
+ |===
191
+ type: unprivileged
192
+ versions:
193
+ - version: "0.1.0"
194
+ state: development
195
+ contributors:
196
+ - name: Albert Yosher
197
+ company: Qualcomm Technologies, Inc.
198
+ email: ayosher@qti.qualcomm.com
199
+ - name: Derek Hower
200
+ company: Qualcomm Technologies, Inc.
201
+ email: dhower@qti.qualcomm.com
202
+ - name: Gil Zukerman
203
+ company: Qualcomm Technologies, Inc.
204
+ email: gzukerma@qti.qualcomm.com
205
+ changes:
206
+ - Initial version. Custom instruction lookup table extension with dual-instruction
207
+ packing and 64-bit double entries. Supports 16-bit, 32-bit, and 48-bit instructions
208
+ in the ILUT. Introduces qc.itba and qc.itdec CSRs.
209
+ requirements:
210
+ allOf:
211
+ - extension:
212
+ name: Zca
213
+ version: ">= 1.0.0"
214
+ - extension:
215
+ name: Zicsr
216
+ version: ">= 2.0.0"
217
+ - not:
218
+ extension:
219
+ name: Zcd
@@ -0,0 +1,127 @@
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/ext_schema.json
5
+
6
+ $schema: ext_schema.json#
7
+ kind: extension
8
+ name: Xqccmt
9
+ long_name: Qualcomm Custom Compressed Jump Table with Alternate Link Register
10
+ description: |
11
+ Xqccmt is a Qualcomm custom extension that provides compressed (16-bit) jump table
12
+ instructions for code-size reduction. It introduces two instructions, `qc.cm.jt` and
13
+ `qc.cm.jalt`, which perform indirect jumps through a jump vector table (JVT) whose
14
+ base address is held in the `jvt` CSR.
15
+
16
+ === Jump Vector Table
17
+
18
+ The jump vector table is an array of XLEN-wide entries stored in memory. Its base
19
+ address is configured by writing to the `jvt` CSR. The base address must be aligned
20
+ to a 64-byte boundary (the lower 6 bits of the base are always zero). The memory
21
+ region pointed to by `jvt.BASE` is treated as instruction memory for the purpose of
22
+ execute-permission checks.
23
+
24
+ Each instruction encodes an 8-bit `index` field. The index selects which entry in the
25
+ table to use:
26
+
27
+ * Indices 0–31 (bits [7:5] of index == 0b000): used by `qc.cm.jt` (jump only, no link)
28
+ * Indices 32–255 (bits [7:5] of index != 0b000): used by `qc.cm.jalt` (jump with link)
29
+
30
+ The entry address is computed as: `entry_addr = {jvt.BASE, 6'b000000} + index × (XLEN/8)`
31
+
32
+ === Alternate Link Register
33
+
34
+ In standard table-jump behavior, a call instruction always saves the return address in
35
+ `ra` (x1). Xqccmt extends this by repurposing bit 0 of each call table entry (index ≥ 32)
36
+ as metadata to select the return address register:
37
+
38
+ * Entry bit 0 = 0: save return address in `ra` (x1)
39
+ * Entry bit 0 = 1: save return address in `t0` (x5), the alternate link register
40
+
41
+ Because XLEN-wide addresses are naturally aligned, bit 0 of a valid target address is
42
+ always zero. Xqccmt repurposes this always-zero bit as a one-bit selector without
43
+ affecting the jump target. The actual jump target is always computed with bit 0 forced
44
+ to zero: `target = {entry[XLEN-1:1], 1'b0}`.
45
+
46
+ For `qc.cm.jt` (index < 32), bit 0 of the table entry is not used as metadata; the
47
+ jump target is computed identically: `target = {entry[XLEN-1:1], 1'b0}`, and no link
48
+ register is written.
49
+
50
+ === Encoding
51
+
52
+ Both instructions use the 16-bit compressed encoding space (quadrant 2, funct3=0b101),
53
+ the same space used by `cm.jt` and `cm.jalt` in the standard Zcmt extension. Because
54
+ of this encoding overlap, Xqccmt and Zcmt are mutually exclusive and cannot both be
55
+ present in the same configuration.
56
+
57
+ The 16-bit encoding is:
58
+
59
+ [%header,cols="^1,^1,^1,^1,^1"]
60
+ |===
61
+ |[15:13]
62
+ |[12:10]
63
+ |[9:5]
64
+ |[4:2]
65
+ |[1:0]
66
+
67
+ |101
68
+ |index[7:5]
69
+ |index[4:0]
70
+ |000
71
+ |10
72
+ |===
73
+
74
+ When index[7:5] == 0b000, the instruction is `qc.cm.jt` (indices 0–31).
75
+ When index[7:5] != 0b000, the instruction is `qc.cm.jalt` (indices 32–255).
76
+
77
+ === JVT CSR Access Control
78
+
79
+ The `jvt` CSR is accessible at address 0x017. If the Smstateen extension is
80
+ implemented, access to `jvt` from non-M modes is gated by the JVT bit in the
81
+ `mstateen0` / `sstateen0` / `hstateen0` CSRs. Attempting to execute `qc.cm.jt` or
82
+ `qc.cm.jalt` when `jvt` is inaccessible raises an Illegal Instruction exception.
83
+
84
+ === Instruction Summary
85
+
86
+ [%header,cols="^1,^1,4,8"]
87
+ |===
88
+ |RV32
89
+ |RV64
90
+ |Mnemonic
91
+ |Instruction
92
+
93
+ |yes
94
+ |yes
95
+ |qc.cm.jt _index_
96
+ |<<#insns-qc_cm_jt>>
97
+
98
+ |yes
99
+ |yes
100
+ |qc.cm.jalt _index_
101
+ |<<#insns-qc_cm_jalt>>
102
+
103
+ |===
104
+ type: unprivileged
105
+ versions:
106
+ - version: "0.1.0"
107
+ state: development
108
+ ratification_date: unknown
109
+ contributors:
110
+ - name: Albert Yosher
111
+ company: Qualcomm Technologies, Inc.
112
+ email: ayosher@qti.qualcomm.com
113
+ - name: Derek Hower
114
+ company: Qualcomm Technologies, Inc.
115
+ email: dhower@qti.qualcomm.com
116
+ changes:
117
+ - Initial version. Custom variant of Zcmt with alternate link register support.
118
+ Uses bit 0 of call table entries as metadata to select ra (x1) or t0 (x5)
119
+ as the return address register for qc.cm.jalt.
120
+ requirements:
121
+ allOf:
122
+ - extension:
123
+ name: Zca
124
+ version: ">= 1.0.0"
125
+ - extension:
126
+ name: Zicsr
127
+ version: ">= 2.0.0"