HDLRuby 2.11.12 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.html +3274 -0
  3. data/README.md +660 -128
  4. data/ext/hruby_sim/hruby_sim_calc.c +2 -0
  5. data/lib/HDLRuby/backend/hruby_allocator.rb +2 -2
  6. data/lib/HDLRuby/backend/hruby_c_allocator.rb +7 -7
  7. data/lib/HDLRuby/hdr_samples/constant_in_function.rb +2 -1
  8. data/lib/HDLRuby/hdr_samples/mei8_bench.rb +1 -1
  9. data/lib/HDLRuby/hdr_samples/with_bram.rb +3 -3
  10. data/lib/HDLRuby/hdr_samples/with_bram_frame_stack.rb +105 -0
  11. data/lib/HDLRuby/hdr_samples/with_bram_stack.rb +69 -0
  12. data/lib/HDLRuby/hdr_samples/with_ref_expr.rb +30 -0
  13. data/lib/HDLRuby/hdr_samples/with_sequencer.rb +185 -0
  14. data/lib/HDLRuby/hdr_samples/with_sequencer_deep.rb +91 -0
  15. data/lib/HDLRuby/hdr_samples/with_sequencer_enumerable.rb +439 -0
  16. data/lib/HDLRuby/hdr_samples/with_sequencer_enumerator.rb +89 -0
  17. data/lib/HDLRuby/hdr_samples/with_sequencer_func.rb +63 -0
  18. data/lib/HDLRuby/hdr_samples/with_sequencer_sync.rb +120 -0
  19. data/lib/HDLRuby/hdrcc.rb +16 -3
  20. data/lib/HDLRuby/hdrlib.rb +1 -1
  21. data/lib/HDLRuby/hruby_db.rb +2 -2
  22. data/lib/HDLRuby/hruby_high.rb +61 -25
  23. data/lib/HDLRuby/hruby_high_fullname.rb +3 -1
  24. data/lib/HDLRuby/hruby_low.rb +2 -2
  25. data/lib/HDLRuby/hruby_low2c.rb +58 -43
  26. data/lib/HDLRuby/hruby_low2hdr.rb +66 -40
  27. data/lib/HDLRuby/hruby_low2high.rb +86 -44
  28. data/lib/HDLRuby/hruby_low2seq.rb +26 -18
  29. data/lib/HDLRuby/hruby_low2sym.rb +14 -13
  30. data/lib/HDLRuby/hruby_low2vhd.rb +78 -43
  31. data/lib/HDLRuby/hruby_low_bool2select.rb +61 -46
  32. data/lib/HDLRuby/hruby_low_casts_without_expression.rb +56 -44
  33. data/lib/HDLRuby/hruby_low_cleanup.rb +18 -16
  34. data/lib/HDLRuby/hruby_low_fix_types.rb +64 -32
  35. data/lib/HDLRuby/hruby_low_mutable.rb +53 -118
  36. data/lib/HDLRuby/hruby_low_resolve.rb +26 -31
  37. data/lib/HDLRuby/hruby_low_with_bool.rb +33 -16
  38. data/lib/HDLRuby/hruby_low_with_port.rb +3 -3
  39. data/lib/HDLRuby/hruby_low_with_var.rb +23 -9
  40. data/lib/HDLRuby/hruby_low_without_concat.rb +19 -13
  41. data/lib/HDLRuby/hruby_low_without_namespace.rb +47 -32
  42. data/lib/HDLRuby/hruby_low_without_parinseq.rb +18 -12
  43. data/lib/HDLRuby/hruby_low_without_select.rb +36 -23
  44. data/lib/HDLRuby/hruby_low_without_subsignals.rb +79 -39
  45. data/lib/HDLRuby/hruby_rcsim.rb +79 -64
  46. data/lib/HDLRuby/hruby_rsim.rb +64 -15
  47. data/lib/HDLRuby/hruby_rsim_mute.rb +2 -3
  48. data/lib/HDLRuby/hruby_rsim_vcd.rb +28 -25
  49. data/lib/HDLRuby/hruby_types.rb +5 -5
  50. data/lib/HDLRuby/hruby_values.rb +19 -8
  51. data/lib/HDLRuby/hruby_verilog.rb +191 -65
  52. data/lib/HDLRuby/hruby_verilog_name.rb +49 -42
  53. data/lib/HDLRuby/soft/stacks.rb +219 -0
  54. data/lib/HDLRuby/std/bram.rb +9 -5
  55. data/lib/HDLRuby/std/clocks.rb +1 -1
  56. data/lib/HDLRuby/std/fsm.rb +39 -10
  57. data/lib/HDLRuby/std/sequencer.rb +2085 -0
  58. data/lib/HDLRuby/std/sequencer_func.rb +533 -0
  59. data/lib/HDLRuby/std/sequencer_sync.rb +400 -0
  60. data/lib/HDLRuby/std/std.rb +13 -0
  61. data/lib/HDLRuby/version.rb +1 -1
  62. data/tuto/adder_sat_flags_vcd.png +0 -0
  63. data/tuto/addsub_vcd.png +0 -0
  64. data/tuto/alu_vcd.png +0 -0
  65. data/tuto/bit_pong_vcd.png +0 -0
  66. data/tuto/checksum_vcd.png +0 -0
  67. data/tuto/circuit_hdr.odg +0 -0
  68. data/tuto/circuit_hdr.png +0 -0
  69. data/tuto/circuit_hie.odg +0 -0
  70. data/tuto/circuit_hie.png +0 -0
  71. data/tuto/circuit_view.odg +0 -0
  72. data/tuto/circuit_view.png +0 -0
  73. data/tuto/clock_counter_vcd.png +0 -0
  74. data/tuto/counter_ext_vcd.png +0 -0
  75. data/tuto/fact_vcd.png +0 -0
  76. data/tuto/hw_flow.odg +0 -0
  77. data/tuto/hw_flow.png +0 -0
  78. data/tuto/maxxer_vcd.png +0 -0
  79. data/tuto/pingpong0_vcd.png +0 -0
  80. data/tuto/pingpong1_vcd.png +0 -0
  81. data/tuto/pingpong2_vcd.png +0 -0
  82. data/tuto/ram_vcd.png +0 -0
  83. data/tuto/serializer_vcd.png +0 -0
  84. data/tuto/sw_flow.odg +0 -0
  85. data/tuto/sw_flow.png +0 -0
  86. data/tuto/the_counter_vcd.png +0 -0
  87. data/tuto/tutorial_sw.html +2359 -0
  88. data/tuto/tutorial_sw.md +2890 -0
  89. data/tuto/tutorial_sw.pdf +0 -0
  90. data/tuto/tutorial_sw_jp.md +417 -0
  91. metadata +46 -2
