udb 0.1.9 → 0.1.14

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 (414) hide show
  1. checksums.yaml +4 -4
  2. data/.data/cfgs/example_rv64_with_overlay.yaml +20 -20
  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 +8 -1
  16. data/.data/cfgs/rv32-riscv-tests.yaml +6 -2
  17. data/.data/cfgs/rv32-vector.yaml +6 -2
  18. data/.data/cfgs/rv64-riscv-tests.yaml +6 -2
  19. data/.data/cfgs/rv64-vector.yaml +6 -2
  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 +290 -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 +136 -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 +134 -0
  31. data/.data/spec/schemas/config_schema.json +220 -27
  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/mmr_schema.json +3 -3
  36. data/.data/spec/schemas/profile_release_schema.json +1 -1
  37. data/.data/spec/schemas/profile_schema.json +0 -3
  38. data/.data/spec/schemas/register_file_schema.json +8 -3
  39. data/.data/spec/schemas/schema_defs.json +13 -27
  40. data/.data/spec/std/isa/csr/H/henvcfg.yaml +25 -0
  41. data/.data/spec/std/isa/csr/I/pmpaddr0.yaml +6 -4
  42. data/.data/spec/std/isa/csr/I/pmpaddr1.yaml +6 -4
  43. data/.data/spec/std/isa/csr/I/pmpaddr10.yaml +6 -4
  44. data/.data/spec/std/isa/csr/I/pmpaddr11.yaml +6 -4
  45. data/.data/spec/std/isa/csr/I/pmpaddr12.yaml +6 -4
  46. data/.data/spec/std/isa/csr/I/pmpaddr13.yaml +6 -4
  47. data/.data/spec/std/isa/csr/I/pmpaddr14.yaml +6 -4
  48. data/.data/spec/std/isa/csr/I/pmpaddr15.yaml +6 -4
  49. data/.data/spec/std/isa/csr/I/pmpaddr16.yaml +6 -4
  50. data/.data/spec/std/isa/csr/I/pmpaddr17.yaml +6 -4
  51. data/.data/spec/std/isa/csr/I/pmpaddr18.yaml +6 -4
  52. data/.data/spec/std/isa/csr/I/pmpaddr19.yaml +6 -4
  53. data/.data/spec/std/isa/csr/I/pmpaddr2.yaml +6 -4
  54. data/.data/spec/std/isa/csr/I/pmpaddr20.yaml +6 -4
  55. data/.data/spec/std/isa/csr/I/pmpaddr21.yaml +6 -4
  56. data/.data/spec/std/isa/csr/I/pmpaddr22.yaml +6 -4
  57. data/.data/spec/std/isa/csr/I/pmpaddr23.yaml +6 -4
  58. data/.data/spec/std/isa/csr/I/pmpaddr24.yaml +6 -4
  59. data/.data/spec/std/isa/csr/I/pmpaddr25.yaml +6 -4
  60. data/.data/spec/std/isa/csr/I/pmpaddr26.yaml +6 -4
  61. data/.data/spec/std/isa/csr/I/pmpaddr27.yaml +6 -4
  62. data/.data/spec/std/isa/csr/I/pmpaddr28.yaml +6 -4
  63. data/.data/spec/std/isa/csr/I/pmpaddr29.yaml +6 -4
  64. data/.data/spec/std/isa/csr/I/pmpaddr3.yaml +6 -4
  65. data/.data/spec/std/isa/csr/I/pmpaddr30.yaml +6 -4
  66. data/.data/spec/std/isa/csr/I/pmpaddr31.yaml +6 -4
  67. data/.data/spec/std/isa/csr/I/pmpaddr32.yaml +6 -4
  68. data/.data/spec/std/isa/csr/I/pmpaddr33.yaml +6 -4
  69. data/.data/spec/std/isa/csr/I/pmpaddr34.yaml +6 -4
  70. data/.data/spec/std/isa/csr/I/pmpaddr35.yaml +6 -4
  71. data/.data/spec/std/isa/csr/I/pmpaddr36.yaml +6 -4
  72. data/.data/spec/std/isa/csr/I/pmpaddr37.yaml +6 -4
  73. data/.data/spec/std/isa/csr/I/pmpaddr38.yaml +6 -4
  74. data/.data/spec/std/isa/csr/I/pmpaddr39.yaml +6 -4
  75. data/.data/spec/std/isa/csr/I/pmpaddr4.yaml +6 -4
  76. data/.data/spec/std/isa/csr/I/pmpaddr40.yaml +6 -4
  77. data/.data/spec/std/isa/csr/I/pmpaddr41.yaml +6 -4
  78. data/.data/spec/std/isa/csr/I/pmpaddr42.yaml +6 -4
  79. data/.data/spec/std/isa/csr/I/pmpaddr43.yaml +6 -4
  80. data/.data/spec/std/isa/csr/I/pmpaddr44.yaml +6 -4
  81. data/.data/spec/std/isa/csr/I/pmpaddr45.yaml +6 -4
  82. data/.data/spec/std/isa/csr/I/pmpaddr46.yaml +6 -4
  83. data/.data/spec/std/isa/csr/I/pmpaddr47.yaml +6 -4
  84. data/.data/spec/std/isa/csr/I/pmpaddr48.yaml +6 -4
  85. data/.data/spec/std/isa/csr/I/pmpaddr49.yaml +6 -4
  86. data/.data/spec/std/isa/csr/I/pmpaddr5.yaml +6 -4
  87. data/.data/spec/std/isa/csr/I/pmpaddr50.yaml +6 -4
  88. data/.data/spec/std/isa/csr/I/pmpaddr51.yaml +6 -4
  89. data/.data/spec/std/isa/csr/I/pmpaddr52.yaml +6 -4
  90. data/.data/spec/std/isa/csr/I/pmpaddr53.yaml +6 -4
  91. data/.data/spec/std/isa/csr/I/pmpaddr54.yaml +6 -4
  92. data/.data/spec/std/isa/csr/I/pmpaddr55.yaml +6 -4
  93. data/.data/spec/std/isa/csr/I/pmpaddr56.yaml +6 -4
  94. data/.data/spec/std/isa/csr/I/pmpaddr57.yaml +6 -4
  95. data/.data/spec/std/isa/csr/I/pmpaddr58.yaml +6 -4
  96. data/.data/spec/std/isa/csr/I/pmpaddr59.yaml +6 -4
  97. data/.data/spec/std/isa/csr/I/pmpaddr6.yaml +6 -4
  98. data/.data/spec/std/isa/csr/I/pmpaddr60.yaml +6 -4
  99. data/.data/spec/std/isa/csr/I/pmpaddr61.yaml +6 -4
  100. data/.data/spec/std/isa/csr/I/pmpaddr62.yaml +6 -4
  101. data/.data/spec/std/isa/csr/I/pmpaddr63.yaml +6 -4
  102. data/.data/spec/std/isa/csr/I/pmpaddr7.yaml +6 -4
  103. data/.data/spec/std/isa/csr/I/pmpaddr8.yaml +6 -4
  104. data/.data/spec/std/isa/csr/I/pmpaddr9.yaml +6 -4
  105. data/.data/spec/std/isa/csr/I/pmpaddrN.layout +6 -4
  106. data/.data/spec/std/isa/csr/I/pmpcfg0.yaml +128 -152
  107. data/.data/spec/std/isa/csr/I/pmpcfg1.yaml +64 -76
  108. data/.data/spec/std/isa/csr/I/pmpcfg10.yaml +128 -152
  109. data/.data/spec/std/isa/csr/I/pmpcfg11.yaml +64 -76
  110. data/.data/spec/std/isa/csr/I/pmpcfg12.yaml +128 -152
  111. data/.data/spec/std/isa/csr/I/pmpcfg13.yaml +64 -76
  112. data/.data/spec/std/isa/csr/I/pmpcfg14.yaml +128 -152
  113. data/.data/spec/std/isa/csr/I/pmpcfg15.yaml +64 -76
  114. data/.data/spec/std/isa/csr/I/pmpcfg2.yaml +128 -152
  115. data/.data/spec/std/isa/csr/I/pmpcfg3.yaml +64 -76
  116. data/.data/spec/std/isa/csr/I/pmpcfg4.yaml +128 -152
  117. data/.data/spec/std/isa/csr/I/pmpcfg5.yaml +64 -76
  118. data/.data/spec/std/isa/csr/I/pmpcfg6.yaml +128 -152
  119. data/.data/spec/std/isa/csr/I/pmpcfg7.yaml +64 -76
  120. data/.data/spec/std/isa/csr/I/pmpcfg8.yaml +128 -152
  121. data/.data/spec/std/isa/csr/I/pmpcfg9.yaml +64 -76
  122. data/.data/spec/std/isa/csr/I/pmpcfgN.layout +16 -19
  123. data/.data/spec/std/isa/csr/Zicntr/mcountinhibit.layout +6 -2
  124. data/.data/spec/std/isa/csr/Zicntr/mcountinhibit.yaml +6 -2
  125. data/.data/spec/std/isa/csr/hstatus.yaml +16 -0
  126. data/.data/spec/std/isa/csr/jvt.yaml +1 -0
  127. data/.data/spec/std/isa/csr/mcycleh.yaml +1 -1
  128. data/.data/spec/std/isa/csr/menvcfg.yaml +20 -0
  129. data/.data/spec/std/isa/csr/misa.yaml +0 -12
  130. data/.data/spec/std/isa/csr/mstatus.yaml +46 -6
  131. data/.data/spec/std/isa/csr/mstatush.yaml +17 -15
  132. data/.data/spec/std/isa/csr/senvcfg.yaml +42 -0
  133. data/.data/spec/std/isa/csr/sstatus.yaml +12 -0
  134. data/.data/spec/std/isa/csr/vsstatus.yaml +24 -0
  135. data/.data/spec/std/isa/ext/A.yaml +5 -7
  136. data/.data/spec/std/isa/ext/S.yaml +12 -0
  137. data/.data/spec/std/isa/ext/Smpmpmt.yaml +52 -0
  138. data/.data/spec/std/isa/ext/Sv32.yaml +7 -19
  139. data/.data/spec/std/isa/ext/Sv39.yaml +7 -19
  140. data/.data/spec/std/isa/ext/Sv48.yaml +4 -20
  141. data/.data/spec/std/isa/ext/Sv57.yaml +4 -20
  142. data/.data/spec/std/isa/ext/Svukte.yaml +71 -0
  143. data/.data/spec/std/isa/ext/Zawrs.yaml +1 -1
  144. data/.data/spec/std/isa/ext/Zihpm.yaml +0 -12
  145. data/.data/spec/std/isa/inst/B/andn.yaml +10 -12
  146. data/.data/spec/std/isa/inst/B/clmul.yaml +9 -11
  147. data/.data/spec/std/isa/inst/B/clmulh.yaml +9 -11
  148. data/.data/spec/std/isa/inst/B/orn.yaml +9 -11
  149. data/.data/spec/std/isa/inst/B/rev8.yaml +1 -1
  150. data/.data/spec/std/isa/inst/B/rol.yaml +9 -11
  151. data/.data/spec/std/isa/inst/B/rolw.yaml +9 -11
  152. data/.data/spec/std/isa/inst/B/ror.yaml +9 -11
  153. data/.data/spec/std/isa/inst/B/rorw.yaml +9 -11
  154. data/.data/spec/std/isa/inst/B/xnor.yaml +9 -11
  155. data/.data/spec/std/isa/inst/C/c.addi.yaml +1 -0
  156. data/.data/spec/std/isa/inst/C/c.addi16sp.yaml +1 -0
  157. data/.data/spec/std/isa/inst/C/c.addiw.yaml +1 -0
  158. data/.data/spec/std/isa/inst/C/c.andi.yaml +1 -0
  159. data/.data/spec/std/isa/inst/C/c.ldsp.yaml +4 -4
  160. data/.data/spec/std/isa/inst/C/c.li.yaml +1 -0
  161. data/.data/spec/std/isa/inst/C/c.lui.yaml +1 -0
  162. data/.data/spec/std/isa/inst/C/c.mv.yaml +1 -1
  163. data/.data/spec/std/isa/inst/C/c.sdsp.yaml +1 -1
  164. data/.data/spec/std/isa/inst/D/fsgnj.d.yaml +3 -0
  165. data/.data/spec/std/isa/inst/D/fsgnjn.d.yaml +3 -0
  166. data/.data/spec/std/isa/inst/D/fsgnjx.d.yaml +3 -0
  167. data/.data/spec/std/isa/inst/F/fadd.s.yaml +5 -5
  168. data/.data/spec/std/isa/inst/F/fclass.s.yaml +2 -2
  169. data/.data/spec/std/isa/inst/F/fcvt.l.s.yaml +1 -1
  170. data/.data/spec/std/isa/inst/F/fcvt.lu.s.yaml +1 -1
  171. data/.data/spec/std/isa/inst/F/fcvt.s.l.yaml +1 -1
  172. data/.data/spec/std/isa/inst/F/fcvt.s.lu.yaml +1 -1
  173. data/.data/spec/std/isa/inst/F/fcvt.s.w.yaml +1 -1
  174. data/.data/spec/std/isa/inst/F/fcvt.s.wu.yaml +1 -1
  175. data/.data/spec/std/isa/inst/F/fcvt.w.s.yaml +1 -1
  176. data/.data/spec/std/isa/inst/F/fcvt.wu.s.yaml +1 -1
  177. data/.data/spec/std/isa/inst/F/fdiv.s.yaml +1 -1
  178. data/.data/spec/std/isa/inst/F/feq.s.yaml +2 -2
  179. data/.data/spec/std/isa/inst/F/fle.s.yaml +2 -2
  180. data/.data/spec/std/isa/inst/F/fleq.s.yaml +2 -2
  181. data/.data/spec/std/isa/inst/F/flt.s.yaml +2 -2
  182. data/.data/spec/std/isa/inst/F/fltq.s.yaml +2 -2
  183. data/.data/spec/std/isa/inst/F/flw.yaml +2 -2
  184. data/.data/spec/std/isa/inst/F/fmadd.s.yaml +1 -1
  185. data/.data/spec/std/isa/inst/F/fmax.s.yaml +6 -6
  186. data/.data/spec/std/isa/inst/F/fmin.s.yaml +6 -6
  187. data/.data/spec/std/isa/inst/F/fmsub.s.yaml +1 -1
  188. data/.data/spec/std/isa/inst/F/fmul.s.yaml +1 -1
  189. data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +2 -2
  190. data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +1 -1
  191. data/.data/spec/std/isa/inst/F/fnmadd.s.yaml +2 -2
  192. data/.data/spec/std/isa/inst/F/fnmsub.s.yaml +1 -1
  193. data/.data/spec/std/isa/inst/F/fsgnj.s.yaml +4 -4
  194. data/.data/spec/std/isa/inst/F/fsgnjn.s.yaml +3 -3
  195. data/.data/spec/std/isa/inst/F/fsgnjx.s.yaml +4 -4
  196. data/.data/spec/std/isa/inst/F/fsqrt.s.yaml +1 -1
  197. data/.data/spec/std/isa/inst/F/fsub.s.yaml +1 -1
  198. data/.data/spec/std/isa/inst/F/fsw.yaml +1 -1
  199. data/.data/spec/std/isa/inst/I/addi.yaml +2 -1
  200. data/.data/spec/std/isa/inst/I/addiw.yaml +2 -1
  201. data/.data/spec/std/isa/inst/I/andi.yaml +2 -1
  202. data/.data/spec/std/isa/inst/I/auipc.yaml +1 -0
  203. data/.data/spec/std/isa/inst/I/beq.yaml +1 -1
  204. data/.data/spec/std/isa/inst/I/bge.yaml +4 -2
  205. data/.data/spec/std/isa/inst/I/bgeu.yaml +3 -0
  206. data/.data/spec/std/isa/inst/I/blt.yaml +4 -2
  207. data/.data/spec/std/isa/inst/I/bltu.yaml +3 -0
  208. data/.data/spec/std/isa/inst/I/bne.yaml +1 -1
  209. data/.data/spec/std/isa/inst/I/lb.yaml +1 -0
  210. data/.data/spec/std/isa/inst/I/lbu.yaml +1 -0
  211. data/.data/spec/std/isa/inst/I/ld.yaml +2 -0
  212. data/.data/spec/std/isa/inst/I/lh.yaml +1 -0
  213. data/.data/spec/std/isa/inst/I/lhu.yaml +1 -0
  214. data/.data/spec/std/isa/inst/I/lui.yaml +1 -0
  215. data/.data/spec/std/isa/inst/I/lw.yaml +1 -0
  216. data/.data/spec/std/isa/inst/I/lwu.yaml +1 -0
  217. data/.data/spec/std/isa/inst/I/ori.yaml +1 -0
  218. data/.data/spec/std/isa/inst/I/sb.yaml +1 -0
  219. data/.data/spec/std/isa/inst/I/sd.yaml +1 -0
  220. data/.data/spec/std/isa/inst/I/sh.yaml +1 -0
  221. data/.data/spec/std/isa/inst/I/slt.yaml +2 -2
  222. data/.data/spec/std/isa/inst/I/slti.yaml +1 -0
  223. data/.data/spec/std/isa/inst/I/sltiu.yaml +2 -1
  224. data/.data/spec/std/isa/inst/I/sltu.yaml +1 -1
  225. data/.data/spec/std/isa/inst/I/sub.yaml +1 -1
  226. data/.data/spec/std/isa/inst/I/subw.yaml +1 -1
  227. data/.data/spec/std/isa/inst/I/sw.yaml +1 -0
  228. data/.data/spec/std/isa/inst/I/xori.yaml +2 -1
  229. data/.data/spec/std/isa/inst/M/mul.yaml +0 -19
  230. data/.data/spec/std/isa/inst/Q/fsgnj.q.yaml +1 -1
  231. data/.data/spec/std/isa/inst/S/sret.yaml +3 -1
  232. data/.data/spec/std/isa/inst/V/vadc.vim.yaml +1 -0
  233. data/.data/spec/std/isa/inst/V/vadd.vi.yaml +1 -0
  234. data/.data/spec/std/isa/inst/V/vadd.vv.yaml +1 -5
  235. data/.data/spec/std/isa/inst/V/vand.vi.yaml +1 -0
  236. data/.data/spec/std/isa/inst/V/vfsgnjn.vv.yaml +3 -0
  237. data/.data/spec/std/isa/inst/V/vfsgnjx.vv.yaml +3 -0
  238. data/.data/spec/std/isa/inst/V/vl1re8.v.yaml +3 -0
  239. data/.data/spec/std/isa/inst/V/vl2re8.v.yaml +3 -0
  240. data/.data/spec/std/isa/inst/V/vl4re8.v.yaml +3 -0
  241. data/.data/spec/std/isa/inst/V/vl8re8.v.yaml +3 -0
  242. data/.data/spec/std/isa/inst/V/vle8.v.yaml +4 -8
  243. data/.data/spec/std/isa/inst/V/vmadc.vi.yaml +1 -0
  244. data/.data/spec/std/isa/inst/V/vmadc.vim.yaml +1 -0
  245. data/.data/spec/std/isa/inst/V/vmand.mm.yaml +3 -0
  246. data/.data/spec/std/isa/inst/V/vmerge.vim.yaml +1 -0
  247. data/.data/spec/std/isa/inst/V/vmfle.vv.yaml +3 -0
  248. data/.data/spec/std/isa/inst/V/vmflt.vv.yaml +3 -0
  249. data/.data/spec/std/isa/inst/V/vmnand.mm.yaml +3 -0
  250. data/.data/spec/std/isa/inst/V/vmseq.vi.yaml +1 -0
  251. data/.data/spec/std/isa/inst/V/vmsgt.vi.yaml +4 -0
  252. data/.data/spec/std/isa/inst/V/vmsgtu.vi.yaml +4 -0
  253. data/.data/spec/std/isa/inst/V/vmsle.vi.yaml +4 -0
  254. data/.data/spec/std/isa/inst/V/vmsle.vv.yaml +3 -0
  255. data/.data/spec/std/isa/inst/V/vmsleu.vi.yaml +4 -0
  256. data/.data/spec/std/isa/inst/V/vmsleu.vv.yaml +3 -0
  257. data/.data/spec/std/isa/inst/V/vmslt.vv.yaml +3 -0
  258. data/.data/spec/std/isa/inst/V/vmsltu.vv.yaml +3 -0
  259. data/.data/spec/std/isa/inst/V/vmsne.vi.yaml +1 -0
  260. data/.data/spec/std/isa/inst/V/vmv.v.i.yaml +2 -13
  261. data/.data/spec/std/isa/inst/V/vmv.x.s.yaml +1 -1
  262. data/.data/spec/std/isa/inst/V/vmxnor.mm.yaml +3 -0
  263. data/.data/spec/std/isa/inst/V/vmxor.mm.yaml +3 -0
  264. data/.data/spec/std/isa/inst/V/vnsrl.wx.yaml +3 -0
  265. data/.data/spec/std/isa/inst/V/vor.vi.yaml +1 -0
  266. data/.data/spec/std/isa/inst/V/vrsub.vi.yaml +1 -0
  267. data/.data/spec/std/isa/inst/V/vrsub.vx.yaml +3 -0
  268. data/.data/spec/std/isa/inst/V/vsadd.vi.yaml +1 -0
  269. data/.data/spec/std/isa/inst/V/vsaddu.vi.yaml +1 -0
  270. data/.data/spec/std/isa/inst/V/vse8.v.yaml +4 -4
  271. data/.data/spec/std/isa/inst/V/vwadd.vx.yaml +3 -0
  272. data/.data/spec/std/isa/inst/V/vwaddu.vx.yaml +3 -0
  273. data/.data/spec/std/isa/inst/V/vxor.vi.yaml +4 -0
  274. data/.data/spec/std/isa/inst/Zalasr/lSIZE.AQRL.layout +40 -5
  275. data/.data/spec/std/isa/inst/Zalasr/lb.aq.yaml +17 -1
  276. data/.data/spec/std/isa/inst/Zalasr/lb.aqrl.yaml +17 -1
  277. data/.data/spec/std/isa/inst/Zalasr/ld.aq.yaml +17 -1
  278. data/.data/spec/std/isa/inst/Zalasr/ld.aqrl.yaml +17 -1
  279. data/.data/spec/std/isa/inst/Zalasr/lh.aq.yaml +17 -1
  280. data/.data/spec/std/isa/inst/Zalasr/lh.aqrl.yaml +17 -1
  281. data/.data/spec/std/isa/inst/Zalasr/lw.aq.yaml +17 -1
  282. data/.data/spec/std/isa/inst/Zalasr/lw.aqrl.yaml +17 -1
  283. data/.data/spec/std/isa/inst/Zalasr/sSIZE.AQRL.layout +46 -5
  284. data/.data/spec/std/isa/inst/Zalasr/sb.aqrl.yaml +16 -1
  285. data/.data/spec/std/isa/inst/Zalasr/sb.rl.yaml +16 -1
  286. data/.data/spec/std/isa/inst/Zalasr/sd.aqrl.yaml +16 -1
  287. data/.data/spec/std/isa/inst/Zalasr/sd.rl.yaml +16 -1
  288. data/.data/spec/std/isa/inst/Zalasr/sh.aqrl.yaml +16 -1
  289. data/.data/spec/std/isa/inst/Zalasr/sh.rl.yaml +16 -1
  290. data/.data/spec/std/isa/inst/Zalasr/sw.aqrl.yaml +16 -1
  291. data/.data/spec/std/isa/inst/Zalasr/sw.rl.yaml +16 -1
  292. data/.data/spec/std/isa/inst/Zawrs/wrs.nto.yaml +4 -2
  293. data/.data/spec/std/isa/inst/Zba/add.uw.yaml +9 -11
  294. data/.data/spec/std/isa/inst/Zbb/orc.b.yaml +1 -1
  295. data/.data/spec/std/isa/inst/Zbkb/brev8.yaml +3 -3
  296. data/.data/spec/std/isa/inst/Zbkb/packw.yaml +1 -1
  297. data/.data/spec/std/isa/inst/Zbkb/unzip.yaml +2 -2
  298. data/.data/spec/std/isa/inst/Zbkb/zip.yaml +2 -2
  299. data/.data/spec/std/isa/inst/Zbkx/xperm4.yaml +2 -2
  300. data/.data/spec/std/isa/inst/Zbkx/xperm8.yaml +2 -2
  301. data/.data/spec/std/isa/inst/Zcd/c.fld.yaml +1 -1
  302. data/.data/spec/std/isa/inst/Zcd/c.fldsp.yaml +1 -1
  303. data/.data/spec/std/isa/inst/Zcd/c.fsdsp.yaml +1 -1
  304. data/.data/spec/std/isa/inst/Zcf/c.flwsp.yaml +1 -1
  305. data/.data/spec/std/isa/inst/Zcf/c.fswsp.yaml +1 -1
  306. data/.data/spec/std/isa/inst/Zcmp/cm.pop.yaml +1 -1
  307. data/.data/spec/std/isa/inst/Zcmp/cm.popret.yaml +1 -1
  308. data/.data/spec/std/isa/inst/Zcmp/cm.popretz.yaml +1 -1
  309. data/.data/spec/std/isa/inst/Zcmp/cm.push.yaml +2 -3
  310. data/.data/spec/std/isa/inst/Zfa/fround.s.yaml +1 -1
  311. data/.data/spec/std/isa/inst/Zfh/fcvt.h.s.yaml +6 -6
  312. data/.data/spec/std/isa/inst/Zfh/fcvt.s.h.yaml +5 -5
  313. data/.data/spec/std/isa/inst/Zfh/flh.yaml +1 -1
  314. data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +1 -1
  315. data/.data/spec/std/isa/inst/Zfh/fmv.x.h.yaml +1 -1
  316. data/.data/spec/std/isa/inst/Zfh/fsh.yaml +1 -1
  317. data/.data/spec/std/isa/inst/Zicbop/prefetch.i.yaml +2 -0
  318. data/.data/spec/std/isa/inst/Zicbop/prefetch.r.yaml +2 -0
  319. data/.data/spec/std/isa/inst/Zicbop/prefetch.w.yaml +2 -0
  320. data/.data/spec/std/isa/inst/Zicsr/csrrc.yaml +1 -1
  321. data/.data/spec/std/isa/inst/Zicsr/csrrci.yaml +1 -1
  322. data/.data/spec/std/isa/inst/Zicsr/csrrs.yaml +2 -2
  323. data/.data/spec/std/isa/inst/Zicsr/csrrsi.yaml +1 -1
  324. data/.data/spec/std/isa/inst/Zicsr/csrrw.yaml +1 -1
  325. data/.data/spec/std/isa/inst/Zicsr/csrrwi.yaml +1 -1
  326. data/.data/spec/std/isa/inst/Zks/sm3p0.yaml +1 -1
  327. data/.data/spec/std/isa/inst/Zks/sm3p1.yaml +1 -1
  328. data/.data/spec/std/isa/inst/Zks/sm4ed.yaml +1 -1
  329. data/.data/spec/std/isa/inst/Zks/sm4ks.yaml +1 -1
  330. data/.data/spec/std/isa/isa/builtin_functions.idl +18 -0
  331. data/.data/spec/std/isa/isa/fp.idl +1 -5
  332. data/.data/spec/std/isa/isa/globals.isa +72 -21
  333. data/.data/spec/std/isa/isa/interrupts.idl +1 -0
  334. data/.data/spec/std/isa/isa/vec.idl +1 -2
  335. data/.data/spec/std/isa/manual_version/isa/20240411/isa_20240411.yaml +5 -5
  336. data/.data/spec/std/isa/param/COUNTINHIBIT_EN.yaml +8 -2
  337. data/.data/spec/std/isa/param/HSTATEEN_CONTEXT_TYPE.yaml +1 -0
  338. data/.data/spec/std/isa/param/JVT_BASE_MASK.yaml +1 -1
  339. data/.data/spec/std/isa/param/MCOUNTINHIBIT_IMPLEMENTED.yaml +25 -0
  340. data/.data/spec/std/isa/param/MSTATEEN_CONTEXT_TYPE.yaml +1 -0
  341. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_DIRECT.yaml +1 -0
  342. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_VECTORED.yaml +1 -0
  343. data/.data/spec/std/isa/param/MTVEC_MODES.yaml +10 -3
  344. data/.data/spec/std/isa/param/NUM_PMP_ENTRIES.yaml +11 -22
  345. data/.data/spec/std/isa/param/NUM_USABLE_PMP_ENTRIES.yaml +35 -0
  346. data/.data/spec/std/isa/param/PMP_NA4_SUPPORTED.yaml +23 -0
  347. data/.data/spec/std/isa/param/PMP_NAPOT_SUPPORTED.yaml +19 -0
  348. data/.data/spec/std/isa/param/{MSTATUS_TVM_IMPLEMENTED.yaml → PMP_TOR_SUPPORTED.yaml} +6 -6
  349. data/.data/spec/std/isa/param/PRECISE_SYNCHRONOUS_EXCEPTIONS.yaml +1 -0
  350. data/.data/spec/std/isa/param/TRAP_ON_EBREAK.yaml +1 -0
  351. data/.data/spec/std/isa/param/TRAP_ON_ECALL_FROM_M.yaml +1 -0
  352. data/.data/spec/std/isa/param/TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY.yaml +1 -0
  353. data/.data/spec/std/isa/param/VLEN.yaml +2 -0
  354. data/.data/spec/std/isa/param/ZAWRS_NTO_IS_NOP.yaml +19 -0
  355. data/.data/spec/std/isa/profile/RVA20S64.yaml +11 -4
  356. data/.data/spec/std/isa/profile/RVA20U64.yaml +14 -5
  357. data/.data/spec/std/isa/profile/RVA22S64.yaml +14 -3
  358. data/.data/spec/std/isa/profile/RVA22U64.yaml +8 -1
  359. data/.data/spec/std/isa/profile/RVA23S64.yaml +13 -0
  360. data/.data/spec/std/isa/profile/RVA23U64.yaml +15 -1
  361. data/.data/spec/std/isa/profile/RVB23S64.yaml +15 -3
  362. data/.data/spec/std/isa/profile/RVB23U64.yaml +8 -1
  363. data/.data/spec/std/isa/profile/RVI20U32.yaml +8 -1
  364. data/.data/spec/std/isa/profile/RVI20U64.yaml +7 -0
  365. data/.data/spec/std/isa/register_file/F.yaml +3 -2
  366. data/.data/spec/std/isa/register_file/V.yaml +2 -2
  367. data/.data/spec/std/isa/register_file/X.yaml +2 -1
  368. data/lib/udb/ESPRESSO_VERSION +1 -1
  369. data/lib/udb/architecture.rb +4 -25
  370. data/lib/udb/cfg_arch.rb +171 -59
  371. data/lib/udb/cli.rb +10 -1
  372. data/lib/udb/condition.rb +38 -37
  373. data/lib/udb/config.rb +86 -8
  374. data/lib/udb/doc_link.rb +3 -4
  375. data/lib/udb/logic.rb +29 -56
  376. data/lib/udb/obj/csr.rb +23 -5
  377. data/lib/udb/obj/csr_field.rb +36 -21
  378. data/lib/udb/obj/database_obj.rb +2 -5
  379. data/lib/udb/obj/extension.rb +0 -3
  380. data/lib/udb/obj/instruction.rb +2 -5
  381. data/lib/udb/obj/non_isa_specification.rb +22 -100
  382. data/lib/udb/obj/portfolio.rb +75 -20
  383. data/lib/udb/obj/profile.rb +0 -4
  384. data/lib/udb/obj/register_file.rb +63 -2
  385. data/lib/udb/portfolio_design.rb +3 -6
  386. data/lib/udb/resolver.rb +84 -23
  387. data/lib/udb/version.rb +1 -1
  388. data/lib/udb/version_spec.rb +8 -0
  389. data/lib/udb/z3.rb +25 -2
  390. data/lib/udb.rb +0 -3
  391. metadata +30 -38
  392. data/.data/cfgs/profile/RVA23M64.yaml +0 -159
  393. data/.data/cfgs/profile/RVB23M64.yaml +0 -149
  394. data/.data/spec/schemas/proc_cert_class_schema.json +0 -35
  395. data/.data/spec/schemas/proc_cert_model_schema.json +0 -336
  396. data/.data/spec/std/isa/proc_cert_class/AC.yaml +0 -13
  397. data/.data/spec/std/isa/proc_cert_class/MC.yaml +0 -13
  398. data/.data/spec/std/isa/proc_cert_class/RVI.yaml +0 -16
  399. data/.data/spec/std/isa/proc_cert_model/AC100.yaml +0 -72
  400. data/.data/spec/std/isa/proc_cert_model/AC200.yaml +0 -58
  401. data/.data/spec/std/isa/proc_cert_model/MC100-32.yaml +0 -155
  402. data/.data/spec/std/isa/proc_cert_model/MC100-64.yaml +0 -21
  403. data/.data/spec/std/isa/proc_cert_model/MC200-32.yaml +0 -60
  404. data/.data/spec/std/isa/proc_cert_model/MC200-64.yaml +0 -21
  405. data/.data/spec/std/isa/proc_cert_model/MC300-32.yaml +0 -40
  406. data/.data/spec/std/isa/proc_cert_model/MC300-64.yaml +0 -21
  407. data/.data/spec/std/isa/proc_cert_model/RVI20-32.yaml +0 -39
  408. data/.data/spec/std/isa/proc_cert_model/RVI20-64.yaml +0 -19
  409. data/.data/spec/std/isa/profile/RVA23M64.yaml +0 -24
  410. data/.data/spec/std/isa/profile/RVB23M64.yaml +0 -86
  411. data/lib/udb/cert_normative_rule.rb +0 -41
  412. data/lib/udb/obj/certifiable_obj.rb +0 -21
  413. data/lib/udb/obj/certificate.rb +0 -230
  414. data/lib/udb/proc_cert_design.rb +0 -77
