HDLRuby 2.11.7 → 2.11.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a24b730862e801cb34298c05648bf25586a22e0010821e890e05bd31848f3d4
4
- data.tar.gz: a9b88f03c706f758c08cb3438a92f180ad977257f2c5b56e5a40c95bd83f6ea8
3
+ metadata.gz: 25ee3661745db7f26a3656327f17f7f3cdb5482d234ffcd201133a6e6889ad00
4
+ data.tar.gz: 40853bbc900fea15ac74a4bbe5a1cb6743404805d3cbdc159cbd0484136bd41b
5
5
  SHA512:
6
- metadata.gz: 4d7e6d175b79fb2d0702bebebda2ec00042508a303865e06dad98ca999117ec664c7f9cf9db514e95f03802c8b07e5abc06e7b25d329a2d715948ff4333cb8ca
7
- data.tar.gz: 9f9d6b129c9caf9a13165fc54e6158b1dcef292117224690e0066f561e53ea006597fafc9f03585bc82d2868debda933528a5c78eea0621ebb2fbd0794087610
6
+ metadata.gz: 4190fdac56a57319d1a0834efe74a7d84fc7674ff91492b0299a889a5b3a90bf684c05b4848d888a35bc51937218daa7aea1132140536aec5cca7972d9d2e918
7
+ data.tar.gz: 17f63b1cb7793dd7cb0883db14a23730d3ba8d170f7b4092181e7cc0e2252349fa8dc17cabeb71e00dd778dc81048fb14934a8e437694dce5003d4088a5bd9b2
@@ -1111,7 +1111,7 @@ extern Value binary(Value (*oper)(Value,Value,Value));
1111
1111
  * @param num the number of values to select from.
1112
1112
  * @return the destination.
1113
1113
  **/
1114
- extern Value select(unsigned int num);
1114
+ extern Value hselect(unsigned int num);
1115
1115
 
1116
1116
  /** Cast calculation.
1117
1117
  * @param typ the type to cast to.
@@ -108,7 +108,7 @@ Value binary(Value (*oper)(Value,Value,Value)) {
108
108
 
109
109
  /** Selection calculation.
110
110
  * @param num the number of choices to select within. */