@@ -56,8 +56,8 @@ module HDLRuby::Low
56
56
 
57
57
 
58
58
 
59
- ## Extends the SystemT class with generation of hdr text.
60
59
  class SystemT
60
+ ## Extends the SystemT class with generation of hdr text.
61
61
 
62
62
  # Generates the text of the equivalent hdr text.
63
63
  # +level+ is the hierachical level of the object.
@@ -102,8 +102,8 @@ module HDLRuby::Low
102
102
  end
103
103
 
104
104
 
105
- ## Extends the Scope class with generation of hdr text.
106
105
  class Scope
106
+ ## Extends the Scope class with generation of hdr text.
107
107
 
108
108
  # Generates the text of the equivalent hdr text.
109
109
  # +level+ is the hierachical level of the object and
@@ -166,8 +166,8 @@ module HDLRuby::Low
166
166
  end
167
167
 
168
168
 
169
- ## Extends the Type class with generation of hdr text.
170
169
  class Type
170
+ ## Extends the Type class with generation of hdr text.
171
171
 
172
172
  # Generates the text of the equivalent hdr text.
173
173
  # +level+ is the hierachical level of the object.
@@ -176,8 +176,9 @@ module HDLRuby::Low
176
176
  end
177
177
  end
178
178
 
179
- ## Extends the TypeDef class with generation of hdr text.
179
+
180
180
  class TypeDef
181
+ ## Extends the TypeDef class with generation of hdr text.
181
182
 
182
183
  # Generates the text of the equivalent hdr text.
183
184
  # +level+ is the hierachical level of the object.
@@ -187,8 +188,9 @@ module HDLRuby::Low
187
188
  end
188
189
  end
189
190
 
190
- ## Extends the TypeVector class with generation of hdr text.
191
+
191
192
  class TypeVector
193
+ ## Extends the TypeVector class with generation of hdr text.
192
194
 
193
195
  # Generates the text of the equivalent hdr text.
194
196
  # +level+ is the hierachical level of the object.
@@ -205,8 +207,9 @@ module HDLRuby::Low
205
207
  end
206
208
  end
207
209
 
