HDLRuby 2.11.12 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.html +3274 -0
  3. data/README.md +556 -84
  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/mei8_bench.rb +1 -1
  8. data/lib/HDLRuby/hdr_samples/with_bram.rb +3 -3
  9. data/lib/HDLRuby/hdr_samples/with_bram_frame_stack.rb +105 -0
  10. data/lib/HDLRuby/hdr_samples/with_bram_stack.rb +69 -0
  11. data/lib/HDLRuby/hdr_samples/with_register_stack.rb +150 -0
  12. data/lib/HDLRuby/hdr_samples/with_sequencer.rb +190 -0
  13. data/lib/HDLRuby/hdr_samples/with_sequencer_deep.rb +91 -0
  14. data/lib/HDLRuby/hdr_samples/with_sequencer_enumerable.rb +405 -0
  15. data/lib/HDLRuby/hdr_samples/with_sequencer_enumerator.rb +89 -0
  16. data/lib/HDLRuby/hdr_samples/with_sequencer_sync.rb +120 -0
  17. data/lib/HDLRuby/hdrcc.rb +15 -2
  18. data/lib/HDLRuby/hdrlib.rb +1 -1
  19. data/lib/HDLRuby/hruby_db.rb +2 -2
  20. data/lib/HDLRuby/hruby_high.rb +38 -20
  21. data/lib/HDLRuby/hruby_high_fullname.rb +3 -1
  22. data/lib/HDLRuby/hruby_low.rb +2 -2
  23. data/lib/HDLRuby/hruby_low2c.rb +58 -43
  24. data/lib/HDLRuby/hruby_low2hdr.rb +66 -40
  25. data/lib/HDLRuby/hruby_low2high.rb +86 -44
  26. data/lib/HDLRuby/hruby_low2seq.rb +26 -18
  27. data/lib/HDLRuby/hruby_low2sym.rb +14 -13
  28. data/lib/HDLRuby/hruby_low2vhd.rb +78 -43
  29. data/lib/HDLRuby/hruby_low_bool2select.rb +61 -46
  30. data/lib/HDLRuby/hruby_low_casts_without_expression.rb +56 -44
  31. data/lib/HDLRuby/hruby_low_cleanup.rb +18 -16
  32. data/lib/HDLRuby/hruby_low_fix_types.rb +64 -32
  33. data/lib/HDLRuby/hruby_low_mutable.rb +53 -118
  34. data/lib/HDLRuby/hruby_low_resolve.rb +26 -31
  35. data/lib/HDLRuby/hruby_low_with_bool.rb +33 -16
  36. data/lib/HDLRuby/hruby_low_with_port.rb +3 -3
  37. data/lib/HDLRuby/hruby_low_with_var.rb +23 -9
  38. data/lib/HDLRuby/hruby_low_without_concat.rb +19 -13
  39. data/lib/HDLRuby/hruby_low_without_namespace.rb +47 -32
  40. data/lib/HDLRuby/hruby_low_without_parinseq.rb +18 -12
  41. data/lib/HDLRuby/hruby_low_without_select.rb +36 -23
  42. data/lib/HDLRuby/hruby_low_without_subsignals.rb +29 -28
  43. data/lib/HDLRuby/hruby_rcsim.rb +79 -64
  44. data/lib/HDLRuby/hruby_rsim.rb +64 -15
  45. data/lib/HDLRuby/hruby_rsim_mute.rb +2 -3
  46. data/lib/HDLRuby/hruby_rsim_vcd.rb +28 -25
  47. data/lib/HDLRuby/hruby_values.rb +13 -2
  48. data/lib/HDLRuby/hruby_verilog.rb +90 -48
  49. data/lib/HDLRuby/soft/stacks.rb +219 -0
  50. data/lib/HDLRuby/std/bram.rb +9 -5
  51. data/lib/HDLRuby/std/clocks.rb +1 -1
  52. data/lib/HDLRuby/std/fsm.rb +29 -9
  53. data/lib/HDLRuby/std/sequencer.rb +1857 -0
  54. data/lib/HDLRuby/std/sequencer_sync.rb +400 -0
  55. data/lib/HDLRuby/std/std.rb +12 -0
  56. data/lib/HDLRuby/version.rb +1 -1
  57. data/tuto/adder_sat_flags_vcd.png +0 -0
  58. data/tuto/addsub_vcd.png +0 -0
  59. data/tuto/alu_vcd.png +0 -0
  60. data/tuto/bit_pong_vcd.png +0 -0
  61. data/tuto/checksum_vcd.png +0 -0
  62. data/tuto/circuit_hdr.odg +0 -0
  63. data/tuto/circuit_hdr.png +0 -0
  64. data/tuto/circuit_hie.odg +0 -0
  65. data/tuto/circuit_hie.png +0 -0
  66. data/tuto/circuit_view.odg +0 -0
  67. data/tuto/circuit_view.png +0 -0
  68. data/tuto/clock_counter_vcd.png +0 -0
  69. data/tuto/counter_ext_vcd.png +0 -0
  70. data/tuto/fact_vcd.png +0 -0
  71. data/tuto/hw_flow.odg +0 -0
  72. data/tuto/hw_flow.png +0 -0
  73. data/tuto/maxxer_vcd.png +0 -0
  74. data/tuto/pingpong0_vcd.png +0 -0
  75. data/tuto/pingpong1_vcd.png +0 -0
  76. data/tuto/pingpong2_vcd.png +0 -0
  77. data/tuto/ram_vcd.png +0 -0
  78. data/tuto/serializer_vcd.png +0 -0
  79. data/tuto/sw_flow.odg +0 -0
  80. data/tuto/sw_flow.png +0 -0
  81. data/tuto/the_counter_vcd.png +0 -0
  82. data/tuto/tutorial_sw.html +2359 -0
  83. data/tuto/tutorial_sw.md +2684 -0
  84. data/tuto/tutorial_sw.pdf +0 -0
  85. data/tuto/tutorial_sw_jp.md +417 -0
  86. metadata +44 -2