@@ -36,23 +36,15 @@ fields:
36
36
  ! Name ! Location ! Description
37
37
 
38
38
  h! L ! 7 ! Locks the entry from further modification. Additionally, when set, PMP checks also apply to M-mode for the entry.
39
- h! - ! 6:5 ! _Reserved_ Writes shall be ignored.
39
+ h! MT ! 6:5 ! When the `Smpmpmt` extension is implemented, MT (Memory Type) is a WARL field that overrides the memory type for accesses that match this PMP entry. See the `Smpmpmt` extension definition for encodings. When the `Smpmpmt` extension is not implemented, MT is _Reserved_ Writes shall be ignored.
40
40
  h! A ! 4:3
41
- a! Address matching mode. One of:
41
+ a! Address matching mode. Encodings:
42
42
 
43
- [when="PMP_GRANULARITY < 2"]
44
43
  * *OFF* (0) - Null region (disabled)
45
44
  * *TOR* (1) - Top of range
46
45
  * *NA4* (2) - Naturally aligned four-byte region
47
46
  * *NAPOT* (3) - Naturally aligned power of two
48
47
 
49
- [when="PMP_GRANULARITY >= 2"]
50
- * *OFF* (0) - Null region (disabled)
51
- * *TOR* (1) - Top of range
52
- * *NAPOT* (3) - Naturally aligned power of two
53
-
54
- [when="PMP_GRANULARITY >= 2"]
55
- Naturally aligned four-byte region, *NA4* (2), is not valid (not needed when the PMP granularity is larger than 4 bytes).
56
48
 
