ipxact-ruby 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.html +27 -23
- data/README.mdown +69 -31
- data/Rakefile +1 -1
- data/VERSION +1 -1
- metadata +4 -4
data/README.html
CHANGED
@@ -10,35 +10,30 @@
|
|
10
10
|
|
11
11
|
<p><strong>IPXACT-Ruby</strong> is a ruby library for extracting data from an <strong>IPXACT</strong> platform description. It was developed at <a href='http://tima-sls.imag.fr'>TIMA Laboratory</a>, France, for simplifying recurring platform parsing tasks. As such, this gem relies heavily on Aaron Patterson’s <a href='http://nokogiri.org'>Nokogiri gem</a> for parsing the XML data. This gem also provides methods for computing values that cannot be explicitly defined using the <strong>IPXACT</strong> format, such as component base addresses, relative to other components. Finally, please note that, in its current state, the <strong>IPXACT-Ruby</strong> gem does not handle all the aspects of the <strong>IPXACT</strong> format, but focuses on its <strong>Component</strong> and <strong>Design</strong> concepts .</p>
|
12
12
|
|
13
|
-
<h2 id='history'>History</h2>
|
14
|
-
|
15
|
-
<p>XXX Latest changes</p>
|
16
|
-
|
17
13
|
<h2 id='ipxact_format'>IPXACT format</h2>
|
18
14
|
|
19
15
|
<p><strong>IPXACT</strong> is an XML format for describing electronic components and their designs. First managed by the SPIRIT Consortium, the evolution of the format is now supervised by <a href='http://www.accelera.org'>Accelera</a>. Additionally, the <strong>IPXACT</strong> format is now an IEEE standard, under the reference <a href='http://standards.ieee.org/getieee/1685/index.html'>IEEE-1685</a>. Its full specification may be downloaded <a href='http://www.accellera.org/pressroom/2010/Get_1685_01Jun10.pdf'>here</a>.</p>
|
20
16
|
|
21
17
|
<h2 id='basic_usage'>Basic Usage</h2>
|
22
18
|
|
23
|
-
<p>
|
19
|
+
<p>Platforms built with the <strong>IPXACT-Ruby</strong> gem are basically composed of two types of elements:</p>
|
24
20
|
|
25
21
|
<ul>
|
26
|
-
<li>
|
27
|
-
<p>Component files, which describe the structure of an IPXACT component</p>
|
28
|
-
|
29
|
-
<p>component_docs = IPXACT::load_components(COMPONENT_PATH) design_docs = IPXACT::load_designs(DESIGN_PATH)</p>
|
30
|
-
</li>
|
22
|
+
<li>Component files, which describe the structure of an <strong>IPXACT</strong> component. Components may include references to design files.</li>
|
31
23
|
|
32
|
-
<li>
|
33
|
-
<p>Design files</p>
|
34
|
-
</li>
|
24
|
+
<li>Design files, which may instantiate variable values subcomponent instances.</li>
|
35
25
|
</ul>
|
36
26
|
|
37
|
-
<p>
|
27
|
+
<p>Most uses of this library should start with loading the <strong>IPXACT</strong> components and designs.</p>
|
28
|
+
|
29
|
+
<pre><code>component_docs = IPXACT::load_components(COMPONENT_PATH)
|
30
|
+
design_docs = IPXACT::load_designs(DESIGN_PATH)</code></pre>
|
31
|
+
|
32
|
+
<p>The whole platform should then be fed to the parser:</p>
|
38
33
|
|
39
34
|
<pre><code>platform = IPXACT::Parser::PlatformData.parse_platform(<platform_name>, component_docs, design_docs)</code></pre>
|
40
35
|
|
41
|
-
<p>Or if you’d rather specify the platform’s version that should be
|
36
|
+
<p>Or if you’d rather specify the platform’s version that should be used:</p>
|
42
37
|
|
43
38
|
<pre><code>platform = IPXACT::Parser::PlatformData.parse_platform([<platform_name>, <platform_version>], \
|
44
39
|
component_docs, design_docs)</code></pre>
|
@@ -53,37 +48,46 @@
|
|
53
48
|
|
54
49
|
<p>Additionally, the same approach may be used for setting parsing constraints, which are passed as a final argument (<code>Array</code>) to the <code>parse_platform</code> method.</p>
|
55
50
|
|
56
|
-
<p>When builder the platform object, IPXACT will combine component and design descriptions, identify hierarchical components and parse subcomponents when possible. In fact, in platform should be considered as a component except for a basic method aliasing (the <code>subcomponents</code> and <code>subcomponents=</code> methods are respectively aliased to <code>components</code> and <code>components=</code>, for the sake of
|
51
|
+
<p>When builder the platform object, <strong>IPXACT-Ruby</strong> will combine component and design descriptions, identify hierarchical components, assign variable values (defined in design files) and parse subcomponents when possible. In fact, in platform should be considered as a component except for a basic method aliasing (the <code>subcomponents</code> and <code>subcomponents=</code> methods are respectively aliased to <code>components</code> and <code>components=</code>, for the sake of semantics). Thus, a component is composed of:</p>
|
57
52
|
|
58
53
|
<ul>
|
59
54
|
<li><code>subcomponents</code></li>
|
60
55
|
|
61
|
-
<li><code>ports</code
|
56
|
+
<li><code>ports</code>, which may include register maps or remaps, depending on the port type.</li>
|
62
57
|
|
63
58
|
<li><code>interconnections</code>, which define how its subcomponents are connected with one another.</li>
|
64
59
|
|
65
60
|
<li><code>hierconnections</code>, which correspond the components’ connections between its ports and its subcomponents.</li>
|
66
61
|
</ul>
|
67
62
|
|
68
|
-
<p>
|
63
|
+
<p>While the subcomponents are <code>IPXACT::Component</code> instances, <code>ports</code>, <code>interconnections</code> and <code>hierconnections</code> are plain Ruby hashes that store data from the IPXACT model, without any post-processing.</p>
|
64
|
+
|
65
|
+
<p>For more information, please refer the gem’s YARD documentation (every method is extensively documented) and to the specs provided with the gem.</p>
|
66
|
+
|
67
|
+
<h2 id='component_address_resolution'>Component address resolution</h2>
|
68
|
+
|
69
|
+
<p><strong>IPXACT-Ruby</strong> also provides methods for resolving a component’s base address, relative to another component. The first method <code>resolve_data_path</code> computes an optimal path between the two component instances that are passed as parameters. In the context of this library, an optimal path should be understood as the shortest path between two components, considering compatible port connections (i.e., between a <code>master</code> port and a <code>mirrored_master</code>, between a <code>mirrored_slave</code> and a <code>slave</code>, between a <code>master</code> and a <code>slave</code> or between an <code>int_master</code> and an <code>int_slave</code>). The second method <code>resolve_base_address</code> deduces a memory address from the data path issued by the first method.</p>
|
70
|
+
|
71
|
+
<pre><code>data_path = platform.resolve_data_path('i_proc', 'i_block_device')
|
72
|
+
base_address = platform.resolve_base_address(data_path)</code></pre>
|
69
73
|
|
70
74
|
<h2 id='installation'>Installation</h2>
|
71
75
|
|
72
76
|
<p>Standard gem install command:</p>
|
73
77
|
|
74
|
-
<pre><code>gem install ipxact</code></pre>
|
78
|
+
<pre><code>gem install ipxact-ruby</code></pre>
|
75
79
|
|
76
80
|
<h2 id='support'>Support</h2>
|
77
81
|
|
78
82
|
<ul>
|
79
|
-
<li>guillaume (dot) godetbar (at) gmail (dot) com</li>
|
83
|
+
<li>email guillaume (dot) godetbar (at) gmail (dot) com</li>
|
80
84
|
</ul>
|
81
85
|
|
82
86
|
<h2 id='license'>License</h2>
|
83
87
|
|
84
|
-
<p>Copyright (C) 2010 TIMA Laboratory</p>
|
88
|
+
<p class='license'>Copyright (C) 2010 TIMA Laboratory</p>
|
85
89
|
|
86
|
-
<p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
|
90
|
+
<p class='license'>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
|
87
91
|
|
88
|
-
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
|
92
|
+
<p class='license'>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
|
89
93
|
</body></html>
|
data/README.mdown
CHANGED
@@ -4,64 +4,99 @@ CSS: style.css
|
|
4
4
|
IPXACT-Ruby
|
5
5
|
===========
|
6
6
|
|
7
|
-
**IPXACT-Ruby** is a ruby library for extracting data from an **IPXACT**
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
**IPXACT-Ruby** is a ruby library for extracting data from an **IPXACT**
|
8
|
+
platform description. It was developed at
|
9
|
+
[TIMA Laboratory](http://tima-sls.imag.fr), France, for simplifying recurring
|
10
|
+
platform parsing tasks. As such, this gem relies heavily on Aaron Patterson's
|
11
|
+
[Nokogiri gem](http://nokogiri.org) for parsing the XML data. This gem also
|
12
|
+
provides methods for computing values that cannot be explicitly defined using
|
13
|
+
the **IPXACT** format, such as component base addresses, relative to other
|
14
|
+
components. Finally, please note that, in its current state, the
|
15
|
+
**IPXACT-Ruby** gem does not handle all the aspects of the **IPXACT** format,
|
16
|
+
but focuses on its **Component** and **Design** concepts .
|
15
17
|
|
16
18
|
|
17
19
|
IPXACT format
|
18
20
|
-------------
|
19
21
|
|
20
|
-
**IPXACT** is an XML format for describing electronic components and their
|
22
|
+
**IPXACT** is an XML format for describing electronic components and their
|
23
|
+
designs. First managed by the SPIRIT Consortium, the evolution of the format is
|
24
|
+
now supervised by [Accellera](http://www.accellera.org). Additionally, the
|
25
|
+
**IPXACT** format is now an IEEE standard, under the reference
|
26
|
+
[IEEE-1685](http://standards.ieee.org/getieee/1685/index.html). Its full
|
27
|
+
specification may be downloaded
|
28
|
+
[here](http://www.accellera.org/pressroom/2010/Get_1685_01Jun10.pdf).
|
21
29
|
|
22
30
|
|
23
31
|
Basic Usage
|
24
32
|
-----------
|
25
|
-
|
26
|
-
|
27
|
-
*
|
33
|
+
Platforms built with the **IPXACT-Ruby** gem are basically composed of two types of elements:
|
34
|
+
* Component files, which describe the structure of an **IPXACT** component. Components may include references to design files.
|
35
|
+
* Design files, which may instantiate variable values subcomponent instances.
|
28
36
|
|
37
|
+
Most uses of this library should start with loading the **IPXACT** components and designs.
|
29
38
|
|
30
39
|
component_docs = IPXACT::load_components(COMPONENT_PATH)
|
31
40
|
design_docs = IPXACT::load_designs(DESIGN_PATH)
|
32
41
|
|
33
|
-
|
34
|
-
|
35
|
-
The whole platform will then be parsed by the IPXACT gem:
|
42
|
+
The whole platform should then be fed to the parser:
|
36
43
|
|
37
44
|
platform = IPXACT::Parser::PlatformData.parse_platform(<platform_name>, component_docs, design_docs)
|
38
45
|
|
39
|
-
Or if you'd rather specify the platform's version that should be
|
46
|
+
Or if you'd rather specify the platform's version that should be used:
|
40
47
|
|
41
48
|
platform = IPXACT::Parser::PlatformData.parse_platform([<platform_name>, <platform_version>], \
|
42
49
|
component_docs, design_docs)
|
43
50
|
|
44
|
-
In most cases, when methods require identifying a component you may use either
|
51
|
+
In most cases, when methods require identifying a component you may use either
|
52
|
+
specification:
|
45
53
|
|
46
54
|
* `<component_name>` will fetch the most recent component.
|
47
|
-
* `[<component_name
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
55
|
+
* `[<component_name>, <component_version>]` will get the component with the
|
56
|
+
specified version, thus allowing different component versions to coexist in the
|
57
|
+
same path.
|
58
|
+
|
59
|
+
Additionally, the same approach may be used for setting parsing constraints,
|
60
|
+
which are passed as a final argument (`Array`) to the `parse_platform`
|
61
|
+
method.
|
62
|
+
|
63
|
+
When builder the platform object, **IPXACT-Ruby** will combine component and
|
64
|
+
design descriptions, identify hierarchical components, assign variable values
|
65
|
+
(defined in design files) and parse subcomponents when possible. In fact, in
|
66
|
+
platform should be considered as a component except for a basic method aliasing
|
67
|
+
(the `subcomponents` and `subcomponents=` methods are respectively aliased to
|
68
|
+
`components` and `components=`, for the sake of semantics). Thus, a component
|
69
|
+
is composed of:
|
57
70
|
|
58
71
|
* `subcomponents`
|
59
|
-
* `ports
|
72
|
+
* `ports`, which may include register maps or remaps, depending on the port
|
73
|
+
type.
|
60
74
|
* `interconnections`, which define how its subcomponents are connected with one another.
|
61
|
-
* `hierconnections`, which correspond the components' connections between its
|
75
|
+
* `hierconnections`, which correspond the components' connections between its
|
76
|
+
ports and its subcomponents.
|
77
|
+
|
78
|
+
While the subcomponents are `IPXACT::Component` instances, `ports`,
|
79
|
+
`interconnections` and `hierconnections` are plain Ruby hashes that store
|
80
|
+
data from the IPXACT model, without any post-processing.
|
81
|
+
|
82
|
+
For more information, please refer the gem's YARD documentation (every method is extensively documented) and to the specs provided with the gem.
|
83
|
+
|
62
84
|
|
63
|
-
|
85
|
+
Component address resolution
|
86
|
+
----------------------------
|
87
|
+
**IPXACT-Ruby** also provides methods for resolving a component's base address,
|
88
|
+
relative to another component. The first method `resolve_data_path` computes
|
89
|
+
an optimal path between the two component instances that are passed as
|
90
|
+
parameters. In the context of this library, an optimal path should be
|
91
|
+
understood as the shortest path between two components, considering compatible
|
92
|
+
port connections (i.e., between a `master` port and a `mirrored_master`,
|
93
|
+
between a `mirrored_slave` and a `slave`, between a `master` and a `slave`
|
94
|
+
or between an `int_master` and an `int_slave`).
|
95
|
+
The second method `resolve_base_address` deduces a memory address
|
96
|
+
from the data path issued by the first method.
|
64
97
|
|
98
|
+
data_path = platform.resolve_data_path('i_proc', 'i_block_device')
|
99
|
+
base_address = platform.resolve_base_address(data_path)
|
65
100
|
|
66
101
|
Installation
|
67
102
|
------------
|
@@ -73,19 +108,22 @@ Standard gem install command:
|
|
73
108
|
Support
|
74
109
|
-------
|
75
110
|
|
76
|
-
* guillaume (dot) godetbar (at) gmail (dot) com
|
111
|
+
* email guillaume (dot) godetbar (at) gmail (dot) com
|
77
112
|
|
78
113
|
License
|
79
114
|
-------
|
80
115
|
|
81
116
|
Copyright (C) 2010 TIMA Laboratory
|
117
|
+
{: .license}
|
82
118
|
|
83
119
|
This program is free software: you can redistribute it and/or modify
|
84
120
|
it under the terms of the GNU General Public License as published by
|
85
121
|
the Free Software Foundation, either version 3 of the License, or
|
86
122
|
(at your option) any later version.
|
123
|
+
{: .license}
|
87
124
|
|
88
125
|
This program is distributed in the hope that it will be useful,
|
89
126
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
90
127
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
91
128
|
GNU General Public License for more details.
|
129
|
+
{: .license}
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ begin
|
|
20
20
|
gemspec.name = "ipxact-ruby"
|
21
21
|
gemspec.summary = "Ruby library for parsing IPXACT specifications and extracting relevant information."
|
22
22
|
gemspec.email = "guillaume.godetbar@gmail.com "
|
23
|
-
gemspec.homepage = "http://tima-sls.imag.fr"
|
23
|
+
gemspec.homepage = "http://tima-sls.imag.fr/www/research/ipxact/"
|
24
24
|
gemspec.authors = ["Guillaume Godet-Bar"]
|
25
25
|
gemspec.files = FileList["{spec,schemas,autotest}/**/*", "lib/ipxact.rb", "lib/ipxact/*", "lib/ipxact/parser/*", "lib/ipxact/pathfinder/graph_pathfinder.rb", ".autotest", ".gitignore", "Rakefile", "VERSION"]
|
26
26
|
gemspec.add_dependency 'nokogiri'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.2
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 11
|
8
|
-
-
|
9
|
-
version: 0.11.
|
8
|
+
- 2
|
9
|
+
version: 0.11.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Guillaume Godet-Bar
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-14 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -182,7 +182,7 @@ files:
|
|
182
182
|
- README.html
|
183
183
|
- README.mdown
|
184
184
|
has_rdoc: true
|
185
|
-
homepage: http://tima-sls.imag.fr
|
185
|
+
homepage: http://tima-sls.imag.fr/www/research/ipxact/
|
186
186
|
licenses: []
|
187
187
|
|
188
188
|
post_install_message:
|