208
- ## Extends the TypeTuple class with generation of hdr text.
210
+
209
211
  class TypeTuple
212
+ ## Extends the TypeTuple class with generation of hdr text.
210
213
 
211
214
  # Generates the text of the equivalent hdr text.
212
215
  # +level+ is the hierachical level of the object.
@@ -222,8 +225,9 @@ module HDLRuby::Low
222
225
  end
223
226
  end
224
227
 
225
- ## Extends the TypeStruct class with generation of hdr text.
228
+
226
229
  class TypeStruct
230
+ ## Extends the TypeStruct class with generation of hdr text.
227
231
 
228
232
  # Generates the text of the equivalent hdr text.
229
233
  # +level+ is the hierachical level of the object.
@@ -242,8 +246,8 @@ module HDLRuby::Low
242
246
  end
243
247
 
244
248
 
245
- ## Extends the Behavior class with generation of hdr text.
246
249
  class Behavior
250
+ ## Extends the Behavior class with generation of hdr text.
247
251
 
248
252
  # Generates the text of the equivalent hdr text.
249
253
  # +level+ is the hierachical level of the object and +timed+
@@ -274,8 +278,9 @@ module HDLRuby::Low
274
278
  end
275
279
  end
276
280
 
277
- ## Extends the TimeBehavior class with generation of hdr text.
281
+
278
282
  class TimeBehavior
283
+ ## Extends the TimeBehavior class with generation of hdr text.
279
284
 
280
285
  # Generates the text of the equivalent hdr text.
281
286
  # +level+ is the hierachical level of the object.
@@ -285,8 +290,8 @@ module HDLRuby::Low
285
290
  end
286
291
 
287
292
 
288
- ## Extends the Event class with generation of hdr text.
289
293
  class Event
294
+ ## Extends the Event class with generation of hdr text.
290
295
 
291
296
  # Generates the text of the equivalent hdr text.
292
297
  # +level+ is the hierachical level of the object.
@@ -296,8 +301,8 @@ module HDLRuby::Low
296
301
  end
297
302
 
298
303
 
299
- ## Extends the SignalI class with generation of hdr text.
300
304
  class SignalI
305
+ ## Extends the SignalI class with generation of hdr text.
301
306
 
302
307
  # Generates the text of the equivalent hdr text.
303
308
  # +level+ is the hierachical level of the object.
@@ -307,8 +312,8 @@ module HDLRuby::Low
307
312
  end
308
313
 
309
314
 
310
- ## Extends the SystemI class with generation of hdr text.
311
315
  class SystemI
316
+ ## Extends the SystemI class with generation of hdr text.
312
317
 
313
318
  # Generates the text of the equivalent hdr text.
314
319
  # +level+ is the hierachical level of the object.
@@ -319,8 +324,8 @@ module HDLRuby::Low
319
324
  end
320
325
 
321
326
 
322
- ## Extends the Statement class with generation of hdr text.
323
327
  class Statement
328
+ ## Extends the Statement class with generation of hdr text.
324
329
 
325
330
  # Generates the text of the equivalent hdr text.
326
331
  # +level+ is the hierachical level of the object.
@@ -330,8 +335,9 @@ module HDLRuby::Low
330
335
  end
331
336
  end
332
337
 
333
- ## Extends the Transmit class with generation of hdr text.
338
+
334
339
  class Transmit
340
+ ## Extends the Transmit class with generation of hdr text.
335
341
 
336
342
  # Generates the text of the equivalent hdr text.
337
343
  # +level+ is the hierachical level of the object.
@@ -341,9 +347,10 @@ module HDLRuby::Low
341
347
  self.right.to_hdr(level) + "\n"
342
348
  end
343
349
  end
344
-
345
- ## Extends the If class with generation of hdr text.
350
+
351
+
346
352
  class If
353
+ ## Extends the If class with generation of hdr text.
347
354
 
348
355
  # Generates the text of the equivalent hdr text.
349
356
  # +level+ is the hierachical level of the object.
@@ -373,8 +380,9 @@ module HDLRuby::Low
373
380
  end
374
381
  end
375
382
 
376
- ## Extends the When class with generation of hdr text.
383
+
377
384
  class When
385
+ ## Extends the When class with generation of hdr text.
378
386
 
379
387
  # Generates the text of the equivalent hdr text.
380
388
  # +level+ is the hierachical level of the object.
@@ -392,8 +400,9 @@ module HDLRuby::Low
392
400
  end
393
401
  end
394
402
 