57
49
  h! X ! 2 ! When clear, instruction fetches cause an `Access Fault` for the matching region and privilege mode.
58
50
  h! W ! 1 ! When clear, stores and AMOs cause an `Access Fault` for the matching region and privilege mode.
@@ -61,23 +53,28 @@ fields:
61
53
 
62
54
  The combination of R = 0, W = 1 is reserved.
63
55
  type(): |
64
- if (NUM_PMP_ENTRIES > 36) {
56
+ if (NUM_USABLE_PMP_ENTRIES > 36) {
65
57
  return CsrFieldType::RWR;
66
58
  } else {
59
+ # entry is either not implemented or implemented as read-only zero
67
60
  return CsrFieldType::RO;
68
61
  }
69
62
  reset_value(): |
70
63
  return 0;
71
64
  sw_write(csr_value): |
72
- if ((CSR[pmpcfg9].pmp36cfg & 0x80) == 0) {
73
- # entry is not locked
74
- if (!(((csr_value.pmp36cfg & 0x1) == 0) && ((csr_value.pmp36cfg & 0x2) == 0x2))) {
75
- # not R = 0, W =1, which is reserved
76
- if ((PMP_GRANULARITY < 2) ||
77
- ((csr_value.pmp36cfg & 0x18) != 0x10)) {
78
- # NA4 is not allowed when PMP granularity is larger than 4 bytes
79
- return csr_value.pmp36cfg;
65
+ if (NUM_USABLE_PMP_ENTRIES > 36 && (CSR[pmpcfg9].pmp36cfg & 0x80) == 0) {
66
+ # entry is usable and not locked
67
+ Bits<8> new_cfg = csr_value.pmp36cfg;
68
+ Bits<2> a_mode = (new_cfg & 0x18) >> 3;
69
+ if (!(((new_cfg & 0x1) == 0) && ((new_cfg & 0x2) == 0x2))) {
70
+ # not R = 0, W = 1, which is reserved
71
+ if (((a_mode == 0x1) && !PMP_TOR_SUPPORTED) ||
72
+ ((a_mode == 0x2) && !PMP_NA4_SUPPORTED) ||
73
+ ((a_mode == 0x3) && !PMP_NAPOT_SUPPORTED)) {
74
+ # unsupported address matching mode; keep old value
75
+ return CSR[pmpcfg9].pmp36cfg;
80
76
  }
77
+ return new_cfg;
81
78
  }
82
79
  }
83
80
  # fall through: keep old value
@@ -94,23 +91,15 @@ fields:
94
91
  ! Name ! Location ! Description
95
92
 
96
93
  h! L ! 15 ! Locks the entry from further modification. Additionally, when set, PMP checks also apply to M-mode for the entry.
97
- h! - ! 14:13 ! _Reserved_ Writes shall be ignored.
94
+ h! MT ! 14:13 ! When the `Smpmpmt` extension is implemented, MT (Memory Type) is a WARL field that overrides the memory type for accesses that match this PMP entry. See the `Smpmpmt` extension definition for encodings. When the `Smpmpmt` extension is not implemented, MT is _Reserved_ Writes shall be ignored.
98
95
  h! A ! 12:11
99
- a! Address matching mode. One of:
96
+ a! Address matching mode. Encodings:
100
97
 
101
- [when="PMP_GRANULARITY < 2"]
102
98
  * *OFF* (0) - Null region (disabled)
103
99
  * *TOR* (1) - Top of range
104
100
  * *NA4* (2) - Naturally aligned four-byte region
105
101
  * *NAPOT* (3) - Naturally aligned power of two
106
102
 
107
- [when="PMP_GRANULARITY >= 2"]
108
- * *OFF* (0) - Null region (disabled)
109
- * *TOR* (1) - Top of range
110
- * *NAPOT* (3) - Naturally aligned power of two
111
-
112
- [when="PMP_GRANULARITY >= 2"]
113
- Naturally aligned four-byte region, *NA4* (2), is not valid (not needed when the PMP granularity is larger than 4 bytes).
114
103
 
115
104
  h! X ! 10 ! When clear, instruction fetches cause an `Access Fault` for the matching region and privilege mode.
116
105
  h! W ! 9 ! When clear, stores and AMOs cause an `Access Fault` for the matching region and privilege mode.
@@ -119,23 +108,28 @@ fields:
119
108
 
120
109
  The combination of R = 0, W = 1 is reserved.
121
110
  type(): |
122
- if (NUM_PMP_ENTRIES > 37) {
111
+ if (NUM_USABLE_PMP_ENTRIES > 37) {
123
112
  return CsrFieldType::RWR;
124
113
  } else {
114
+ # entry is either not implemented or implemented as read-only zero
125
115
  return CsrFieldType::RO;
126
116
  }
127
117
  reset_value(): |
128
118
  return 0;
129
119
  sw_write(csr_value): |
130
- if ((CSR[pmpcfg9].pmp37cfg & 0x80) == 0) {
131
- # entry is not locked
132
- if (!(((csr_value.pmp37cfg & 0x1) == 0) && ((csr_value.pmp37cfg & 0x2) == 0x2))) {
133
- # not R = 0, W =1, which is reserved
134
- if ((PMP_GRANULARITY < 2) ||
135
- ((csr_value.pmp37cfg & 0x18) != 0x10)) {
136
- # NA4 is not allowed when PMP granularity is larger than 4 bytes
137
- return csr_value.pmp37cfg;
120
+ if (NUM_USABLE_PMP_ENTRIES > 37 && (CSR[pmpcfg9].pmp37cfg & 0x80) == 0) {
121
+ # entry is usable and not locked
122
+ Bits<8> new_cfg = csr_value.pmp37cfg;
123
+ Bits<2> a_mode = (new_cfg & 0x18) >> 3;
124
+ if (!(((new_cfg & 0x1) == 0) && ((new_cfg & 0x2) == 0x2))) {
125
+ # not R = 0, W = 1, which is reserved
126
+ if (((a_mode == 0x1) && !PMP_TOR_SUPPORTED) ||
127
+ ((a_mode == 0x2) && !PMP_NA4_SUPPORTED) ||
128
+ ((a_mode == 0x3) && !PMP_NAPOT_SUPPORTED)) {
129
+ # unsupported address matching mode; keep old value
130
+ return CSR[pmpcfg9].pmp37cfg;
138
131
  }
132
+ return new_cfg;
139
133
  }
140
134
  }
141
135
  # fall through: keep old value
@@ -152,23 +146,15 @@ fields:
152
146
  ! Name ! Location ! Description
153
147
 
154
148
  h! L ! 23 ! Locks the entry from further modification. Additionally, when set, PMP checks also apply to M-mode for the entry.
155
- h! - ! 22:21 ! _Reserved_ Writes shall be ignored.
149
+ h! MT ! 22:21 ! When the `Smpmpmt` extension is implemented, MT (Memory Type) is a WARL field that overrides the memory type for accesses that match this PMP entry. See the `Smpmpmt` extension definition for encodings. When the `Smpmpmt` extension is not implemented, MT is _Reserved_ Writes shall be ignored.
156
150
  h! A ! 20:19
157
- a! Address matching mode. One of:
151
+ a! Address matching mode. Encodings:
158
152
 
159
- [when="PMP_GRANULARITY < 2"]
160
153
  * *OFF* (0) - Null region (disabled)
161
154
  * *TOR* (1) - Top of range
162
155
  * *NA4* (2) - Naturally aligned four-byte region
163
156
  * *NAPOT* (3) - Naturally aligned power of two
164
157
 
165
- [when="PMP_GRANULARITY >= 2"]
166
- * *OFF* (0) - Null region (disabled)
167
- * *TOR* (1) - Top of range
168
- * *NAPOT* (3) - Naturally aligned power of two
169
-
170
- [when="PMP_GRANULARITY >= 2"]
171
- Naturally aligned four-byte region, *NA4* (2), is not valid (not needed when the PMP granularity is larger than 4 bytes).
172
158
 
173
159
  h! X ! 18 ! When clear, instruction fetches cause an `Access Fault` for the matching region and privilege mode.
174
160
  h! W ! 17 ! When clear, stores and AMOs cause an `Access Fault` for the matching region and privilege mode.
@@ -177,23 +163,28 @@ fields:
177
163
 
178
164
  The combination of R = 0, W = 1 is reserved.
179
165
  type(): |
180
- if (NUM_PMP_ENTRIES > 38) {
166
+ if (NUM_USABLE_PMP_ENTRIES > 38) {
181
167
  return CsrFieldType::RWR;
182
168
  } else {
169
+ # entry is either not implemented or implemented as read-only zero
183
170
  return CsrFieldType::RO;
184
171
  }
185
172
  reset_value(): |
186
173
  return 0;
187
174
  sw_write(csr_value): |
188
- if ((CSR[pmpcfg9].pmp38cfg & 0x80) == 0) {
189
- # entry is not locked
190
- if (!(((csr_value.pmp38cfg & 0x1) == 0) && ((csr_value.pmp38cfg & 0x2) == 0x2))) {
191
- # not R = 0, W =1, which is reserved
192
- if ((PMP_GRANULARITY < 2) ||
193
- ((csr_value.pmp38cfg & 0x18) != 0x10)) {
194
- # NA4 is not allowed when PMP granularity is larger than 4 bytes
195
- return csr_value.pmp38cfg;
175
+ if (NUM_USABLE_PMP_ENTRIES > 38 && (CSR[pmpcfg9].pmp38cfg & 0x80) == 0) {
176
+ # entry is usable and not locked
177
+ Bits<8> new_cfg = csr_value.pmp38cfg;
178
+ Bits<2> a_mode = (new_cfg & 0x18) >> 3;
179
+ if (!(((new_cfg & 0x1) == 0) && ((new_cfg & 0x2) == 0x2))) {
180
+ # not R = 0, W = 1, which is reserved
181
+ if (((a_mode == 0x1) && !PMP_TOR_SUPPORTED) ||
182
+ ((a_mode == 0x2) && !PMP_NA4_SUPPORTED) ||
183
+ ((a_mode == 0x3) && !PMP_NAPOT_SUPPORTED)) {
184
+ # unsupported address matching mode; keep old value
185
+ return CSR[pmpcfg9].pmp38cfg;
196
186
  }
187
+ return new_cfg;
197
188
  }
198
189
  }
199
190
  # fall through: keep old value
@@ -210,23 +201,15 @@ fields:
210
201
  ! Name ! Location ! Description
211
202
 
212
203
  h! L ! 31 ! Locks the entry from further modification. Additionally, when set, PMP checks also apply to M-mode for the entry.
213
- h! - ! 30:29 ! _Reserved_ Writes shall be ignored.
204
+ h! MT ! 30:29 ! When the `Smpmpmt` extension is implemented, MT (Memory Type) is a WARL field that overrides the memory type for accesses that match this PMP entry. See the `Smpmpmt` extension definition for encodings. When the `Smpmpmt` extension is not implemented, MT is _Reserved_ Writes shall be ignored.
214
205
  h! A ! 28:27
215
- a! Address matching mode. One of:
206
+ a! Address matching mode. Encodings:
216
207
 
217
- [when="PMP_GRANULARITY < 2"]
218
208
  * *OFF* (0) - Null region (disabled)
219
209
  * *TOR* (1) - Top of range
220
210
  * *NA4* (2) - Naturally aligned four-byte region
221
211
  * *NAPOT* (3) - Naturally aligned power of two
222
212
 
223
- [when="PMP_GRANULARITY >= 2"]
224
- * *OFF* (0) - Null region (disabled)
225
- * *TOR* (1) - Top of range
226
- * *NAPOT* (3) - Naturally aligned power of two
227
-
228
- [when="PMP_GRANULARITY >= 2"]
229
- Naturally aligned four-byte region, *NA4* (2), is not valid (not needed when the PMP granularity is larger than 4 bytes).
230
213
 
231
214
  h! X ! 26 ! When clear, instruction fetches cause an `Access Fault` for the matching region and privilege mode.
232
215
  h! W ! 25 ! When clear, stores and AMOs cause an `Access Fault` for the matching region and privilege mode.
@@ -235,23 +218,28 @@ fields:
235
218
 
236
219
  The combination of R = 0, W = 1 is reserved.
237
220
  type(): |
238
- if (NUM_PMP_ENTRIES > 39) {
221
+ if (NUM_USABLE_PMP_ENTRIES > 39) {
239
222
  return CsrFieldType::RWR;
240
223
  } else {
224
+ # entry is either not implemented or implemented as read-only zero
241
225
  return CsrFieldType::RO;
242
226
  }
243
227
  reset_value(): |
244
228
  return 0;
245
229
  sw_write(csr_value): |
246
- if ((CSR[pmpcfg9].pmp39cfg & 0x80) == 0) {
247
- # entry is not locked
248
- if (!(((csr_value.pmp39cfg & 0x1) == 0) && ((csr_value.pmp39cfg & 0x2) == 0x2))) {
249
- # not R = 0, W =1, which is reserved
250
- if ((PMP_GRANULARITY < 2) ||
251
- ((csr_value.pmp39cfg & 0x18) != 0x10)) {
252
- # NA4 is not allowed when PMP granularity is larger than 4 bytes
253
- return csr_value.pmp39cfg;
230
+ if (NUM_USABLE_PMP_ENTRIES > 39 && (CSR[pmpcfg9].pmp39cfg & 0x80) == 0) {
231
+ # entry is usable and not locked
232
+ Bits<8> new_cfg = csr_value.pmp39cfg;
233
+ Bits<2> a_mode = (new_cfg & 0x18) >> 3;
234
+ if (!(((new_cfg & 0x1) == 0) && ((new_cfg & 0x2) == 0x2))) {
235
+ # not R = 0, W = 1, which is reserved
236
+ if (((a_mode == 0x1) && !PMP_TOR_SUPPORTED) ||
237
+ ((a_mode == 0x2) && !PMP_NA4_SUPPORTED) ||
238
+ ((a_mode == 0x3) && !PMP_NAPOT_SUPPORTED)) {
239
+ # unsupported address matching mode; keep old value
240
+ return CSR[pmpcfg9].pmp39cfg;
254
241
  }
242
+ return new_cfg;
255
243
  }
256
244
  }
257
245
  # fall through: keep old value
@@ -48,23 +48,15 @@ fields:
48
48
  ! Name ! Location ! Description
49
49
 
50
50
  h! L ! <%= ((i+1)*8)-1 %> ! Locks the entry from further modification. Additionally, when set, PMP checks also apply to M-mode for the entry.
51
- h! - ! <%= ((i+1)*8)-2 %>:<%= ((i+1)*8)-3 %> ! _Reserved_ Writes shall be ignored.
51
+ h! MT ! <%= ((i+1)*8)-2 %>:<%= ((i+1)*8)-3 %> ! When the `Smpmpmt` extension is implemented, MT (Memory Type) is a WARL field that overrides the memory type for accesses that match this PMP entry. See the `Smpmpmt` extension definition for encodings. When the `Smpmpmt` extension is not implemented, MT is _Reserved_ Writes shall be ignored.
52
52
  h! A ! <%= ((i+1)*8)-4 %>:<%= ((i+1)*8)-5 %>
53
- a! Address matching mode. One of:
53
+ a! Address matching mode. Encodings:
54
54
 
55
- [when="PMP_GRANULARITY < 2"]
56
55
  * *OFF* (0) - Null region (disabled)
57
56
  * *TOR* (1) - Top of range
58
57
  * *NA4* (2) - Naturally aligned four-byte region
59
58
  * *NAPOT* (3) - Naturally aligned power of two
60
59
 
61
- [when="PMP_GRANULARITY >= 2"]
62
- * *OFF* (0) - Null region (disabled)
63
- * *TOR* (1) - Top of range
64
- * *NAPOT* (3) - Naturally aligned power of two
65
-
66
- [when="PMP_GRANULARITY >= 2"]
67
- Naturally aligned four-byte region, *NA4* (2), is not valid (not needed when the PMP granularity is larger than 4 bytes).
68
60
 
69
61
  h! X ! <%= ((i)*8)+2 %> ! When clear, instruction fetches cause an `Access Fault` for the matching region and privilege mode.
70
62
  h! W ! <%= ((i)*8)+1 %> ! When clear, stores and AMOs cause an `Access Fault` for the matching region and privilege mode.
@@ -73,23 +65,28 @@ fields:
73
65
 
74
66
  The combination of R = 0, W = 1 is reserved.
75
67
  type(): |
76
- if (NUM_PMP_ENTRIES > <%= pmpcfg_num*4 + i %>) {
68
+ if (NUM_USABLE_PMP_ENTRIES > <%= pmpcfg_num*4 + i %>) {
77
69
  return CsrFieldType::RWR;
78
70
  } else {
71
+ # entry is either not implemented or implemented as read-only zero
79
72
  return CsrFieldType::RO;
80
73
  }
81
74
  reset_value(): |
82
75
  return 0;
83
76
  sw_write(csr_value): |
84
- if (<%- if i > 4 -%>(xlen() == 64) && <%- end -%>(CSR[<%= "pmpcfg#{pmpcfg_num}" %>].pmp<%= pmpcfg_num*4 + i %>cfg & 0x80) == 0) {
85
- # entry is not locked
86
- if (!(((csr_value.pmp<%= pmpcfg_num*4 + i %>cfg & 0x1) == 0) && ((csr_value.pmp<%= pmpcfg_num*4 + i %>cfg & 0x2) == 0x2))) {
87
- # not R = 0, W =1, which is reserved
88
- if ((PMP_GRANULARITY < 2) ||
89
- ((csr_value.pmp<%= pmpcfg_num*4 + i %>cfg & 0x18) != 0x10)) {
90
- # NA4 is not allowed when PMP granularity is larger than 4 bytes
91
- return csr_value.pmp<%= pmpcfg_num*4 + i %>cfg;
77
+ if (<%- if i > 4 -%>(xlen() == 64) && <%- end -%>NUM_USABLE_PMP_ENTRIES > <%= pmpcfg_num*4 + i %> && (CSR[<%= "pmpcfg#{pmpcfg_num}" %>].pmp<%= pmpcfg_num*4 + i %>cfg & 0x80) == 0) {
78
+ # entry is usable and not locked
79
+ Bits<8> new_cfg = csr_value.pmp<%= pmpcfg_num*4 + i %>cfg;
80
+ Bits<2> a_mode = (new_cfg & 0x18) >> 3;
81
+ if (!(((new_cfg & 0x1) == 0) && ((new_cfg & 0x2) == 0x2))) {
82
+ # not R = 0, W = 1, which is reserved
83
+ if (((a_mode == 0x1) && !PMP_TOR_SUPPORTED) ||
84
+ ((a_mode == 0x2) && !PMP_NA4_SUPPORTED) ||
85
+ ((a_mode == 0x3) && !PMP_NAPOT_SUPPORTED)) {
86
+ # unsupported address matching mode; keep old value
87
+ return CSR[<%= "pmpcfg#{pmpcfg_num}" %>].pmp<%= pmpcfg_num*4 + i %>cfg;
92
88
  }
89
+ return new_cfg;
93
90
  }
94
91
  }
95
92
  # fall through: keep old value
@@ -44,8 +44,12 @@ description: |
44
44
  ====
45
45
 
46
46
  definedBy:
47
- extension:
48
- name: Sm
47
+ allOf:
48
+ - extension:
49
+ name: Sm
50
+ - param:
51
+ name: MCOUNTINHIBIT_IMPLEMENTED
52
+ equal: true
49
53
  fields:
50
54
  CY:
51
55
  location: 0
@@ -47,8 +47,12 @@ description: |
47
47
  ====
48
48
 
49
49
  definedBy:
50
- extension:
51
- name: Sm
50
+ allOf:
51
+ - extension:
52
+ name: Sm
53
+ - param:
54
+ name: MCOUNTINHIBIT_IMPLEMENTED
55
+ equal: true
52
56
  fields:
53
57
  CY:
54
58
  location: 0
@@ -73,6 +73,22 @@ fields:
73
73
  } else {
74
74
  return csr_value.VSXL;
75
75
  }
76
+ HUKTE:
77
+ location: 24
78
+ long_name: Hypervisor UKTE
79
+ description: |
80
+ If the Svukte extension is implemented, the HUKTE field determines
81
+ whether the HLV, HLVX, and HSV instructions, when executed in U-mode,
82
+ are Svukte-qualified.
83
+ When one of these instructions is executed in U-mode, it behaves as though
84
+ `senvcfg`.UKTE were set to the value of HUKTE.
85
+ If Svukte is not implemented, HUKTE is read-only zero.
86
+
87
+ definedBy:
88
+ extension:
89
+ name: Svukte
90
+ type: RW
91
+ reset_value: UNDEFINED_LEGAL
76
92
  VTSR:
77
93
  location: 22
78
94
  long_name: Virtual Trap SRET
@@ -56,6 +56,7 @@ fields:
56
56
  && (CSR[sstateen0].JVT == 1'b0 || CSR[hstateen0].JVT == 1'b0) )) {
57
57
 
58
58
  unimplemented_csr($encoding);
59
+ return 0;
59
60
  }
60
61
  else {
61
62
  if (JVT_BASE_TYPE == "custom") {
@@ -11,7 +11,7 @@ definedBy:
11
11
  allOf:
12
12
  - xlen: 32
13
13
  - extension:
14
- name: Zicntr
14
+ name: Sm
15
15
  address: 0xB80
16
16
  writable: true
17
17
  description: |
@@ -296,6 +296,26 @@ fields:
296
296
  name: Zicfiss
297
297
  type: RW
298
298
  reset_value: UNDEFINED_LEGAL
299
+ LPE:
300
+ location: 2
301
+ description: |
302
+ *Landing Pad Enable*
303
+
304
+ When the LPE field is set to 1 and S-mode is implemented, the Zicfilp
305
+ extension is enabled in S-mode. If the LPE field is set to 1 and S-mode
306
+ is not implemented, the Zicfilp extension is enabled in U-mode. When the
307
+ LPE field is 0, the Zicfilp extension is not enabled in S-mode (or U-mode
308
+ if S-mode is not implemented), and the following rules apply:
309
+
310
+ * The hart does not update the `ELP` state; it remains as `NO_LP_EXPECTED`.
311
+ * The `LPAD` instruction operates as a no-op.
312
+
313
+ When `menvcfg.LPE` is 0, `henvcfg.LPE` and `senvcfg.LPE` are read-only zero.
314
+ definedBy:
315
+ extension:
316
+ name: Zicfilp
317
+ type: RW
318
+ reset_value: UNDEFINED_LEGAL
299
319
  FIOM:
300
320
  location: 0
301
321
  description: |
@@ -165,12 +165,6 @@ fields:
165
165
  definedBy:
166
166
  extension:
167
167
  name: M
168
- cert_normative_rules:
169
- - id: csr_field.misa.M.disabled
170
- name: Disabling `misa.M` bit
171
- description: What happens when you turn off `misa.M`
172
- doc_links:
173
- - manual:csr:misa:disabling-extension
174
168
  Q:
175
169
  location: 16
176
170
  description: |
@@ -251,9 +245,3 @@ sw_read(): |
251
245
  (CSR[misa].C `<< 2) |
252
246
  (CSR[misa].B `<< 1) |
253
247
  CSR[misa].A);
254
- cert_normative_rules:
255
- - id: csr.misa.disabling_bits
256
- name: Disabling `misa` bits
257
- description: What happens when you turn off bits
258
- doc_links:
259
- - manual:csr:misa:disabling-extension
@@ -72,6 +72,26 @@ fields:
72
72
  name: Smdbltrp
73
73
  type: RW-H
74
74
  reset_value: UNDEFINED_LEGAL
75
+ MPELP:
76
+ location: 41
77
+ long_name: M-mode Previous Expected Landing Pad state
78
+ description: |
79
+ Holds the previous Expected Landing Pad (`ELP`) state when entering
80
+ M-mode from a trap, and is restored to `ELP` on `MRET`.
81
+
82
+ Defined by the Zicfilp extension.
83
+
84
+ Encoded as:
85
+
86
+ * 0 - `NO_LP_EXPECTED` - no landing pad instruction expected.
87
+ * 1 - `LP_EXPECTED` - a landing pad instruction is expected.
88
+ type: RW-H
89
+ reset_value: UNDEFINED_LEGAL
90
+ definedBy:
91
+ allOf:
92
+ - xlen: 64
93
+ - extension:
94
+ name: Zicfilp
75
95
  MPV:
76
96
  location: 39
77
97
  long_name: Machine Previous Virtualization mode
@@ -245,6 +265,24 @@ fields:
245
265
  return 2;
246
266
  }
247
267
 
268
+ SPELP:
269
+ location: 23
270
+ long_name: S-mode Previous Expected Landing Pad state
271
+ description: |
272
+ Holds the previous Expected Landing Pad (`ELP`) state when entering
273
+ (H)S-mode from a trap, and is restored to `ELP` on `SRET`.
274
+
275
+ Defined by the Zicfilp extension.
276
+
277
+ Encoded as:
278
+
279
+ * 0 - `NO_LP_EXPECTED` - no landing pad instruction expected.
280
+ * 1 - `LP_EXPECTED` - a landing pad instruction is expected.
281
+ type: RW-H
282
+ reset_value: UNDEFINED_LEGAL
283
+ definedBy:
284
+ extension:
285
+ name: Zicfilp
248
286
  TSR:
249
287
  location: 22
250
288
  long_name: Trap SRET
@@ -290,6 +328,8 @@ fields:
290
328
  type(): |
291
329
  if (CSR[misa].S == 1'b0) {
292
330
  return CsrFieldType::RO;
331
+ } else if (!(implemented?(ExtensionName::Sv32) || implemented?(ExtensionName::Sv39) || implemented?(ExtensionName::Sv48) || implemented?(ExtensionName::Sv57))) {
332
+ return CsrFieldType::RO;
293
333
  } else {
294
334
  return CsrFieldType::RW;
295
335
  }
@@ -299,18 +339,18 @@ fields:
299
339
  reset_value(): |
300
340
  if (CSR[misa].S == 1'b0) {
301
341
  return 0;
302
- } else if (MSTATUS_TVM_IMPLEMENTED) {
303
- return UNDEFINED_LEGAL;
304
- } else {
342
+ } else if (!(implemented?(ExtensionName::Sv32) || implemented?(ExtensionName::Sv39) || implemented?(ExtensionName::Sv48) || implemented?(ExtensionName::Sv57))) {
305
343
  return 0;
344
+ } else {
345
+ return UNDEFINED_LEGAL;
306
346
  }
307
347
  sw_write(csr_value): |
308
348
  if (CSR[misa].S == 1'b0) {
309
349
  return 0;
310
- } else if (MSTATUS_TVM_IMPLEMENTED) {
311
- return csr_value.TVM;
312
- } else {
350
+ } else if (!(implemented?(ExtensionName::Sv32) || implemented?(ExtensionName::Sv39) || implemented?(ExtensionName::Sv48) || implemented?(ExtensionName::Sv57))) {
313
351
  return 0;
352
+ } else {
353
+ return csr_value.TVM;
314
354
  }
315
355
  MXR:
316
356
  location: 19
@@ -24,39 +24,40 @@ fields:
24
24
  MDT:
25
25
  location: 10
26
26
  description: |
27
- *Machine Disable Trap*
28
-
29
- Written to 1 when entering M-mode from an exception/interrupt.
30
- When returning via an MRET instruction, the bit is written to 0.
31
- On reset in set to 1, and software should write it to 0 when boot sequence is done.
32
- When mstatush.MDT=1, direct write by CSR instruction cannot set mstatus.MIE to 1.
27
+ see `mstatus.MDT`
28
+ type: RW-H
29
+ reset_value: UNDEFINED_LEGAL
30
+ alias: mstatus.MDT
33
31
  definedBy:
34
32
  extension:
35
33
  name: Smdbltrp
34
+ MPELP:
35
+ location: 9
36
+ description: |
37
+ see `mstatus.MPELP`
36
38
  type: RW-H
37
39
  reset_value: UNDEFINED_LEGAL
40
+ alias: mstatus.MPELP
41
+ definedBy:
42
+ extension:
43
+ name: Zicfilp
38
44
  MPV:
39
45
  location: 7
40
46
  description: |
41
- *Machine Previous Virtualization mode*
42
-
43
- Written with the prior virtualization mode when entering M-mode from an exception/interrupt.
44
- When returning via an MRET instruction, the virtualization mode becomes the value of MPV unless MPP=3, in which case the virtualization mode is always 0.
45
- Can also be written by software.
47
+ see `mstatus.MPV`
46
48
  type: RW-H
47
49
  reset_value: UNDEFINED_LEGAL
50
+ alias: mstatus.MPV
48
51
  definedBy:
49
52
  extension:
50
53
  name: H
51
54
  GVA:
52
55
  location: 6
53
56
  description: |
54
- *Guest Virtual Address*
55
-
56
- When a trap is taken and a guest virtual address is written into mtval, GVA is set.
57
- When a trap is taken and a guest virtual address is written into mtval, GVA is cleared.
57
+ see `mstatus.GVA`
58
58
  type: RW-H
59
59
  reset_value: 0
60
+ alias: mstatus.GVA
60
61
  definedBy:
61
62
  extension:
62
63
  name: H
@@ -86,3 +87,4 @@ fields:
86
87
  } else {
87
88
  return UNDEFINED_LEGAL;
88
89
  }
90
+ alias: mstatus.SBE
@@ -124,6 +124,22 @@ fields:
124
124
  return UNDEFINED_LEGAL_DETERMINISTIC;
125
125
  }
126
126
  reset_value: UNDEFINED_LEGAL
127
+ UKTE:
128
+ location: 8
129
+ description: |
130
+ If the Svukte extension is implemented, the UKTE field affects the behavior of
131
+ instruction fetches and explicit memory accesses.
132
+ When UKTE=0, instruction fetches and explicit memory accesses proceed as
133
+ though the Svukte extension were not implemented.
134
+ When UKTE=1, instruction fetches and explicit memory accesses with effective
135
+ privilege mode U or VU are Svukte-qualified, as described in <<sec:svukte>>.
136
+ If Svukte is not implemented, UKTE is read-only zero.
137
+
138
+ definedBy:
139
+ extension:
140
+ name: Svukte
141
+ type: RW
142
+ reset_value: UNDEFINED_LEGAL
127
143
  SSE:
128
144
  location: 3
129
145
  description: |
@@ -149,6 +165,28 @@ fields:
149
165
  return 0;
150
166
  }
151
167
  return csr_value.SSE;
168
+ LPE:
169
+ location: 2
170
+ description: |
171
+ *Landing Pad Enable*
172
+
173
+ When the LPE field is set to 1 and `menvcfg.LPE` is 1, the Zicfilp extension
174
+ is enabled in U/VU-mode. Read-only zero when `menvcfg.LPE` is 0. When the LPE
175
+ field is 0, the Zicfilp extension is not enabled in U/VU-mode and the following
176
+ rules apply:
177
+
178
+ * The hart does not update the `ELP` state; it remains as `NO_LP_EXPECTED`.
179
+ * The `LPAD` instruction operates as a no-op.
180
+ definedBy:
181
+ extension:
182
+ name: Zicfilp
183
+ type: RW
184
+ reset_value: UNDEFINED_LEGAL
185
+ sw_write(csr_value): |
186
+ if (CSR[menvcfg].LPE == 0) {
187
+ return 0;
188
+ }
189
+ return csr_value.LPE;
152
190
  FIOM:
153
191
  location: 0
154
192
  description: |
@@ -186,4 +224,8 @@ sw_read(): |
186
224
  # senvcfg.SSE must read-as-zero
187
225
  value = value & ~(1 `<< 3);
188
226
  }
227
+ if (implemented?(ExtensionName::Zicfilp) && CSR[menvcfg].LPE == 0) {
228
+ # senvcfg.LPE must read-as-zero when menvcfg.LPE is 0
229
+ value = value & ~(1 `<< 2);
230
+ }
189
231
  return value;