rggen-systemverilog 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b9151400ac8b5e912e6542f249878a597c38f1ff740d47a318afc20872c5ce7
4
- data.tar.gz: '09b3d758f2b661f6677bdf45b88505b6bd3a3b6f5c6e1a96a14cffadcf8431a3'
3
+ metadata.gz: 870f678345b879ac2bf3c72776f48b86eaabcaa26239e85ce560b8b00c606e85
4
+ data.tar.gz: af9fedc6e3ae7a601cb149f03aeb2ae0cfcede4d18b513b06fdf889b7fb1770f
5
5
  SHA512:
6
- metadata.gz: aba68f32b100a9d1aecd998fe66ab7fc89a840700ec2b6b4c31f97e45a48b87f71c4828380b339f1cc8276655cf7d2e49c5a2e5e50101ebf8db7fc33a8249f5a
7
- data.tar.gz: 1005421893fd648c4e8bf9c10cf4865194e5327fd1b54b27dbe9ea6a2138f7a7777f6ef030d43dbadc788301fea4d7bbf8c331b4bf3b3c35c4e39cb3c72ba3ad
6
+ metadata.gz: 14eb14c10b6df5d2f28ad5c29b7392fd3d808c7c0cd15ef41a670752198b695a275e85ffe6280a663142296c8a1a6c1b7c1521c6340a4675605144db5ce58297
7
+ data.tar.gz: 49d27402d996dac7cc122566ab592b605a72298401a5a2e5c614b9c41a1059bf1513efee800ee702b7c12d55938cb03a95419ec10fa7340d4acc815d46088b8b
@@ -10,6 +10,14 @@ module RgGen
10
10
  @children.map(&body)
11
11
  ].flatten
12
12
  end
13
+
14
+ def package_imports(domain)
15
+ body = ->(r) { r.package_imports(domain) }
16
+ [
17
+ @features.each_value.map(&body),
18
+ @children.map(&body)
19
+ ].flatten.uniq
20
+ end
13
21
  end
14
22
  end
15
23
  end
@@ -27,6 +27,10 @@ module RgGen
27
27
  @declarations[domain][type]
28
28
  end
29
29
 
30
+ def package_imports(domain)
31
+ @package_imports[domain]
32
+ end
33
+
30
34
  private
31
35
 
32
36
  def post_initialize
@@ -34,6 +38,7 @@ module RgGen
34
38
  @declarations = Hash.new do |h0, k0|
35
39
  h0[k0] = Hash.new { |h1, k1| h1[k1] = [] }
36
40
  end
41
+ @package_imports = Hash.new { |h, k| h[k] = [] }
37
42
  end
38
43
 
39
44
  def create_entity(context, attributes, block)
@@ -57,6 +62,15 @@ module RgGen
57
62
  attr_singleton_reader(name)
58
63
  export(name)
59
64
  end
65
+
66
+ def import_package(domain, package)
67
+ @package_imports[domain].include?(package) ||
68
+ (@package_imports[domain] << package)
69
+ end
70
+
71
+ def import_packages(domain, packages)
72
+ Array(packages).each { |package| import_package(domain, package) }
73
+ end
60
74
  end
61
75
  end
62
76
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module SystemVerilog
5
- VERSION = '0.10.0'
5
+ VERSION = '0.11.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-systemverilog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-31 00:00:00.000000000 Z
11
+ date: 2019-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docile
@@ -109,5 +109,5 @@ requirements: []
109
109
  rubygems_version: 3.0.3
110
110
  signing_key:
111
111
  specification_version: 4
112
- summary: rggen-systemverilog-0.10.0
112
+ summary: rggen-systemverilog-0.11.0
113
113
  test_files: []