HDLRuby 2.11.12 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.html +3274 -0
- data/README.md +556 -84
- 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/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_register_stack.rb +150 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer.rb +190 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_deep.rb +91 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_enumerable.rb +405 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_enumerator.rb +89 -0
- data/lib/HDLRuby/hdr_samples/with_sequencer_sync.rb +120 -0
- data/lib/HDLRuby/hdrcc.rb +15 -2
- data/lib/HDLRuby/hdrlib.rb +1 -1
- data/lib/HDLRuby/hruby_db.rb +2 -2
- data/lib/HDLRuby/hruby_high.rb +38 -20
- 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 +29 -28
- 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_values.rb +13 -2
- data/lib/HDLRuby/hruby_verilog.rb +90 -48
- 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 +29 -9
- data/lib/HDLRuby/std/sequencer.rb +1857 -0
- data/lib/HDLRuby/std/sequencer_sync.rb +400 -0
- data/lib/HDLRuby/std/std.rb +12 -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 +2684 -0
- data/tuto/tutorial_sw.pdf +0 -0
- data/tuto/tutorial_sw_jp.md +417 -0
- 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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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+
|