udb 0.1.13 → 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 (189) hide show
  1. checksums.yaml +4 -4
  2. data/.data/cfgs/example_rv64_with_overlay.yaml +15 -18
  3. data/.data/cfgs/qc_iu.yaml +5 -1
  4. data/.data/cfgs/rv32-riscv-tests.yaml +4 -1
  5. data/.data/cfgs/rv32-vector.yaml +4 -1
  6. data/.data/cfgs/rv64-riscv-tests.yaml +4 -1
  7. data/.data/cfgs/rv64-vector.yaml +4 -1
  8. data/.data/spec/custom/isa/qc_iu/ext/Xqccmi.yaml +107 -36
  9. data/.data/spec/custom/isa/qc_iu/inst/Xqccmi/qc.cm.ilut.yaml +52 -69
  10. data/.data/spec/custom/isa/qc_iu/isa/globals.isa +27 -5
  11. data/.data/spec/schemas/config_schema.json +1 -1
  12. data/.data/spec/schemas/mmr_schema.json +3 -3
  13. data/.data/spec/schemas/schema_defs.json +5 -0
  14. data/.data/spec/std/isa/csr/H/henvcfg.yaml +25 -0
  15. data/.data/spec/std/isa/csr/I/pmpaddr0.yaml +6 -4
  16. data/.data/spec/std/isa/csr/I/pmpaddr1.yaml +6 -4
  17. data/.data/spec/std/isa/csr/I/pmpaddr10.yaml +6 -4
  18. data/.data/spec/std/isa/csr/I/pmpaddr11.yaml +6 -4
  19. data/.data/spec/std/isa/csr/I/pmpaddr12.yaml +6 -4
  20. data/.data/spec/std/isa/csr/I/pmpaddr13.yaml +6 -4
  21. data/.data/spec/std/isa/csr/I/pmpaddr14.yaml +6 -4
  22. data/.data/spec/std/isa/csr/I/pmpaddr15.yaml +6 -4
  23. data/.data/spec/std/isa/csr/I/pmpaddr16.yaml +6 -4
  24. data/.data/spec/std/isa/csr/I/pmpaddr17.yaml +6 -4
  25. data/.data/spec/std/isa/csr/I/pmpaddr18.yaml +6 -4
  26. data/.data/spec/std/isa/csr/I/pmpaddr19.yaml +6 -4
  27. data/.data/spec/std/isa/csr/I/pmpaddr2.yaml +6 -4
  28. data/.data/spec/std/isa/csr/I/pmpaddr20.yaml +6 -4
  29. data/.data/spec/std/isa/csr/I/pmpaddr21.yaml +6 -4
  30. data/.data/spec/std/isa/csr/I/pmpaddr22.yaml +6 -4
  31. data/.data/spec/std/isa/csr/I/pmpaddr23.yaml +6 -4
  32. data/.data/spec/std/isa/csr/I/pmpaddr24.yaml +6 -4
  33. data/.data/spec/std/isa/csr/I/pmpaddr25.yaml +6 -4
  34. data/.data/spec/std/isa/csr/I/pmpaddr26.yaml +6 -4
  35. data/.data/spec/std/isa/csr/I/pmpaddr27.yaml +6 -4
  36. data/.data/spec/std/isa/csr/I/pmpaddr28.yaml +6 -4
  37. data/.data/spec/std/isa/csr/I/pmpaddr29.yaml +6 -4
  38. data/.data/spec/std/isa/csr/I/pmpaddr3.yaml +6 -4
  39. data/.data/spec/std/isa/csr/I/pmpaddr30.yaml +6 -4
  40. data/.data/spec/std/isa/csr/I/pmpaddr31.yaml +6 -4
  41. data/.data/spec/std/isa/csr/I/pmpaddr32.yaml +6 -4
  42. data/.data/spec/std/isa/csr/I/pmpaddr33.yaml +6 -4
  43. data/.data/spec/std/isa/csr/I/pmpaddr34.yaml +6 -4
  44. data/.data/spec/std/isa/csr/I/pmpaddr35.yaml +6 -4
  45. data/.data/spec/std/isa/csr/I/pmpaddr36.yaml +6 -4
  46. data/.data/spec/std/isa/csr/I/pmpaddr37.yaml +6 -4
  47. data/.data/spec/std/isa/csr/I/pmpaddr38.yaml +6 -4
  48. data/.data/spec/std/isa/csr/I/pmpaddr39.yaml +6 -4
  49. data/.data/spec/std/isa/csr/I/pmpaddr4.yaml +6 -4
  50. data/.data/spec/std/isa/csr/I/pmpaddr40.yaml +6 -4
  51. data/.data/spec/std/isa/csr/I/pmpaddr41.yaml +6 -4
  52. data/.data/spec/std/isa/csr/I/pmpaddr42.yaml +6 -4
  53. data/.data/spec/std/isa/csr/I/pmpaddr43.yaml +6 -4
  54. data/.data/spec/std/isa/csr/I/pmpaddr44.yaml +6 -4
  55. data/.data/spec/std/isa/csr/I/pmpaddr45.yaml +6 -4
  56. data/.data/spec/std/isa/csr/I/pmpaddr46.yaml +6 -4
  57. data/.data/spec/std/isa/csr/I/pmpaddr47.yaml +6 -4
  58. data/.data/spec/std/isa/csr/I/pmpaddr48.yaml +6 -4
  59. data/.data/spec/std/isa/csr/I/pmpaddr49.yaml +6 -4
  60. data/.data/spec/std/isa/csr/I/pmpaddr5.yaml +6 -4
  61. data/.data/spec/std/isa/csr/I/pmpaddr50.yaml +6 -4
  62. data/.data/spec/std/isa/csr/I/pmpaddr51.yaml +6 -4
  63. data/.data/spec/std/isa/csr/I/pmpaddr52.yaml +6 -4
  64. data/.data/spec/std/isa/csr/I/pmpaddr53.yaml +6 -4
  65. data/.data/spec/std/isa/csr/I/pmpaddr54.yaml +6 -4
  66. data/.data/spec/std/isa/csr/I/pmpaddr55.yaml +6 -4
  67. data/.data/spec/std/isa/csr/I/pmpaddr56.yaml +6 -4
  68. data/.data/spec/std/isa/csr/I/pmpaddr57.yaml +6 -4
  69. data/.data/spec/std/isa/csr/I/pmpaddr58.yaml +6 -4
  70. data/.data/spec/std/isa/csr/I/pmpaddr59.yaml +6 -4
  71. data/.data/spec/std/isa/csr/I/pmpaddr6.yaml +6 -4
  72. data/.data/spec/std/isa/csr/I/pmpaddr60.yaml +6 -4
  73. data/.data/spec/std/isa/csr/I/pmpaddr61.yaml +6 -4
  74. data/.data/spec/std/isa/csr/I/pmpaddr62.yaml +6 -4
  75. data/.data/spec/std/isa/csr/I/pmpaddr63.yaml +6 -4
  76. data/.data/spec/std/isa/csr/I/pmpaddr7.yaml +6 -4
  77. data/.data/spec/std/isa/csr/I/pmpaddr8.yaml +6 -4
  78. data/.data/spec/std/isa/csr/I/pmpaddr9.yaml +6 -4
  79. data/.data/spec/std/isa/csr/I/pmpaddrN.layout +6 -4
  80. data/.data/spec/std/isa/csr/I/pmpcfg0.yaml +120 -144
  81. data/.data/spec/std/isa/csr/I/pmpcfg1.yaml +60 -72
  82. data/.data/spec/std/isa/csr/I/pmpcfg10.yaml +120 -144
  83. data/.data/spec/std/isa/csr/I/pmpcfg11.yaml +60 -72
  84. data/.data/spec/std/isa/csr/I/pmpcfg12.yaml +120 -144
  85. data/.data/spec/std/isa/csr/I/pmpcfg13.yaml +60 -72
  86. data/.data/spec/std/isa/csr/I/pmpcfg14.yaml +120 -144
  87. data/.data/spec/std/isa/csr/I/pmpcfg15.yaml +60 -72
  88. data/.data/spec/std/isa/csr/I/pmpcfg2.yaml +120 -144
  89. data/.data/spec/std/isa/csr/I/pmpcfg3.yaml +60 -72
  90. data/.data/spec/std/isa/csr/I/pmpcfg4.yaml +120 -144
  91. data/.data/spec/std/isa/csr/I/pmpcfg5.yaml +60 -72
  92. data/.data/spec/std/isa/csr/I/pmpcfg6.yaml +120 -144
  93. data/.data/spec/std/isa/csr/I/pmpcfg7.yaml +60 -72
  94. data/.data/spec/std/isa/csr/I/pmpcfg8.yaml +120 -144
  95. data/.data/spec/std/isa/csr/I/pmpcfg9.yaml +60 -72
  96. data/.data/spec/std/isa/csr/I/pmpcfgN.layout +15 -18
  97. data/.data/spec/std/isa/csr/jvt.yaml +1 -0
  98. data/.data/spec/std/isa/csr/menvcfg.yaml +20 -0
  99. data/.data/spec/std/isa/csr/mstatus.yaml +8 -6
  100. data/.data/spec/std/isa/csr/senvcfg.yaml +26 -0
  101. data/.data/spec/std/isa/inst/B/andn.yaml +10 -12
  102. data/.data/spec/std/isa/inst/B/clmul.yaml +9 -11
  103. data/.data/spec/std/isa/inst/B/clmulh.yaml +9 -11
  104. data/.data/spec/std/isa/inst/B/orn.yaml +9 -11
  105. data/.data/spec/std/isa/inst/B/rev8.yaml +1 -1
  106. data/.data/spec/std/isa/inst/B/rol.yaml +9 -11
  107. data/.data/spec/std/isa/inst/B/rolw.yaml +9 -11
  108. data/.data/spec/std/isa/inst/B/ror.yaml +9 -11
  109. data/.data/spec/std/isa/inst/B/rorw.yaml +9 -11
  110. data/.data/spec/std/isa/inst/B/xnor.yaml +9 -11
  111. data/.data/spec/std/isa/inst/C/c.ldsp.yaml +3 -3
  112. data/.data/spec/std/isa/inst/I/addi.yaml +1 -0
  113. data/.data/spec/std/isa/inst/I/addiw.yaml +1 -0
  114. data/.data/spec/std/isa/inst/I/andi.yaml +1 -0
  115. data/.data/spec/std/isa/inst/I/auipc.yaml +1 -0
  116. data/.data/spec/std/isa/inst/I/lb.yaml +1 -0
  117. data/.data/spec/std/isa/inst/I/lbu.yaml +1 -0
  118. data/.data/spec/std/isa/inst/I/ld.yaml +2 -0
  119. data/.data/spec/std/isa/inst/I/lh.yaml +1 -0
  120. data/.data/spec/std/isa/inst/I/lhu.yaml +1 -0
  121. data/.data/spec/std/isa/inst/I/lui.yaml +1 -0
  122. data/.data/spec/std/isa/inst/I/lw.yaml +1 -0
  123. data/.data/spec/std/isa/inst/I/lwu.yaml +1 -0
  124. data/.data/spec/std/isa/inst/I/ori.yaml +1 -0
  125. data/.data/spec/std/isa/inst/I/sb.yaml +1 -0
  126. data/.data/spec/std/isa/inst/I/sd.yaml +1 -0
  127. data/.data/spec/std/isa/inst/I/sh.yaml +1 -0
  128. data/.data/spec/std/isa/inst/I/slti.yaml +1 -0
  129. data/.data/spec/std/isa/inst/I/sltiu.yaml +1 -0
  130. data/.data/spec/std/isa/inst/I/sw.yaml +1 -0
  131. data/.data/spec/std/isa/inst/I/xori.yaml +1 -0
  132. data/.data/spec/std/isa/inst/V/vadc.vim.yaml +1 -0
  133. data/.data/spec/std/isa/inst/V/vadd.vi.yaml +1 -0
  134. data/.data/spec/std/isa/inst/V/vand.vi.yaml +1 -0
  135. data/.data/spec/std/isa/inst/V/vle8.v.yaml +1 -0
  136. data/.data/spec/std/isa/inst/V/vmadc.vi.yaml +1 -0
  137. data/.data/spec/std/isa/inst/V/vmadc.vim.yaml +1 -0
  138. data/.data/spec/std/isa/inst/V/vmerge.vim.yaml +1 -0
  139. data/.data/spec/std/isa/inst/V/vmseq.vi.yaml +1 -0
  140. data/.data/spec/std/isa/inst/V/vmsgt.vi.yaml +1 -0
  141. data/.data/spec/std/isa/inst/V/vmsgtu.vi.yaml +1 -0
  142. data/.data/spec/std/isa/inst/V/vmsle.vi.yaml +1 -0
  143. data/.data/spec/std/isa/inst/V/vmsleu.vi.yaml +1 -0
  144. data/.data/spec/std/isa/inst/V/vmsne.vi.yaml +1 -0
  145. data/.data/spec/std/isa/inst/V/vor.vi.yaml +1 -0
  146. data/.data/spec/std/isa/inst/V/vrsub.vi.yaml +1 -0
  147. data/.data/spec/std/isa/inst/V/vsadd.vi.yaml +1 -0
  148. data/.data/spec/std/isa/inst/V/vsaddu.vi.yaml +1 -0
  149. data/.data/spec/std/isa/inst/V/vse8.v.yaml +1 -0
  150. data/.data/spec/std/isa/inst/Zawrs/wrs.nto.yaml +4 -2
  151. data/.data/spec/std/isa/inst/Zba/add.uw.yaml +9 -11
  152. data/.data/spec/std/isa/inst/Zbb/orc.b.yaml +1 -1
  153. data/.data/spec/std/isa/inst/Zbkb/brev8.yaml +3 -3
  154. data/.data/spec/std/isa/inst/Zbkb/unzip.yaml +2 -2
  155. data/.data/spec/std/isa/inst/Zbkb/zip.yaml +2 -2
  156. data/.data/spec/std/isa/inst/Zbkx/xperm4.yaml +2 -2
  157. data/.data/spec/std/isa/inst/Zbkx/xperm8.yaml +2 -2
  158. data/.data/spec/std/isa/inst/Zicbop/prefetch.i.yaml +2 -0
  159. data/.data/spec/std/isa/inst/Zicbop/prefetch.r.yaml +2 -0
  160. data/.data/spec/std/isa/inst/Zicbop/prefetch.w.yaml +2 -0
  161. data/.data/spec/std/isa/inst/Zks/sm3p0.yaml +1 -1
  162. data/.data/spec/std/isa/inst/Zks/sm3p1.yaml +1 -1
  163. data/.data/spec/std/isa/inst/Zks/sm4ed.yaml +1 -1
  164. data/.data/spec/std/isa/inst/Zks/sm4ks.yaml +1 -1
  165. data/.data/spec/std/isa/isa/builtin_functions.idl +1 -0
  166. data/.data/spec/std/isa/isa/globals.isa +27 -7
  167. data/.data/spec/std/isa/isa/interrupts.idl +1 -0
  168. data/.data/spec/std/isa/param/HSTATEEN_CONTEXT_TYPE.yaml +1 -0
  169. data/.data/spec/std/isa/param/MSTATEEN_CONTEXT_TYPE.yaml +1 -0
  170. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_DIRECT.yaml +1 -0
  171. data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_VECTORED.yaml +1 -0
  172. data/.data/spec/std/isa/param/NUM_PMP_ENTRIES.yaml +11 -22
  173. data/.data/spec/std/isa/param/NUM_USABLE_PMP_ENTRIES.yaml +35 -0
  174. data/.data/spec/std/isa/param/PMP_NA4_SUPPORTED.yaml +23 -0
  175. data/.data/spec/std/isa/param/PMP_NAPOT_SUPPORTED.yaml +19 -0
  176. data/.data/spec/std/isa/param/{MSTATUS_TVM_IMPLEMENTED.yaml → PMP_TOR_SUPPORTED.yaml} +6 -6
  177. data/.data/spec/std/isa/param/PRECISE_SYNCHRONOUS_EXCEPTIONS.yaml +1 -0
  178. data/.data/spec/std/isa/param/TRAP_ON_EBREAK.yaml +1 -0
  179. data/.data/spec/std/isa/param/TRAP_ON_ECALL_FROM_M.yaml +1 -0
  180. data/.data/spec/std/isa/param/TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY.yaml +1 -0
  181. data/.data/spec/std/isa/param/ZAWRS_NTO_IS_NOP.yaml +19 -0
  182. data/lib/udb/ESPRESSO_VERSION +1 -1
  183. data/lib/udb/config.rb +14 -2
  184. data/lib/udb/doc_link.rb +3 -4
  185. data/lib/udb/obj/instruction.rb +1 -1
  186. data/lib/udb/obj/non_isa_specification.rb +22 -100
  187. data/lib/udb/version.rb +1 -1
  188. data/lib/udb/z3.rb +2 -2
  189. metadata +7 -3
@@ -15,17 +15,15 @@ definedBy:
15
15
  - name: Zbb
16
16
  - name: Zbkb
17
17
  assembly: xd, xs1, xs2
18
- format:
19
- $inherits:
20
- - inst_subtype/R/R-x.yaml#/data
21
- opcodes:
22
- funct7:
23
- display_name: XNOR
24
- value: 0b0100000
25
- funct3:
26
- display_name: XNOR
27
- value: 0b100
28
- opcode: { $inherits: inst_opcode/OP.yaml#/data }
18
+ encoding:
19
+ match: 0100000----------100-----0110011
20
+ variables:
21
+ - name: xs2
22
+ location: 24-20
23
+ - name: xs1
24
+ location: 19-15
25
+ - name: xd
26
+ location: 11-7
29
27
  access:
30
28
  s: always
31
29
  u: always
@@ -57,8 +57,8 @@ operation(): |
57
57
  Bits<64> value = read_memory(64, virtual_address, $encoding);
58
58
 
59
59
  if (xlen()== 64) {
60
- X[creg2reg(xd)] = value;
60
+ X[xd] = value;
61
61
  } else if (xlen() == 32) {
62
- X[creg2reg(xd)] = value[31:0];
63
- X[creg2reg(xd) + 1] = value[63:32];
62
+ X[xd] = value[31:0];
63
+ X[xd + 1] = value[63:32];
64
64
  }
@@ -19,6 +19,7 @@ encoding:
19
19
  variables:
20
20
  - name: imm
21
21
  location: 31-20
22
+ sign_extend: true
22
23
  - name: xs1
23
24
  location: 19-15
24
25
  - name: xd
@@ -21,6 +21,7 @@ encoding:
21
21
  variables:
22
22
  - name: imm
23
23
  location: 31-20
24
+ sign_extend: true
24
25
  - name: xs1
25
26
  location: 19-15
26
27
  - name: xd
@@ -17,6 +17,7 @@ encoding:
17
17
  variables:
18
18
  - name: imm
19
19
  location: 31-20
20
+ sign_extend: true
20
21
  - name: xs1
21
22
  location: 19-15
22
23
  - name: xd
@@ -18,6 +18,7 @@ encoding:
18
18
  - name: imm
19
19
  location: 31-12
20
20
  left_shift: 12
21
+ sign_extend: true
21
22
  - name: xd
22
23
  location: 11-7
23
24
  hints:
@@ -20,6 +20,7 @@ encoding:
20
20
  variables:
21
21
  - name: imm
22
22
  location: 31-20
23
+ sign_extend: true
23
24
  - name: xs1
24
25
  location: 19-15
25
26
  - name: xd
@@ -20,6 +20,7 @@ encoding:
20
20
  variables:
21
21
  - name: imm
22
22
  location: 31-20
23
+ sign_extend: true
23
24
  - name: xs1
24
25
  location: 19-15
25
26
  - name: xd
@@ -29,6 +29,7 @@ encoding:
29
29
  variables:
30
30
  - name: imm
31
31
  location: 31-20
32
+ sign_extend: true
32
33
  - name: xs1
33
34
  location: 19-15
34
35
  - name: xd
@@ -39,6 +40,7 @@ encoding:
39
40
  variables:
40
41
  - name: imm
41
42
  location: 31-20
43
+ sign_extend: true
42
44
  - name: xs1
43
45
  location: 19-15
44
46
  - name: xd
@@ -20,6 +20,7 @@ encoding:
20
20
  variables:
21
21
  - name: imm
22
22
  location: 31-20
23
+ sign_extend: true
23
24
  - name: xs1
24
25
  location: 19-15
25
26
  - name: xd
@@ -20,6 +20,7 @@ encoding:
20
20
  variables:
21
21
  - name: imm
22
22
  location: 31-20
23
+ sign_extend: true
23
24
  - name: xs1
24
25
  location: 19-15
25
26
  - name: xd
@@ -18,6 +18,7 @@ encoding:
18
18
  - name: imm
19
19
  location: 31-12
20
20
  left_shift: 12
21
+ sign_extend: true
21
22
  - name: xd
22
23
  location: 11-7
23
24
  access:
@@ -20,6 +20,7 @@ encoding:
20
20
  variables:
21
21
  - name: imm
22
22
  location: 31-20
23
+ sign_extend: true
23
24
  - name: xs1
24
25
  location: 19-15
25
26
  - name: xd
@@ -22,6 +22,7 @@ encoding:
22
22
  variables:
23
23
  - name: imm
24
24
  location: 31-20
25
+ sign_extend: true
25
26
  - name: xs1
26
27
  location: 19-15
27
28
  - name: xd
@@ -17,6 +17,7 @@ encoding:
17
17
  variables:
18
18
  - name: imm
19
19
  location: 31-20
20
+ sign_extend: true
20
21
  - name: xs1
21
22
  location: 19-15
22
23
  - name: xd
@@ -19,6 +19,7 @@ encoding:
19
19
  variables:
20
20
  - name: imm
21
21
  location: 31-25|11-7
22
+ sign_extend: true
22
23
  - name: xs2
23
24
  location: 24-20
24
25
  - name: xs1
@@ -25,6 +25,7 @@ encoding:
25
25
  variables:
26
26
  - name: imm
27
27
  location: 31-25|11-7
28
+ sign_extend: true
28
29
  - name: xs2
29
30
  not: [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]
30
31
  location: 24-20
@@ -19,6 +19,7 @@ encoding:
19
19
  variables:
20
20
  - name: imm
21
21
  location: 31-25|11-7
22
+ sign_extend: true
22
23
  - name: xs2
23
24
  location: 24-20
24
25
  - name: xs1
@@ -19,6 +19,7 @@ encoding:
19
19
  variables:
20
20
  - name: imm
21
21
  location: 31-20
22
+ sign_extend: true
22
23
  - name: xs1
23
24
  location: 19-15
24
25
  - name: xd
@@ -23,6 +23,7 @@ encoding:
23
23
  variables:
24
24
  - name: imm
25
25
  location: 31-20
26
+ sign_extend: true
26
27
  - name: xs1
27
28
  location: 19-15
28
29
  - name: xd
@@ -19,6 +19,7 @@ encoding:
19
19
  variables:
20
20
  - name: imm
21
21
  location: 31-25|11-7
22
+ sign_extend: true
22
23
  - name: xs2
23
24
  location: 24-20
24
25
  - name: xs1
@@ -19,6 +19,7 @@ encoding:
19
19
  variables:
20
20
  - name: imm
21
21
  location: 31-20
22
+ sign_extend: true
22
23
  - name: xs1
23
24
  location: 19-15
24
25
  - name: xd
@@ -20,6 +20,7 @@ encoding:
20
20
  location: 24-20
21
21
  - name: imm
22
22
  location: 19-15
23
+ sign_extend: true
23
24
  - name: vd
24
25
  location: 11-7
25
26
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -36,3 +36,4 @@ operation(): |
36
36
  U32 end_bit_pos = start_bit_pos + 7;
37
37
  V[vd][end_bit_pos:start_bit_pos] = read_memory(8, virtual_address + i, $encoding)[7:0];
38
38
  }
39
+ CSR[vstart].VALUE = 0;
@@ -20,6 +20,7 @@ encoding:
20
20
  location: 24-20
21
21
  - name: imm
22
22
  location: 19-15
23
+ sign_extend: true
23
24
  - name: vd
24
25
  location: 11-7
25
26
  access:
@@ -20,6 +20,7 @@ encoding:
20
20
  location: 24-20
21
21
  - name: imm
22
22
  location: 19-15
23
+ sign_extend: true
23
24
  - name: vd
24
25
  location: 11-7
25
26
  access:
@@ -20,6 +20,7 @@ encoding:
20
20
  location: 24-20
21
21
  - name: imm
22
22
  location: 19-15
23
+ sign_extend: true
23
24
  - name: vd
24
25
  location: 11-7
25
26
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -22,6 +22,7 @@ encoding:
22
22
  location: 24-20
23
23
  - name: imm
24
24
  location: 19-15
25
+ sign_extend: true
25
26
  - name: vd
26
27
  location: 11-7
27
28
  access:
@@ -36,3 +36,4 @@ operation(): |
36
36
  U32 end_bit_pos = start_bit_pos + 7;
37
37
  write_memory(8, virtual_address + i, V[vs3][end_bit_pos:start_bit_pos], $encoding);
38
38
  }
