HDLRuby 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +5 -0
  4. data/.yardopts +1 -0
  5. data/Gemfile +4 -0
  6. data/HDLRuby.gemspec +36 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +2774 -0
  9. data/README.pdf +0 -0
  10. data/Rakefile +10 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/exe/hdrcc +3 -0
  14. data/lib/HDLRuby/alcc.rb +137 -0
  15. data/lib/HDLRuby/backend/hruby_allocator.rb +69 -0
  16. data/lib/HDLRuby/backend/hruby_c_allocator.rb +76 -0
  17. data/lib/HDLRuby/hdr_samples/adder.rb +7 -0
  18. data/lib/HDLRuby/hdr_samples/adder_assign_error.rb +11 -0
  19. data/lib/HDLRuby/hdr_samples/adder_bench.rb +27 -0
  20. data/lib/HDLRuby/hdr_samples/adder_gen.rb +7 -0
  21. data/lib/HDLRuby/hdr_samples/adder_nodef_error.rb +7 -0
  22. data/lib/HDLRuby/hdr_samples/addsub.rb +19 -0
  23. data/lib/HDLRuby/hdr_samples/addsubz.rb +22 -0
  24. data/lib/HDLRuby/hdr_samples/alu.rb +47 -0
  25. data/lib/HDLRuby/hdr_samples/calculator.rb +48 -0
  26. data/lib/HDLRuby/hdr_samples/counter_bench.rb +83 -0
  27. data/lib/HDLRuby/hdr_samples/dff.rb +9 -0
  28. data/lib/HDLRuby/hdr_samples/dff_bench.rb +66 -0
  29. data/lib/HDLRuby/hdr_samples/dff_counter.rb +20 -0
  30. data/lib/HDLRuby/hdr_samples/include.rb +14 -0
  31. data/lib/HDLRuby/hdr_samples/instance_open.rb +23 -0
  32. data/lib/HDLRuby/hdr_samples/mei8.rb +256 -0
  33. data/lib/HDLRuby/hdr_samples/mei8_bench.rb +309 -0
  34. data/lib/HDLRuby/hdr_samples/multer_gen.rb +8 -0
  35. data/lib/HDLRuby/hdr_samples/multer_seq.rb +29 -0
  36. data/lib/HDLRuby/hdr_samples/neural/a.rb +9 -0
  37. data/lib/HDLRuby/hdr_samples/neural/a_sub.rb +5 -0
  38. data/lib/HDLRuby/hdr_samples/neural/bw.rb +23 -0
  39. data/lib/HDLRuby/hdr_samples/neural/counter.rb +16 -0
  40. data/lib/HDLRuby/hdr_samples/neural/dadz.rb +9 -0
  41. data/lib/HDLRuby/hdr_samples/neural/dadz_sub.rb +4 -0
  42. data/lib/HDLRuby/hdr_samples/neural/forward.rb +153 -0
  43. data/lib/HDLRuby/hdr_samples/neural/forward_sub.rb +62 -0
  44. data/lib/HDLRuby/hdr_samples/neural/forward_sub_rand.rb +41 -0
  45. data/lib/HDLRuby/hdr_samples/neural/forward_sub_rand_typedef.rb +47 -0
  46. data/lib/HDLRuby/hdr_samples/neural/mem.rb +30 -0
  47. data/lib/HDLRuby/hdr_samples/neural/random.rb +23 -0
  48. data/lib/HDLRuby/hdr_samples/neural/selector.rb +29 -0
  49. data/lib/HDLRuby/hdr_samples/neural/sigmoid.rb +20 -0
  50. data/lib/HDLRuby/hdr_samples/neural/z.rb +33 -0
  51. data/lib/HDLRuby/hdr_samples/prog.obj +256 -0
  52. data/lib/HDLRuby/hdr_samples/ram.rb +18 -0
  53. data/lib/HDLRuby/hdr_samples/register_with_code_bench.rb +98 -0
  54. data/lib/HDLRuby/hdr_samples/rom.rb +10 -0
  55. data/lib/HDLRuby/hdr_samples/struct.rb +14 -0
  56. data/lib/HDLRuby/hdr_samples/sumprod.rb +29 -0
  57. data/lib/HDLRuby/hdr_samples/sw_encrypt_bench.rb +103 -0
  58. data/lib/HDLRuby/hdr_samples/sw_encrypt_cpu_bench.rb +261 -0
  59. data/lib/HDLRuby/hdr_samples/sw_encrypt_cpusim_bench.rb +302 -0
  60. data/lib/HDLRuby/hdr_samples/system_open.rb +11 -0
  61. data/lib/HDLRuby/hdr_samples/tuple.rb +16 -0
  62. data/lib/HDLRuby/hdr_samples/with_channel.rb +118 -0
  63. data/lib/HDLRuby/hdr_samples/with_class.rb +199 -0
  64. data/lib/HDLRuby/hdr_samples/with_decoder.rb +17 -0
  65. data/lib/HDLRuby/hdr_samples/with_fsm.rb +34 -0
  66. data/lib/HDLRuby/hdr_samples/with_reconf.rb +103 -0
  67. data/lib/HDLRuby/hdrcc.rb +623 -0
  68. data/lib/HDLRuby/high_samples/_adder_fault.rb +23 -0
  69. data/lib/HDLRuby/high_samples/_generic_transmission2.rb +146 -0
  70. data/lib/HDLRuby/high_samples/adder.rb +21 -0
  71. data/lib/HDLRuby/high_samples/adder_common_errors.rb +25 -0
  72. data/lib/HDLRuby/high_samples/addsub.rb +33 -0
  73. data/lib/HDLRuby/high_samples/addsubz.rb +37 -0
  74. data/lib/HDLRuby/high_samples/after.rb +28 -0
  75. data/lib/HDLRuby/high_samples/all_signals.rb +29 -0
  76. data/lib/HDLRuby/high_samples/alu.rb +61 -0
  77. data/lib/HDLRuby/high_samples/anonymous.rb +41 -0
  78. data/lib/HDLRuby/high_samples/before.rb +28 -0
  79. data/lib/HDLRuby/high_samples/blockblock.rb +26 -0
  80. data/lib/HDLRuby/high_samples/bugs/dadz.rb +22 -0
  81. data/lib/HDLRuby/high_samples/bugs/misample_instan.rb +20 -0
  82. data/lib/HDLRuby/high_samples/bugs/misample_updown.rb +22 -0
  83. data/lib/HDLRuby/high_samples/bugs/sample_add.rb +16 -0
  84. data/lib/HDLRuby/high_samples/bugs/sample_barrel.rb +13 -0
  85. data/lib/HDLRuby/high_samples/bugs/sample_daice.rb +57 -0
  86. data/lib/HDLRuby/high_samples/bugs/sample_kumiawase.rb +52 -0
  87. data/lib/HDLRuby/high_samples/bugs/sample_multi.rb +18 -0
  88. data/lib/HDLRuby/high_samples/bugs/sample_sub.rb +14 -0
  89. data/lib/HDLRuby/high_samples/bugs/z2.rb +32 -0
  90. data/lib/HDLRuby/high_samples/case.rb +32 -0
  91. data/lib/HDLRuby/high_samples/case2.rb +30 -0
  92. data/lib/HDLRuby/high_samples/change.rb +23 -0
  93. data/lib/HDLRuby/high_samples/clocks.rb +35 -0
  94. data/lib/HDLRuby/high_samples/comparer.rb +21 -0
  95. data/lib/HDLRuby/high_samples/conditionals.rb +29 -0
  96. data/lib/HDLRuby/high_samples/dff.rb +23 -0
  97. data/lib/HDLRuby/high_samples/each.rb +28 -0
  98. data/lib/HDLRuby/high_samples/exporter.rb +42 -0
  99. data/lib/HDLRuby/high_samples/functions.rb +60 -0
  100. data/lib/HDLRuby/high_samples/if_seq.rb +26 -0
  101. data/lib/HDLRuby/high_samples/inherit_as_dff.rb +32 -0
  102. data/lib/HDLRuby/high_samples/inherit_dff.rb +36 -0
  103. data/lib/HDLRuby/high_samples/instance.rb +37 -0
  104. data/lib/HDLRuby/high_samples/memory.rb +64 -0
  105. data/lib/HDLRuby/high_samples/multi_file.rb +27 -0
  106. data/lib/HDLRuby/high_samples/overload.rb +32 -0
  107. data/lib/HDLRuby/high_samples/paper_after.rb +49 -0
  108. data/lib/HDLRuby/high_samples/ram.rb +27 -0
  109. data/lib/HDLRuby/high_samples/registers.rb +139 -0
  110. data/lib/HDLRuby/high_samples/rom.rb +23 -0
  111. data/lib/HDLRuby/high_samples/scopeblockname.rb +37 -0
  112. data/lib/HDLRuby/high_samples/scopescope.rb +26 -0
  113. data/lib/HDLRuby/high_samples/shift.rb +31 -0
  114. data/lib/HDLRuby/high_samples/shift2.rb +40 -0
  115. data/lib/HDLRuby/high_samples/simple_instance.rb +31 -0
  116. data/lib/HDLRuby/high_samples/test_all.sh +10 -0
  117. data/lib/HDLRuby/high_samples/typedef.rb +24 -0
  118. data/lib/HDLRuby/high_samples/values.rb +70 -0
  119. data/lib/HDLRuby/high_samples/vector.rb +22 -0
  120. data/lib/HDLRuby/high_samples/with_decoder.rb +30 -0
  121. data/lib/HDLRuby/high_samples/with_fsm.rb +46 -0
  122. data/lib/HDLRuby/high_samples/with_pipe.rb +43 -0
  123. data/lib/HDLRuby/high_samples/with_seq.rb +25 -0
  124. data/lib/HDLRuby/hruby_bstr.rb +1085 -0
  125. data/lib/HDLRuby/hruby_check.rb +317 -0
  126. data/lib/HDLRuby/hruby_db.rb +432 -0
  127. data/lib/HDLRuby/hruby_error.rb +44 -0
  128. data/lib/HDLRuby/hruby_high.rb +4103 -0
  129. data/lib/HDLRuby/hruby_low.rb +4735 -0
  130. data/lib/HDLRuby/hruby_low2c.rb +1986 -0
  131. data/lib/HDLRuby/hruby_low2high.rb +738 -0
  132. data/lib/HDLRuby/hruby_low2seq.rb +248 -0
  133. data/lib/HDLRuby/hruby_low2sym.rb +126 -0
  134. data/lib/HDLRuby/hruby_low2vhd.rb +1437 -0
  135. data/lib/HDLRuby/hruby_low_bool2select.rb +295 -0
  136. data/lib/HDLRuby/hruby_low_cleanup.rb +193 -0
  137. data/lib/HDLRuby/hruby_low_fix_types.rb +437 -0
  138. data/lib/HDLRuby/hruby_low_mutable.rb +1803 -0
  139. data/lib/HDLRuby/hruby_low_resolve.rb +165 -0
  140. data/lib/HDLRuby/hruby_low_skeleton.rb +129 -0
  141. data/lib/HDLRuby/hruby_low_with_bool.rb +141 -0
  142. data/lib/HDLRuby/hruby_low_with_port.rb +167 -0
  143. data/lib/HDLRuby/hruby_low_with_var.rb +302 -0
  144. data/lib/HDLRuby/hruby_low_without_bit2vector.rb +88 -0
  145. data/lib/HDLRuby/hruby_low_without_concat.rb +162 -0
  146. data/lib/HDLRuby/hruby_low_without_connection.rb +113 -0
  147. data/lib/HDLRuby/hruby_low_without_namespace.rb +718 -0
  148. data/lib/HDLRuby/hruby_low_without_outread.rb +107 -0
  149. data/lib/HDLRuby/hruby_low_without_select.rb +206 -0
  150. data/lib/HDLRuby/hruby_serializer.rb +398 -0
  151. data/lib/HDLRuby/hruby_tools.rb +37 -0
  152. data/lib/HDLRuby/hruby_types.rb +239 -0
  153. data/lib/HDLRuby/hruby_values.rb +64 -0
  154. data/lib/HDLRuby/hruby_verilog.rb +1888 -0
  155. data/lib/HDLRuby/hruby_verilog_name.rb +52 -0
  156. data/lib/HDLRuby/low_samples/adder.yaml +97 -0
  157. data/lib/HDLRuby/low_samples/after.yaml +228 -0
  158. data/lib/HDLRuby/low_samples/before.yaml +223 -0
  159. data/lib/HDLRuby/low_samples/blockblock.yaml +48 -0
  160. data/lib/HDLRuby/low_samples/bugs/sample_add.yaml +97 -0
  161. data/lib/HDLRuby/low_samples/bugs/sample_daice.yaml +444 -0
  162. data/lib/HDLRuby/low_samples/bugs/sample_kumiawase.yaml +332 -0
  163. data/lib/HDLRuby/low_samples/bugs/sample_sub.yaml +97 -0
  164. data/lib/HDLRuby/low_samples/bugs/seqpar.yaml +184 -0
  165. data/lib/HDLRuby/low_samples/case.yaml +327 -0
  166. data/lib/HDLRuby/low_samples/change.yaml +135 -0
  167. data/lib/HDLRuby/low_samples/clocks.yaml +674 -0
  168. data/lib/HDLRuby/low_samples/cloner.rb +22 -0
  169. data/lib/HDLRuby/low_samples/comparer.yaml +85 -0
  170. data/lib/HDLRuby/low_samples/conditionals.yaml +133 -0
  171. data/lib/HDLRuby/low_samples/dff.yaml +107 -0
  172. data/lib/HDLRuby/low_samples/each.yaml +1328 -0
  173. data/lib/HDLRuby/low_samples/exporter.yaml +226 -0
  174. data/lib/HDLRuby/low_samples/functions.yaml +298 -0
  175. data/lib/HDLRuby/low_samples/generic_transmission.yaml +597 -0
  176. data/lib/HDLRuby/low_samples/inherit_as_dff.yaml +125 -0
  177. data/lib/HDLRuby/low_samples/inherit_dff.yaml +107 -0
  178. data/lib/HDLRuby/low_samples/load_yaml.rb +11 -0
  179. data/lib/HDLRuby/low_samples/memory.yaml +678 -0
  180. data/lib/HDLRuby/low_samples/namespace_extractor.rb +23 -0
  181. data/lib/HDLRuby/low_samples/overload.yaml +226 -0
  182. data/lib/HDLRuby/low_samples/paper_after.yaml +431 -0
  183. data/lib/HDLRuby/low_samples/port_maker.rb +14 -0
  184. data/lib/HDLRuby/low_samples/ram.yaml +207 -0
  185. data/lib/HDLRuby/low_samples/registers.yaml +228 -0
  186. data/lib/HDLRuby/low_samples/rom.yaml +2950 -0
  187. data/lib/HDLRuby/low_samples/shift.yaml +230 -0
  188. data/lib/HDLRuby/low_samples/shift2.yaml +2095 -0
  189. data/lib/HDLRuby/low_samples/simple_instance.yaml +102 -0
  190. data/lib/HDLRuby/low_samples/test_all.sh +43 -0
  191. data/lib/HDLRuby/low_samples/typedef.yaml +115 -0
  192. data/lib/HDLRuby/low_samples/values.yaml +577 -0
  193. data/lib/HDLRuby/low_samples/variable_maker.rb +14 -0
  194. data/lib/HDLRuby/low_samples/vector.yaml +56 -0
  195. data/lib/HDLRuby/low_samples/with_seq.yaml +188 -0
  196. data/lib/HDLRuby/low_samples/yaml2hdr.rb +10 -0
  197. data/lib/HDLRuby/low_samples/yaml2vhd.rb +19 -0
  198. data/lib/HDLRuby/sim/Makefile +19 -0
  199. data/lib/HDLRuby/sim/hruby_sim.h +590 -0
  200. data/lib/HDLRuby/sim/hruby_sim_calc.c +2362 -0
  201. data/lib/HDLRuby/sim/hruby_sim_core.c +589 -0
  202. data/lib/HDLRuby/sim/hruby_sim_list.c +93 -0
  203. data/lib/HDLRuby/sim/hruby_sim_vizualize.c +91 -0
  204. data/lib/HDLRuby/sim/hruby_value_pool.c +64 -0
  205. data/lib/HDLRuby/std/channel.rb +354 -0
  206. data/lib/HDLRuby/std/clocks.rb +165 -0
  207. data/lib/HDLRuby/std/counters.rb +82 -0
  208. data/lib/HDLRuby/std/decoder.rb +214 -0
  209. data/lib/HDLRuby/std/fsm.rb +516 -0
  210. data/lib/HDLRuby/std/pipeline.rb +220 -0
  211. data/lib/HDLRuby/std/reconf.rb +309 -0
  212. data/lib/HDLRuby/test_hruby_bstr.rb +2259 -0
  213. data/lib/HDLRuby/test_hruby_high.rb +594 -0
  214. data/lib/HDLRuby/test_hruby_high_low.rb +99 -0
  215. data/lib/HDLRuby/test_hruby_low.rb +934 -0
  216. data/lib/HDLRuby/v_samples/adder.v +10 -0
  217. data/lib/HDLRuby/v_samples/dff.v +12 -0
  218. data/lib/HDLRuby/v_samples/ram.v +20 -0
  219. data/lib/HDLRuby/v_samples/rom.v +270 -0
  220. data/lib/HDLRuby/version.rb +3 -0
  221. data/lib/HDLRuby.rb +11 -0
  222. data/makedoc +1 -0
  223. data/metadata.yaml +4 -0
  224. metadata +299 -0
