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
@@ -1,60 +0,0 @@
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/proc_cert_model_schema.json
5
-
6
- $schema: proc_cert_model_schema.json#
7
- kind: processor certificate model
8
- name: MC200-32
9
- long_name: Intermediate 32-bit Microcontroller Certificate
10
- class:
11
- $ref: proc_cert_class/MC.yaml#
12
-
13
- # Semantic versions within the model
14
- versions:
15
- - version: "1.0.0"
16
-
17
- # MXLEN used by rakefile
18
- base: 32
19
-
20
- $inherits: "proc_cert_model/MC100-32.yaml#"
21
-
22
- revision_history:
23
- - revision: "0.1.0"
24
- date: "2024-11-27"
25
- changes:
26
- - First created
27
-
28
- introduction: |
29
- The MC200 Processor Certificate targets intermediate RISC-V microcontrollers.
30
- It supports either a 32-bit (MC200-32) or 64-bit (MC200-64) base ISA.
31
- The MC200 adds the following mandatory extensions to the MC100:
32
-
33
- * M extension
34
- * U extension (User-mode privilege level)
35
- * Zihpm extension (hardware performance counters)
36
- * B (Bitfield) extension
37
- * Zce extension (additional 16-bit instructions suitable for microcontrollers)
38
- * CLIC extension (if/when ratified)
39
-
40
- # Specification versions
41
- tsc_profile_release: null # None for MC200
42
- unpriv_isa_manual_revision: "20191213"
43
- priv_isa_manual_revision: "20190608-Priv-MSU-Ratified"
44
- debug_manual_revision: "0.13.2"
45
-
46
- # TODO: No ratified CLIC yet. It will be multiple extensions.
47
-
48
- extensions:
49
- Zicntr:
50
- presence: mandatory
51
- M:
52
- presence: mandatory
53
- B:
54
- presence: mandatory
55
- Zce:
56
- presence: mandatory
57
- U:
58
- presence: mandatory
59
- Zihpm:
60
- presence: mandatory
@@ -1,21 +0,0 @@
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/proc_cert_model_schema.json
5
-
6
- $schema: proc_cert_model_schema.json#
7
- kind: processor certificate model
8
- name: MC200-64
9
- long_name: Intermediate 64-bit Microcontroller Certificate
10
- class:
11
- $ref: proc_cert_class/MC.yaml#
12
-
13
- $inherits: "proc_cert_model/MC200-32.yaml#"
14
-
15
- # MXLEN used by rakefile
16
- base: 64
17
-
18
- param_constraints:
19
- MXLEN:
20
- schema:
21
- const: 64
@@ -1,40 +0,0 @@
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/proc_cert_model_schema.json
5
-
6
- $schema: proc_cert_model_schema.json#
7
- kind: processor certificate model
8
- name: MC300-32
9
- long_name: Advanced 32-bit Microcontroller Certificate
10
- class:
11
- $ref: proc_cert_class/MC.yaml#
12
-
13
- # Semantic versions within the model
14
- versions:
15
- - version: "1.0.0"
16
-
17
- # MXLEN used by rakefile
18
- base: 32
19
-
20
- $inherits: "proc_cert_model/MC200-32.yaml#"
21
-
22
- revision_history:
23
- - revision: "0.1.0"
24
- date: "2024-11-27"
25
- changes:
26
- - First created
27
-
28
- introduction: |
29
- The MC300 Processor Certificate targets advanced RISC-V microcontrollers.
30
- It supports either a 32-bit (MC300-32) or 64-bit (MC300-64) base ISA.
31
- The MC300 adds the following mandatory extensions to the MC200:
32
-
33
- * S extension (Supervisor-mode privilege level)
34
- * Sspmp extension (S-mode PMP, not ratified yet)
35
-
36
- # TODO: No ratified sPMP yet.
37
-
38
- extensions:
39
- S:
40
- presence: mandatory
@@ -1,21 +0,0 @@
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/proc_cert_model_schema.json
5
-
6
- $schema: proc_cert_model_schema.json#
7
- kind: processor certificate model
8
- name: MC300-64
9
- long_name: Advanced 64-bit Microcontroller Certificate
10
- class:
11
- $ref: proc_cert_class/MC.yaml#
12
-
13
- $inherits: "proc_cert_model/MC300-32.yaml#"
14
-
15
- # MXLEN used by rakefile
16
- base: 64
17
-
18
- param_constraints:
19
- MXLEN:
20
- schema:
21
- const: 64
@@ -1,39 +0,0 @@
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/proc_cert_model_schema.json
5
-
6
- $schema: proc_cert_model_schema.json#
7
- kind: processor certificate model
8
- name: RVI20-32
9
- long_name: 32-bit RVI20 Certificate
10
- class:
11
- $ref: proc_cert_class/RVI.yaml#
12
-
13
- # MXLEN
14
- base: 32
15
-
16
- # Semantic versions within the model
17
- versions:
18
- - version: "1.0.0"
19
-
20
- revision_history:
21
- - revision: "0.1.0"
22
- date: "2025-07-03"
23
- changes:
24
- - Created
25
-
26
- introduction: |
27
- The RVI20-32 processor certificate corresponds to the RVI20U32 profile.
28
-
29
- # Specification versions
30
- tsc_profile_release:
31
- $ref: profile_release/RVI20.yaml#
32
- unpriv_isa_manual_revision: "20240411"
33
-
34
- in_scope_priv_modes:
35
- - U
36
-
37
- extensions:
38
- $inherits:
39
- - "profile/RVI20U32.yaml#/extensions"
@@ -1,19 +0,0 @@
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/proc_cert_model_schema.json
5
-
6
- $schema: proc_cert_model_schema.json#
7
- kind: processor certificate model
8
- name: RVI20-64
9
- long_name: 64-bit RVI20 Certificate
10
- class:
11
- $ref: proc_cert_class/RVI.yaml#
12
-
13
- $inherits: "proc_cert_model/RVI20-32.yaml#"
14
-
15
- # MXLEN
16
- base: 64
17
-
18
- introduction: |
19
- The RVI20-64 processor certificate corresponds to the RVI20U64 profile.
@@ -1,24 +0,0 @@
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/profile_schema.json
5
-
6
- $schema: profile_schema.json#
7
- kind: profile
8
- name: RVA23M64
9
- long_name: M-mode extensions for version 23 of the 64-bit Apps Processor profile (not ratified)
10
- marketing_name: RVA23M64
11
- mode: M
12
- base: 64
13
- release: { $ref: profile_release/RVA23.yaml# }
14
- introduction: |
15
- The RVA23M64 profile specifies the ISA features available to machine-mode
16
- execution environments in 64-bit applications processors.
17
-
18
- [NOTE]
19
- The RVA23M64 profile is not a ratified profile by RISC-V International.
20
- It only exists here to support certificates based on RVA23 Profile Release having M-mode extensions.
21
- extensions:
22
- $inherits:
23
- - "profile/RVB23M64.yaml#/extensions"
24
- - "profile/RVA23S64.yaml#/extensions"
@@ -1,86 +0,0 @@
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/profile_schema.json
5
-
6
- $schema: profile_schema.json#
7
- kind: profile
8
- name: RVB23M64
9
- long_name: M-mode extensions for version 23 of the 64-bit Bespoke Apps Processor profile (not ratified)
10
- marketing_name: RVB23M64
11
- mode: M
12
- base: 64
13
- release: { $ref: profile_release/RVB23.yaml# }
14
- introduction: |
15
- The RVB23M64 profile specifies the ISA features available to machine-mode
16
- execution environments in 64-bit applications processors.
17
-
18
- [NOTE]
19
- The RVB23M64 profile is not a ratified profile by RISC-V International.
20
- It only exists here to support certificates based on RVB23 Profile Release having M-mode extensions.
21
- extensions:
22
- $inherits:
23
- - "profile/RVB23S64.yaml#/extensions"
24
-
25
- #########################################################################
26
- # MANDATORY extensions in RVB23 (and RVA23)
27
- #########################################################################
28
- Sm:
29
- version: "~> 1.13"
30
- presence: mandatory
31
-
32
- #########################################################################
33
- # OPTIONAL LOCALIZED extensions in RVB23M64
34
- #########################################################################
35
-
36
- # None
37
-
38
- #########################################################################
39
- # OPTIONAL DEVELOPMENT extensions in RVB23M64
40
- #########################################################################
41
-
42
- # None
43
-
44
- #########################################################################
45
- # OPTIONAL EXPANSION extensions in RVB23M64
46
- #########################################################################
47
-
48
- # None
49
-
50
- #########################################################################
51
- # OPTIONAL EXPANSION extensions in both RVB23M64 and RVA23M64
52
- #########################################################################
53
-
54
- # None
55
-
56
- requirements:
57
- param:
58
- allOf:
59
- - name: MTVEC_BASE_ALIGNMENT_DIRECT
60
- equal: 4
61
- - name: MTVEC_MODES
62
- equal: [0, 1]
63
- - name: PRECISE_SYNCHRONOUS_EXCEPTIONS
64
- equal: true
65
- - name: TRAP_ON_ECALL_FROM_M
66
- equal: true
67
- - name: TRAP_ON_EBREAK
68
- equal: true
69
- - name: REPORT_VA_IN_MTVAL_ON_BREAKPOINT
70
- equal: true
71
- - name: REPORT_VA_IN_MTVAL_ON_INSTRUCTION_ACCESS_FAULT
72
- equal: true
73
- - name: REPORT_VA_IN_MTVAL_ON_LOAD_ACCESS_FAULT
74
- equal: true
75
- - name: REPORT_VA_IN_MTVAL_ON_STORE_AMO_ACCESS_FAULT
76
- equal: true
77
- - name: REPORT_ENCODING_IN_MTVAL_ON_ILLEGAL_INSTRUCTION
78
- equal: true
79
- - name: M_MODE_ENDIANNESS
80
- equal: little
81
- - name: MXLEN
82
- equal: 64
83
- - name: NUM_PMP_ENTRIES
84
- greaterThanOrEqual: 4
85
- - name: PMP_GRANULARITY
86
- lessThanOrEqual: 12
@@ -1,41 +0,0 @@
1
- # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
- # SPDX-License-Identifier: BSD-3-Clause-Clear
3
-
4
- # frozen_string_literal: true
5
-
6
- module Udb
7
- class CertNormativeRule
8
- # @param data [Hash<String, Object>] Data from YAML file
9
- # @param db_obj [DatabaseObject] Database object that defines normative rule (Extension, Instruction, CSR, or CSR field)
10
- def initialize(data, db_obj)
11
- raise ArgumentError, "Need Hash but was passed a #{data.class}" unless data.is_a?(Hash)
12
- raise ArgumentError, "Need DatabaseObject but was passed a #{db_obj.class}" unless db_obj.is_a?(DatabaseObject)
13
-
14
- @data = data
15
- @db_obj = db_obj
16
-
17
- raise ArgumentError, "Missing certification normative rule description for #{db_obj.name} of kind #{db_obj.kind}" if description.nil?
18
- raise ArgumentError, "Missing certification normative rule ID for #{db_obj.name} of kind #{db_obj.kind}" if id.nil?
19
- end
20
-
21
- # @return [String] Description of normative rule (could be multiple lines)
22
- def description = @data["description"]
23
-
24
- # @return [String] Unique ID of the normative rule
25
- def id = @data["id"]
26
-
27
- # @return [Array<DocLink>] List of certification point documentation links
28
- def doc_links
29
- return @doc_links unless @doc_links.nil?
30
-
31
- @doc_links = []
32
- @data["doc_links"]&.each do |dst|
33
- @doc_links << DocLink.new(dst, @db_obj)
34
- end
35
-
36
- raise "Missing doc_links for certification normative rule ID '#{id}' of kind #{@db_obj.kind}" if @doc_links.empty?
37
-
38
- @doc_links
39
- end
40
- end
41
- end
@@ -1,21 +0,0 @@
1
- # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
- # SPDX-License-Identifier: BSD-3-Clause-Clear
3
-
4
- # frozen_string_literal: true
5
-
6
- require_relative "../cert_normative_rule"
7
-
8
- module Udb
9
- module CertifiableObject
10
- # @return [Array<CertNormativeRule>]
11
- def cert_normative_rules
12
- return @cert_normative_rules unless @cert_normative_rules.nil?
13
-
14
- @cert_normative_rules = []
15
- @data["cert_normative_rules"]&.each do |cert_data|
16
- @cert_normative_rules << CertNormativeRule.new(cert_data, self)
17
- end
18
- @cert_normative_rules
19
- end
20
- end # module
21
- end
@@ -1,230 +0,0 @@
1
- # typed: false
2
- # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
3
- # SPDX-License-Identifier: BSD-3-Clause-Clear
4
-
5
- # frozen_string_literal: true
6
-
7
- # Classes for certificates.
8
- # Each processor certificate model is a member of a processor certificate class.
9
-
10
- require_relative "portfolio"
11
-
12
- #######################
13
- # ProcCertClass Class #
14
- #######################
15
-
16
- module Udb
17
-
18
- # Holds information from processor certificate class YAML file.
19
- # The inherited "data" member is the database of extensions, instructions, CSRs, etc.
20
- class ProcCertClass < PortfolioClass
21
- end
22
-
23
- #######################
24
- # ProcCertModel Class #
25
- #######################
26
-
27
- # Holds information about a processor certificate model YAML file.
28
- # The inherited "data" member is the database of extensions, instructions, CSRs, etc.
29
- class ProcCertModel < Portfolio
30
- # @param obj_yaml [Hash<String, Object>] Contains contents of Certificate Model yaml file (put in @data)
31
- # @param data_path [String] Path to yaml file
32
- # @param arch [Architecture] Database of RISC-V standards
33
- def initialize(obj_yaml, yaml_path, arch)
34
- super # Calls parent class with the same args I got
35
- end
36
-
37
- def unpriv_isa_manual_revision = @data["unpriv_isa_manual_revision"]
38
- def priv_isa_manual_revision = @data["priv_isa_manual_revision"]
39
- def debug_manual_revision = @data["debug_manual_revision"]
40
-
41
- def tsc_profile_release
42
- return nil if @data["tsc_profile_release"].nil?
43
-
44
- profile_release = @arch.ref(@data["tsc_profile_release"]["$ref"])
45
-
46
- raise "No profile release called '#{@data["tsc_profile_release"]}' exists" if profile_release.nil?
47
-
48
- profile_release
49
- end
50
-
51
- def in_scope_priv_modes = @data["in_scope_priv_modes"]
52
-
53
- # @return [ProcCertClass] The certification class that this model belongs to.
54
- def proc_cert_class
55
- proc_cert_class = @arch.ref(@data["class"]["$ref"])
56
- raise "No processor certificate class named '#{@data["class"]}'" if proc_cert_class.nil?
57
-
58
- proc_cert_class
59
- end
60
-
61
- #####################
62
- # Requirement Class #
63
- #####################
64
-
65
- # Holds extra requirements not associated with extensions or their parameters.
66
- class Requirement
67
- # @param data [Hash<String, Object>] Data from yaml
68
- # @param arch [Architecture] Architecture standards
69
- def initialize(data, arch)
70
- raise ArgumentError, "Bad data" unless data.is_a?(Hash)
71
- raise ArgumentError, "Need Architecture class but it's a #{arch.class}" unless arch.is_a?(Architecture)
72
-
73
- @data = data
74
- @arch = arch
75
- end
76
-
77
- def name = @data["name"]
78
- def description = @data["description"]
79
- def when = @data["when"]
80
-
81
- def when_pretty
82
- @data["when"].keys.map do |key|
83
- case key
84
- when "xlen"
85
- "XLEN == #{@data["when"]["xlen"]}"
86
- when "param"
87
- @data["when"]["param"].map do |param_name, param_value|
88
- "Parameter #{param_name} == #{param_value}"
89
- end
90
- else
91
- raise "Type #{key} not implemented"
92
- end
93
- end.flatten.join(" and ")
94
- end
95
- end
96
-
97
- ##########################
98
- # RequirementGroup Class #
99
- ##########################
100
-
101
- # Holds a group of Requirement objects to provide a one-level group.
102
- # Can't nest RequirementGroup objects to make multi-level group.
103
- class RequirementGroup
104
- # @param data [Hash<String, Object>] Data from yaml
105
- # @param arch [Architecture] Architecture standards
106
- def initialize(data, arch)
107
- raise ArgumentError, "data is a #{data.class} class containing '#{data}' but needs to be a Hash" unless data.is_a?(Hash)
108
- raise ArgumentError, "arch is a #{arch.class} class but needs to be an Architecture class" unless arch.is_a?(Architecture)
109
-
110
- @data = data
111
- @arch = arch
112
- end
113
-
114
- def name = @data["name"]
115
- def description = @data["description"]
116
- def when = @data["when"]
117
-
118
- def when_pretty
119
- @data["when"].keys.map do |key|
120
- case key
121
- when "xlen"
122
- "XLEN == #{@data["when"]["xlen"]}"
123
- when "param"
124
- @data["when"]["param"].map do |param_name, param_value|
125
- "Parameter #{param_name} == #{param_value}"
126
- end
127
- else
128
- raise "Type #{key} not implemented"
129
- end
130
- end.flatten.join(" and ")
131
- end
132
-
133
- # @return [Array<Requirement>] The list of requirements in this group.
134
- def requirements
135
- return @requirements unless @requirements.nil?
136
-
137
- @requirements = []
138
- @data["requirements"].each do |req|
139
- @requirements << Requirement.new(req, @arch)
140
- end
141
- @requirements
142
- end
143
- end
144
-
145
- # @return [Array<RequirementGroup>] The list of requirement groups
146
- def requirement_groups
147
- return @requirement_groups unless @requirement_groups.nil?
148
-
149
- @requirement_groups = []
150
- @data["requirement_groups"]&.each do |req_key, req_group|
151
- @requirement_groups << RequirementGroup.new(req_group, @arch) unless req_key == "$child_of" || req_key == "$parent_of"
152
- end
153
- @requirement_groups
154
- end
155
-
156
- ###################################
157
- # Routines using InScopeParameter #
158
- ###################################
159
-
160
- # @return [Array<InScopeParameter>] Sorted list of parameters specified by any extension in portfolio.
161
- # These are always IN-SCOPE by definition (since they are listed in the portfolio).
162
- # Can have multiple array entries with the same parameter name since multiple extensions may define
163
- # the same parameter.
164
- def all_in_scope_params
165
- return @all_in_scope_params unless @all_in_scope_params.nil?
166
-
167
- @all_in_scope_params = []
168
-
169
- @data["param_constraints"]&.each do |param_name, param_data|
170
- param = @arch.param(param_name)
171
- if param.nil?
172
- cond_param = ext.conditional_params.find { |p| p.param.name == param_name }
173
- raise "There is no param '#{param_name}' in extension '#{ext_name}" if cond_param.nil?
174
- param = cond_param.param
175
- end
176
- @all_in_scope_params << InScopeParameter.new(param, param_data["schema"], param_data["note"])
177
- # next unless param.defined_by_condition.satisfied_by_cfg_arch?(to_cfg_arch) == SatisfiedResult::Yes
178
- end
179
-
180
- @all_in_scope_params << InScopeParameter.new(@arch.param("MXLEN"), { "const" => @data["base"] }, "")
181
- @all_in_scope_params.sort!
182
- end
183
-
184
- # @return [Array<Parameter>] Sorted list of parameters out of scope across all in scope extensions
185
- # (those listed as mandatory or optional in the certificate model).
186
- def all_out_of_scope_params
187
- return @all_out_of_scope_params unless @all_out_of_scope_params.nil?
188
-
189
- @all_out_of_scope_params = []
190
- in_scope_ext_reqs.each do |ext_req|
191
- ext = @arch.extension(ext_req.name)
192
- ext.params.each do |param|
193
- next if all_in_scope_params.any? { |c| c.param.name == param.name }
194
-
195
- @all_out_of_scope_params << param
196
- end
197
- end
198
- @all_out_of_scope_params.sort!
199
- end
200
-
201
- # @param ext_name [String] Extension name
202
- # @return [Array<Parameter>] Sorted list of parameters that are out of scope for named extension.
203
- def out_of_scope_params(ext_name)
204
- all_out_of_scope_params.select { |param| param.defined_by_condition.mentions?(@arch.extension(ext_name)) && param.defined_by_condition.satisfied_by_cfg_arch?(to_cfg_arch) == SatisfiedResult::Yes }.sort
205
- end
206
-
207
- # @param param [Parameter]
208
- # @return [Array<Extension>] Sorted list of all in-scope extensions that define this parameter
209
- # in the database and the parameter is in-scope.
210
- def all_in_scope_exts_with_param(param)
211
- raise ArgumentError, "Expecting Parameter" unless param.is_a?(Parameter)
212
-
213
- # Iterate through all the extensions in the architecture database that define this parameter.
214
- in_scope_extensions.select do |potential_ext|
215
- param.requirements_condition.mentions?(potential_ext) &&
216
- (param.requirements_condition & potential_ext.to_condition)
217
- end.sort_by!(&:name)
218
- end
219
-
220
- # @param param [Parameter]
221
- # @return [Array<Extension>] List of all in-scope extensions that define this parameter in the
222
- # database but the parameter is out-of-scope.
223
- def all_in_scope_exts_without_param(param)
224
- raise ArgumentError, "Expecting Parameter" unless param.is_a?(Parameter)
225
-
226
- all_in_scope_exts_with_param(param)
227
- end
228
- end
229
-
230
- end
@@ -1,77 +0,0 @@
1
- # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2
- # SPDX-License-Identifier: BSD-3-Clause-Clear
3
-
4
- # frozen_string_literal: true
5
-
6
- # Inherits from PortfolioDesign and contains content shared by
7
- # all processor certificate-based designs.
8
-
9
- require_relative "portfolio_design"
10
-
11
- module Udb
12
-
13
- class ProcCertDesign < PortfolioDesign
14
- # @return [ProcCertModel] The processor certificate model object from the architecture database
15
- attr_reader :proc_cert_model
16
-
17
- # @return [ProcCertClass] The processor certificate class object from the architecture database
18
- attr_reader :proc_cert_class
19
-
20
- # @param name [#to_s] The name of the portfolio design (i.e., backend filename without a suffix)
21
- # @param cfg_arch [ConfiguredArchitecture] The database of RISC-V standards for a particular configuration
22
- # @param portfolio_design_type [String] Type of portfolio design associated with this design
23
- # @param portfolios [Array<Portfolio>] Portfolios being converted to adoc
24
- # @param portfolio_class [PortfolioClass] PortfolioClass for all the Portfolios
25
- def initialize(name, cfg_arch, portfolio_design_type, proc_cert_model, proc_cert_class)
26
- raise ArgumentError, "proc_cert_model must be a ProcCertModel" unless proc_cert_model.is_a?(ProcCertModel)
27
- raise ArgumentError, "proc_cert_class must be a ProcCertClass" unless proc_cert_class.is_a?(ProcCertClass)
28
- @proc_cert_model = proc_cert_model
29
- @proc_cert_class = proc_cert_class
30
- super(name, cfg_arch, portfolio_design_type, [proc_cert_model], proc_cert_class)
31
- end
32
-
33
- # Returns a string representation of the object, suitable for debugging.
34
- # @return [String] A string representation of the object.
35
- def inspect = "ProcCertDesign##{name}"
36
-
37
- # @param extra_inputs [Array<Hash>] Any extra inputs to be passed to ERB template.
38
- # @return [Hash<String, Object>] Hash of objects to be used in ERB templates
39
- # Add certificate-specific objects to the parent hash.
40
- def erb_env(*extra_inputs)
41
- raise ArgumentError, "extra_inputs must be an Array but is a #{extra_inputs.class}" unless extra_inputs.is_a?(Array)
42
-
43
- h = super # Call parent method with whatever args I got
44
-
45
- h[:proc_cert_design] = self
46
- h[:proc_cert_model] = proc_cert_model
47
- h[:proc_cert_class] = proc_cert_class
48
-
49
- h
50
- end
51
-
52
- # Include a partial ERB template into a full ERB template. Can be either in
53
- # the portfolio or proc_cert backends (but not both).
54
- #
55
- # @param template_path [String] Name of template file located in backends/portfolio/templates
56
- # or in backends/proc_cert/templates
57
- # @param extra_inputs [Hash<String, Object>] Any extra inputs to be passed to ERB template.
58
- # @return [String] Result of ERB evaluation of the template file
59
- def include_erb(template_name, extra_inputs = {})
60
- proc_cert_template_pname = "proc_cert/templates/#{template_name}"
61
- proc_cert_template_path = Pathname.new($root / "backends" / proc_cert_template_pname)
62
-
63
- portfolio_template_pname = "portfolio/templates/#{template_name}"
64
- portfolio_template_path = Pathname.new($root / "backends" / portfolio_template_pname)
65
-
66
- if proc_cert_template_path.exist? && portfolio_template_path.exist?
67
- raise "Both #{proc_cert_template_pname} and #{portfolio_template_pname} exist. Need unique names."
68
- elsif proc_cert_template_path.exist?
69
- partial(proc_cert_template_pname, erb_env(extra_inputs))
70
- elsif portfolio_template_path.exist?
71
- partial(portfolio_template_pname, erb_env(extra_inputs))
72
- else
73
- raise "Can't find file #{template_name} in either #{proc_cert_template_pname} or #{portfolio_template_pname}."
74
- end
75
- end
76
- end
77
- end