39
+ CSR[vstart].VALUE = 0;
@@ -73,5 +73,7 @@ operation(): |
73
73
  }
74
74
  }
75
75
 
76
- # stall while the reservation set is valid and no interrupt is pending
77
- wrs_nto();
76
+ if (!ZAWRS_NTO_IS_NOP) {
77
+ # stall while the reservation set is valid and no interrupt is pending
78
+ wrs_nto();
79
+ }
@@ -16,17 +16,15 @@ definedBy:
16
16
  - extension:
17
17
  name: Zba
18
18
  assembly: xd, xs1, xs2
19
- format:
20
- $inherits:
21
- - inst_subtype/R/R-x.yaml#/data
22
- opcodes:
23
- funct7:
24
- display_name: ADD.UW
25
- value: 0b0000100
26
- funct3:
27
- display_name: ADD.UW
28
- value: 0b000
29
- opcode: { $inherits: inst_opcode/OP-32.yaml#/data }
19
+ encoding:
20
+ match: 0000100----------000-----0111011
21
+ variables:
22
+ - name: xs2
23
+ location: 24-20
24
+ - name: xs1
25
+ location: 19-15
26
+ - name: xd
27
+ location: 11-7
30
28
  access:
31
29
  s: always
32
30
  u: always
@@ -35,7 +35,7 @@ operation(): |
35
35
  XReg input = X[xs1];
36
36
  XReg output = 0;
37
37
 
38
- for (U32 i=0; i<(xlen() - 8); i = i+8) {
38
+ for (U32 i=0; i < xlen(); i = i+8) {
39
39
  output[(i+7):i] = (input[(i+7):i] == 0) ? 8'd0 : ~8'd0;
40
40
  }
41
41
 
@@ -25,14 +25,14 @@ access:
25
25
  u: always
26
26
  vs: always
27
27
  vu: always
28
- data_independent_timing: false
28
+ data_independent_timing: true
29
29
  operation(): |
30
30
  XReg input = X[xs1];
31
31
  XReg output = 0;
32
32
 
33
- for(U32 i=0; i<(xlen()-8); i = i+8) {
33
+ for(U32 i=0; i < xlen(); i = i+8) {
34
34
  for(U32 j=0; j<8; j = j+1) {
35
- output[(i*8)+(7-j)] = input[(i*8)+j];
35
+ output[i+(7-j)] = input[i+j];
36
36
  }
37
37
  }
38
38
 
@@ -29,12 +29,12 @@ access:
29
29
  u: always
30
30
  vs: always
31
31
  vu: always
32
- data_independent_timing: false
32
+ data_independent_timing: true
33
33
  operation(): |
34
34
  XReg input = X[xs1];
35
35
  XReg output = 0;
36
36
 
37
- for(U32 i=0; i<(xlen()/2-1); i = i+1) {
37
+ for(U32 i=0; i < (xlen()/2); i = i+1) {
38
38
  output[i] = input[2*i];
39
39
  output[i+xlen()/2] = input[2*i+1];
40
40
  }
@@ -29,12 +29,12 @@ access:
29
29
  u: always
30
30
  vs: always
31
31
  vu: always
32
- data_independent_timing: false
32
+ data_independent_timing: true
33
33
  operation(): |
34
34
  XReg input = X[xs1];
35
35
  XReg output = 0;
36
36
 
37
- for(U32 i=0; i<(xlen()/2-1); i = i+1){
37
+ for(U32 i=0; i < (xlen()/2); i = i+1){
38
38
  output[2*i] = input[i];
39
39
  output[2*i+1] = input[i+xlen()/2];
40
40
  }
@@ -29,13 +29,13 @@ access:
29
29
  u: always
30
30
  vs: always
31
31
  vu: always
32
- data_independent_timing: false
32
+ data_independent_timing: true
33
33
  operation(): |
34
34
  XReg input1 = X[xs1];
35
35
  XReg input2 = X[xs2];
36
36
  XReg output = 0;
37
37
 
38
- for(U32 i=0; i<(xlen()-4); i = i+4) {
38
+ for(U32 i=0; i < xlen(); i = i+4) {
39
39
  XReg index = input2[i+3:i];
40
40
  if(4*index < xlen()) {
41
41
  output[i+3:i] = input1[4*index+3:4*index];
@@ -29,13 +29,13 @@ access:
29
29
  u: always
30
30
  vs: always
31
31
  vu: always
32
- data_independent_timing: false
32
+ data_independent_timing: true
33
33
  operation(): |
34
34
  XReg input1 = X[xs1];
35
35
  XReg input2 = X[xs2];
36
36
  XReg output = 0;
37
37
 
38
- for(U32 i=0; i<(xlen()-8); i = i+8) {
38
+ for(U32 i=0; i < xlen(); i = i+8) {
39
39
  XReg index = input2[i+7:i];
40
40
  if(8*index < xlen()) {
41
41
  output[i+7:i] = input1[8*index+7:8*index];
@@ -21,6 +21,8 @@ encoding:
21
21
  variables:
22
22
  - name: imm
23
23
  location: 31-25
24
+ left_shift: 5
25
+ sign_extend: true
24
26
  - name: xs1
25
27
  location: 19-15
26
28
  access:
@@ -21,6 +21,8 @@ encoding:
21
21
  variables:
22
22
  - name: imm
23
23
  location: 31-25
24
+ left_shift: 5
25
+ sign_extend: true
24
26
  - name: xs1
25
27
  location: 19-15
26
28
  access:
@@ -21,6 +21,8 @@ encoding:
21
21
  variables:
22
22
  - name: imm
23
23
  location: 31-25
24
+ left_shift: 5
25
+ sign_extend: true
24
26
  - name: xs1
25
27
  location: 19-15
26
28
  access:
@@ -25,5 +25,5 @@ access:
25
25
  u: always
26
26
  vs: always
27
27
  vu: always
28
- data_independent_timing: false
28
+ data_independent_timing: true
29
29
  operation(): |
@@ -25,5 +25,5 @@ access:
25
25
  u: always
26
26
  vs: always
27
27
  vu: always
28
- data_independent_timing: false
28
+ data_independent_timing: true
29
29
  operation(): |
@@ -29,5 +29,5 @@ access:
29
29
  u: always
30
30
  vs: always
31
31
  vu: always
32
- data_independent_timing: false
32
+ data_independent_timing: true
33
33
  operation(): |
@@ -29,5 +29,5 @@ access:
29
29
  u: always
30
30
  vs: always
31
31
  vu: always
32
- data_independent_timing: false
32
+ data_independent_timing: true
33
33
  operation(): |
@@ -439,6 +439,7 @@ function read_physical_memory {
439
439
  return read_physical_memory_64(paddr);
440
440
  } else {
441
441
  assert(false, "Invalid len");
442
+ return 0;
442
443
  }
443
444
  }
444
445
  }