@@ -0,0 +1,678 @@
1
+ ---
2
+ Type:
3
+ name: signed
4
+ ---
5
+ Type:
6
+ name: void
7
+ ---
8
+ Type:
9
+ name: bit
10
+ ---
11
+ TypeVector:
12
+ name: integer
13
+ base: signed
14
+ range:
15
+ - 31
16
+ - 0
17
+ ---
18
+ SystemT:
19
+ name: memH::T_
20
+ inputs:
21
+ - SignalI:
22
+ name: clk
23
+ type: bit
24
+ - SignalI:
25
+ name: rwb
26
+ type: bit
27
+ - SignalI:
28
+ name: addr
29
+ type:
30
+ TypeVector:
31
+ name: ''
32
+ base: bit
33
+ range:
34
+ - 15
35
+ - 0
36
+ outputs: []
37
+ inouts:
38
+ - SignalI:
39
+ name: data
40
+ type:
41
+ TypeVector:
42
+ name: ''
43
+ base: bit
44
+ range:
45
+ - 7
46
+ - 0
47
+ scope:
48
+ Scope:
49
+ name: ''
50
+ scopes: []
51
+ inners:
52
+ - SignalI:
53
+ name: content
54
+ type:
55
+ TypeVector:
56
+ name: ''
57
+ base:
58
+ TypeVector:
59
+ name: ''
60
+ base: bit
61
+ range:
62
+ - 7
63
+ - 0
64
+ range:
65
+ - 65535
66
+ - 0
67
+ systemIs: []
68
+ connections: []
69
+ behaviors:
70
+ - Behavior:
71
+ events:
72
+ - Event:
73
+ type: posedge
74
+ ref:
75
+ RefName:
76
+ type: bit
77
+ ref:
78
+ RefThis:
79
+ type: void
80
+ name: clk
81
+ block:
82
+ Block:
83
+ mode: par
84
+ name: ''
85
+ inners: []
86
+ statements:
87
+ - If:
88
+ condition:
89
+ RefName:
90
+ type: bit
91
+ ref:
92
+ RefThis:
93
+ type: void
94
+ name: rwb
95
+ 'yes':
96
+ Block:
97
+ mode: par
98
+ name: ''
99
+ inners: []
100
+ statements:
101
+ - Transmit:
102
+ left:
103
+ RefName:
104
+ type:
105
+ TypeVector:
106
+ name: ''
107
+ base: bit
108
+ range:
109
+ - 7
110
+ - 0
111
+ ref:
112
+ RefThis:
113
+ type: void
114
+ name: data
115
+ right:
116
+ RefIndex:
117
+ type: bit
118
+ ref:
119
+ RefName:
120
+ type:
121
+ TypeVector:
122
+ name: ''
123
+ base:
124
+ TypeVector:
125
+ name: ''
126
+ base: bit
127
+ range:
128
+ - 7
129
+ - 0
130
+ range:
131
+ - 65535
132
+ - 0
133
+ ref:
134
+ RefThis:
135
+ type: void
136
+ name: content
137
+ index:
138
+ RefName:
139
+ type:
140
+ TypeVector:
141
+ name: ''
142
+ base: bit
143
+ range:
144
+ - 15
145
+ - 0
146
+ ref:
147
+ RefThis:
148
+ type: void
149
+ name: addr
150
+ 'no':
151
+ Block:
152
+ mode: par
153
+ name: ''
154
+ inners: []
155
+ statements:
156
+ - Transmit:
157
+ left:
158
+ RefIndex:
159
+ type: bit
160
+ ref:
161
+ RefName:
162
+ type:
163
+ TypeVector:
164
+ name: ''
165
+ base:
166
+ TypeVector:
167
+ name: ''
168
+ base: bit
169
+ range:
170
+ - 7
171
+ - 0
172
+ range:
173
+ - 65535
174
+ - 0
175
+ ref:
176
+ RefThis:
177
+ type: void
178
+ name: content
179
+ index:
180
+ RefName:
181
+ type:
182
+ TypeVector:
183
+ name: ''
184
+ base: bit
185
+ range:
186
+ - 15
187
+ - 0
188
+ ref:
189
+ RefThis:
190
+ type: void
191
+ name: addr
192
+ right:
193
+ RefName:
194
+ type:
195
+ TypeVector:
196
+ name: ''
197
+ base: bit
198
+ range:
199
+ - 7
200
+ - 0
201
+ ref:
202
+ RefThis:
203
+ type: void
204
+ name: data
205
+ noifs: []
206
+ ---
207
+ SystemT:
208
+ name: memL::T_
209
+ inputs:
210
+ - SignalI:
211
+ name: clk
212
+ type: bit
213
+ - SignalI:
214
+ name: rwb
215
+ type: bit
216
+ - SignalI:
217
+ name: addr
218
+ type:
219
+ TypeVector:
220
+ name: ''
221
+ base: bit
222
+ range:
223
+ - 15
224
+ - 0
225
+ outputs: []
226
+ inouts:
227
+ - SignalI:
228
+ name: data
229
+ type:
230
+ TypeVector:
231
+ name: ''
232
+ base: bit
233
+ range:
234
+ - 7
235
+ - 0
236
+ scope:
237
+ Scope:
238
+ name: ''
239
+ scopes: []
240
+ inners:
241
+ - SignalI:
242
+ name: content
243
+ type:
244
+ TypeVector:
245
+ name: ''
246
+ base:
247
+ TypeVector:
248
+ name: ''
249
+ base: bit
250
+ range:
251
+ - 7
252
+ - 0
253
+ range:
254
+ - 65535
255
+ - 0
256
+ systemIs: []
257
+ connections: []
258
+ behaviors:
259
+ - Behavior:
260
+ events:
261
+ - Event:
262
+ type: posedge
263
+ ref:
264
+ RefName:
265
+ type: bit
266
+ ref:
267
+ RefThis:
268
+ type: void
269
+ name: clk
270
+ block:
271
+ Block:
272
+ mode: par
273
+ name: ''
274
+ inners: []
275
+ statements:
276
+ - If:
277
+ condition:
278
+ RefName:
279
+ type: bit
280
+ ref:
281
+ RefThis:
282
+ type: void
283
+ name: rwb
284
+ 'yes':
285
+ Block:
286
+ mode: par
287
+ name: ''
288
+ inners: []
289
+ statements:
290
+ - Transmit:
291
+ left:
292
+ RefName:
293
+ type:
294
+ TypeVector:
295
+ name: ''
296
+ base: bit
297
+ range:
298
+ - 7
299
+ - 0
300
+ ref:
301
+ RefThis:
302
+ type: void
303
+ name: data
304
+ right:
305
+ RefIndex:
306
+ type: bit
307
+ ref:
308
+ RefName:
309
+ type:
310
+ TypeVector:
311
+ name: ''
312
+ base:
313
+ TypeVector:
314
+ name: ''
315
+ base: bit
316
+ range:
317
+ - 7
318
+ - 0
319
+ range:
320
+ - 65535
321
+ - 0
322
+ ref:
323
+ RefThis:
324
+ type: void
325
+ name: content
326
+ index:
327
+ RefName:
328
+ type:
329
+ TypeVector:
330
+ name: ''
331
+ base: bit
332
+ range:
333
+ - 15
334
+ - 0
335
+ ref:
336
+ RefThis:
337
+ type: void
338
+ name: addr
339
+ 'no':
340
+ Block:
341
+ mode: par
342
+ name: ''
343
+ inners: []
344
+ statements:
345
+ - Transmit:
346
+ left:
347
+ RefIndex:
348
+ type: bit
349
+ ref:
350
+ RefName:
351
+ type:
352
+ TypeVector:
353
+ name: ''
354
+ base:
355
+ TypeVector:
356
+ name: ''
357
+ base: bit
358
+ range:
359
+ - 7
360
+ - 0
361
+ range:
362
+ - 65535
363
+ - 0
364
+ ref:
365
+ RefThis:
366
+ type: void
367
+ name: content
368
+ index:
369
+ RefName:
370
+ type:
371
+ TypeVector:
372
+ name: ''
373
+ base: bit
374
+ range:
375
+ - 15
376
+ - 0
377
+ ref:
378
+ RefThis:
379
+ type: void
380
+ name: addr
381
+ right:
382
+ RefName:
383
+ type:
384
+ TypeVector:
385
+ name: ''
386
+ base: bit
387
+ range:
388
+ - 7
389
+ - 0
390
+ ref:
391
+ RefThis:
392
+ type: void
393
+ name: data
394
+ noifs: []
395
+ ---
396
+ SystemT:
397
+ name: mem16_16_longI::T_
398
+ inputs:
399
+ - SignalI:
400
+ name: clk
401
+ type: bit
402
+ - SignalI:
403
+ name: rwb
404
+ type: bit
405
+ - SignalI:
406
+ name: addr
407
+ type:
408
+ TypeVector:
409
+ name: ''
410
+ base: bit
411
+ range:
412
+ - 15
413
+ - 0
414
+ outputs: []
415
+ inouts:
416
+ - SignalI:
417
+ name: data
418
+ type:
419
+ TypeVector:
420
+ name: ''
421
+ base: bit
422
+ range:
423
+ - 15
424
+ - 0
425
+ scope:
426
+ Scope:
427
+ name: ''
428
+ scopes: []
429
+ inners: []
430
+ systemIs:
431
+ - SystemI:
432
+ name: memL
433
+ systemT: memL::T_
434
+ - SystemI:
435
+ name: memH
436
+ systemT: memH::T_
437
+ connections:
438
+ - Connection:
439
+ left:
440
+ RefName:
441
+ type: bit
442
+ ref:
443
+ RefName:
444
+ type: void
445
+ ref:
446
+ RefThis:
447
+ type: void
448
+ name: memL
449
+ name: clk
450
+ right:
451
+ RefName:
452
+ type: bit
453
+ ref:
454
+ RefThis:
455
+ type: void
456
+ name: clk
457
+ - Connection:
458
+ left:
459
+ RefName:
460
+ type: bit
461
+ ref:
462
+ RefName:
463
+ type: void
464
+ ref:
465
+ RefThis:
466
+ type: void
467
+ name: memL
468
+ name: rwb
469
+ right:
470
+ RefName:
471
+ type: bit
472
+ ref:
473
+ RefThis:
474
+ type: void
475
+ name: rwb
476
+ - Connection:
477
+ left:
478
+ RefName:
479
+ type:
480
+ TypeVector:
481
+ name: ''
482
+ base: bit
483
+ range:
484
+ - 15
485
+ - 0
486
+ ref:
487
+ RefName:
488
+ type: void
489
+ ref:
490
+ RefThis:
491
+ type: void
492
+ name: memL
493
+ name: addr
494
+ right:
495
+ RefName:
496
+ type:
497
+ TypeVector:
498
+ name: ''
499
+ base: bit
500
+ range:
501
+ - 15
502
+ - 0
503
+ ref:
504
+ RefThis:
505
+ type: void
506
+ name: addr
507
+ - Connection:
508
+ left:
509
+ RefName:
510
+ type:
511
+ TypeVector:
512
+ name: ''
513
+ base: bit
514
+ range:
515
+ - 7
516
+ - 0
517
+ ref:
518
+ RefName:
519
+ type: void
520
+ ref:
521
+ RefThis:
522
+ type: void
523
+ name: memL
524
+ name: data
525
+ right:
526
+ RefRange:
527
+ type:
528
+ TypeVector:
529
+ name: ''
530
+ base: bit
531
+ range:
532
+ - Value:
533
+ type: integer
534
+ content: 7
535
+ - Value:
536
+ type: integer
537
+ content: 0
538
+ ref:
539
+ RefName:
540
+ type:
541
+ TypeVector:
542
+ name: ''
543
+ base: bit
544
+ range:
545
+ - 15
546
+ - 0
547
+ ref:
548
+ RefThis:
549
+ type: void
550
+ name: data
551
+ range:
552
+ - Value:
553
+ type: integer
554
+ content: 7
555
+ - Value:
556
+ type: integer
557
+ content: 0
558
+ - Connection:
559
+ left:
560
+ RefName:
561
+ type: bit
562
+ ref:
563
+ RefName:
564
+ type: void
565
+ ref:
566
+ RefThis:
567
+ type: void
568
+ name: memH
569
+ name: clk
570
+ right:
571
+ RefName:
572
+ type: bit
573
+ ref:
574
+ RefThis:
575
+ type: void
576
+ name: clk
577
+ - Connection:
578
+ left:
579
+ RefName:
580
+ type: bit
581
+ ref:
582
+ RefName:
583
+ type: void
584
+ ref:
585
+ RefThis:
586
+ type: void
587
+ name: memH
588
+ name: rwb
589
+ right:
590
+ RefName:
591
+ type: bit
592
+ ref:
593
+ RefThis:
594
+ type: void
595
+ name: rwb
596
+ - Connection:
597
+ left:
598
+ RefName:
599
+ type:
600
+ TypeVector:
601
+ name: ''
602
+ base: bit
603
+ range:
604
+ - 15
605
+ - 0
606
+ ref:
607
+ RefName:
608
+ type: void
609
+ ref:
610
+ RefThis:
611
+ type: void
612
+ name: memH
613
+ name: addr
614
+ right:
615
+ RefName:
616
+ type:
617
+ TypeVector:
618
+ name: ''
619
+ base: bit
620
+ range:
621
+ - 15
622
+ - 0
623
+ ref:
624
+ RefThis:
625
+ type: void
626
+ name: addr
627
+ - Connection:
628
+ left:
629
+ RefName:
630
+ type:
631
+ TypeVector:
632
+ name: ''
633
+ base: bit
634
+ range:
635
+ - 7
636
+ - 0
637
+ ref:
638
+ RefName:
639
+ type: void
640
+ ref:
641
+ RefThis:
642
+ type: void
643
+ name: memH
644
+ name: data
645
+ right:
646
+ RefRange:
647
+ type:
648
+ TypeVector:
649
+ name: ''
650
+ base: bit
651
+ range:
652
+ - Value:
653
+ type: integer
654
+ content: 15
655
+ - Value:
656
+ type: integer
657
+ content: 8
658
+ ref:
659
+ RefName:
660
+ type:
661
+ TypeVector:
662
+ name: ''
663
+ base: bit
664
+ range:
665
+ - 15
666
+ - 0
667
+ ref:
668
+ RefThis:
669
+ type: void
670
+ name: data
671
+ range:
672
+ - Value:
673
+ type: integer
674
+ content: 15
675
+ - Value:
676
+ type: integer
677
+ content: 8
678
+ behaviors: []
@@ -0,0 +1,23 @@
1
+ # Simple program for testing the extraction of declares from sub namespaces.
2
+ require 'pp'
3
+ require 'HDLRuby'
4
+ require 'HDLRuby/hruby_low_without_namespace.rb'
5
+ require 'HDLRuby/hruby_low2high.rb'
6
+ include HDLRuby::Low
7
+
8
+ $hdr = $*[0] == "-hdr" ? true : false
9
+
10
+ $*.shift if $hdr
11
+
12
+ # Read a yaml file.
13
+ hardwares = HDLRuby::from_yaml(File.read($*[0]))
14
+
15
+ # Generate the variables.
16
+ hardwares[-1].to_upper_space!
17
+
18
+ # Displays the result
19
+ if $hdr then
20
+ puts hardwares[-1].to_high
21
+ else
22
+ puts hardwares[-1].to_yaml
23
+ end