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,226 @@
1
+ ---
2
+ Type:
3
+ name: signed
4
+ ---
5
+ TypeVector:
6
+ name: integer
7
+ base: signed
8
+ range:
9
+ - 31
10
+ - 0
11
+ ---
12
+ Type:
13
+ name: void
14
+ ---
15
+ Type:
16
+ name: bit
17
+ ---
18
+ SystemT:
19
+ name: adderI::T_
20
+ inputs:
21
+ - SignalI:
22
+ name: x
23
+ type:
24
+ TypeDef:
25
+ name: sat16
26
+ def:
27
+ TypeVector:
28
+ name: ''
29
+ base: bit
30
+ range:
31
+ - 15
32
+ - 0
33
+ - SignalI:
34
+ name: y
35
+ type:
36
+ TypeDef:
37
+ name: sat16
38
+ def:
39
+ TypeVector:
40
+ name: ''
41
+ base: bit
42
+ range:
43
+ - 15
44
+ - 0
45
+ outputs:
46
+ - SignalI:
47
+ name: s
48
+ type:
49
+ TypeVector:
50
+ name: ''
51
+ base: bit
52
+ range:
53
+ - 15
54
+ - 0
55
+ inouts: []
56
+ scope:
57
+ Scope:
58
+ name: ''
59
+ scopes:
60
+ - Scope:
61
+ name: ''
62
+ scopes: []
63
+ inners:
64
+ - SignalI:
65
+ name: res
66
+ type:
67
+ TypeVector:
68
+ name: ''
69
+ base: bit
70
+ range:
71
+ - 16
72
+ - 0
73
+ systemIs: []
74
+ connections: []
75
+ behaviors:
76
+ - Behavior:
77
+ events: []
78
+ block:
79
+ Block:
80
+ mode: seq
81
+ name: ''
82
+ inners: []
83
+ statements:
84
+ - Transmit:
85
+ left:
86
+ RefName:
87
+ type:
88
+ TypeVector:
89
+ name: ''
90
+ base: bit
91
+ range:
92
+ - 16
93
+ - 0
94
+ ref:
95
+ RefThis:
96
+ type: void
97
+ name: res
98
+ right:
99
+ Binary:
100
+ type:
101
+ TypeVector:
102
+ name: ''
103
+ base: bit
104
+ range:
105
+ - 16
106
+ - 0
107
+ operator: "+"
108
+ left:
109
+ Cast:
110
+ type:
111
+ TypeVector:
112
+ name: ''
113
+ base: bit
114
+ range:
115
+ - 15
116
+ - 0
117
+ child:
118
+ RefName:
119
+ type:
120
+ TypeDef:
121
+ name: sat16
122
+ def:
123
+ TypeVector:
124
+ name: ''
125
+ base: bit
126
+ range:
127
+ - 15
128
+ - 0
129
+ ref:
130
+ RefThis:
131
+ type: void
132
+ name: x
133
+ right:
134
+ RefName:
135
+ type:
136
+ TypeDef:
137
+ name: sat16
138
+ def:
139
+ TypeVector:
140
+ name: ''
141
+ base: bit
142
+ range:
143
+ - 15
144
+ - 0
145
+ ref:
146
+ RefThis:
147
+ type: void
148
+ name: y
149
+ - If:
150
+ condition:
151
+ RefIndex:
152
+ type: bit
153
+ ref:
154
+ RefName:
155
+ type:
156
+ TypeVector:
157
+ name: ''
158
+ base: bit
159
+ range:
160
+ - 16
161
+ - 0
162
+ ref:
163
+ RefThis:
164
+ type: void
165
+ name: res
166
+ index:
167
+ Value:
168
+ type: integer
169
+ content: 16
170
+ 'yes':
171
+ Block:
172
+ mode: seq
173
+ name: ''
174
+ inners: []
175
+ statements:
176
+ - Transmit:
177
+ left:
178
+ RefName:
179
+ type:
180
+ TypeVector:
181
+ name: ''
182
+ base: bit
183
+ range:
184
+ - 16
185
+ - 0
186
+ ref:
187
+ RefThis:
188
+ type: void
189
+ name: res
190
+ right:
191
+ Value:
192
+ type: integer
193
+ content: 65535
194
+ 'no':
195
+ noifs: []
196
+ inners: []
197
+ systemIs: []
198
+ connections:
199
+ - Connection:
200
+ left:
201
+ RefName:
202
+ type:
203
+ TypeVector:
204
+ name: ''
205
+ base: bit
206
+ range:
207
+ - 15
208
+ - 0
209
+ ref:
210
+ RefThis:
211
+ type: void
212
+ name: s
213
+ right:
214
+ RefName:
215
+ type:
216
+ TypeVector:
217
+ name: ''
218
+ base: bit
219
+ range:
220
+ - 16
221
+ - 0
222
+ ref:
223
+ RefThis:
224
+ type: void
225
+ name: res
226
+ behaviors: []
@@ -0,0 +1,431 @@
1
+ ---
2
+ Type:
3
+ name: signed
4
+ ---
5
+ TypeVector:
6
+ name: integer
7
+ base: signed
8
+ range:
9
+ - 31
10
+ - 0
11
+ ---
12
+ Type:
13
+ name: void
14
+ ---
15
+ Type:
16
+ name: bit
17
+ ---
18
+ SystemT:
19
+ name: test_after0I::T_
20
+ inputs:
21
+ - SignalI:
22
+ name: clk
23
+ type: bit
24
+ - SignalI:
25
+ name: rst
26
+ type: bit
27
+ outputs: []
28
+ inouts: []
29
+ scope:
30
+ Scope:
31
+ name: ''
32
+ scopes: []
33
+ inners:
34
+ - SignalI:
35
+ name: sig0
36
+ type: bit
37
+ - SignalI:
38
+ name: sig1
39
+ type: bit
40
+ - SignalI:
41
+ name: ":0"
42
+ type:
43
+ TypeVector:
44
+ name: ''
45
+ base: bit
46
+ range:
47
+ - 3
48
+ - 0
49
+ systemIs: []
50
+ connections: []
51
+ behaviors:
52
+ - Behavior:
53
+ events:
54
+ - Event:
55
+ type: posedge
56
+ ref:
57
+ RefName:
58
+ type: bit
59
+ ref:
60
+ RefThis:
61
+ type: void
62
+ name: clk
63
+ - Event:
64
+ type: posedge
65
+ ref:
66
+ RefName:
67
+ type: bit
68
+ ref:
69
+ RefThis:
70
+ type: void
71
+ name: rst
72
+ block:
73
+ Block:
74
+ mode: par
75
+ name: ''
76
+ inners: []
77
+ statements:
78
+ - If:
79
+ condition:
80
+ RefName:
81
+ type: bit
82
+ ref:
83
+ RefThis:
84
+ type: void
85
+ name: rst
86
+ 'yes':
87
+ Block:
88
+ mode: par
89
+ name: ''
90
+ inners: []
91
+ statements:
92
+ - Transmit:
93
+ left:
94
+ RefName:
95
+ type:
96
+ TypeVector:
97
+ name: ''
98
+ base: bit
99
+ range:
100
+ - 3
101
+ - 0
102
+ ref:
103
+ RefThis:
104
+ type: void
105
+ name: ":0"
106
+ right:
107
+ Value:
108
+ type: integer
109
+ content: 0
110
+ 'no':
111
+ Block:
112
+ mode: par
113
+ name: ''
114
+ inners: []
115
+ statements:
116
+ - Transmit:
117
+ left:
118
+ RefName:
119
+ type:
120
+ TypeVector:
121
+ name: ''
122
+ base: bit
123
+ range:
124
+ - 3
125
+ - 0
126
+ ref:
127
+ RefThis:
128
+ type: void
129
+ name: ":0"
130
+ right:
131
+ Binary:
132
+ type:
133
+ TypeVector:
134
+ name: ''
135
+ base: signed
136
+ range:
137
+ - 32
138
+ - 0
139
+ operator: "+"
140
+ left:
141
+ RefName:
142
+ type:
143
+ TypeVector:
144
+ name: ''
145
+ base: bit
146
+ range:
147
+ - 3
148
+ - 0
149
+ ref:
150
+ RefThis:
151
+ type: void
152
+ name: ":0"
153
+ right:
154
+ Value:
155
+ type: integer
156
+ content: 1
157
+ noifs: []
158
+ - Behavior:
159
+ events: []
160
+ block:
161
+ Block:
162
+ mode: par
163
+ name: ''
164
+ inners: []
165
+ statements:
166
+ - If:
167
+ condition:
168
+ Binary:
169
+ type:
170
+ TypeVector:
171
+ name: ''
172
+ base: signed
173
+ range:
174
+ - 31
175
+ - 0
176
+ operator: ">="
177
+ left:
178
+ RefName:
179
+ type:
180
+ TypeVector:
181
+ name: ''
182
+ base: bit
183
+ range:
184
+ - 3
185
+ - 0
186
+ ref:
187
+ RefThis:
188
+ type: void
189
+ name: ":0"
190
+ right:
191
+ Value:
192
+ type: integer
193
+ content: 10
194
+ 'yes':
195
+ Block:
196
+ mode: par
197
+ name: ''
198
+ inners: []
199
+ statements:
200
+ - Transmit:
201
+ left:
202
+ RefName:
203
+ type: bit
204
+ ref:
205
+ RefThis:
206
+ type: void
207
+ name: sig0
208
+ right:
209
+ Value:
210
+ type: integer
211
+ content: 1
212
+ 'no':
213
+ Block:
214
+ mode: par
215
+ name: ''
216
+ inners: []
217
+ statements:
218
+ - Transmit:
219
+ left:
220
+ RefName:
221
+ type: bit
222
+ ref:
223
+ RefThis:
224
+ type: void
225
+ name: sig0
226
+ right:
227
+ Value:
228
+ type: integer
229
+ content: 0
230
+ noifs: []
231
+ - Behavior:
232
+ events:
233
+ - Event:
234
+ type: posedge
235
+ ref:
236
+ RefName:
237
+ type: bit
238
+ ref:
239
+ RefThis:
240
+ type: void
241
+ name: clk
242
+ - Event:
243
+ type: posedge
244
+ ref:
245
+ RefName:
246
+ type: bit
247
+ ref:
248
+ RefThis:
249
+ type: void
250
+ name: rst
251
+ block:
252
+ Block:
253
+ mode: par
254
+ name: ''
255
+ inners:
256
+ - SignalI:
257
+ name: ":1"
258
+ type:
259
+ TypeVector:
260
+ name: ''
261
+ base: bit
262
+ range:
263
+ - 4
264
+ - 0
265
+ statements:
266
+ - Transmit:
267
+ left:
268
+ RefName:
269
+ type: bit
270
+ ref:
271
+ RefThis:
272
+ type: void
273
+ name: sig1
274
+ right:
275
+ Value:
276
+ type: integer
277
+ content: 0
278
+ - If:
279
+ condition:
280
+ RefName:
281
+ type: bit
282
+ ref:
283
+ RefThis:
284
+ type: void
285
+ name: __universe__rst__
286
+ 'yes':
287
+ Block:
288
+ mode: par
289
+ name: ''
290
+ inners: []
291
+ statements:
292
+ - Transmit:
293
+ left:
294
+ RefName:
295
+ type:
296
+ TypeVector:
297
+ name: ''
298
+ base: bit
299
+ range:
300
+ - 4
301
+ - 0
302
+ ref:
303
+ RefThis:
304
+ type: void
305
+ name: ":1"
306
+ right:
307
+ Value:
308
+ type: integer
309
+ content: 0
310
+ 'no':
311
+ noifs:
312
+ - - Binary:
313
+ type:
314
+ TypeVector:
315
+ name: ''
316
+ base: signed
317
+ range:
318
+ - 31
319
+ - 0
320
+ operator: "<"
321
+ left:
322
+ RefName:
323
+ type:
324
+ TypeVector:
325
+ name: ''
326
+ base: bit
327
+ range:
328
+ - 4
329
+ - 0
330
+ ref:
331
+ RefThis:
332
+ type: void
333
+ name: ":1"
334
+ right:
335
+ Value:
336
+ type: integer
337
+ content: 20
338
+ - Block:
339
+ mode: par
340
+ name: ''
341
+ inners: []
342
+ statements:
343
+ - Transmit:
344
+ left:
345
+ RefName:
346
+ type:
347
+ TypeVector:
348
+ name: ''
349
+ base: bit
350
+ range:
351
+ - 4
352
+ - 0
353
+ ref:
354
+ RefThis:
355
+ type: void
356
+ name: ":1"
357
+ right:
358
+ Binary:
359
+ type:
360
+ TypeVector:
361
+ name: ''
362
+ base: signed
363
+ range:
364
+ - 32
365
+ - 0
366
+ operator: "+"
367
+ left:
368
+ RefName:
369
+ type:
370
+ TypeVector:
371
+ name: ''
372
+ base: bit
373
+ range:
374
+ - 4
375
+ - 0
376
+ ref:
377
+ RefThis:
378
+ type: void
379
+ name: ":1"
380
+ right:
381
+ Value:
382
+ type: integer
383
+ content: 1
384
+ - If:
385
+ condition:
386
+ Binary:
387
+ type:
388
+ TypeVector:
389
+ name: ''
390
+ base: signed
391
+ range:
392
+ - 31
393
+ - 0
394
+ operator: ">="
395
+ left:
396
+ RefName:
397
+ type:
398
+ TypeVector:
399
+ name: ''
400
+ base: bit
401
+ range:
402
+ - 4
403
+ - 0
404
+ ref:
405
+ RefThis:
406
+ type: void
407
+ name: ":1"
408
+ right:
409
+ Value:
410
+ type: integer
411
+ content: 20
412
+ 'yes':
413
+ Block:
414
+ mode: par
415
+ name: ''
416
+ inners: []
417
+ statements:
418
+ - Transmit:
419
+ left:
420
+ RefName:
421
+ type: bit
422
+ ref:
423
+ RefThis:
424
+ type: void
425
+ name: sig1
426
+ right:
427
+ Value:
428
+ type: integer
429
+ content: 1
430
+ 'no':
431
+ noifs: []
@@ -0,0 +1,14 @@
1
+ # Simple program for testing the port wire generation for HDLRuby::Low instances.
2
+ require 'pp'
3
+ require 'HDLRuby'
4
+ require 'HDLRuby/hruby_low_with_port.rb'
5
+ include HDLRuby::Low
6
+
7
+ # Read a yaml file.
8
+ hardwares = HDLRuby::from_yaml(File.read($*[0]))
9
+
10
+ # Generate the variables.
11
+ hardwares[-1].with_port!
12
+
13
+ # Displays the result
14
+ puts hardwares[-1].to_yaml