HDLRuby 2.5.1 → 2.6.8

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.
Files changed (46) 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/comparison_bench.rb +40 -0
  6. data/lib/HDLRuby/hdr_samples/constant_in_function.rb +27 -0
  7. data/lib/HDLRuby/hdr_samples/dff_unit.rb +3 -3
  8. data/lib/HDLRuby/hdr_samples/huge_rom.rb +25 -0
  9. data/lib/HDLRuby/hdr_samples/logic_bench.rb +21 -0
  10. data/lib/HDLRuby/hdr_samples/mei8_bench.rb +1 -1
  11. data/lib/HDLRuby/hdr_samples/multi_timed_bench.rb +54 -0
  12. data/lib/HDLRuby/hdr_samples/music.rb +79 -0
  13. data/lib/HDLRuby/hdr_samples/named_sub.rb +42 -0
  14. data/lib/HDLRuby/hdr_samples/rom.rb +16 -0
  15. data/lib/HDLRuby/hdr_samples/type_minmax_bench.rb +37 -0
  16. data/lib/HDLRuby/hdr_samples/with_function_generator.rb +25 -0
  17. data/lib/HDLRuby/hdr_samples/with_to_array.rb +29 -0
  18. data/lib/HDLRuby/hdrcc.rb +69 -9
  19. data/lib/HDLRuby/hruby_decorator.rb +3 -1
  20. data/lib/HDLRuby/hruby_high.rb +220 -29
  21. data/lib/HDLRuby/hruby_low.rb +433 -45
  22. data/lib/HDLRuby/hruby_low2c.rb +122 -168
  23. data/lib/HDLRuby/hruby_low2hdr.rb +738 -0
  24. data/lib/HDLRuby/hruby_low2high.rb +331 -549
  25. data/lib/HDLRuby/hruby_low2vhd.rb +39 -2
  26. data/lib/HDLRuby/hruby_low_bool2select.rb +29 -0
  27. data/lib/HDLRuby/hruby_low_casts_without_expression.rb +27 -0
  28. data/lib/HDLRuby/hruby_low_fix_types.rb +25 -0
  29. data/lib/HDLRuby/hruby_low_mutable.rb +70 -0
  30. data/lib/HDLRuby/hruby_low_resolve.rb +28 -0
  31. data/lib/HDLRuby/hruby_low_without_connection.rb +6 -3
  32. data/lib/HDLRuby/hruby_low_without_namespace.rb +7 -4
  33. data/lib/HDLRuby/hruby_low_without_select.rb +13 -0
  34. data/lib/HDLRuby/hruby_tools.rb +11 -1
  35. data/lib/HDLRuby/hruby_verilog.rb +1572 -1723
  36. data/lib/HDLRuby/sim/hruby_sim.h +45 -5
  37. data/lib/HDLRuby/sim/hruby_sim_calc.c +192 -20
  38. data/lib/HDLRuby/sim/hruby_sim_core.c +24 -9
  39. data/lib/HDLRuby/sim/hruby_sim_vcd.c +7 -3
  40. data/lib/HDLRuby/sim/hruby_sim_vizualize.c +22 -6
  41. data/lib/HDLRuby/std/fixpoint.rb +9 -0
  42. data/lib/HDLRuby/std/function_generator.rb +139 -0
  43. data/lib/HDLRuby/std/hruby_unit.rb +75 -0
  44. data/lib/HDLRuby/version.rb +1 -1
  45. metadata +18 -6
  46. data/lib/HDLRuby/hruby_unit.rb +0 -43
@@ -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