ipxact-ruby 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +15 -0
- data/.gitignore +2 -0
- data/README.html +89 -0
- data/README.mdown +91 -0
- data/Rakefile +31 -0
- data/VERSION +1 -0
- data/autotest/discover.rb +17 -0
- data/lib/ipxact.rb +263 -0
- data/lib/ipxact/component.rb +235 -0
- data/lib/ipxact/parser.rb +27 -0
- data/lib/ipxact/parser/bus_data_parser.rb +229 -0
- data/lib/ipxact/parser/component_data_parser.rb +309 -0
- data/lib/ipxact/parser/platform_data_parser.rb +63 -0
- data/lib/ipxact/pathfinder/graph_pathfinder.rb +191 -0
- data/lib/ipxact/platform.rb +43 -0
- data/schemas/abstractionDefinition.xsd +332 -0
- data/schemas/abstractor.xsd +156 -0
- data/schemas/autoConfigure.xsd +226 -0
- data/schemas/busDefinition.xsd +99 -0
- data/schemas/busInterface.xsd +640 -0
- data/schemas/commonStructures.xsd +189 -0
- data/schemas/component.xsd +253 -0
- data/schemas/configurable.xsd +82 -0
- data/schemas/constraints.xsd +283 -0
- data/schemas/design.xsd +105 -0
- data/schemas/designConfig.xsd +144 -0
- data/schemas/file.xsd +560 -0
- data/schemas/fileType.xsd +86 -0
- data/schemas/generator.xsd +240 -0
- data/schemas/identifier.xsd +93 -0
- data/schemas/index.xsd +67 -0
- data/schemas/memoryMap.xsd +1007 -0
- data/schemas/model.xsd +291 -0
- data/schemas/port.xsd +441 -0
- data/schemas/signalDrivers.xsd +220 -0
- data/schemas/simpleTypes.xsd +90 -0
- data/schemas/subInstances.xsd +256 -0
- data/spec/integration/bus_data_extraction_spec.rb +105 -0
- data/spec/integration/data_calculation_spec.rb +133 -0
- data/spec/integration/data_construction_spec.rb +52 -0
- data/spec/integration/general_spec.rb +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_initiator_port.h +135 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_initiator_port.tpp +247 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_initiator_port_base.h +189 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_router.h +205 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_router.tpp +278 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_slave_base.h +115 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_slave_base.tpp +126 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_target_port.h +168 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_target_port_base.h +133 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_tlm_if.h +280 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/user_types.h +38 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/Leon2Platform/Leon2Platform.xml +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/Leon2Platform/design_Leon2Platform.xml +156 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/Leon2Platform/tlmsrc/Leon2Platform.h +149 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/apbSubSystem/apbSubSystem.xml +406 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/apbSubSystem/design_apbSubSystem.xml +135 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/apbSubSystem/tlmsrc/apbSubSystem.h +133 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/Leon2Platform/Leon2Platform.xml +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/Leon2Platform/design_Leon2Platform.xml +157 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/Leon2Platform/tlmsrc/Leon2Platform.h +150 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/apbSubSystem.xml +422 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/designConfig_apbSubSystem.xml +79 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/design_apbSubSystem.xml +184 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/tlmsrc/apbSubSystem.h +164 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/Leon2Platform/Leon2Platform.xml +105 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/Leon2Platform/design_Leon2Platform.xml +157 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/Leon2Platform/tlmsrc/Leon2Platform.h +152 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/apbSubSystem.xml +429 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/designConfig_apbSubSystem.xml +64 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/design_apbSubSystem.xml +150 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/tlmsrc/apbSubSystem.h +167 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbbus/1.4/ahbbus22.xml +236 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbbus/1.4/tlmsrc/ahbbus.h +52 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbram/1.4/ahbram.xml +184 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbram/1.4/tlmsrc/ahbram.cc +93 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbram/1.4/tlmsrc/ahbram.h +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbbus/1.4/apbbus8.xml +544 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbbus/1.4/tlmsrc/apbbus.h +55 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbmst/1.4/apbmst.xml +209 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbmst/1.4/tlmsrc/apbmst.h +53 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/apbram.xml +395 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.cc +89 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.h +69 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.v +82 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.vhd +132 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.4/cgu.xml +686 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.4/tlmsrc/cgu.cc +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.4/tlmsrc/cgu.h +81 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.5/cgu.xml +707 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.5/tlmsrc/cgu.cc +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.5/tlmsrc/cgu.h +81 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/dma/1.4/dma.xml +272 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/dma/1.4/tlmsrc/dma.cc +230 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/dma/1.4/tlmsrc/dma.h +116 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/irqctrl/1.4/irqctrl.xml +530 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/irqctrl/1.4/tlmsrc/irqctrl.cc +211 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/irqctrl/1.4/tlmsrc/irqctrl.h +108 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/processor/1.4/processor.xml +423 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/processor/1.4/tlmsrc/processor.cc +331 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/processor/1.4/tlmsrc/processor.h +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2apb/1.0/pv2apb.xml +240 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2apb/1.0/tlmsrc/pv2apb.cc +153 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2apb/1.0/tlmsrc/pv2apb.h +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2tac/1.0/pv2tac.xml +154 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2tac/1.0/tlmsrc/pv2tac.cc +114 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2tac/1.0/tlmsrc/pv2tac.h +67 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/rgu/1.4/rgu.xml +766 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/rgu/1.4/tlmsrc/rgu.cc +126 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/rgu/1.4/tlmsrc/rgu.h +105 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/scmlAdaptor/1.0/scmlAdaptor.xml +154 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/scmlAdaptor/1.0/tlmsrc/scmladaptor.cc +100 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/scmlAdaptor/1.0/tlmsrc/scmladaptor.h +62 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/serial_device/1.0/serial_device.xml +151 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/serial_device/1.0/tlmsrc/serial_device.h +85 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/timers/1.4/timers.xml +460 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/timers/1.4/tlmsrc/timers.cc +201 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/timers/1.4/tlmsrc/timers.h +102 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart.h +152 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart_fifo.h +113 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart_memory_map.h +96 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart_types.h +60 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart.cc +125 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_interrupt_handler.cc +136 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_register_bank.cc +129 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_serial_tx_rx.cc +145 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/uart_scml.xml +372 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/Leon2_uart.h +216 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/def_Leon2_uart.h +34 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/tlm_field.h +72 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/tlm_register.h +129 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/tlmreg_Leon2_uart.h +133 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/src/Leon2_uart.cc +316 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/src/tlmreg_Leon2_uart.cc +197 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/src/user_specific_Leon2_uart.cc +146 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/uart_tac.xml +222 -0
- data/spec/unit/component_spec.rb +98 -0
- data/spec/unit/graph_pathfinder_spec.rb +128 -0
- data/spec/unit/interconnect_spec.rb +177 -0
- data/spec/unit/ipxact_spec.rb +69 -0
- data/spec/unit/platform_spec.rb +34 -0
- metadata +225 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright (C) 2010 TIMA Laboratory
|
2
|
+
#
|
3
|
+
# This program is free software: you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation, either version 3 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License
|
14
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
#
|
16
|
+
|
17
|
+
require File.join File.dirname(__FILE__), 'component'
|
18
|
+
|
19
|
+
# {IPXACT::Platform} is the root class for a parsed IPXACT platform
|
20
|
+
# specification. It may be treated as a {IPXACT::Component} with
|
21
|
+
# regard to its attributes and methods, with the single difference
|
22
|
+
# that the {Component#subcomponents} and {Component#subcomponents=} methods
|
23
|
+
# have been aliased to {#components} and {#components=} respectively.
|
24
|
+
#
|
25
|
+
# @author Guillaume Godet-Bar
|
26
|
+
#
|
27
|
+
class IPXACT::Platform < IPXACT::Component
|
28
|
+
alias_method :components, :subcomponents
|
29
|
+
alias_method :components=, :subcomponents=
|
30
|
+
|
31
|
+
# Creates a new IPXACT::Platform instance, by merging the attributes
|
32
|
+
# an existing {IPXACT::Component}.
|
33
|
+
#
|
34
|
+
# @param [Component] root_component the Component that should be cloned
|
35
|
+
# into a Platform.
|
36
|
+
#
|
37
|
+
def initialize(root_component)
|
38
|
+
self.merge!(root_component)
|
39
|
+
self.components = root_component.subcomponents
|
40
|
+
self.ports = root_component.ports
|
41
|
+
self.interconnections = root_component.interconnections
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,332 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
// Description: abstractionDefinition.xsd
|
4
|
+
// Author: The SPIRIT Consortium Schema Working Group
|
5
|
+
//
|
6
|
+
// Revision: $Revision: 1506 $
|
7
|
+
// Date: $Date: 2009-04-26 01:51:56 -0500 (Sun, 26 Apr 2009) $
|
8
|
+
//
|
9
|
+
// Copyright (c) 2005, 2006, 2007, 2008, 2009 The SPIRIT Consortium.
|
10
|
+
//
|
11
|
+
// This work forms part of a deliverable of The SPIRIT Consortium.
|
12
|
+
//
|
13
|
+
// Use of these materials are governed by the legal terms and conditions
|
14
|
+
// outlined in the disclaimer available from www.spiritconsortium.org.
|
15
|
+
//
|
16
|
+
// This source file is provided on an AS IS basis. The SPIRIT
|
17
|
+
// Consortium disclaims any warranty express or implied including
|
18
|
+
// any warranty of merchantability and fitness for use for a
|
19
|
+
// particular purpose.
|
20
|
+
//
|
21
|
+
// The user of the source file shall indemnify and hold The SPIRIT
|
22
|
+
// Consortium and its members harmless from any damages or liability.
|
23
|
+
// Users are requested to provide feedback to The SPIRIT Consortium
|
24
|
+
// using either mailto:feedback@lists.spiritconsortium.org or the forms at
|
25
|
+
// http://www.spiritconsortium.org/about/contact_us/
|
26
|
+
//
|
27
|
+
// This file may be copied, and distributed, WITHOUT
|
28
|
+
// modifications; this notice must be included on any copy.
|
29
|
+
-->
|
30
|
+
<xs:schema xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" elementFormDefault="qualified" attributeFormDefault="qualified">
|
31
|
+
<xs:include schemaLocation="identifier.xsd"/>
|
32
|
+
<xs:include schemaLocation="commonStructures.xsd"/>
|
33
|
+
<xs:include schemaLocation="port.xsd"/>
|
34
|
+
<xs:include schemaLocation="generator.xsd"/>
|
35
|
+
<xs:include schemaLocation="constraints.xsd"/>
|
36
|
+
<xs:element name="presence" default="optional">
|
37
|
+
<xs:annotation>
|
38
|
+
<xs:documentation>If this element is present, the existance of the port is controlled by the specified value. valid values are 'illegal', 'required' and 'optional'.</xs:documentation>
|
39
|
+
</xs:annotation>
|
40
|
+
<xs:simpleType>
|
41
|
+
<xs:restriction base="xs:string">
|
42
|
+
<xs:enumeration value="required"/>
|
43
|
+
<xs:enumeration value="illegal"/>
|
44
|
+
<xs:enumeration value="optional"/>
|
45
|
+
</xs:restriction>
|
46
|
+
</xs:simpleType>
|
47
|
+
</xs:element>
|
48
|
+
<xs:complexType name="serviceType">
|
49
|
+
<xs:annotation>
|
50
|
+
<xs:documentation>The service that this transactional port can provide or requires.</xs:documentation>
|
51
|
+
</xs:annotation>
|
52
|
+
<xs:sequence>
|
53
|
+
<xs:element name="initiative" default="requires">
|
54
|
+
<xs:annotation>
|
55
|
+
<xs:documentation>If this element is present, the type of access is restricted to the specified value.</xs:documentation>
|
56
|
+
</xs:annotation>
|
57
|
+
<xs:simpleType>
|
58
|
+
<xs:restriction base="xs:string">
|
59
|
+
<xs:enumeration value="requires"/>
|
60
|
+
<xs:enumeration value="provides"/>
|
61
|
+
<xs:enumeration value="both"/>
|
62
|
+
</xs:restriction>
|
63
|
+
</xs:simpleType>
|
64
|
+
</xs:element>
|
65
|
+
<xs:element name="typeName" maxOccurs="unbounded">
|
66
|
+
<xs:annotation>
|
67
|
+
<xs:documentation>Defines the name of the transactional interface type.</xs:documentation>
|
68
|
+
</xs:annotation>
|
69
|
+
<xs:complexType>
|
70
|
+
<xs:simpleContent>
|
71
|
+
<xs:extension base="xs:string">
|
72
|
+
<xs:attribute name="implicit" type="xs:boolean" default="false">
|
73
|
+
<xs:annotation>
|
74
|
+
<xs:documentation>Defines that the typeName supplied for this service is implicit and a netlister should not declare this service in
|
75
|
+
a language specific top-level netlist </xs:documentation>
|
76
|
+
</xs:annotation>
|
77
|
+
</xs:attribute>
|
78
|
+
</xs:extension>
|
79
|
+
</xs:simpleContent>
|
80
|
+
</xs:complexType>
|
81
|
+
</xs:element>
|
82
|
+
<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
|
83
|
+
</xs:sequence>
|
84
|
+
</xs:complexType>
|
85
|
+
<xs:group name="transactionalPort">
|
86
|
+
<xs:annotation>
|
87
|
+
<xs:documentation>Group of elements used in a transactional port.</xs:documentation>
|
88
|
+
</xs:annotation>
|
89
|
+
<xs:sequence>
|
90
|
+
<xs:element ref="spirit:presence" minOccurs="0"/>
|
91
|
+
<xs:element name="service" type="spirit:serviceType">
|
92
|
+
<xs:annotation>
|
93
|
+
<xs:documentation>The service that this transactional port can provide or requires.</xs:documentation>
|
94
|
+
</xs:annotation>
|
95
|
+
</xs:element>
|
96
|
+
</xs:sequence>
|
97
|
+
</xs:group>
|
98
|
+
<xs:group name="wirePort">
|
99
|
+
<xs:annotation>
|
100
|
+
<xs:documentation>Group of elements used in a wire port.</xs:documentation>
|
101
|
+
</xs:annotation>
|
102
|
+
<xs:sequence>
|
103
|
+
<xs:element ref="spirit:presence" minOccurs="0"/>
|
104
|
+
<xs:element name="width" type="xs:positiveInteger" minOccurs="0">
|
105
|
+
<xs:annotation>
|
106
|
+
<xs:documentation>Number of bits required to represent this port. Absence of this element indicates unconstrained number of bits, i.e. the component will define the number of bits in this port. The logical numbering of the port starts at 0 to width-1.</xs:documentation>
|
107
|
+
</xs:annotation>
|
108
|
+
</xs:element>
|
109
|
+
<xs:element name="direction" default="out" minOccurs="0">
|
110
|
+
<xs:annotation>
|
111
|
+
<xs:documentation>If this element is present, the direction of this port is restricted to the specified value. The direction is relative to the non-mirrored interface.</xs:documentation>
|
112
|
+
</xs:annotation>
|
113
|
+
<xs:simpleType>
|
114
|
+
<xs:restriction base="xs:token">
|
115
|
+
<xs:enumeration value="in"/>
|
116
|
+
<xs:enumeration value="out"/>
|
117
|
+
<xs:enumeration value="inout"/>
|
118
|
+
</xs:restriction>
|
119
|
+
</xs:simpleType>
|
120
|
+
</xs:element>
|
121
|
+
<xs:sequence minOccurs="0">
|
122
|
+
<xs:element name="modeConstraints" type="spirit:abstractionDefPortConstraintsType">
|
123
|
+
<xs:annotation>
|
124
|
+
<xs:documentation>Specifies default constraints for the enclosing wire type port. If the mirroredModeConstraints element is not defined, then these constraints applied to this port when it appears in a 'mode' bus interface or a mirrored-'mode' bus interface. Otherwise they only apply when the port appears in a 'mode' bus interface.</xs:documentation>
|
125
|
+
</xs:annotation>
|
126
|
+
</xs:element>
|
127
|
+
<xs:element name="mirroredModeConstraints" type="spirit:abstractionDefPortConstraintsType" minOccurs="0">
|
128
|
+
<xs:annotation>
|
129
|
+
<xs:documentation>Specifies default constraints for the enclosing wire type port when it appears in a mirrored-'mode' bus interface. </xs:documentation>
|
130
|
+
</xs:annotation>
|
131
|
+
</xs:element>
|
132
|
+
</xs:sequence>
|
133
|
+
</xs:sequence>
|
134
|
+
</xs:group>
|
135
|
+
<xs:element name="abstractionDefinition">
|
136
|
+
<xs:annotation>
|
137
|
+
<xs:documentation>Define the ports and other information of a particular abstraction of the bus</xs:documentation>
|
138
|
+
</xs:annotation>
|
139
|
+
<xs:complexType>
|
140
|
+
<xs:sequence>
|
141
|
+
<xs:group ref="spirit:versionedIdentifier"/>
|
142
|
+
<xs:element name="busType" type="spirit:libraryRefType">
|
143
|
+
<xs:annotation>
|
144
|
+
<xs:documentation>Reference to the busDefinition that this abstractionDefinition implements.</xs:documentation>
|
145
|
+
</xs:annotation>
|
146
|
+
</xs:element>
|
147
|
+
<xs:element name="extends" type="spirit:libraryRefType" minOccurs="0">
|
148
|
+
<xs:annotation>
|
149
|
+
<xs:documentation>Optional name of abstraction type that this abstraction definition is compatible with. This abstraction definition may change the definitions of ports in the existing abstraction definition and add new ports, the ports in the original abstraction are not deleted but may be marked illegal to disallow their use.
|
150
|
+
This abstraction definition may only extend another abstraction definition if the bus type of this abstraction definition extends the bus type of the extended abstraction definition</xs:documentation>
|
151
|
+
</xs:annotation>
|
152
|
+
</xs:element>
|
153
|
+
<xs:element name="ports">
|
154
|
+
<xs:annotation>
|
155
|
+
<xs:documentation>This is a list of logical ports defined by the bus.</xs:documentation>
|
156
|
+
</xs:annotation>
|
157
|
+
<xs:complexType>
|
158
|
+
<xs:sequence>
|
159
|
+
<xs:element name="port" maxOccurs="unbounded">
|
160
|
+
<xs:complexType>
|
161
|
+
<xs:sequence>
|
162
|
+
<xs:element name="logicalName" type="xs:Name">
|
163
|
+
<xs:annotation>
|
164
|
+
<xs:documentation>The assigned name of this port in bus specifications.</xs:documentation>
|
165
|
+
</xs:annotation>
|
166
|
+
</xs:element>
|
167
|
+
<xs:element ref="spirit:displayName" minOccurs="0"/>
|
168
|
+
<xs:element ref="spirit:description" minOccurs="0"/>
|
169
|
+
<xs:choice>
|
170
|
+
<xs:annotation>
|
171
|
+
<xs:documentation>Port style.</xs:documentation>
|
172
|
+
</xs:annotation>
|
173
|
+
<xs:element name="wire">
|
174
|
+
<xs:annotation>
|
175
|
+
<xs:documentation>A port that carries logic or an array of logic values</xs:documentation>
|
176
|
+
</xs:annotation>
|
177
|
+
<xs:complexType>
|
178
|
+
<xs:sequence>
|
179
|
+
<xs:element name="qualifier" minOccurs="0">
|
180
|
+
<xs:annotation>
|
181
|
+
<xs:documentation>The type of information this port carries A wire port can carry both address and data, but may not mix this with a clock or reset</xs:documentation>
|
182
|
+
</xs:annotation>
|
183
|
+
<xs:complexType>
|
184
|
+
<xs:choice>
|
185
|
+
<xs:sequence>
|
186
|
+
<xs:element name="isAddress" type="xs:boolean" minOccurs="0">
|
187
|
+
<xs:annotation>
|
188
|
+
<xs:documentation>If this element is present, the port contains address information.</xs:documentation>
|
189
|
+
</xs:annotation>
|
190
|
+
</xs:element>
|
191
|
+
<xs:element name="isData" type="xs:boolean" minOccurs="0">
|
192
|
+
<xs:annotation>
|
193
|
+
<xs:documentation>If this element is present, the port contains data information.</xs:documentation>
|
194
|
+
</xs:annotation>
|
195
|
+
</xs:element>
|
196
|
+
</xs:sequence>
|
197
|
+
<xs:element name="isClock" type="xs:boolean" minOccurs="0">
|
198
|
+
<xs:annotation>
|
199
|
+
<xs:documentation>If this element is present, the port contains only clock information.</xs:documentation>
|
200
|
+
</xs:annotation>
|
201
|
+
</xs:element>
|
202
|
+
<xs:element name="isReset" type="xs:boolean" minOccurs="0">
|
203
|
+
<xs:annotation>
|
204
|
+
<xs:documentation>Is this element is present, the port contains only reset information.</xs:documentation>
|
205
|
+
</xs:annotation>
|
206
|
+
</xs:element>
|
207
|
+
</xs:choice>
|
208
|
+
</xs:complexType>
|
209
|
+
</xs:element>
|
210
|
+
<xs:element name="onSystem" minOccurs="0" maxOccurs="unbounded">
|
211
|
+
<xs:annotation>
|
212
|
+
<xs:documentation>Defines constraints for this port when present in a system bus interface with a matching group name.</xs:documentation>
|
213
|
+
</xs:annotation>
|
214
|
+
<xs:complexType>
|
215
|
+
<xs:sequence>
|
216
|
+
<xs:element name="group" type="xs:Name">
|
217
|
+
<xs:annotation>
|
218
|
+
<xs:documentation>Used to group system ports into different groups within a common bus.</xs:documentation>
|
219
|
+
</xs:annotation>
|
220
|
+
</xs:element>
|
221
|
+
<xs:group ref="spirit:wirePort"/>
|
222
|
+
</xs:sequence>
|
223
|
+
</xs:complexType>
|
224
|
+
</xs:element>
|
225
|
+
<xs:element name="onMaster" minOccurs="0">
|
226
|
+
<xs:annotation>
|
227
|
+
<xs:documentation>Defines constraints for this port when present in a master bus interface.</xs:documentation>
|
228
|
+
</xs:annotation>
|
229
|
+
<xs:complexType>
|
230
|
+
<xs:group ref="spirit:wirePort"/>
|
231
|
+
</xs:complexType>
|
232
|
+
</xs:element>
|
233
|
+
<xs:element name="onSlave" minOccurs="0">
|
234
|
+
<xs:annotation>
|
235
|
+
<xs:documentation>Defines constraints for this port when present in a slave bus interface.</xs:documentation>
|
236
|
+
</xs:annotation>
|
237
|
+
<xs:complexType>
|
238
|
+
<xs:group ref="spirit:wirePort"/>
|
239
|
+
</xs:complexType>
|
240
|
+
</xs:element>
|
241
|
+
<xs:choice minOccurs="0">
|
242
|
+
<xs:element name="defaultValue" type="spirit:scaledNonNegativeInteger">
|
243
|
+
<xs:annotation>
|
244
|
+
<xs:documentation>Indicates the default value for this wire port.</xs:documentation>
|
245
|
+
</xs:annotation>
|
246
|
+
</xs:element>
|
247
|
+
<xs:element ref="spirit:requiresDriver"/>
|
248
|
+
</xs:choice>
|
249
|
+
</xs:sequence>
|
250
|
+
</xs:complexType>
|
251
|
+
</xs:element>
|
252
|
+
<xs:element name="transactional">
|
253
|
+
<xs:annotation>
|
254
|
+
<xs:documentation>A port that carries complex information modeled at a high level of abstraction.</xs:documentation>
|
255
|
+
</xs:annotation>
|
256
|
+
<xs:complexType>
|
257
|
+
<xs:sequence>
|
258
|
+
<xs:element name="qualifier" minOccurs="0">
|
259
|
+
<xs:annotation>
|
260
|
+
<xs:documentation>The type of information this port carries A transactional port can carry both address and data information.</xs:documentation>
|
261
|
+
</xs:annotation>
|
262
|
+
<xs:complexType>
|
263
|
+
<xs:sequence>
|
264
|
+
<xs:element name="isAddress" type="xs:boolean" minOccurs="0">
|
265
|
+
<xs:annotation>
|
266
|
+
<xs:documentation>If this element is present, the port contains address information.</xs:documentation>
|
267
|
+
</xs:annotation>
|
268
|
+
</xs:element>
|
269
|
+
<xs:element name="isData" type="xs:boolean" minOccurs="0">
|
270
|
+
<xs:annotation>
|
271
|
+
<xs:documentation>If this element is present, the port contains data information.</xs:documentation>
|
272
|
+
</xs:annotation>
|
273
|
+
</xs:element>
|
274
|
+
</xs:sequence>
|
275
|
+
</xs:complexType>
|
276
|
+
</xs:element>
|
277
|
+
<xs:element name="onSystem" minOccurs="0" maxOccurs="unbounded">
|
278
|
+
<xs:annotation>
|
279
|
+
<xs:documentation>Defines constraints for this port when present in a system bus interface with a matching group name.</xs:documentation>
|
280
|
+
</xs:annotation>
|
281
|
+
<xs:complexType>
|
282
|
+
<xs:sequence>
|
283
|
+
<xs:element name="group" type="xs:Name">
|
284
|
+
<xs:annotation>
|
285
|
+
<xs:documentation>Used to group system ports into different groups within a common bus.</xs:documentation>
|
286
|
+
</xs:annotation>
|
287
|
+
</xs:element>
|
288
|
+
<xs:group ref="spirit:transactionalPort"/>
|
289
|
+
</xs:sequence>
|
290
|
+
</xs:complexType>
|
291
|
+
</xs:element>
|
292
|
+
<xs:element name="onMaster" minOccurs="0">
|
293
|
+
<xs:annotation>
|
294
|
+
<xs:documentation>Defines constraints for this port when present in a master bus interface.</xs:documentation>
|
295
|
+
</xs:annotation>
|
296
|
+
<xs:complexType>
|
297
|
+
<xs:group ref="spirit:transactionalPort"/>
|
298
|
+
</xs:complexType>
|
299
|
+
</xs:element>
|
300
|
+
<xs:element name="onSlave" minOccurs="0">
|
301
|
+
<xs:annotation>
|
302
|
+
<xs:documentation>Defines constraints for this port when present in a slave bus interface.</xs:documentation>
|
303
|
+
</xs:annotation>
|
304
|
+
<xs:complexType>
|
305
|
+
<xs:group ref="spirit:transactionalPort"/>
|
306
|
+
</xs:complexType>
|
307
|
+
</xs:element>
|
308
|
+
</xs:sequence>
|
309
|
+
</xs:complexType>
|
310
|
+
</xs:element>
|
311
|
+
</xs:choice>
|
312
|
+
<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
|
313
|
+
</xs:sequence>
|
314
|
+
</xs:complexType>
|
315
|
+
</xs:element>
|
316
|
+
</xs:sequence>
|
317
|
+
</xs:complexType>
|
318
|
+
</xs:element>
|
319
|
+
<xs:element ref="spirit:description" minOccurs="0"/>
|
320
|
+
<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
|
321
|
+
</xs:sequence>
|
322
|
+
</xs:complexType>
|
323
|
+
<xs:key name="busDefPortKey">
|
324
|
+
<xs:selector xpath="spirit:ports/spirit:port"/>
|
325
|
+
<xs:field xpath="spirit:logicalName"/>
|
326
|
+
</xs:key>
|
327
|
+
<xs:keyref name="timingConstraintKeyRef" refer="spirit:busDefPortKey">
|
328
|
+
<xs:selector xpath=".//spirit:timingConstraint"/>
|
329
|
+
<xs:field xpath="@spirit:clockName"/>
|
330
|
+
</xs:keyref>
|
331
|
+
</xs:element>
|
332
|
+
</xs:schema>
|
@@ -0,0 +1,156 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
// Description: abstractor.xsd
|
4
|
+
// Author: The SPIRIT Consortium Schema Working Group
|
5
|
+
//
|
6
|
+
// Revision: $Revision: 1522 $
|
7
|
+
// Date: $Date: 2009-05-26 13:03:12 -0500 (Tue, 26 May 2009) $
|
8
|
+
//
|
9
|
+
// Copyright (c) 2005, 2006, 2007, 2008, 2009 The SPIRIT Consortium.
|
10
|
+
//
|
11
|
+
// This work forms part of a deliverable of The SPIRIT Consortium.
|
12
|
+
//
|
13
|
+
// Use of these materials are governed by the legal terms and conditions
|
14
|
+
// outlined in the disclaimer available from www.spiritconsortium.org.
|
15
|
+
//
|
16
|
+
// This source file is provided on an AS IS basis. The SPIRIT
|
17
|
+
// Consortium disclaims any warranty express or implied including
|
18
|
+
// any warranty of merchantability and fitness for use for a
|
19
|
+
// particular purpose.
|
20
|
+
//
|
21
|
+
// The user of the source file shall indemnify and hold The SPIRIT
|
22
|
+
// Consortium and its members harmless from any damages or liability.
|
23
|
+
// Users are requested to provide feedback to The SPIRIT Consortium
|
24
|
+
// using either mailto:feedback@lists.spiritconsortium.org or the forms at
|
25
|
+
// http://www.spiritconsortium.org/about/contact_us/
|
26
|
+
//
|
27
|
+
// This file may be copied, and distributed, WITHOUT
|
28
|
+
// modifications; this notice must be included on any copy.
|
29
|
+
-->
|
30
|
+
<xs:schema xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" elementFormDefault="qualified" attributeFormDefault="qualified">
|
31
|
+
<xs:include schemaLocation="busInterface.xsd"/>
|
32
|
+
<xs:include schemaLocation="identifier.xsd"/>
|
33
|
+
<xs:include schemaLocation="generator.xsd"/>
|
34
|
+
<xs:include schemaLocation="commonStructures.xsd"/>
|
35
|
+
<xs:include schemaLocation="model.xsd"/>
|
36
|
+
<xs:include schemaLocation="subInstances.xsd"/>
|
37
|
+
<xs:include schemaLocation="constraints.xsd"/>
|
38
|
+
<xs:complexType name="abstractorType">
|
39
|
+
<xs:annotation>
|
40
|
+
<xs:documentation>Abstractor-specific extension to abstractorType</xs:documentation>
|
41
|
+
</xs:annotation>
|
42
|
+
<xs:sequence>
|
43
|
+
<xs:group ref="spirit:versionedIdentifier"/>
|
44
|
+
<xs:element name="abstractorMode">
|
45
|
+
<xs:annotation>
|
46
|
+
<xs:documentation>Define the mode for the interfaces on this abstractor.
|
47
|
+
|
48
|
+
For master the first interface connects to the master, the second connects to the mirroredMaster
|
49
|
+
|
50
|
+
For slave the first interface connects to the mirroredSlave the second connects to the slave
|
51
|
+
|
52
|
+
For direct the first interface connects to the master, the second connects to the slave
|
53
|
+
|
54
|
+
For system the first interface connects to the system, the second connects to the mirroredSystem. For system the group attribute is required</xs:documentation>
|
55
|
+
</xs:annotation>
|
56
|
+
<xs:complexType>
|
57
|
+
<xs:simpleContent>
|
58
|
+
<xs:extension base="spirit:abstractorModeType">
|
59
|
+
<xs:attribute name="group" type="xs:Name">
|
60
|
+
<xs:annotation>
|
61
|
+
<xs:documentation>Define the system group if the mode is set to system</xs:documentation>
|
62
|
+
</xs:annotation>
|
63
|
+
</xs:attribute>
|
64
|
+
</xs:extension>
|
65
|
+
</xs:simpleContent>
|
66
|
+
</xs:complexType>
|
67
|
+
</xs:element>
|
68
|
+
<xs:element name="busType" type="spirit:libraryRefType">
|
69
|
+
<xs:annotation>
|
70
|
+
<xs:documentation>The bus type of both interfaces. Refers to bus definition using vendor, library, name, version attributes.</xs:documentation>
|
71
|
+
</xs:annotation>
|
72
|
+
</xs:element>
|
73
|
+
<xs:element name="abstractorInterfaces">
|
74
|
+
<xs:annotation>
|
75
|
+
<xs:documentation>The interfaces supported by this abstractor</xs:documentation>
|
76
|
+
</xs:annotation>
|
77
|
+
<xs:complexType>
|
78
|
+
<xs:sequence>
|
79
|
+
<xs:element name="abstractorInterface" type="spirit:abstractorBusInterfaceType" minOccurs="2" maxOccurs="2">
|
80
|
+
<xs:annotation>
|
81
|
+
<xs:documentation>An abstractor must have exactly 2 Interfaces.</xs:documentation>
|
82
|
+
</xs:annotation>
|
83
|
+
</xs:element>
|
84
|
+
</xs:sequence>
|
85
|
+
</xs:complexType>
|
86
|
+
</xs:element>
|
87
|
+
<xs:element name="model" type="spirit:abstractorModelType" minOccurs="0">
|
88
|
+
<xs:annotation>
|
89
|
+
<xs:documentation>Model information.</xs:documentation>
|
90
|
+
</xs:annotation>
|
91
|
+
</xs:element>
|
92
|
+
<xs:element ref="spirit:abstractorGenerators" minOccurs="0">
|
93
|
+
<xs:annotation>
|
94
|
+
<xs:documentation>Generator list is tools-specific.</xs:documentation>
|
95
|
+
</xs:annotation>
|
96
|
+
</xs:element>
|
97
|
+
<xs:element ref="spirit:choices" minOccurs="0"/>
|
98
|
+
<xs:element ref="spirit:fileSets" minOccurs="0"/>
|
99
|
+
<xs:element ref="spirit:description" minOccurs="0"/>
|
100
|
+
<xs:element ref="spirit:parameters" minOccurs="0"/>
|
101
|
+
<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
|
102
|
+
</xs:sequence>
|
103
|
+
</xs:complexType>
|
104
|
+
<xs:element name="abstractor" type="spirit:abstractorType">
|
105
|
+
<xs:annotation>
|
106
|
+
<xs:documentation>This is the root element for abstractors</xs:documentation>
|
107
|
+
</xs:annotation>
|
108
|
+
<xs:key name="abstractorInterfaceKey">
|
109
|
+
<xs:selector xpath="spirit:abstractorInterfaces/spirit:abstractorInterface"/>
|
110
|
+
<xs:field xpath="spirit:name"/>
|
111
|
+
</xs:key>
|
112
|
+
<xs:key name="abstractorComponentChoiceKey">
|
113
|
+
<xs:selector xpath="spirit:choices/spirit:choice"/>
|
114
|
+
<xs:field xpath="spirit:name"/>
|
115
|
+
</xs:key>
|
116
|
+
<xs:keyref name="abstractorComponentChoiceRef" refer="spirit:abstractorComponentChoiceKey">
|
117
|
+
<xs:selector xpath=".//*"/>
|
118
|
+
<xs:field xpath="@spirit:choiceRef"/>
|
119
|
+
</xs:keyref>
|
120
|
+
<xs:key name="abstractorComponentViewKey">
|
121
|
+
<xs:selector xpath="spirit:model/spirit:views/spirit:view"/>
|
122
|
+
<xs:field xpath="spirit:name"/>
|
123
|
+
</xs:key>
|
124
|
+
<xs:keyref name="abstractorComponentTypeDefViewNameRef" refer="spirit:abstractorComponentViewKey">
|
125
|
+
<xs:selector xpath=".//spirit:viewNameRef"/>
|
126
|
+
<xs:field xpath="."/>
|
127
|
+
</xs:keyref>
|
128
|
+
<xs:key name="abstractorFileSetKey">
|
129
|
+
<xs:selector xpath=".//spirit:fileSet"/>
|
130
|
+
<xs:field xpath="spirit:name"/>
|
131
|
+
</xs:key>
|
132
|
+
<xs:keyref name="abstractorFileSetRef" refer="spirit:abstractorFileSetKey">
|
133
|
+
<xs:selector xpath=".//spirit:fileSetRef"/>
|
134
|
+
<xs:field xpath="spirit:localName"/>
|
135
|
+
</xs:keyref>
|
136
|
+
<xs:key name="abstractorPortKey">
|
137
|
+
<xs:selector xpath="spirit:model/spirit:ports/spirit:port"/>
|
138
|
+
<xs:field xpath="spirit:name"/>
|
139
|
+
</xs:key>
|
140
|
+
<xs:keyref name="abstractorportRef" refer="spirit:abstractorPortKey">
|
141
|
+
<xs:selector xpath="spirit:abstractorInterfaces/spirit:abstractorInterface/spirit:portMaps/spirit:portMap/spirit:physicalPort/spirit:name"/>
|
142
|
+
<xs:field xpath="."/>
|
143
|
+
</xs:keyref>
|
144
|
+
</xs:element>
|
145
|
+
<xs:simpleType name="abstractorModeType">
|
146
|
+
<xs:annotation>
|
147
|
+
<xs:documentation>Mode for this abstractor</xs:documentation>
|
148
|
+
</xs:annotation>
|
149
|
+
<xs:restriction base="xs:string">
|
150
|
+
<xs:enumeration value="master"/>
|
151
|
+
<xs:enumeration value="slave"/>
|
152
|
+
<xs:enumeration value="direct"/>
|
153
|
+
<xs:enumeration value="system"/>
|
154
|
+
</xs:restriction>
|
155
|
+
</xs:simpleType>
|
156
|
+
</xs:schema>
|