@@ -52,9 +52,9 @@ module HDLRuby::Low
52
52
  end
53
53
 
54
54
 
55
- ## Extends the SystemT class with functionality for converting select
56
- # expressions to case statements.
57
55
  class SystemT
56
+ ## Extends the SystemT class with functionality for converting select
57
+ # expressions to case statements.
58
58
 
59
59
  # Converts the Select expressions to Case statements.
60
60
  def select2case!
@@ -63,9 +63,10 @@ module HDLRuby::Low
63
63
 
64
64
  end
65
65
 
66
+
67
+ class Scope
66
68
  ## Extends the Scope class with functionality for converting select
67
69
  # expressions to case statements.
68
- class Scope
69
70
 
70
71
  # Converts the Select expressions to Case statements.
71
72
  def select2case!
@@ -98,9 +99,10 @@ module HDLRuby::Low
98
99
  end
99
100
 
100
101
 
101
- ## Extends the TimeWait class with functionality for converting booleans
102
- # in assignments to select operators.
103
102
  class TimeWait
103
+ ## Extends the TimeWait class with functionality for converting booleans
104
+ # in assignments to select operators.
105
+
104
106
  # Extract the Select expressions.
105
107
  def extract_selects!
106
108
  # Nothing to extract.
@@ -109,9 +111,10 @@ module HDLRuby::Low
109
111
  end
110
112
 
111
113
 
112
- ## Extends the TimeRepeat class with functionality for converting booleans
113
- # in assignments to select operators.
114
114
  class TimeRepeat
115
+ ## Extends the TimeRepeat class with functionality for converting
116
+ # booleans in assignments to select operators.
117
+
115
118
  # Extract the Select expressions.
116
119
  def extract_selects!
117
120
  # Simply recruse on the statement.
@@ -124,9 +127,9 @@ module HDLRuby::Low
124
127
  end
125
128
 
126
129
 
127
- ## Extends the Block class with functionality for converting select
128
- # expressions to case statements.
129
130
  class Block
131
+ ## Extends the Block class with functionality for converting select
132
+ # expressions to case statements.
130
133
 
131
134
  # Breaks the assignments to concats.
132
135
  #
@@ -151,9 +154,11 @@ module HDLRuby::Low
151
154
  end
152
155
  end
153
156
 
154
- ## Extends the Transmit class with functionality for converting select
155
- # expressions to case statements.
157
+
156
158
  class Transmit
159
+ ## Extends the Transmit class with functionality for converting select
160
+ # expressions to case statements.
161
+
157
162
  # Extract the Select expressions.
158
163
  def extract_selects!
159
164
  selects = []
@@ -163,9 +168,11 @@ module HDLRuby::Low
163
168
  end
164
169
  end
165
170
 
166
- ## Extends the Print class with functionality for converting select
167
- # expressions to case statements.
171
+
168
172
  class Print
173
+ ## Extends the Print class with functionality for converting select
174
+ # expressions to case statements.
175
+
169
176
  # Extract the Select expressions.
170
177
  def extract_selects!
171
178
  selects = []
@@ -176,19 +183,22 @@ module HDLRuby::Low
176
183
  end
177
184
  end
178
185
 
179
- ## Extends the TimeTerminate class with functionality for converting select
180
- # expressions to case statements.
186
+
181
187
  class TimeTerminate
188
+ ## Extends the TimeTerminate class with functionality for converting
189
+ # select expressions to case statements.
190
+
182
191
  # Extract the Select expressions.
183
192
  def extract_selects!
184
193
  # Nothing to extract.
185
194
  return []
186
195
  end
187
196
  end
197
+
188
198
 
189
- ## Extends the If class with functionality for converting select
190
- # expressions to case statements.
191
199
  class If
200
+ ## Extends the If class with functionality for converting select
201
+ # expressions to case statements.
192
202
 
193
203
  # Extract the Select expressions.
194
204
  #
@@ -200,9 +210,10 @@ module HDLRuby::Low
200
210
  end
201
211
  end
202
212
 
203
- ## Extends the If class with functionality for converting select
204
- # expressions to case statements.
213
+
205
214
  class When
215
+ ## Extends the If class with functionality for converting select
216
+ # expressions to case statements.
206
217
 
207
218
  # Extract the Select expressions.
208
219
  #
@@ -214,9 +225,10 @@ module HDLRuby::Low
214
225
  end
215
226
  end
216
227
 
217
- ## Extends the Case class with functionality for converting select
218
- # expressions to case statements.
228
+
219
229
  class Case
230
+ ## Extends the Case class with functionality for converting select
231
+ # expressions to case statements.
220
232
 
221
233
  # Extract the Select expressions.
222
234
  #
@@ -231,9 +243,10 @@ module HDLRuby::Low
231
243
  end
232
244
  end
233
245
 
234
- ## Extends the Expression class with functionality for converting select
235
- # expressions to ase statements.
246
+
236
247
  class Expression
248
+ ## Extends the Expression class with functionality for converting select
249
+ # expressions to ase statements.
237
250
 
238
251
  # Extract the Select expressions and put them into +selects+
239
252
  def extract_selects_to!(selects)
@@ -12,10 +12,11 @@ module HDLRuby::Low
12
12
  # Makes handling by some synthesis tools easier.
13
13
  #
14
14
  ########################################################################
15
+
15
16
 
16
- ## Extends the SystemT class with functionality for decomposing the
17
- # hierachical signals in the statements.
18
17
  class SystemT
18
+ ## Extends the SystemT class with functionality for decomposing the
19
+ # hierachical signals in the statements.
19
20
 
20
21
  # Decompose the hierarchical signals in the statements.
21
22
  def signal2subs!
@@ -24,9 +25,9 @@ module HDLRuby::Low
24
25
  end
25
26
 
26
27
 
27
- ## Extends the Scope class with functionality for decomposing the
28
- # hierachical signals in the statements.
29
28
  class Scope
29
+ ## Extends the Scope class with functionality for decomposing the
30
+ # hierachical signals in the statements.
30
31
 
31
32
  # Decompose the hierarchical signals in the statements.
32
33
  def signal2subs!
@@ -49,9 +50,9 @@ module HDLRuby::Low
49
50
  end
50
51
 
51
52
 
52
- ## Extends the Behavior class with functionality for decomposing the
53
- # hierachical signals in the statements.
54
53
  class Behavior
54
+ ## Extends the Behavior class with functionality for decomposing the
55
+ # hierachical signals in the statements.
55
56
 
56
57
  # Decompose the hierarchical signals in the statements.
57
58
  def signal2subs!
@@ -74,9 +75,9 @@ module HDLRuby::Low
74
75
  end
75
76
 
76
77
 
77
- ## Extends the Block class with functionality for decomposing the
78
- # hierachical signals in the statements.
79
78
  class Block
79
+ ## Extends the Block class with functionality for decomposing the
80
+ # hierachical signals in the statements.
80
81
 
81
82
  # Decompose the hierarchical signals in the statements.
82
83
  def signal2subs!
@@ -89,9 +90,9 @@ module HDLRuby::Low
89
90
  end
90
91
 
91
92
 
92
- ## Extends the TimeWait class with functionality for decomposing the
93
- # hierachical signals in the statements.
94
93
  class TimeWait
94
+ ## Extends the TimeWait class with functionality for decomposing the
95
+ # hierachical signals in the statements.
95
96
 
96
97
  # Decompose the hierarchical signals in the statements.
97
98
  def signal2subs!
@@ -101,9 +102,9 @@ module HDLRuby::Low
101
102
  end
102
103
 
103
104
 
104
- ## Extends the TimeRepeat class with functionality for decomposing the
105
- # hierachical signals in the statements.
106
105
  class TimeRepeat
106
+ ## Extends the TimeRepeat class with functionality for decomposing the
107
+ # hierachical signals in the statements.
107
108
 
108
109
  # Decompose the hierarchical signals in the statements.
109
110
  def signal2subs!
@@ -114,9 +115,9 @@ module HDLRuby::Low
114
115
  end
115
116
 
116
117
 
117
- ## Extends the Transmit class with functionality for decomposing the
118
- # hierachical signals in the statements.
119
118
  class Transmit
119
+ ## Extends the Transmit class with functionality for decomposing the
120
+ # hierachical signals in the statements.
120
121
 
121
122
  # Decompose the hierarchical signals in the statements.
122
123
  def signal2subs!
@@ -128,9 +129,9 @@ module HDLRuby::Low
128
129
  end
129
130
 
130
131
 
131
- ## Extends the Print class with functionality for decomposing the
132
- # hierachical signals in the statements.
133
132
  class Print
133
+ ## Extends the Print class with functionality for decomposing the
134
+ # hierachical signals in the statements.
134
135
 
135
136
  # Decompose the hierarchical signals in the statements.
136
137
  def signal2subs!
@@ -141,9 +142,9 @@ module HDLRuby::Low
141
142
  end
142
143
 
143
144
 
144
- ## Extends the Print class with functionality for decomposing the
145
- # hierachical signals in the statements.
146
145
  class TimeTerminate
146
+ ## Extends the Print class with functionality for decomposing the
147
+ # hierachical signals in the statements.
147
148
 
148
149
  # Decompose the hierarchical signals in the statements.
149
150
  def signal2subs!
@@ -153,9 +154,9 @@ module HDLRuby::Low
153
154
  end
154
155
 
155
156
 
156
- ## Extends the If class with functionality for decomposing the
157
- # hierachical signals in the statements.
158
157
  class If
158
+ ## Extends the If class with functionality for decomposing the
159
+ # hierachical signals in the statements.
159
160
 
160
161
  # Decompose the hierarchical signals in the statements.
161
162
  def signal2subs!
@@ -174,9 +175,9 @@ module HDLRuby::Low
174
175
  end
175
176
 
176
177
 
177
- ## Extends the When class with functionality for decomposing the
178
- # hierachical signals in the statements.
179
178
  class When
179
+ ## Extends the When class with functionality for decomposing the
180
+ # hierachical signals in the statements.
180
181
 
181
182
  # Decompose the hierarchical signals in the statements.
182
183
  def signal2subs!
@@ -190,9 +191,9 @@ module HDLRuby::Low
190
191
  end
191
192
 
192
193
 
193
- ## Extends the Case class with functionality for decomposing the
194
- # hierachical signals in the statements.
195
194
  class Case
195
+ ## Extends the Case class with functionality for decomposing the
196
+ # hierachical signals in the statements.
196
197
 
197
198
  # Decompose the hierarchical signals in the statements.
198
199
  def signal2subs!
@@ -207,9 +208,9 @@ module HDLRuby::Low
207
208
  end
208
209
 
209
210
 
210
- ## Extends the Expression class with functionality for decomposing the
211
- # hierachical signals in the statements.
212
211
  class Expression
212
+ ## Extends the Expression class with functionality for decomposing the
213
+ # hierachical signals in the statements.
213
214
 
214
215
  # Decompose the hierarchical signals in the statements.
215
216
  def signal2subs!
@@ -221,9 +222,9 @@ module HDLRuby::Low
221
222
  end
222
223
 
223
224
 
224
- ## Extends the RefName class with functionality for decomposing the
225
- # hierachical signals in the statements.
226
225
  class RefName
226
+ ## Extends the RefName class with functionality for decomposing the
227
+ # hierachical signals in the statements.
227
228
 
228
229
  # Flatten a reference to a list of reference to leaf signals
229
230
  # from signal +sig+ and add to result to +subrefs+