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.
- checksums.yaml +4 -4
- data/lib/HDLRuby/hdr_samples/adder.rb +1 -1
- data/lib/HDLRuby/hdr_samples/adder_bench.rb +1 -1
- data/lib/HDLRuby/hdr_samples/adder_gen.rb +1 -1
- data/lib/HDLRuby/hdr_samples/comparison_bench.rb +40 -0
- data/lib/HDLRuby/hdr_samples/constant_in_function.rb +27 -0
- data/lib/HDLRuby/hdr_samples/dff_unit.rb +3 -3
- data/lib/HDLRuby/hdr_samples/huge_rom.rb +25 -0
- data/lib/HDLRuby/hdr_samples/logic_bench.rb +21 -0
- data/lib/HDLRuby/hdr_samples/mei8_bench.rb +1 -1
- data/lib/HDLRuby/hdr_samples/multi_timed_bench.rb +54 -0
- data/lib/HDLRuby/hdr_samples/music.rb +79 -0
- data/lib/HDLRuby/hdr_samples/named_sub.rb +42 -0
- data/lib/HDLRuby/hdr_samples/rom.rb +16 -0
- data/lib/HDLRuby/hdr_samples/type_minmax_bench.rb +37 -0
- data/lib/HDLRuby/hdr_samples/with_function_generator.rb +25 -0
- data/lib/HDLRuby/hdr_samples/with_to_array.rb +29 -0
- data/lib/HDLRuby/hdrcc.rb +69 -9
- data/lib/HDLRuby/hruby_decorator.rb +3 -1
- data/lib/HDLRuby/hruby_high.rb +220 -29
- data/lib/HDLRuby/hruby_low.rb +433 -45
- data/lib/HDLRuby/hruby_low2c.rb +122 -168
- data/lib/HDLRuby/hruby_low2hdr.rb +738 -0
- data/lib/HDLRuby/hruby_low2high.rb +331 -549
- data/lib/HDLRuby/hruby_low2vhd.rb +39 -2
- data/lib/HDLRuby/hruby_low_bool2select.rb +29 -0
- data/lib/HDLRuby/hruby_low_casts_without_expression.rb +27 -0
- data/lib/HDLRuby/hruby_low_fix_types.rb +25 -0
- data/lib/HDLRuby/hruby_low_mutable.rb +70 -0
- data/lib/HDLRuby/hruby_low_resolve.rb +28 -0
- data/lib/HDLRuby/hruby_low_without_connection.rb +6 -3
- data/lib/HDLRuby/hruby_low_without_namespace.rb +7 -4
- data/lib/HDLRuby/hruby_low_without_select.rb +13 -0
- data/lib/HDLRuby/hruby_tools.rb +11 -1
- data/lib/HDLRuby/hruby_verilog.rb +1572 -1723
- data/lib/HDLRuby/sim/hruby_sim.h +45 -5
- data/lib/HDLRuby/sim/hruby_sim_calc.c +192 -20
- data/lib/HDLRuby/sim/hruby_sim_core.c +24 -9
- data/lib/HDLRuby/sim/hruby_sim_vcd.c +7 -3
- data/lib/HDLRuby/sim/hruby_sim_vizualize.c +22 -6
- data/lib/HDLRuby/std/fixpoint.rb +9 -0
- data/lib/HDLRuby/std/function_generator.rb +139 -0
- data/lib/HDLRuby/std/hruby_unit.rb +75 -0
- data/lib/HDLRuby/version.rb +1 -1
- metadata +18 -6
- data/lib/HDLRuby/hruby_unit.rb +0 -43
data/lib/HDLRuby/hruby_unit.rb
DELETED
@@ -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
|