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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require "HDLRuby/hruby_error"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
module HDLRuby::Low
|
|
4
5
|
|
|
5
6
|
##
|
|
6
7
|
# Make HDLRuby::Low objects mutable trough "!" methods.
|
|
@@ -10,13 +11,10 @@ require "HDLRuby/hruby_error"
|
|
|
10
11
|
# * this is a work in progress.
|
|
11
12
|
#
|
|
12
13
|
########################################################################
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
# Describes a system type.
|
|
17
|
-
#
|
|
18
|
-
# NOTE: delegates its content-related methods to its Scope object.
|
|
14
|
+
|
|
15
|
+
|
|
19
16
|
class SystemT
|
|
17
|
+
## Makes SystemT mutable.
|
|
20
18
|
|
|
21
19
|
# Sets the +name+.
|
|
22
20
|
def set_name!(name)
|
|
@@ -97,9 +95,8 @@ module HDLRuby::Low
|
|
|
97
95
|
end
|
|
98
96
|
|
|
99
97
|
|
|
100
|
-
##
|
|
101
|
-
# Describes scopes of system types.
|
|
102
98
|
class Scope
|
|
99
|
+
## Makes Scope mutable.
|
|
103
100
|
|
|
104
101
|
# Maps on the local types.
|
|
105
102
|
def map_types!(&ruby_block)
|
|
@@ -272,9 +269,8 @@ module HDLRuby::Low
|
|
|
272
269
|
end
|
|
273
270
|
|
|
274
271
|
|
|
275
|
-
##
|
|
276
|
-
# Describes a data type.
|
|
277
272
|
class Type
|
|
273
|
+
## Makes Type mutable.
|
|
278
274
|
|
|
279
275
|
# Sets the +name+.
|
|
280
276
|
def set_name!(name)
|
|
@@ -283,12 +279,8 @@ module HDLRuby::Low
|
|
|
283
279
|
end
|
|
284
280
|
|
|
285
281
|
|
|
286
|
-
##
|
|
287
|
-
# Describes a high-level type definition.
|
|
288
|
-
#
|
|
289
|
-
# NOTE: type definition are actually type with a name refering to another
|
|
290
|
-
# type (and equivalent to it).
|
|
291
282
|
class TypeDef
|
|
283
|
+
## Makes TypeDef mutable.
|
|
292
284
|
|
|
293
285
|
# Sets the type definition to +type+.
|
|
294
286
|
def set_def!(type)
|
|
@@ -302,10 +294,8 @@ module HDLRuby::Low
|
|
|
302
294
|
end
|
|
303
295
|
|
|
304
296
|
|
|
305
|
-
|
|
306
|
-
##
|
|
307
|
-
# Describes a vector type.
|
|
308
297
|
class TypeVector
|
|
298
|
+
## Makes TypeVector mutable.
|
|
309
299
|
|
|
310
300
|
# Sets the +base+ type.
|
|
311
301
|
def set_base!(type)
|
|
@@ -333,9 +323,8 @@ module HDLRuby::Low
|
|
|
333
323
|
end
|
|
334
324
|
|
|
335
325
|
|
|
336
|
-
##
|
|
337
|
-
# Describes a tuple type.
|
|
338
326
|
class TypeTuple
|
|
327
|
+
## Makes TypeTuple mutable.
|
|
339
328
|
|
|
340
329
|
# Maps on the sub types.
|
|
341
330
|
def map_types!(&ruby_block)
|
|
@@ -355,9 +344,8 @@ module HDLRuby::Low
|
|
|
355
344
|
end
|
|
356
345
|
|
|
357
346
|
|
|
358
|
-
##
|
|
359
|
-
# Describes a structure type.
|
|
360
347
|
class TypeStruct
|
|
348
|
+
## Makes TypeStruct mutable.
|
|
361
349
|
|
|
362
350
|
# Maps on the sub types.
|
|
363
351
|
def map_types!(&ruby_block)
|
|
@@ -377,10 +365,8 @@ module HDLRuby::Low
|
|
|
377
365
|
end
|
|
378
366
|
|
|
379
367
|
|
|
380
|
-
|
|
381
|
-
##
|
|
382
|
-
# Describes a behavior.
|
|
383
368
|
class Behavior
|
|
369
|
+
## Makes Behavior mutable.
|
|
384
370
|
|
|
385
371
|
# Sets the block.
|
|
386
372
|
def set_block!(block)
|
|
@@ -409,13 +395,8 @@ module HDLRuby::Low
|
|
|
409
395
|
end
|
|
410
396
|
|
|
411
397
|
|
|
412
|
-
##
|
|
413
|
-
# Describes a timed behavior.
|
|
414
|
-
#
|
|
415
|
-
# NOTE:
|
|
416
|
-
# * this is the only kind of behavior that can include time statements.
|
|
417
|
-
# * this kind of behavior is not synthesizable!
|
|
418
398
|
class TimeBehavior
|
|
399
|
+
## Makes TimeBehavior mutable.
|
|
419
400
|
|
|
420
401
|
# Sets the block.
|
|
421
402
|
def set_block!(block)
|
|
@@ -430,9 +411,9 @@ module HDLRuby::Low
|
|
|
430
411
|
end
|
|
431
412
|
|
|
432
413
|
|
|
433
|
-
##
|
|
434
|
-
# Describes an event.
|
|
435
414
|
class Event
|
|
415
|
+
## Makes Event mutable.
|
|
416
|
+
|
|
436
417
|
# Sets the type.
|
|
437
418
|
def set_type!(type)
|
|
438
419
|
# Check and set the type.
|
|
@@ -482,9 +463,8 @@ module HDLRuby::Low
|
|
|
482
463
|
end
|
|
483
464
|
|
|
484
465
|
|
|
485
|
-
##
|
|
486
|
-
# Describes a signal.
|
|
487
466
|
class SignalI
|
|
467
|
+
## Makes SignalI mutable.
|
|
488
468
|
|
|
489
469
|
# Sets the name.
|
|
490
470
|
def set_name!(name)
|
|
@@ -515,9 +495,8 @@ module HDLRuby::Low
|
|
|
515
495
|
end
|
|
516
496
|
|
|
517
497
|
|
|
518
|
-
##
|
|
519
|
-
# Describes a system instance.
|
|
520
498
|
class SystemI
|
|
499
|
+
## Makes SystemI mutable.
|
|
521
500
|
|
|
522
501
|
# Sets the name.
|
|
523
502
|
def set_name!(name)
|
|
@@ -537,12 +516,9 @@ module HDLRuby::Low
|
|
|
537
516
|
end
|
|
538
517
|
|
|
539
518
|
|
|
540
|
-
|
|
541
|
-
##
|
|
542
|
-
# Describes a statement.
|
|
543
|
-
#
|
|
544
|
-
# NOTE: this is an abstract class which is not to be used directly.
|
|
545
519
|
class Statement
|
|
520
|
+
## Makes Statement mutable.
|
|
521
|
+
|
|
546
522
|
# Replaces sub expressions using +node2rep+ table indicating the
|
|
547
523
|
# node to replace and the corresponding replacement.
|
|
548
524
|
# Returns the actually replaced nodes and their corresponding
|
|
@@ -564,11 +540,9 @@ module HDLRuby::Low
|
|
|
564
540
|
end
|
|
565
541
|
|
|
566
542
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
##
|
|
570
|
-
# Decribes a transmission statement.
|
|
571
543
|
class Transmit
|
|
544
|
+
## Makes Transmit mutable.
|
|
545
|
+
|
|
572
546
|
# Sets the left.
|
|
573
547
|
def set_left!(left)
|
|
574
548
|
# Check and set the left reference.
|
|
@@ -641,9 +615,8 @@ module HDLRuby::Low
|
|
|
641
615
|
end
|
|
642
616
|
|
|
643
617
|
|
|
644
|
-
##
|
|
645
|
-
# Decribes a print statement.
|
|
646
618
|
class Print
|
|
619
|
+
## Makes Print mutable.
|
|
647
620
|
|
|
648
621
|
# Maps on the arguments.
|
|
649
622
|
def map_args!(&ruby_block)
|
|
@@ -699,9 +672,8 @@ module HDLRuby::Low
|
|
|
699
672
|
end
|
|
700
673
|
|
|
701
674
|
|
|
702
|
-
##
|
|
703
|
-
# Describes an if statement.
|
|
704
675
|
class If
|
|
676
|
+
## Makes If mutable.
|
|
705
677
|
|
|
706
678
|
# Sets the condition.
|
|
707
679
|
def set_condition!(condition)
|
|
@@ -819,9 +791,10 @@ module HDLRuby::Low
|
|
|
819
791
|
end
|
|
820
792
|
end
|
|
821
793
|
|
|
822
|
-
|
|
823
|
-
# Describes a when for a case statement.
|
|
794
|
+
|
|
824
795
|
class When
|
|
796
|
+
## Makes When mutable.
|
|
797
|
+
|
|
825
798
|
# Sets the match.
|
|
826
799
|
def set_match!(match)
|
|
827
800
|
# Checks the match.
|
|
@@ -893,9 +866,8 @@ module HDLRuby::Low
|
|
|
893
866
|
end
|
|
894
867
|
|
|
895
868
|
|
|
896
|
-
##
|
|
897
|
-
# Describes a case statement.
|
|
898
869
|
class Case
|
|
870
|
+
## Makes Case mutable.
|
|
899
871
|
|
|
900
872
|
# Sets the value.
|
|
901
873
|
def set_value!(value)
|
|
@@ -984,9 +956,8 @@ module HDLRuby::Low
|
|
|
984
956
|
end
|
|
985
957
|
|
|
986
958
|
|
|
987
|
-
##
|
|
988
|
-
# Describes a delay: not synthesizable.
|
|
989
959
|
class Delay
|
|
960
|
+
## Makes Delay mutable.
|
|
990
961
|
|
|
991
962
|
# Sets the value.
|
|
992
963
|
def set_value!(value)
|
|
@@ -1030,9 +1001,8 @@ module HDLRuby::Low
|
|
|
1030
1001
|
end
|
|
1031
1002
|
|
|
1032
1003
|
|
|
1033
|
-
##
|
|
1034
|
-
# Describes a wait statement: not synthesizable!
|
|
1035
1004
|
class TimeWait
|
|
1005
|
+
## Makes TimeWait mutable.
|
|
1036
1006
|
|
|
1037
1007
|
# Sets the delay.
|
|
1038
1008
|
def set_delay!(delay)
|
|
@@ -1052,9 +1022,8 @@ module HDLRuby::Low
|
|
|
1052
1022
|
end
|
|
1053
1023
|
|
|
1054
1024
|
|
|
1055
|
-
##
|
|
1056
|
-
# Describes a timed loop statement: not synthesizable!
|
|
1057
1025
|
class TimeRepeat
|
|
1026
|
+
## Makes TimeRepeat mutable.
|
|
1058
1027
|
|
|
1059
1028
|
# Sets the statement.
|
|
1060
1029
|
def set_statement!(statement)
|
|
@@ -1102,9 +1071,8 @@ module HDLRuby::Low
|
|
|
1102
1071
|
end
|
|
1103
1072
|
|
|
1104
1073
|
|
|
1105
|
-
##
|
|
1106
|
-
# Describes a block.
|
|
1107
1074
|
class Block
|
|
1075
|
+
## Makes Block mutable.
|
|
1108
1076
|
|
|
1109
1077
|
# Sets the mode.
|
|
1110
1078
|
def set_mode!(mode)
|
|
@@ -1274,18 +1242,14 @@ module HDLRuby::Low
|
|
|
1274
1242
|
end
|
|
1275
1243
|
|
|
1276
1244
|
|
|
1277
|
-
# Describes a timed block.
|
|
1278
|
-
#
|
|
1279
|
-
# NOTE:
|
|
1280
|
-
# * this is the only kind of block that can include time statements.
|
|
1281
|
-
# * this kind of block is not synthesizable!
|
|
1282
1245
|
class TimeBlock
|
|
1246
|
+
## Makes TimeBlock mutable.
|
|
1283
1247
|
end
|
|
1284
1248
|
|
|
1285
1249
|
|
|
1286
|
-
##
|
|
1287
|
-
# Decribes a piece of software code.
|
|
1288
1250
|
class Code
|
|
1251
|
+
## Makes Code mutable.
|
|
1252
|
+
|
|
1289
1253
|
# Sets the type.
|
|
1290
1254
|
def set_type!(type)
|
|
1291
1255
|
# Check and set type.
|
|
@@ -1301,13 +1265,8 @@ module HDLRuby::Low
|
|
|
1301
1265
|
end
|
|
1302
1266
|
|
|
1303
1267
|
|
|
1304
|
-
##
|
|
1305
|
-
# Describes a connection.
|
|
1306
|
-
#
|
|
1307
|
-
# NOTE: eventhough a connection is semantically different from a
|
|
1308
|
-
# transmission, it has a common structure. Therefore, it is described
|
|
1309
|
-
# as a subclass of a transmit.
|
|
1310
1268
|
class Connection
|
|
1269
|
+
## Makes Connection mutable.
|
|
1311
1270
|
|
|
1312
1271
|
# Replace node by corresponding replacement from +node2reassign+ that
|
|
1313
1272
|
# is a table whose entries are:
|
|
@@ -1345,12 +1304,8 @@ module HDLRuby::Low
|
|
|
1345
1304
|
end
|
|
1346
1305
|
|
|
1347
1306
|
|
|
1348
|
-
|
|
1349
|
-
##
|
|
1350
|
-
# Describes an expression.
|
|
1351
|
-
#
|
|
1352
|
-
# NOTE: this is an abstract class which is not to be used directly.
|
|
1353
1307
|
class Expression
|
|
1308
|
+
## Makes Expression mutable.
|
|
1354
1309
|
|
|
1355
1310
|
# Sets the type.
|
|
1356
1311
|
def set_type!(type)
|
|
@@ -1382,9 +1337,8 @@ module HDLRuby::Low
|
|
|
1382
1337
|
end
|
|
1383
1338
|
|
|
1384
1339
|
|
|
1385
|
-
##
|
|
1386
|
-
# Describes a value.
|
|
1387
1340
|
class Value
|
|
1341
|
+
## Makes Value mutable.
|
|
1388
1342
|
|
|
1389
1343
|
# Sets the content.
|
|
1390
1344
|
def set_content!(content)
|
|
@@ -1440,18 +1394,15 @@ module HDLRuby::Low
|
|
|
1440
1394
|
end
|
|
1441
1395
|
end
|
|
1442
1396
|
|
|
1443
|
-
|
|
1444
|
-
# Describes a cast.
|
|
1397
|
+
|
|
1445
1398
|
class Cast
|
|
1399
|
+
## Makes Cast mutable.
|
|
1446
1400
|
include OneChildMutable
|
|
1447
1401
|
end
|
|
1448
1402
|
|
|
1449
1403
|
|
|
1450
|
-
##
|
|
1451
|
-
# Describes an operation.
|
|
1452
|
-
#
|
|
1453
|
-
# NOTE: this is an abstract class which is not to be used directly.
|
|
1454
1404
|
class Operation
|
|
1405
|
+
## Makes Operation mutable.
|
|
1455
1406
|
|
|
1456
1407
|
# Sets the operator.
|
|
1457
1408
|
def set_operator!(operator)
|
|
@@ -1461,9 +1412,8 @@ module HDLRuby::Low
|
|
|
1461
1412
|
end
|
|
1462
1413
|
|
|
1463
1414
|
|
|
1464
|
-
##
|
|
1465
|
-
# Describes an unary operation.
|
|
1466
1415
|
class Unary
|
|
1416
|
+
## Makes Unary mutable.
|
|
1467
1417
|
include OneChildMutable
|
|
1468
1418
|
|
|
1469
1419
|
# Moved to OneChildMutable
|
|
@@ -1486,9 +1436,8 @@ module HDLRuby::Low
|
|
|
1486
1436
|
end
|
|
1487
1437
|
|
|
1488
1438
|
|
|
1489
|
-
##
|
|
1490
|
-
# Describes an binary operation.
|
|
1491
1439
|
class Binary
|
|
1440
|
+
## Makes Binary mutable.
|
|
1492
1441
|
|
|
1493
1442
|
# Sets the left.
|
|
1494
1443
|
def set_left!(left)
|
|
@@ -1560,11 +1509,8 @@ module HDLRuby::Low
|
|
|
1560
1509
|
end
|
|
1561
1510
|
|
|
1562
1511
|
|
|
1563
|
-
##
|
|
1564
|
-
# Describes a section operation (generalization of the ternary operator).
|
|
1565
|
-
#
|
|
1566
|
-
# NOTE: choice is using the value of +select+ as an index.
|
|
1567
1512
|
class Select
|
|
1513
|
+
## Makes Select mutable.
|
|
1568
1514
|
|
|
1569
1515
|
# Sets the select.
|
|
1570
1516
|
def set_select!(select)
|
|
@@ -1685,9 +1631,8 @@ module HDLRuby::Low
|
|
|
1685
1631
|
end
|
|
1686
1632
|
|
|
1687
1633
|
|
|
1688
|
-
##
|
|
1689
|
-
# Describes a concatenation expression.
|
|
1690
1634
|
class Concat
|
|
1635
|
+
## Makes Concat mutable.
|
|
1691
1636
|
include MutableConcat
|
|
1692
1637
|
|
|
1693
1638
|
# Maps on the expression.
|
|
@@ -1715,11 +1660,9 @@ module HDLRuby::Low
|
|
|
1715
1660
|
end
|
|
1716
1661
|
|
|
1717
1662
|
|
|
1718
|
-
##
|
|
1719
|
-
# Describes a reference expression.
|
|
1720
|
-
#
|
|
1721
|
-
# NOTE: this is an abstract class which is not to be used directly.
|
|
1722
1663
|
class Ref
|
|
1664
|
+
## Makes Ref mutable.
|
|
1665
|
+
|
|
1723
1666
|
# Maps on the children.
|
|
1724
1667
|
def map_nodes!(&ruby_block)
|
|
1725
1668
|
# Nothing to do.
|
|
@@ -1729,9 +1672,8 @@ module HDLRuby::Low
|
|
|
1729
1672
|
end
|
|
1730
1673
|
|
|
1731
1674
|
|
|
1732
|
-
##
|
|
1733
|
-
# Describes concatenation reference.
|
|
1734
1675
|
class RefConcat
|
|
1676
|
+
## Makes RefConcat mutable.
|
|
1735
1677
|
include MutableConcat
|
|
1736
1678
|
|
|
1737
1679
|
# Maps on the references.
|
|
@@ -1759,9 +1701,8 @@ module HDLRuby::Low
|
|
|
1759
1701
|
end
|
|
1760
1702
|
|
|
1761
1703
|
|
|
1762
|
-
##
|
|
1763
|
-
# Describes a index reference.
|
|
1764
1704
|
class RefIndex
|
|
1705
|
+
## Makes RefIndex mutable.
|
|
1765
1706
|
|
|
1766
1707
|
# Sets the base reference.
|
|
1767
1708
|
def set_ref!(ref)
|
|
@@ -1835,9 +1776,8 @@ module HDLRuby::Low
|
|
|
1835
1776
|
end
|
|
1836
1777
|
|
|
1837
1778
|
|
|
1838
|
-
##
|
|
1839
|
-
# Describes a range reference.
|
|
1840
1779
|
class RefRange
|
|
1780
|
+
## Makes RefRange mutable.
|
|
1841
1781
|
|
|
1842
1782
|
# Sets the base reference.
|
|
1843
1783
|
def set_ref!(ref)
|
|
@@ -1931,9 +1871,9 @@ module HDLRuby::Low
|
|
|
1931
1871
|
end
|
|
1932
1872
|
|
|
1933
1873
|
|
|
1934
|
-
##
|
|
1935
|
-
# Describes a name reference.
|
|
1936
1874
|
class RefName
|
|
1875
|
+
# Makes RefName mutable.
|
|
1876
|
+
|
|
1937
1877
|
# Sets the base reference.
|
|
1938
1878
|
def set_ref!(ref)
|
|
1939
1879
|
# Check and set the accessed reference.
|
|
@@ -1985,11 +1925,8 @@ module HDLRuby::Low
|
|
|
1985
1925
|
end
|
|
1986
1926
|
|
|
1987
1927
|
|
|
1988
|
-
##
|
|
1989
|
-
# Describe a this reference.
|
|
1990
|
-
#
|
|
1991
|
-
# This is the current system.
|
|
1992
1928
|
class RefThis
|
|
1929
|
+
## Makes RefThis mutable.
|
|
1993
1930
|
|
|
1994
1931
|
# Maps on the children.
|
|
1995
1932
|
def map_nodes!(&ruby_block)
|
|
@@ -1999,11 +1936,9 @@ module HDLRuby::Low
|
|
|
1999
1936
|
alias_method :map_expressions!, :map_nodes!
|
|
2000
1937
|
end
|
|
2001
1938
|
|
|
2002
|
-
|
|
2003
|
-
# Describes a string.
|
|
2004
|
-
#
|
|
2005
|
-
# NOTE: This is not synthesizable!
|
|
1939
|
+
|
|
2006
1940
|
class StringE
|
|
1941
|
+
## Makes StringE mutable.
|
|
2007
1942
|
|
|
2008
1943
|
# Maps on the arguments.
|
|
2009
1944
|
def map_args!(&ruby_block)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require "HDLRuby/hruby_error"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
module HDLRuby::Low
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
##
|
|
6
8
|
# Adds methods for finding objects through names.
|
|
@@ -8,12 +10,11 @@ require "HDLRuby/hruby_error"
|
|
|
8
10
|
# NOTE: For now only resolve name reference.
|
|
9
11
|
#
|
|
10
12
|
########################################################################
|
|
11
|
-
module HDLRuby::Low
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
# Extends SystemT with the capability of finding one of its inner object
|
|
15
|
-
# by name.
|
|
14
|
+
|
|
16
15
|
class SystemT
|
|
16
|
+
## Extends SystemT with the capability of finding one of its inner
|
|
17
|
+
# object by name.
|
|
17
18
|
|
|
18
19
|
## Find an inner object by +name+.
|
|
19
20
|
# NOTE: return nil if not found.
|
|
@@ -31,10 +32,9 @@ module HDLRuby::Low
|
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
##
|
|
35
|
-
# Extends Scope with the capability of finding one of its inner object
|
|
36
|
-
# by name.
|
|
37
35
|
class Scope
|
|
36
|
+
## Extends Scope with the capability of finding one of its inner object
|
|
37
|
+
# by name.
|
|
38
38
|
|
|
39
39
|
## Find an inner object by +name+.
|
|
40
40
|
# NOTE: return nil if not found.
|
|
@@ -55,10 +55,10 @@ module HDLRuby::Low
|
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
# Extends Behavior with the capability of finding one of its inner object
|
|
60
|
-
# by name.
|
|
58
|
+
|
|
61
59
|
class Behavior
|
|
60
|
+
## Extends Behavior with the capability of finding one of its inner
|
|
61
|
+
# object by name.
|
|
62
62
|
|
|
63
63
|
## Find an inner object by +name+.
|
|
64
64
|
# NOTE: return nil if not found.
|
|
@@ -70,10 +70,10 @@ module HDLRuby::Low
|
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
# Extends SystemI with the capability of finding one of its inner object
|
|
75
|
-
# by name.
|
|
73
|
+
|
|
76
74
|
class SystemI
|
|
75
|
+
## Extends SystemI with the capability of finding one of its inner object
|
|
76
|
+
# by name.
|
|
77
77
|
|
|
78
78
|
## Find an inner object by +name+.
|
|
79
79
|
# NOTE: return nil if not found.
|
|
@@ -84,10 +84,9 @@ module HDLRuby::Low
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
##
|
|
88
|
-
# Extends Block with the capability of finding one of its inner object
|
|
89
|
-
# by name.
|
|
90
87
|
class Block
|
|
88
|
+
## Extends Block with the capability of finding one of its inner object
|
|
89
|
+
# by name.
|
|
91
90
|
|
|
92
91
|
## Find an inner object by +name+.
|
|
93
92
|
# NOTE: return nil if not found.
|
|
@@ -109,10 +108,9 @@ module HDLRuby::Low
|
|
|
109
108
|
end
|
|
110
109
|
|
|
111
110
|
|
|
112
|
-
##
|
|
113
|
-
# Extends SignalI with the capability of finding one of its inner object
|
|
114
|
-
# by name.
|
|
115
111
|
class SignalI
|
|
112
|
+
## Extends SignalI with the capability of finding one of its inner object
|
|
113
|
+
# by name.
|
|
116
114
|
|
|
117
115
|
## Find an inner object by +name+.
|
|
118
116
|
# NOTE: return nil if not found.
|
|
@@ -123,10 +121,10 @@ module HDLRuby::Low
|
|
|
123
121
|
|
|
124
122
|
|
|
125
123
|
|
|
126
|
-
##
|
|
127
|
-
# Extends RefIndex with the capability of finding the object it
|
|
128
|
-
# refered to.
|
|
129
124
|
class Ref
|
|
125
|
+
## Extends RefIndex with the capability of finding the object it
|
|
126
|
+
# refered to.
|
|
127
|
+
|
|
130
128
|
## Resolves the name of the reference (if any) and return the
|
|
131
129
|
# corresponding object.
|
|
132
130
|
# NOTE: return nil if could not resolve.
|
|
@@ -137,10 +135,9 @@ module HDLRuby::Low
|
|
|
137
135
|
end
|
|
138
136
|
|
|
139
137
|
|
|
140
|
-
##
|
|
141
|
-
# Extends RefIndex with the capability of finding the object it
|
|
142
|
-
# refered to.
|
|
143
138
|
class RefIndex
|
|
139
|
+
## Extends RefIndex with the capability of finding the object it
|
|
140
|
+
# refered to.
|
|
144
141
|
|
|
145
142
|
## Tells if it is a reference to a systemI signal.
|
|
146
143
|
def from_systemI?
|
|
@@ -156,10 +153,9 @@ module HDLRuby::Low
|
|
|
156
153
|
end
|
|
157
154
|
|
|
158
155
|
|
|
159
|
-
##
|
|
160
|
-
# Extends RefRange with the capability of finding the object it
|
|
161
|
-
# refered to.
|
|
162
156
|
class RefRange
|
|
157
|
+
## Extends RefRange with the capability of finding the object it
|
|
158
|
+
# refered to.
|
|
163
159
|
|
|
164
160
|
## Tells if it is a reference to a systemI signal.
|
|
165
161
|
def from_systemI?
|
|
@@ -175,10 +171,9 @@ module HDLRuby::Low
|
|
|
175
171
|
end
|
|
176
172
|
|
|
177
173
|
|
|
178
|
-
##
|
|
179
|
-
# Extends RefName with the capability of finding the object it
|
|
180
|
-
# refered to.
|
|
181
174
|
class RefName
|
|
175
|
+
## Extends RefName with the capability of finding the object it
|
|
176
|
+
# refered to.
|
|
182
177
|
|
|
183
178
|
## Tells if it is a reference to a systemI signal.
|
|
184
179
|
def from_systemI?
|