111
- Value select(unsigned int num) {
111
+ Value hselect(unsigned int num) {
112
112
  Value* vals = alloca(num*sizeof(Value));
113
113
  int i;
114
114
  /* Get the values to concat from the stack. */
data/lib/HDLRuby/hdrcc.rb CHANGED
@@ -641,23 +641,23 @@ elsif $options[:clang] then
641
641
  # top_system = $top_system
642
642
  # Preprocess the HW description for valid C generation.
643
643
  $top_system.each_systemT_deep do |systemT|
644
- HDLRuby.show "seq2seq step..."
644
+ HDLRuby.show? "seq2seq step..."
645
645
  # Coverts the par blocks in seq blocks to seq blocks to match
646
646
  # the simulation engine.
647
647
  systemT.par_in_seq2seq!
648
- HDLRuby.show "#{Time.now}#{show_mem}"
649
- HDLRuby.show "connections_to_behaviors step..."
648
+ HDLRuby.show? "#{Time.now}#{show_mem}"
649
+ HDLRuby.show? "connections_to_behaviors step..."
650
650
  # Converts the connections to behaviors.
651
651
  systemT.connections_to_behaviors!
652
- HDLRuby.show "#{Time.now}#{show_mem}"
652
+ HDLRuby.show? "#{Time.now}#{show_mem}"
653
653
  # Break the RefConcat.
654
- HDLRuby.show "concat_assigns step..."
654
+ HDLRuby.show? "concat_assigns step..."
655
655
  systemT.break_concat_assigns!
656
- HDLRuby.show "#{Time.now}#{show_mem}"
656
+ HDLRuby.show? "#{Time.now}#{show_mem}"
657
657
  # Explicits the types.
658
- HDLRuby.show "explicit_types step..."
658
+ HDLRuby.show? "explicit_types step..."
659
659
  systemT.explicit_types!
660
- HDLRuby.show "#{Time.now}#{show_mem}"
660
+ HDLRuby.show? "#{Time.now}#{show_mem}"
661
661
  end
662
662
  # Generate the C.
663
663
  if $options[:multiple] then
@@ -788,8 +788,12 @@ elsif $options[:clang] then
788
788
  " Then execute:\n hruby_simulator"
789
789
  end
790
790
  # Use it.
791
+ HDLRuby.show "Compiling C code of the simulator..."
791
792
  Kernel.system("#{cc_cmd} -o3 -o hruby_simulator *.c -lpthread")
793
+ HDLRuby.show "#{Time.now}#{show_mem}"
794
+ HDLRuby.show "Executing the simulator..."
792
795
  Kernel.system("./hruby_simulator")
796
+ HDLRuby.show "#{Time.now}#{show_mem}"
793
797
  end
794
798
  elsif $options[:verilog] then
795
799
  # warn("Verilog HDL output is not available yet... but it will be soon, promise!")
@@ -800,25 +804,25 @@ elsif $options[:verilog] then
800
804
  # HDLRuby.show "casts_without_expression! step..."
801
805
  # systemT.casts_without_expression!
802
806
  # HDLRuby.show Time.now
803
- HDLRuby.show "to_upper_space! step..."
807
+ HDLRuby.show? "to_upper_space! step..."
804
808
  systemT.to_upper_space!
805
- HDLRuby.show "#{Time.now}#{show_mem}"
809
+ HDLRuby.show? "#{Time.now}#{show_mem}"
806
810
  end
807
- HDLRuby.show "to_global_space! step (global)..."
811
+ HDLRuby.show? "to_global_space! step (global)..."
808
812
  $top_system.to_global_systemTs!
809
- HDLRuby.show "#{Time.now}#{show_mem}"
813
+ HDLRuby.show? "#{Time.now}#{show_mem}"
810
814
  $top_system.each_systemT_deep do |systemT|
811
815
  ## systemT.break_types!
812
816
  ## systemT.expand_types!
813
- HDLRuby.show "par_in_seq2seq! step..."
817
+ HDLRuby.show? "par_in_seq2seq! step..."
814
818
  systemT.par_in_seq2seq!
815
- HDLRuby.show "#{Time.now}#{show_mem}"
816
- HDLRuby.show "initial_concat_to_timed! step..."
819
+ HDLRuby.show? "#{Time.now}#{show_mem}"
820
+ HDLRuby.show? "initial_concat_to_timed! step..."
817
821
  systemT.initial_concat_to_timed!
818
- HDLRuby.show "#{Time.now}#{show_mem}"
819
- HDLRuby.show "with_port! step..."
822
+ HDLRuby.show? "#{Time.now}#{show_mem}"
823
+ HDLRuby.show? "with_port! step..."
820
824
  systemT.with_port!
821
- HDLRuby.show "#{Time.now}#{show_mem}"
825
+ HDLRuby.show? "#{Time.now}#{show_mem}"
822
826
  end
823
827
  # # Verilog generation
824
828
  # $output << top_system.to_verilog
@@ -2630,7 +2630,7 @@ module HDLRuby::Low
2630
2630
  end
2631
2631
  # Compute the resulting selection.
2632
2632
  res << (" " * (level*3))
2633
- res << "select(#{expressions.size});\n"
2633
+ res << "hselect(#{expressions.size});\n"
2634
2634
  # Restore the value pool state.
2635
2635
  res << (" " * (level*3)) << "RV;\n"
2636
2636
  return res
@@ -1,3 +1,3 @@
1
1
  module HDLRuby
2
- VERSION = "2.11.7"
2
+ VERSION = "2.11.9"
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.11.7
4
+ version: 2.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lovic Gauthier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2022-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler