HDLRuby 2.3.4 → 2.3.5

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: b9bca5842e518422f5e7b7edb864a8eae5955df19238cd9582a776d4ef6c7a1e
4
- data.tar.gz: 6c094ebf5d69c8dbf57ddd800eca16aca88b4bc324db11eecac3f15569b633e3
3
+ metadata.gz: 641fb6b2455f562967e1dd6d19ff944ed59e6f1e6a4e692c3dbd236af75ea3b6
4
+ data.tar.gz: 7238f3492e48352e20d4b1a321d9087d25c32b95900c6542e314d941a7a9ff42
5
5
  SHA512:
6
- metadata.gz: f01e2f703bcade0db355c42e78267205ca3662c8b30589c5676eab6acaf334fac2a86205b600122e50f11eef3e6a17182dacb59b9a7821c3fa9d7aed90ebd6b7
7
- data.tar.gz: 5c3b80eddb70a3f25f2941bc26c8e95a8f3a30f5020cb17d6a4a199678aacaab4ce0c5c4ffcd347c23b53bd86fb15d58392818673e57ca3d108aec0c5b062ed0
6
+ metadata.gz: 15d0cfd9c1ad51076854eb39bce2b2dceee053b242350b7c1745d727e69bed0ced9d38f717252fb2a4bd971de5c6e3c804536212ccc6ac98936b716f574048e2
7
+ data.tar.gz: 10b6326d21c30106d922eb23f8c9da3849b56bf3cac0b186e21f1c427ebb664fab128aba7d961b53af6e558d861ed2a75ce7777c9fa54f778bd3d23e2ba697f4
@@ -1263,7 +1263,8 @@ module HDLRuby::High
1263
1263
  # Converts the scope to HDLRuby::Low.
1264
1264
  def to_low()
1265
1265
  # Create the resulting low scope.
1266
- scopeLow = HDLRuby::Low::Scope.new()
1266
+ # scopeLow = HDLRuby::Low::Scope.new()
1267
+ scopeLow = HDLRuby::Low::Scope.new(self.name)
1267
1268
  # Push the private namespace for the low generation.
1268
1269
  High.space_push(@namespace)
1269
1270
  # Pushes on the name stack for converting the internals of
@@ -1858,7 +1859,8 @@ module HDLRuby::High
1858
1859
  def function(name, &ruby_block)
1859
1860
  if HDLRuby::High.in_system? then
1860
1861
  define_singleton_method(name.to_sym) do |*args,&other_block|
1861
- sub do
1862
+ # sub do
1863
+ sub(HDLRuby.uniq_name(name)) do
1862
1864
  HDLRuby::High.top_user.instance_exec(*args,*other_block,
1863
1865
  &ruby_block)
1864
1866
  # ruby_block.call(*args)
@@ -1866,7 +1868,8 @@ module HDLRuby::High
1866
1868
  end
1867
1869
  else
1868
1870
  define_method(name.to_sym) do |*args,&other_block|
1869
- sub do
1871
+ # sub do
1872
+ sub(HDLRuby.uniq_name(name)) do
1870
1873
  HDLRuby::High.top_user.instance_exec(*args,*other_block,
1871
1874
  &ruby_block)
1872
1875
  end
@@ -13,9 +13,9 @@ module HDLRuby
13
13
  @@absoluteCounter = -1 # The absolute name counter.
14
14
 
15
15
  # Generates an absolute uniq name.
16
- def self.uniq_name
16
+ def self.uniq_name(base = "")
17
17
  @@absoluteCounter += 1
18
- name = ":#{@@absoluteCounter}"
18
+ name = base.to_s + ":#{@@absoluteCounter}"
19
19
  if Symbol.all_symbols.find {|symbol| symbol.to_s == name } then
20
20
  # The symbol exists, try again.
21
21
  return self.uniq_name
@@ -45,8 +45,10 @@ module HDLRuby::High::Std
45
45
  # Generates the channels.
46
46
  channelI = nil
47
47
  args.each do |nameI|
48
- channelI = ChannelI.new(name,&@ruby_block)
49
- HDLRuby::High.space_reg(nameI) { channelI }
48
+ # puts "nameI=#{nameI}"
49
+ channelI = ChannelI.new(nameI,&@ruby_block)
50
+ # Already registered!
51
+ # HDLRuby::High.space_reg(nameI) { channelI }
50
52
  end
51
53
  channelI
52
54
  end
@@ -350,9 +352,11 @@ module HDLRuby::High::Std
350
352
  def initialize(name,&ruby_block)
351
353
  # Check and set the name of the channel.
352
354
  @name = name.to_sym
355
+ # puts "my name is #{self.name}"
353
356
  # Generate a name for the scope containing the signals of
354
357
  # the channel.
355
- @scope_name = HDLRuby.uniq_name
358
+ # @scope_name = HDLRuby.uniq_name
359
+ @scope_name = HDLRuby.uniq_name(name)
356
360
 
357
361
  # # Sets the scope.
358
362
  # @scope = HDLRuby::High.cur_scope
@@ -635,6 +639,7 @@ module HDLRuby::High::Std
635
639
  # Alternatively, a ready channel instance can be passed as argument
636
640
  # as +channelI+.
637
641
  def brancher(name,channelI = nil,&ruby_block)
642
+ # puts "self.name=#{self.name} and name=#{name}"
638
643
  # Ensure name is a symbol.
639
644
  name = name.to_s unless name.respond_to?(:to_sym)
640
645
  name = name.to_sym
@@ -646,6 +651,7 @@ module HDLRuby::High::Std
646
651
  end
647
652
  # Now, create the branch.
648
653
  channelI = HDLRuby::High::Std.channel_instance(name, &ruby_block)
654
+ # channelI = HDLRuby::High::Std.channel_instance("#{self.name}::#{name}", &ruby_block)
649
655
  @branches[name] = channelI
650
656
  return self
651
657
  end
@@ -568,7 +568,7 @@ HDLRuby::High::Std.channel(:mem_dual) do |typ,size,clk,rst,br_rsts = {}|
568
568
  # using +target+ as target of access result.
569
569
  writer do |blk,target|
570
570
  # On reset the read trigger is 0.
571
- rst = send(rst_name)
571
+ rst = send(rst_name)
572
572
  top_block.unshift do
573
573
  # Initialize the address so that the next access is at address 0.
574
574
  hif(rst == 1) { abus_w <= -1 }
@@ -1,3 +1,3 @@
1
1
  module HDLRuby
2
- VERSION = "2.3.4"
2
+ VERSION = "2.3.5"
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.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lovic Gauthier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-11 00:00:00.000000000 Z
11
+ date: 2020-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler