HDLRuby 2.5.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/HDLRuby/hdr_samples/adder.rb +1 -1
  3. data/lib/HDLRuby/hdr_samples/adder_bench.rb +1 -1
  4. data/lib/HDLRuby/hdr_samples/adder_gen.rb +1 -1
  5. data/lib/HDLRuby/hdr_samples/constant_in_function.rb +27 -0
  6. data/lib/HDLRuby/hdr_samples/dff_unit.rb +3 -3
  7. data/lib/HDLRuby/hdr_samples/huge_rom.rb +25 -0
  8. data/lib/HDLRuby/hdr_samples/logic_bench.rb +21 -0
  9. data/lib/HDLRuby/hdr_samples/mei8_bench.rb +1 -1
  10. data/lib/HDLRuby/hdr_samples/music.rb +79 -0
  11. data/lib/HDLRuby/hdr_samples/named_sub.rb +42 -0
  12. data/lib/HDLRuby/hdr_samples/rom.rb +16 -0
  13. data/lib/HDLRuby/hdr_samples/with_function_generator.rb +25 -0
  14. data/lib/HDLRuby/hdrcc.rb +41 -7
  15. data/lib/HDLRuby/hruby_decorator.rb +3 -1
  16. data/lib/HDLRuby/hruby_high.rb +214 -26
  17. data/lib/HDLRuby/hruby_low.rb +402 -45
  18. data/lib/HDLRuby/hruby_low2c.rb +122 -168
  19. data/lib/HDLRuby/hruby_low2hdr.rb +738 -0
  20. data/lib/HDLRuby/hruby_low2high.rb +331 -549
  21. data/lib/HDLRuby/hruby_low2vhd.rb +39 -2
  22. data/lib/HDLRuby/hruby_low_bool2select.rb +29 -0
  23. data/lib/HDLRuby/hruby_low_casts_without_expression.rb +27 -0
  24. data/lib/HDLRuby/hruby_low_fix_types.rb +25 -0
  25. data/lib/HDLRuby/hruby_low_mutable.rb +70 -0
  26. data/lib/HDLRuby/hruby_low_resolve.rb +28 -0
  27. data/lib/HDLRuby/hruby_low_without_connection.rb +6 -3
  28. data/lib/HDLRuby/hruby_low_without_namespace.rb +7 -4
  29. data/lib/HDLRuby/hruby_low_without_select.rb +13 -0
  30. data/lib/HDLRuby/hruby_tools.rb +11 -1
  31. data/lib/HDLRuby/hruby_verilog.rb +1572 -1723
  32. data/lib/HDLRuby/sim/hruby_sim.h +25 -2
  33. data/lib/HDLRuby/sim/hruby_sim_calc.c +63 -6
  34. data/lib/HDLRuby/sim/hruby_sim_vcd.c +5 -1
  35. data/lib/HDLRuby/sim/hruby_sim_vizualize.c +22 -6
  36. data/lib/HDLRuby/std/fixpoint.rb +9 -0
  37. data/lib/HDLRuby/std/function_generator.rb +139 -0
  38. data/lib/HDLRuby/std/hruby_unit.rb +75 -0
  39. data/lib/HDLRuby/version.rb +1 -1
  40. metadata +14 -6
  41. data/lib/HDLRuby/hruby_unit.rb +0 -43
@@ -1,3 +1,3 @@
1
1
  module HDLRuby
2
- VERSION = "2.5.1"
2
+ VERSION = "2.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: HDLRuby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lovic Gauthier
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-16 00:00:00.000000000 Z
11
+ date: 2021-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,15 +83,18 @@ files:
83
83
  - lib/HDLRuby/hdr_samples/alu.rb
84
84
  - lib/HDLRuby/hdr_samples/bstr_bench.rb
85
85
  - lib/HDLRuby/hdr_samples/calculator.rb
86
+ - lib/HDLRuby/hdr_samples/constant_in_function.rb
86
87
  - lib/HDLRuby/hdr_samples/counter_bench.rb
87
88
  - lib/HDLRuby/hdr_samples/dff.rb
88
89
  - lib/HDLRuby/hdr_samples/dff_bench.rb
89
90
  - lib/HDLRuby/hdr_samples/dff_counter.rb
90
91
  - lib/HDLRuby/hdr_samples/dff_properties.rb
91
92
  - lib/HDLRuby/hdr_samples/dff_unit.rb
93
+ - lib/HDLRuby/hdr_samples/huge_rom.rb
92
94
  - lib/HDLRuby/hdr_samples/include.rb
93
95
  - lib/HDLRuby/hdr_samples/instance_open.rb
94
96
  - lib/HDLRuby/hdr_samples/linear_test.rb
97
+ - lib/HDLRuby/hdr_samples/logic_bench.rb
95
98
  - lib/HDLRuby/hdr_samples/make_multi_channels_v.rb
96
99
  - lib/HDLRuby/hdr_samples/make_multi_channels_vcd.rb
97
100
  - lib/HDLRuby/hdr_samples/mei8.rb
@@ -99,6 +102,8 @@ files:
99
102
  - lib/HDLRuby/hdr_samples/memory_test.rb
100
103
  - lib/HDLRuby/hdr_samples/multer_gen.rb
101
104
  - lib/HDLRuby/hdr_samples/multer_seq.rb
105
+ - lib/HDLRuby/hdr_samples/music.rb
106
+ - lib/HDLRuby/hdr_samples/named_sub.rb
102
107
  - lib/HDLRuby/hdr_samples/neg_arith_bench.rb
103
108
  - lib/HDLRuby/hdr_samples/neural/a.rb
104
109
  - lib/HDLRuby/hdr_samples/neural/a_sub.rb
@@ -135,6 +140,7 @@ files:
135
140
  - lib/HDLRuby/hdr_samples/with_decoder.rb
136
141
  - lib/HDLRuby/hdr_samples/with_fixpoint.rb
137
142
  - lib/HDLRuby/hdr_samples/with_fsm.rb
143
+ - lib/HDLRuby/hdr_samples/with_function_generator.rb
138
144
  - lib/HDLRuby/hdr_samples/with_linear.rb
139
145
  - lib/HDLRuby/hdr_samples/with_loop.rb
140
146
  - lib/HDLRuby/hdr_samples/with_memory.rb
@@ -208,6 +214,7 @@ files:
208
214
  - lib/HDLRuby/hruby_high.rb
209
215
  - lib/HDLRuby/hruby_low.rb
210
216
  - lib/HDLRuby/hruby_low2c.rb
217
+ - lib/HDLRuby/hruby_low2hdr.rb
211
218
  - lib/HDLRuby/hruby_low2high.rb
212
219
  - lib/HDLRuby/hruby_low2seq.rb
213
220
  - lib/HDLRuby/hruby_low2sym.rb
@@ -232,7 +239,6 @@ files:
232
239
  - lib/HDLRuby/hruby_serializer.rb
233
240
  - lib/HDLRuby/hruby_tools.rb
234
241
  - lib/HDLRuby/hruby_types.rb
235
- - lib/HDLRuby/hruby_unit.rb
236
242
  - lib/HDLRuby/hruby_values.rb
237
243
  - lib/HDLRuby/hruby_verilog.rb
238
244
  - lib/HDLRuby/hruby_verilog_name.rb
@@ -293,6 +299,8 @@ files:
293
299
  - lib/HDLRuby/std/decoder.rb
294
300
  - lib/HDLRuby/std/fixpoint.rb
295
301
  - lib/HDLRuby/std/fsm.rb
302
+ - lib/HDLRuby/std/function_generator.rb
303
+ - lib/HDLRuby/std/hruby_unit.rb
296
304
  - lib/HDLRuby/std/linear.rb
297
305
  - lib/HDLRuby/std/loop.rb
298
306
  - lib/HDLRuby/std/memory.rb
@@ -315,7 +323,7 @@ homepage: https://github.com/civol/HDLRuby
315
323
  licenses:
316
324
  - MIT
317
325
  metadata: {}
318
- post_install_message:
326
+ post_install_message:
319
327
  rdoc_options: []
320
328
  require_paths:
321
329
  - lib
@@ -332,7 +340,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
340
  version: '0'
333
341
  requirements: []
334
342
  rubygems_version: 3.0.8
335
- signing_key:
343
+ signing_key:
336
344
  specification_version: 4
337
345
  summary: HDLRuby is a library for describing and simulating digital electronic systems.
338
346
  test_files: []
@@ -1,43 +0,0 @@
1
- require "HDLRuby/hruby_high"
2
-
3
-
4
-
5
- ##
6
- # Library for building unit test systems.
7
- #
8
- ########################################################################
9
- module HDLRuby::Unit
10
-
11
- ## The HDLRuby unit test error class.
12
- class UnitError < ::StandardError
13
- end
14
-
15
- # The set of the unit systems by name.
16
- @@unit_systems = {}
17
-
18
- # Declares system +name+ for unit testing.
19
- # The system is built by executing +ruby_block+.
20
- #
21
- # NOTE: the name of the system is not registered within the HDLRuby
22
- # namespace since it is not meant to be used directly.
23
- def self.system(name,&ruby_block)
24
- # Ensure name is a symbol.
25
- name = name.to_s.to_sym
26
- # Check if the name is already used or not.
27
- if @@unit_systems.key?(name) then
28
- raise UnitError, "Unit test system #{name} already declared."
29
- end
30
- @@unit_systems[name] = HDLRuby::High.system(&ruby_block)
31
- end
32
-
33
-
34
- # Create a system named +test_name+ executing all the unit tests.
35
- def self.test(test_name = "test")
36
- # Declare the system.
37
- HDLRuby::High.system test_name do
38
- @@unit_systems.each do |name,sys|
39
- sys.instantiate(name)
40
- end
41
- end
42
- end
43
- end