395
- ## Extends the Case class with generation of hdr text.
403
+
396
404
  class Case
405
+ ## Extends the Case class with generation of hdr text.
397
406
 
398
407
  # Generates the text of the equivalent hdr text.
399
408
  # +level+ is the hierachical level of the object.
@@ -420,8 +429,8 @@ module HDLRuby::Low
420
429
  end
421
430
 
422
431
 
423
- ## Extends the Delay class with generation of hdr text.
424
432
  class Delay
433
+ ## Extends the Delay class with generation of hdr text.
425
434
 
426
435
  # Generates the text of the equivalent hdr text.
427
436
  # +level+ is the hierachical level of the object.
@@ -431,8 +440,8 @@ module HDLRuby::Low
431
440
  end
432
441
 
433
442
 
434
- ## Extends the TimeWait class with generation of hdr text.
435
443
  class TimeWait
444
+ ## Extends the TimeWait class with generation of hdr text.
436
445
 
437
446
  # Generates the text of the equivalent hdr text.
438
447
  # +level+ is the hierachical level of the object.
@@ -446,8 +455,9 @@ module HDLRuby::Low
446
455
  end
447
456
  end
448
457
 
449
- ## Extends the TimeRepeat class with generation of hdr text.
458
+
450
459
  class TimeRepeat
460
+ ## Extends the TimeRepeat class with generation of hdr text.
451
461
 
452
462
  # Generates the text of the equivalent hdr text.
453
463
  # +level+ is the hierachical level of the object.
@@ -465,8 +475,9 @@ module HDLRuby::Low
465
475
  end
466
476
  end
467
477
 
468
- ## Extends the Block class with generation of hdr text.
478
+
469
479
  class Block
480
+ ## Extends the Block class with generation of hdr text.
470
481
 
471
482
  # Generates the text of the equivalent hdr text.
472
483
  # +level+ is the hierachical level of the object.
@@ -507,8 +518,9 @@ module HDLRuby::Low
507
518
  end
508
519
  end
509
520
 
510
- ## Extends the TimeBlock class with generation of hdr text.
521
+
511
522
  class TimeBlock
523
+ ## Extends the TimeBlock class with generation of hdr text.
512
524
 
513
525
  # Generates the text of the equivalent hdr text.
514
526
  # +level+ is the hierachical level of the object.
@@ -518,8 +530,8 @@ module HDLRuby::Low
518
530
  end
519
531
 
520
532
 
521
- ## Extends the Code class with generation of hdr text.
522
533
  class Code
534
+ ## Extends the Code class with generation of hdr text.
523
535
 
524
536
  # Generates the text of the equivalent hdr text.
525
537
  # +level+ is the hierachical level of the object.
@@ -528,14 +540,15 @@ module HDLRuby::Low
528
540
  end
529
541
  end
530
542
 
531
- ## Extends the Connection class with generation of hdr text.
543
+
532
544
  class Connection
545
+ ## Extends the Connection class with generation of hdr text.
533
546
  # Nothing required, Transmit is generated identically.
534
547
  end
535
548
 
536
549
 
537
- ## Extends the Expression class with generation of hdr text.
538
550
  class Expression
551
+ ## Extends the Expression class with generation of hdr text.
539
552
 
540
553
  # Generates the text of the equivalent hdr text.
541
554
  # +level+ is the hierachical level of the object.
@@ -545,8 +558,9 @@ module HDLRuby::Low
545
558
  end
546
559
  end
547
560
 
548
- ## Extends the Value class with generation of hdr text.
561
+
549
562
  class Value
563
+ ## Extends the Value class with generation of hdr text.
550
564
 
551
565
  # Generates the text of the equivalent hdr text.
552
566
  # +level+ is the hierachical level of the object.
@@ -559,8 +573,9 @@ module HDLRuby::Low
559
573
  end
560
574
  end
561
575
 
562
- ## Extends the Cast class with generation of hdr text.
576
+
563
577
  class Cast
578
+ ## Extends the Cast class with generation of hdr text.
564
579
 
565
580
  # Generates the text of the equivalent hdr text.
566
581
  # +level+ is the hierachical level of the object.
@@ -570,8 +585,9 @@ module HDLRuby::Low
570
585
  end
571
586
  end
572
587
 
573
- ## Extends the Operation class with generation of hdr text.
588
+
574
589
  class Operation
590
+ ## Extends the Operation class with generation of hdr text.
575
591
 
576
592
  # Generates the text of the equivalent hdr text.
