HDLRuby 2.11.12 → 3.1.0
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.
- checksums.yaml +4 -4
- data/README.html +3274 -0
- data/README.md +660 -128
- data/ext/hruby_sim/hruby_sim_calc.c +2 -0
- data/lib/HDLRuby/backend/hruby_allocator.rb +2 -2
- data/lib/HDLRuby/backend/hruby_c_allocator.rb +7 -7
- data/lib/HDLRuby/hdr_samples/constant_in_function.rb +2 -1
- data/lib/HDLRuby/hdr_samples/mei8_bench.rb +1 -1
- data/lib/HDLRuby/hdr_samples/with_bram.rb +3 -3
- data/lib/HDLRuby/hdr_samples/with_bram_frame_stack.rb +105 -0
- data/lib/HDLRuby/hdr_samples/with_bram_stack.rb +69 -0
- data/lib/HDLRuby/hdr_samples/with_ref_expr.rb +30 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer.rb +185 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_deep.rb +91 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_enumerable.rb +439 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_enumerator.rb +89 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_func.rb +63 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_sync.rb +120 -0
- data/lib/HDLRuby/hdrcc.rb +16 -3
- data/lib/HDLRuby/hdrlib.rb +1 -1
- data/lib/HDLRuby/hruby_db.rb +2 -2
- data/lib/HDLRuby/hruby_high.rb +61 -25
- data/lib/HDLRuby/hruby_high_fullname.rb +3 -1
- data/lib/HDLRuby/hruby_low.rb +2 -2
- data/lib/HDLRuby/hruby_low2c.rb +58 -43
- data/lib/HDLRuby/hruby_low2hdr.rb +66 -40
- data/lib/HDLRuby/hruby_low2high.rb +86 -44
- data/lib/HDLRuby/hruby_low2seq.rb +26 -18
- data/lib/HDLRuby/hruby_low2sym.rb +14 -13
- data/lib/HDLRuby/hruby_low2vhd.rb +78 -43
- data/lib/HDLRuby/hruby_low_bool2select.rb +61 -46
- data/lib/HDLRuby/hruby_low_casts_without_expression.rb +56 -44
- data/lib/HDLRuby/hruby_low_cleanup.rb +18 -16
- data/lib/HDLRuby/hruby_low_fix_types.rb +64 -32
- data/lib/HDLRuby/hruby_low_mutable.rb +53 -118
- data/lib/HDLRuby/hruby_low_resolve.rb +26 -31
- data/lib/HDLRuby/hruby_low_with_bool.rb +33 -16
- data/lib/HDLRuby/hruby_low_with_port.rb +3 -3
- data/lib/HDLRuby/hruby_low_with_var.rb +23 -9
- data/lib/HDLRuby/hruby_low_without_concat.rb +19 -13
- data/lib/HDLRuby/hruby_low_without_namespace.rb +47 -32
- data/lib/HDLRuby/hruby_low_without_parinseq.rb +18 -12
- data/lib/HDLRuby/hruby_low_without_select.rb +36 -23
- data/lib/HDLRuby/hruby_low_without_subsignals.rb +79 -39
- data/lib/HDLRuby/hruby_rcsim.rb +79 -64
- data/lib/HDLRuby/hruby_rsim.rb +64 -15
- data/lib/HDLRuby/hruby_rsim_mute.rb +2 -3
- data/lib/HDLRuby/hruby_rsim_vcd.rb +28 -25
- data/lib/HDLRuby/hruby_types.rb +5 -5
- data/lib/HDLRuby/hruby_values.rb +19 -8
- data/lib/HDLRuby/hruby_verilog.rb +191 -65
- data/lib/HDLRuby/hruby_verilog_name.rb +49 -42
- data/lib/HDLRuby/soft/stacks.rb +219 -0
- data/lib/HDLRuby/std/bram.rb +9 -5
- data/lib/HDLRuby/std/clocks.rb +1 -1
- data/lib/HDLRuby/std/fsm.rb +39 -10
- data/lib/HDLRuby/std/sequencer.rb +2085 -0
- data/lib/HDLRuby/std/sequencer_func.rb +533 -0
- data/lib/HDLRuby/std/sequencer_sync.rb +400 -0
- data/lib/HDLRuby/std/std.rb +13 -0
- data/lib/HDLRuby/version.rb +1 -1
- data/tuto/adder_sat_flags_vcd.png +0 -0
- data/tuto/addsub_vcd.png +0 -0
- data/tuto/alu_vcd.png +0 -0
- data/tuto/bit_pong_vcd.png +0 -0
- data/tuto/checksum_vcd.png +0 -0
- data/tuto/circuit_hdr.odg +0 -0
- data/tuto/circuit_hdr.png +0 -0
- data/tuto/circuit_hie.odg +0 -0
- data/tuto/circuit_hie.png +0 -0
- data/tuto/circuit_view.odg +0 -0
- data/tuto/circuit_view.png +0 -0
- data/tuto/clock_counter_vcd.png +0 -0
- data/tuto/counter_ext_vcd.png +0 -0
- data/tuto/fact_vcd.png +0 -0
- data/tuto/hw_flow.odg +0 -0
- data/tuto/hw_flow.png +0 -0
- data/tuto/maxxer_vcd.png +0 -0
- data/tuto/pingpong0_vcd.png +0 -0
- data/tuto/pingpong1_vcd.png +0 -0
- data/tuto/pingpong2_vcd.png +0 -0
- data/tuto/ram_vcd.png +0 -0
- data/tuto/serializer_vcd.png +0 -0
- data/tuto/sw_flow.odg +0 -0
- data/tuto/sw_flow.png +0 -0
- data/tuto/the_counter_vcd.png +0 -0
- data/tuto/tutorial_sw.html +2359 -0
- data/tuto/tutorial_sw.md +2890 -0
- data/tuto/tutorial_sw.pdf +0 -0
- data/tuto/tutorial_sw_jp.md +417 -0
- metadata +46 -2
|
@@ -15,9 +15,9 @@ module HDLRuby::Low
|
|
|
15
15
|
########################################################################
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
## Extends the SystemT class with functionality for extracting
|
|
19
|
-
# expressions from cast.
|
|
20
18
|
class SystemT
|
|
19
|
+
## Extends the SystemT class with functionality for extracting
|
|
20
|
+
# expressions from cast.
|
|
21
21
|
|
|
22
22
|
# Extracts the expressions from the casts.
|
|
23
23
|
def casts_without_expression!
|
|
@@ -28,9 +28,9 @@ module HDLRuby::Low
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
## Extends the Scope class with functionality for extracting
|
|
32
|
-
# expressions from cast.
|
|
33
31
|
class Scope
|
|
32
|
+
## Extends the Scope class with functionality for extracting
|
|
33
|
+
# expressions from cast.
|
|
34
34
|
|
|
35
35
|
# Extracts the expressions from the casts.
|
|
36
36
|
def casts_without_expression!
|
|
@@ -49,9 +49,9 @@ module HDLRuby::Low
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
## Extends the Transmit class with functionality for extracting
|
|
53
|
-
# expressions from cast.
|
|
54
52
|
class Transmit
|
|
53
|
+
## Extends the Transmit class with functionality for extracting
|
|
54
|
+
# expressions from cast.
|
|
55
55
|
|
|
56
56
|
# Extracts the expressions from the casts.
|
|
57
57
|
def casts_without_expression!
|
|
@@ -64,9 +64,9 @@ module HDLRuby::Low
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
## Extends the Print class with functionality for extracting
|
|
68
|
-
# expressions from cast.
|
|
69
67
|
class Print
|
|
68
|
+
## Extends the Print class with functionality for extracting
|
|
69
|
+
# expressions from cast.
|
|
70
70
|
|
|
71
71
|
# Extracts the expressions from the casts.
|
|
72
72
|
def casts_without_expression!
|
|
@@ -77,9 +77,9 @@ module HDLRuby::Low
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
## Extends the If class with functionality for extracting
|
|
81
|
-
# expressions from cast.
|
|
82
80
|
class If
|
|
81
|
+
## Extends the If class with functionality for extracting
|
|
82
|
+
# expressions from cast.
|
|
83
83
|
|
|
84
84
|
# Extracts the expressions from the casts.
|
|
85
85
|
def casts_without_expression!
|
|
@@ -97,9 +97,9 @@ module HDLRuby::Low
|
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
## Extends the When class with functionality for extracting
|
|
101
|
-
# expressions from cast.
|
|
102
100
|
class When
|
|
101
|
+
## Extends the When class with functionality for extracting
|
|
102
|
+
# expressions from cast.
|
|
103
103
|
|
|
104
104
|
# Extracts the expressions from the casts.
|
|
105
105
|
def casts_without_expression!
|
|
@@ -112,9 +112,9 @@ module HDLRuby::Low
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
## Extends the Case class with functionality for extracting
|
|
116
|
-
# expressions from cast.
|
|
117
115
|
class Case
|
|
116
|
+
## Extends the Case class with functionality for extracting
|
|
117
|
+
# expressions from cast.
|
|
118
118
|
|
|
119
119
|
# Extracts the expressions from the casts.
|
|
120
120
|
def casts_without_expression!
|
|
@@ -130,9 +130,10 @@ module HDLRuby::Low
|
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
## Extends the TimeWait class with functionality for extracting
|
|
134
|
-
# expressions from cast.
|
|
135
133
|
class TimeWait
|
|
134
|
+
## Extends the TimeWait class with functionality for extracting
|
|
135
|
+
# expressions from cast.
|
|
136
|
+
|
|
136
137
|
# Extracts the expressions from the casts.
|
|
137
138
|
def casts_without_expression!
|
|
138
139
|
# Nothing to do.
|
|
@@ -140,9 +141,11 @@ module HDLRuby::Low
|
|
|
140
141
|
end
|
|
141
142
|
end
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
# expressions from cast.
|
|
144
|
+
|
|
145
145
|
class TimeRepeat
|
|
146
|
+
## Extends the TimeRepeat class with functionality for extracting
|
|
147
|
+
# expressions from cast.
|
|
148
|
+
|
|
146
149
|
# Extracts the expressions from the casts.
|
|
147
150
|
def casts_without_expression!
|
|
148
151
|
# Simply recurse on the stamtement.
|
|
@@ -152,9 +155,9 @@ module HDLRuby::Low
|
|
|
152
155
|
end
|
|
153
156
|
|
|
154
157
|
|
|
155
|
-
## Extends the Block class with functionality for extracting
|
|
156
|
-
# expressions from cast.
|
|
157
158
|
class Block
|
|
159
|
+
## Extends the Block class with functionality for extracting
|
|
160
|
+
# expressions from cast.
|
|
158
161
|
|
|
159
162
|
# Extracts the expressions from the casts.
|
|
160
163
|
def casts_without_expression!
|
|
@@ -165,9 +168,10 @@ module HDLRuby::Low
|
|
|
165
168
|
end
|
|
166
169
|
|
|
167
170
|
|
|
168
|
-
## Extends the Value class with functionality for extracting
|
|
169
|
-
# expressions from cast.
|
|
170
171
|
class Value
|
|
172
|
+
## Extends the Value class with functionality for extracting
|
|
173
|
+
# expressions from cast.
|
|
174
|
+
|
|
171
175
|
# Extracts the expressions from the casts.
|
|
172
176
|
def casts_without_expression!
|
|
173
177
|
# # Simple clones.
|
|
@@ -177,9 +181,10 @@ module HDLRuby::Low
|
|
|
177
181
|
end
|
|
178
182
|
|
|
179
183
|
|
|
180
|
-
## Extends the Cast class with functionality for extracting
|
|
181
|
-
# expressions from cast.
|
|
182
184
|
class Cast
|
|
185
|
+
## Extends the Cast class with functionality for extracting
|
|
186
|
+
# expressions from cast.
|
|
187
|
+
|
|
183
188
|
# Extracts the expressions from the casts.
|
|
184
189
|
def casts_without_expression!
|
|
185
190
|
# Recurse on the child.
|
|
@@ -218,9 +223,10 @@ module HDLRuby::Low
|
|
|
218
223
|
end
|
|
219
224
|
end
|
|
220
225
|
|
|
221
|
-
|
|
222
|
-
# expressions from cast.
|
|
226
|
+
|
|
223
227
|
class Unary
|
|
228
|
+
## Extends the Unary class with functionality for extracting
|
|
229
|
+
# expressions from cast.
|
|
224
230
|
|
|
225
231
|
# Extracts the expressions from the casts.
|
|
226
232
|
def casts_without_expression!
|
|
@@ -233,9 +239,9 @@ module HDLRuby::Low
|
|
|
233
239
|
end
|
|
234
240
|
|
|
235
241
|
|
|
236
|
-
## Extends the Binary class with functionality for extracting
|
|
237
|
-
# expressions from cast.
|
|
238
242
|
class Binary
|
|
243
|
+
## Extends the Binary class with functionality for extracting
|
|
244
|
+
# expressions from cast.
|
|
239
245
|
|
|
240
246
|
# Extracts the expressions from the casts.
|
|
241
247
|
def casts_without_expression!
|
|
@@ -251,9 +257,9 @@ module HDLRuby::Low
|
|
|
251
257
|
|
|
252
258
|
|
|
253
259
|
|
|
254
|
-
## Extends the Select class with functionality for extracting
|
|
255
|
-
# expressions from cast.
|
|
256
260
|
class Select
|
|
261
|
+
## Extends the Select class with functionality for extracting
|
|
262
|
+
# expressions from cast.
|
|
257
263
|
|
|
258
264
|
# Extracts the expressions from the casts.
|
|
259
265
|
def casts_without_expression!
|
|
@@ -270,9 +276,10 @@ module HDLRuby::Low
|
|
|
270
276
|
end
|
|
271
277
|
|
|
272
278
|
|
|
273
|
-
## Extends the Concat class with functionality for converting booleans
|
|
274
|
-
# in assignments to select operators.
|
|
275
279
|
class Concat
|
|
280
|
+
## Extends the Concat class with functionality for converting booleans
|
|
281
|
+
# in assignments to select operators.
|
|
282
|
+
|
|
276
283
|
# Extracts the expressions from the casts.
|
|
277
284
|
def casts_without_expression!
|
|
278
285
|
# Recurse on the sub expressions.
|
|
@@ -285,9 +292,10 @@ module HDLRuby::Low
|
|
|
285
292
|
end
|
|
286
293
|
|
|
287
294
|
|
|
288
|
-
## Extends the RefConcat class with functionality for converting booleans
|
|
289
|
-
# in assignments to select operators.
|
|
290
295
|
class RefConcat
|
|
296
|
+
## Extends the RefConcat class with functionality for converting booleans
|
|
297
|
+
# in assignments to select operators.
|
|
298
|
+
|
|
291
299
|
# Extracts the expressions from the casts.
|
|
292
300
|
def casts_without_expression!
|
|
293
301
|
# # Recurse on the sub references.
|
|
@@ -300,9 +308,10 @@ module HDLRuby::Low
|
|
|
300
308
|
end
|
|
301
309
|
|
|
302
310
|
|
|
303
|
-
## Extends the RefIndex class with functionality for converting booleans
|
|
304
|
-
# in assignments to select operators.
|
|
305
311
|
class RefIndex
|
|
312
|
+
## Extends the RefIndex class with functionality for converting booleans
|
|
313
|
+
# in assignments to select operators.
|
|
314
|
+
|
|
306
315
|
# Extracts the expressions from the casts.
|
|
307
316
|
def casts_without_expression!
|
|
308
317
|
# Recurse on the sub references.
|
|
@@ -316,9 +325,10 @@ module HDLRuby::Low
|
|
|
316
325
|
end
|
|
317
326
|
|
|
318
327
|
|
|
319
|
-
## Extends the RefRange class with functionality for converting booleans
|
|
320
|
-
# in assignments to select operators.
|
|
321
328
|
class RefRange
|
|
329
|
+
## Extends the RefRange class with functionality for converting booleans
|
|
330
|
+
# in assignments to select operators.
|
|
331
|
+
|
|
322
332
|
# Extracts the expressions from the casts.
|
|
323
333
|
def casts_without_expression!
|
|
324
334
|
# Recurse on the sub references.
|
|
@@ -334,9 +344,10 @@ module HDLRuby::Low
|
|
|
334
344
|
end
|
|
335
345
|
|
|
336
346
|
|
|
337
|
-
## Extends the RefName class with functionality for converting booleans
|
|
338
|
-
# in assignments to select operators.
|
|
339
347
|
class RefName
|
|
348
|
+
## Extends the RefName class with functionality for converting booleans
|
|
349
|
+
# in assignments to select operators.
|
|
350
|
+
|
|
340
351
|
# Extracts the expressions from the casts.
|
|
341
352
|
def casts_without_expression!
|
|
342
353
|
# Recurse on the sub references.
|
|
@@ -349,9 +360,10 @@ module HDLRuby::Low
|
|
|
349
360
|
end
|
|
350
361
|
|
|
351
362
|
|
|
352
|
-
## Extends the RefThis class with functionality for converting booleans
|
|
353
|
-
# in assignments to select operators.
|
|
354
363
|
class RefThis
|
|
364
|
+
## Extends the RefThis class with functionality for converting booleans
|
|
365
|
+
# in assignments to select operators.
|
|
366
|
+
|
|
355
367
|
# Extracts the expressions from the casts.
|
|
356
368
|
def casts_without_expression!
|
|
357
369
|
# # Simply clone.
|
|
@@ -361,9 +373,9 @@ module HDLRuby::Low
|
|
|
361
373
|
end
|
|
362
374
|
|
|
363
375
|
|
|
364
|
-
## Extends the StringE class with functionality for extracting
|
|
365
|
-
# expressions from cast.
|
|
366
376
|
class StringE
|
|
377
|
+
## Extends the StringE class with functionality for extracting
|
|
378
|
+
# expressions from cast.
|
|
367
379
|
|
|
368
380
|
# Extracts the expressions from the casts.
|
|
369
381
|
def casts_without_expression!
|
|
@@ -14,9 +14,9 @@ module HDLRuby::Low
|
|
|
14
14
|
########################################################################
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
## Extends the SystemT class with functionality for cleaning up the
|
|
18
|
-
# structure.
|
|
19
17
|
class SystemT
|
|
18
|
+
## Extends the SystemT class with functionality for cleaning up the
|
|
19
|
+
# structure.
|
|
20
20
|
|
|
21
21
|
# Cleans up.
|
|
22
22
|
def cleanup!
|
|
@@ -29,9 +29,9 @@ module HDLRuby::Low
|
|
|
29
29
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
## Extends the Scope class with functionality for cleaning up the
|
|
33
|
-
# structure.
|
|
34
32
|
class Scope
|
|
33
|
+
## Extends the Scope class with functionality for cleaning up the
|
|
34
|
+
# structure.
|
|
35
35
|
|
|
36
36
|
# Cleans up.
|
|
37
37
|
# +keep+ includes the list of names to be kept.
|
|
@@ -107,9 +107,9 @@ module HDLRuby::Low
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
## Extends the Statement class with functionality for breaking assingments
|
|
111
|
-
# to concats.
|
|
112
110
|
class Statement
|
|
111
|
+
## Extends the Statement class with functionality for cleaning up the
|
|
112
|
+
# structure.
|
|
113
113
|
|
|
114
114
|
# Removes the signals and corresponding assignments whose name is not
|
|
115
115
|
# in +keep+.
|
|
@@ -119,9 +119,8 @@ module HDLRuby::Low
|
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
|
|
122
|
-
## Extends the If class with functionality for breaking assingments
|
|
123
|
-
# to concats.
|
|
124
122
|
class If
|
|
123
|
+
## Extends the If class with functionality for cleaning up the structure
|
|
125
124
|
|
|
126
125
|
# Removes the signals and corresponding assignments whose name is not
|
|
127
126
|
# in +keep+.
|
|
@@ -136,9 +135,10 @@ module HDLRuby::Low
|
|
|
136
135
|
end
|
|
137
136
|
end
|
|
138
137
|
|
|
139
|
-
|
|
140
|
-
# to concats.
|
|
138
|
+
|
|
141
139
|
class When
|
|
140
|
+
## Extends the When class with functionality for cleaning up the
|
|
141
|
+
# structure.
|
|
142
142
|
|
|
143
143
|
# Removes the signals and corresponding assignments whose name is not
|
|
144
144
|
# in +keep+.
|
|
@@ -149,9 +149,10 @@ module HDLRuby::Low
|
|
|
149
149
|
end
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
## Extends the Case class with functionality for breaking assingments
|
|
153
|
-
# to concats.
|
|
154
152
|
class Case
|
|
153
|
+
## Extends the Case class with functionality for cleaning up the
|
|
154
|
+
# structure.
|
|
155
|
+
|
|
155
156
|
# Removes the signals and corresponding assignments whose name is not
|
|
156
157
|
# in +keep+.
|
|
157
158
|
def delete_unless!(keep)
|
|
@@ -163,9 +164,9 @@ module HDLRuby::Low
|
|
|
163
164
|
end
|
|
164
165
|
|
|
165
166
|
|
|
166
|
-
## Extends the Block class with functionality for breaking assingments
|
|
167
|
-
# to concats.
|
|
168
167
|
class Block
|
|
168
|
+
## Extends the Block class with functionality for cleaning up the
|
|
169
|
+
# structure.
|
|
169
170
|
|
|
170
171
|
# Removes the signals and corresponding assignments whose name is not
|
|
171
172
|
# in +keep+.
|
|
@@ -189,9 +190,10 @@ module HDLRuby::Low
|
|
|
189
190
|
end
|
|
190
191
|
end
|
|
191
192
|
|
|
192
|
-
|
|
193
|
-
# to concats.
|
|
193
|
+
|
|
194
194
|
class TimeBlock
|
|
195
|
+
## Extends the TimeBlock class with functionality for cleaning up the
|
|
196
|
+
# structure.
|
|
195
197
|
|
|
196
198
|
# Removes the signals and corresponding assignments whose name is not
|
|
197
199
|
# in +keep+.
|
|
@@ -12,8 +12,9 @@ module HDLRuby::Low
|
|
|
12
12
|
########################################################################
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
## Extends the SystemT class with fixing of types and constants.
|
|
16
15
|
class SystemT
|
|
16
|
+
## Extends the SystemT class with fixing of types and constants.
|
|
17
|
+
|
|
17
18
|
# Explicit the types conversions in the system.
|
|
18
19
|
def explicit_types!
|
|
19
20
|
# No direct fix required in the system, recurse on the scope.
|
|
@@ -23,8 +24,9 @@ module HDLRuby::Low
|
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
## Extends the Scope class with fixing of types and constants.
|
|
27
27
|
class Scope
|
|
28
|
+
## Extends the Scope class with fixing of types and constants.
|
|
29
|
+
|
|
28
30
|
# Explicit the types conversions in the scope.
|
|
29
31
|
def explicit_types!
|
|
30
32
|
# Recurse on the sub scopes.
|
|
@@ -40,8 +42,9 @@ module HDLRuby::Low
|
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
|
|
43
|
-
## Extends the Behavior class with fixing of types and constants.
|
|
44
45
|
class Behavior
|
|
46
|
+
## Extends the Behavior class with fixing of types and constants.
|
|
47
|
+
|
|
45
48
|
# Explicit the types conversions in the scope.
|
|
46
49
|
def explicit_types!
|
|
47
50
|
# Fix the types of the block.
|
|
@@ -51,8 +54,9 @@ module HDLRuby::Low
|
|
|
51
54
|
end
|
|
52
55
|
|
|
53
56
|
|
|
54
|
-
## Extends the SignalI class with fixing of types and constants.
|
|
55
57
|
class SignalI
|
|
58
|
+
## Extends the SignalI class with fixing of types and constants.
|
|
59
|
+
|
|
56
60
|
# Explicit the types conversions in the signal.
|
|
57
61
|
def explicit_types!
|
|
58
62
|
# Is there a value?
|
|
@@ -67,8 +71,9 @@ module HDLRuby::Low
|
|
|
67
71
|
end
|
|
68
72
|
|
|
69
73
|
|
|
70
|
-
## Extends the Statement class with fixing of types and constants.
|
|
71
74
|
class Statement
|
|
75
|
+
## Extends the Statement class with fixing of types and constants.
|
|
76
|
+
|
|
72
77
|
# Explicit the types conversions in the statement.
|
|
73
78
|
def explicit_types!
|
|
74
79
|
raise "Should implement explicit_types! for class #{self.class}."
|
|
@@ -76,8 +81,9 @@ module HDLRuby::Low
|
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
|
|
79
|
-
## Extends the Transmit class with fixing of types and constants.
|
|
80
84
|
class Transmit
|
|
85
|
+
## Extends the Transmit class with fixing of types and constants.
|
|
86
|
+
|
|
81
87
|
# Explicit the types conversions in the statement.
|
|
82
88
|
def explicit_types!
|
|
83
89
|
# Recurse on the left and the right.
|
|
@@ -90,8 +96,9 @@ module HDLRuby::Low
|
|
|
90
96
|
end
|
|
91
97
|
|
|
92
98
|
|
|
93
|
-
## Extends the Print class with fixing of types and constants.
|
|
94
99
|
class Print
|
|
100
|
+
## Extends the Print class with fixing of types and constants.
|
|
101
|
+
|
|
95
102
|
# Explicit the types conversions in the statement.
|
|
96
103
|
def explicit_types!
|
|
97
104
|
# Recurse on the arguments.
|
|
@@ -101,8 +108,9 @@ module HDLRuby::Low
|
|
|
101
108
|
end
|
|
102
109
|
|
|
103
110
|
|
|
104
|
-
## Extends the Configure class with fixing of types and constants.
|
|
105
111
|
class Configure
|
|
112
|
+
## Extends the Configure class with fixing of types and constants.
|
|
113
|
+
|
|
106
114
|
# Explicit the types conversions in the statement.
|
|
107
115
|
def explicit_types!
|
|
108
116
|
# Nothing to do.
|
|
@@ -111,8 +119,9 @@ module HDLRuby::Low
|
|
|
111
119
|
end
|
|
112
120
|
|
|
113
121
|
|
|
114
|
-
## Extends the TimeTerminate class with fixing of types and constants.
|
|
115
122
|
class TimeTerminate
|
|
123
|
+
## Extends the TimeTerminate class with fixing of types and constants.
|
|
124
|
+
|
|
116
125
|
# Explicit the types conversions in the statement.
|
|
117
126
|
def explicit_types!
|
|
118
127
|
# Nothing to do.
|
|
@@ -123,8 +132,9 @@ module HDLRuby::Low
|
|
|
123
132
|
|
|
124
133
|
|
|
125
134
|
|
|
126
|
-
## Extends the If class with fixing of types and constants.
|
|
127
135
|
class If
|
|
136
|
+
## Extends the If class with fixing of types and constants.
|
|
137
|
+
|
|
128
138
|
# Explicit the types conversions in the if.
|
|
129
139
|
def explicit_types!
|
|
130
140
|
# Recurse on the condition: it must be a Bit.
|
|
@@ -142,8 +152,9 @@ module HDLRuby::Low
|
|
|
142
152
|
end
|
|
143
153
|
|
|
144
154
|
|
|
145
|
-
## Extends the When class with fixing of types and constants.
|
|
146
155
|
class When
|
|
156
|
+
## Extends the When class with fixing of types and constants.
|
|
157
|
+
|
|
147
158
|
# Explicit the types conversions in the when where +type+ is the
|
|
148
159
|
# type of the selecting value.
|
|
149
160
|
def explicit_types!(type)
|
|
@@ -156,8 +167,9 @@ module HDLRuby::Low
|
|
|
156
167
|
end
|
|
157
168
|
|
|
158
169
|
|
|
159
|
-
## Extends the Case class with fixing of types and constants.
|
|
160
170
|
class Case
|
|
171
|
+
## Extends the Case class with fixing of types and constants.
|
|
172
|
+
|
|
161
173
|
# Explicit the types conversions in the case.
|
|
162
174
|
def explicit_types!
|
|
163
175
|
# Recurse on the value.
|
|
@@ -169,9 +181,10 @@ module HDLRuby::Low
|
|
|
169
181
|
end
|
|
170
182
|
end
|
|
171
183
|
|
|
172
|
-
|
|
173
|
-
# Describes a wait statement: not synthesizable!
|
|
184
|
+
|
|
174
185
|
class TimeWait
|
|
186
|
+
## Extends the TimeWait class with fixing of types and constants.
|
|
187
|
+
|
|
175
188
|
# Explicit the types conversions in the time wait.
|
|
176
189
|
def explicit_types!
|
|
177
190
|
# Nothing to do.
|
|
@@ -179,8 +192,10 @@ module HDLRuby::Low
|
|
|
179
192
|
end
|
|
180
193
|
end
|
|
181
194
|
|
|
182
|
-
|
|
195
|
+
|
|
183
196
|
class TimeRepeat
|
|
197
|
+
## Extends the TimeRepeat class with fixing of types and constants.
|
|
198
|
+
|
|
184
199
|
# Explicit the types conversions in the time repeat.
|
|
185
200
|
def explicit_types!
|
|
186
201
|
# Recurse on the statement.
|
|
@@ -190,8 +205,9 @@ module HDLRuby::Low
|
|
|
190
205
|
end
|
|
191
206
|
|
|
192
207
|
|
|
193
|
-
## Extends the Block class with fixing of types and constants.
|
|
194
208
|
class Block
|
|
209
|
+
## Extends the Block class with fixing of types and constants.
|
|
210
|
+
|
|
195
211
|
# Explicit the types conversions in the block.
|
|
196
212
|
def explicit_types!
|
|
197
213
|
# Recurse on the statements.
|
|
@@ -201,14 +217,16 @@ module HDLRuby::Low
|
|
|
201
217
|
end
|
|
202
218
|
|
|
203
219
|
|
|
204
|
-
## Extends the Connection class with fixing of types and constants.
|
|
205
220
|
class Connection
|
|
221
|
+
## Extends the Connection class with fixing of types and constants.
|
|
222
|
+
|
|
206
223
|
# Nothing required, Transmit is generated identically.
|
|
207
224
|
end
|
|
208
225
|
|
|
209
226
|
|
|
210
|
-
## Extends the Expression class with fixing of types and constants.
|
|
211
227
|
class Expression
|
|
228
|
+
## Extends the Expression class with fixing of types and constants.
|
|
229
|
+
|
|
212
230
|
# Explicit the types conversions in the expression where
|
|
213
231
|
# +type+ is the expected type of the condition if any.
|
|
214
232
|
def explicit_types(type = nil)
|
|
@@ -217,8 +235,9 @@ module HDLRuby::Low
|
|
|
217
235
|
end
|
|
218
236
|
|
|
219
237
|
|
|
220
|
-
## Extends the Value class with fixing of types and constants.
|
|
221
238
|
class Value
|
|
239
|
+
## Extends the Value class with fixing of types and constants.
|
|
240
|
+
|
|
222
241
|
# Explicit the types conversions in the value where
|
|
223
242
|
# +type+ is the expected type of the condition if any.
|
|
224
243
|
def explicit_types(type = nil)
|
|
@@ -234,8 +253,9 @@ module HDLRuby::Low
|
|
|
234
253
|
end
|
|
235
254
|
|
|
236
255
|
|
|
237
|
-
## Extends the Cast class with fixing of types and constants.
|
|
238
256
|
class Cast
|
|
257
|
+
## Extends the Cast class with fixing of types and constants.
|
|
258
|
+
|
|
239
259
|
# Explicit the types conversions in the cast where
|
|
240
260
|
# +type+ is the expected type of the condition if any.
|
|
241
261
|
def explicit_types(type = nil)
|
|
@@ -251,8 +271,9 @@ module HDLRuby::Low
|
|
|
251
271
|
end
|
|
252
272
|
|
|
253
273
|
|
|
254
|
-
## Extends the Operation class with fixing of types and constants.
|
|
255
274
|
class Operation
|
|
275
|
+
## Extends the Operation class with fixing of types and constants.
|
|
276
|
+
|
|
256
277
|
# Explicit the types conversions in the operation where
|
|
257
278
|
# +type+ is the expected type of the condition if any.
|
|
258
279
|
def explicit_types(type = nil)
|
|
@@ -261,8 +282,9 @@ module HDLRuby::Low
|
|
|
261
282
|
end
|
|
262
283
|
|
|
263
284
|
|
|
264
|
-
## Extends the Unary class with fixing of types and constants.
|
|
265
285
|
class Unary
|
|
286
|
+
## Extends the Unary class with fixing of types and constants.
|
|
287
|
+
|
|
266
288
|
# Explicit the types conversions in the unary operation where
|
|
267
289
|
# +type+ is the expected type of the condition if any.
|
|
268
290
|
def explicit_types(type = nil)
|
|
@@ -281,8 +303,9 @@ module HDLRuby::Low
|
|
|
281
303
|
end
|
|
282
304
|
|
|
283
305
|
|
|
284
|
-
## Extends the Binary class with fixing of types and constants.
|
|
285
306
|
class Binary
|
|
307
|
+
## Extends the Binary class with fixing of types and constants.
|
|
308
|
+
|
|
286
309
|
# Explicit the types conversions in the binary operation where
|
|
287
310
|
# +type+ is the expected type of the condition if any.
|
|
288
311
|
def explicit_types(type = nil)
|
|
@@ -305,8 +328,9 @@ module HDLRuby::Low
|
|
|
305
328
|
end
|
|
306
329
|
|
|
307
330
|
|
|
308
|
-
## Extends the Select class with fixing of types and constants.
|
|
309
331
|
class Select
|
|
332
|
+
## Extends the Select class with fixing of types and constants.
|
|
333
|
+
|
|
310
334
|
# Explicit the types conversions in the selection where
|
|
311
335
|
# +type+ is the expected type of the condition if any.
|
|
312
336
|
def explicit_types(type = nil)
|
|
@@ -319,8 +343,9 @@ module HDLRuby::Low
|
|
|
319
343
|
end
|
|
320
344
|
|
|
321
345
|
|
|
322
|
-
## Extends the Concat class with fixing of types and constants.
|
|
323
346
|
class Concat
|
|
347
|
+
## Extends the Concat class with fixing of types and constants.
|
|
348
|
+
|
|
324
349
|
# Explicit the types conversions in the concat where
|
|
325
350
|
# +type+ is the expected type of the condition if any.
|
|
326
351
|
def explicit_types(type = nil)
|
|
@@ -354,8 +379,9 @@ module HDLRuby::Low
|
|
|
354
379
|
end
|
|
355
380
|
|
|
356
381
|
|
|
357
|
-
## Extends the Ref class with fixing of types and constants.
|
|
358
382
|
class Ref
|
|
383
|
+
## Extends the Ref class with fixing of types and constants.
|
|
384
|
+
|
|
359
385
|
# Explicit the types conversions in the reference where
|
|
360
386
|
# +type+ is the expected type of the condition if any.
|
|
361
387
|
def explicit_types(type = nil)
|
|
@@ -364,8 +390,9 @@ module HDLRuby::Low
|
|
|
364
390
|
end
|
|
365
391
|
|
|
366
392
|
|
|
367
|
-
## Extends the RefConcat class with fixing of types and constants.
|
|
368
393
|
class RefConcat
|
|
394
|
+
## Extends the RefConcat class with fixing of types and constants.
|
|
395
|
+
|
|
369
396
|
# Explicit the types conversions in the concat ref where
|
|
370
397
|
# +type+ is the expected type of the condition if any.
|
|
371
398
|
def explicit_types(type = nil)
|
|
@@ -397,8 +424,9 @@ module HDLRuby::Low
|
|
|
397
424
|
end
|
|
398
425
|
|
|
399
426
|
|
|
400
|
-
## Extends the RefIndex class with fixing of types and constants.
|
|
401
427
|
class RefIndex
|
|
428
|
+
## Extends the RefIndex class with fixing of types and constants.
|
|
429
|
+
|
|
402
430
|
# Explicit the types conversions in the index ref where
|
|
403
431
|
# +type+ is the expected type of the condition if any.
|
|
404
432
|
def explicit_types(type = nil)
|
|
@@ -418,8 +446,9 @@ module HDLRuby::Low
|
|
|
418
446
|
end
|
|
419
447
|
|
|
420
448
|
|
|
421
|
-
## Extends the RefRange class with fixing of types and constants.
|
|
422
449
|
class RefRange
|
|
450
|
+
## Extends the RefRange class with fixing of types and constants.
|
|
451
|
+
|
|
423
452
|
# Explicit the types conversions in the range ref where
|
|
424
453
|
# +type+ is the expected type of the condition if any.
|
|
425
454
|
def explicit_types(type = nil)
|
|
@@ -441,8 +470,9 @@ module HDLRuby::Low
|
|
|
441
470
|
end
|
|
442
471
|
|
|
443
472
|
|
|
444
|
-
## Extends the RefName class with fixing of types and constants.
|
|
445
473
|
class RefName
|
|
474
|
+
## Extends the RefName class with fixing of types and constants.
|
|
475
|
+
|
|
446
476
|
# Explicit the types conversions in the index ref where
|
|
447
477
|
# +type+ is the expected type of the condition if any.
|
|
448
478
|
def explicit_types(type = nil)
|
|
@@ -461,8 +491,9 @@ module HDLRuby::Low
|
|
|
461
491
|
end
|
|
462
492
|
|
|
463
493
|
|
|
464
|
-
## Extends the RefThis class with fixing of types and constants.
|
|
465
494
|
class RefThis
|
|
495
|
+
## Extends the RefThis class with fixing of types and constants.
|
|
496
|
+
|
|
466
497
|
# Explicit the types conversions in the index ref where
|
|
467
498
|
# +type+ is the expected type of the condition if any.
|
|
468
499
|
def explicit_types(type = nil)
|
|
@@ -472,8 +503,9 @@ module HDLRuby::Low
|
|
|
472
503
|
end
|
|
473
504
|
|
|
474
505
|
|
|
475
|
-
## Extends the stringE class with fixing of types and constants.
|
|
476
506
|
class StringE
|
|
507
|
+
## Extends the stringE class with fixing of types and constants.
|
|
508
|
+
|
|
477
509
|
# Explicit the types conversions in the concat where
|
|
478
510
|
# +type+ is the expected type of the condition if any.
|
|
479
511
|
def explicit_types(type = nil)
|