577
593
  # +level+ is the hierachical level of the object.
@@ -581,8 +597,9 @@ module HDLRuby::Low
581
597
  end
582
598
  end
583
599
 
584
- ## Extends the Unary class with generation of hdr text.
600
+
585
601
  class Unary
602
+ ## Extends the Unary class with generation of hdr text.
586
603
 
587
604
  # Generates the text of the equivalent hdr text.
588
605
  # +level+ is the hierachical level of the object.
@@ -591,8 +608,9 @@ module HDLRuby::Low
591
608
  end
592
609
  end
593
610
 
594
- ## Extends the Binary class with generation of hdr text.
611
+
595
612
  class Binary
613
+ ## Extends the Binary class with generation of hdr text.
596
614
 
597
615
  # Generates the text of the equivalent hdr text.
598
616
  # +level+ is the hierachical level of the object.
@@ -602,8 +620,9 @@ module HDLRuby::Low
602
620
  end
603
621
  end
604
622
 
605
- ## Extends the Select class with generation of hdr text.
623
+
606
624
  class Select
625
+ ## Extends the Select class with generation of hdr text.
607
626
 
608
627
  # Generates the text of the equivalent hdr text.
609
628
  # +level+ is the hierachical level of the object.
@@ -623,8 +642,9 @@ module HDLRuby::Low
623
642
  end
624
643
  end
625
644
 
626
- ## Extends the Concat class with generation of hdr text.
645
+
627
646
  class Concat
647
+ ## Extends the Concat class with generation of hdr text.
628
648
 
629
649
  # Generates the text of the equivalent hdr text.
630
650
  # +level+ is the hierachical level of the object.
@@ -645,8 +665,8 @@ module HDLRuby::Low
645
665
  end
646
666
 
647
667
 
648
- ## Extends the Ref class with generation of hdr text.
649
668
  class Ref
669
+ ## Extends the Ref class with generation of hdr text.
650
670
 
651
671
  # Generates the text of the equivalent hdr text.
652
672
  # +level+ is the hierachical level of the object.
@@ -656,8 +676,9 @@ module HDLRuby::Low
656
676
  end
657
677
  end
658
678
 
659
- ## Extends the RefConcat class with generation of hdr text.
679
+
660
680
  class RefConcat
681
+ ## Extends the RefConcat class with generation of hdr text.
661
682
 
662
683
  # Generates the text of the equivalent hdr text.
663
684
  # +level+ is the hierachical level of the object.
@@ -677,8 +698,9 @@ module HDLRuby::Low
677
698
  end
678
699
  end
679
700
 
680
- ## Extends the RefIndex class with generation of hdr text.
701
+
681
702
  class RefIndex
703
+ ## Extends the RefIndex class with generation of hdr text.
682
704
 
683
705
  # Generates the text of the equivalent hdr text.
684
706
  # +level+ is the hierachical level of the object.
@@ -687,8 +709,9 @@ module HDLRuby::Low
687
709
  end
688
710
  end
689
711
 
690
- ## Extends the RefRange class with generation of hdr text.
712
+
691
713
  class RefRange
714
+ ## Extends the RefRange class with generation of hdr text.
692
715
 
693
716
  # Generates the text of the equivalent hdr text.
694
717
  # +level+ is the hierachical level of the object.
@@ -698,8 +721,9 @@ module HDLRuby::Low
698
721
  end
699
722
  end
700
723
 
701
- ## Extends the RefName class with generation of hdr text.
724
+
702
725
  class RefName
726
+ ## Extends the RefName class with generation of hdr text.
703
727
 
704
728
  # Generates the text of the equivalent hdr text.
705
729
  # +level+ is the hierachical level of the object.
@@ -715,8 +739,9 @@ module HDLRuby::Low
715
739
  end
716
740
  end
717
741
 
718
- ## Extends the RefThis class with generation of hdr text.
742
+
719
743
  class RefThis
744
+ ## Extends the RefThis class with generation of hdr text.
720
745
 
721
746
  # Generates the text of the equivalent hdr text.
722
747
  # +level+ is the hierachical level of the object.
@@ -725,8 +750,9 @@ module HDLRuby::Low
725
750
  end
726
751
  end
727
752
 
728
- ## Extends the Numeric class with generation of hdr text.
753
+
729
754
  class ::Numeric
755
+ ## Extends the Numeric class with generation of hdr text.
730
756
 
731
757
  # Generates the text of the equivalent hdr text.
732
758
  # +level+ is the hierachical level of the object.