<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Michael Brouhard (Mentor Graphics) -->
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Michael Brouhard (Mentor Graphics) -->
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Mark Noll (Synopsys) -->
<!--
// Description : busDefinition.xsd
// Author : SPIRIT Schema Working Group
// Version:     $Revision: 401 $
// Date:        $Date: 2006-07-07 07:21:09 -0600 (Fri, 07 Jul 2006) $
// Tag:         $Name$
//
// Copyright (c) 2005 SPIRIT.  All rights reserved.
// www.spiritconsortium.com
//
// THIS WORK FORMS PART OF A SPIRIT CONSORTIUM SPECIFICATION.
// THIS WORK CONTAINS TRADE SECRETS AND PROPRIETARY INFORMATION
// WHICH IS THE EXCLUSIVE PROPERTY OF INDIVIDUAL MEMBERS OF THE
// SPIRIT CONSORTIUM. USE OF THESE MATERIALS ARE GOVERNED BY
// THE LEGAL TERMS AND CONDITIONS OUTLINED IN THE SPIRIT
// SPECIFICATION DISCLAIMER AVAILABLE FROM
// www.spiritconsortium.org
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.4" targetNamespace="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.4" elementFormDefault="qualified" attributeFormDefault="qualified">
	<xs:include schemaLocation="identifier.xsd"/>
	<xs:include schemaLocation="configurator.xsd"/>
	<xs:include schemaLocation="commonStructures.xsd"/>
	<xs:include schemaLocation="port.xsd"/>
	<xs:include schemaLocation="generator.xsd"/>
	<xs:include schemaLocation="constraints.xsd"/>
	<xs:group name="strengthGroup">
		<xs:sequence>
			<xs:element name="strength" default="strong">
				<xs:annotation>
					<xs:documentation>The strength of the signal. "strong" (default) or "weak"</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="strong"/>
						<xs:enumeration value="weak"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<xs:group name="portProperties">
		<xs:sequence>
			<xs:choice minOccurs="0">
				<xs:element name="direction" type="spirit:componentPortDirectionType" default="out"/>
				<xs:element ref="spirit:initiative"/>
			</xs:choice>
		</xs:sequence>
	</xs:group>
	<xs:element name="presence" default="optional">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="required"/>
				<xs:enumeration value="illegal"/>
				<xs:enumeration value="optional"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="busDefinition">
		<xs:annotation>
			<xs:documentation>Defines the signals and high-level function of a bus.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:group ref="spirit:versionedIdentifier"/>
				<xs:element name="directConnection" type="xs:boolean" default="false">
					<xs:annotation>
						<xs:documentation>This element indicates that a master interface may be directly connected to a slave interface (under certain conditions) for busses of this type.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="extends" type="spirit:libraryRefType" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Optional name of bus type that this bus definition is compatible with. This bus definition may change the definitions of signals in the existing bus definition and add new signals, the signals in the original bus are not deleted but may be marked illegal to disallow their use.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="maxMasters" type="xs:nonNegativeInteger" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Indicates the maximum number of masters this bus supports.  If this element is not present, the number of masters allowed is unbounded. </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="maxSlaves" type="xs:nonNegativeInteger" default="0" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Indicates the maximum number of slaves this bus supports.  If the element is not present, the number of slaves allowed is unbounded.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="ports">
					<xs:annotation>
						<xs:documentation>This is a list of logical ports defined by the bus.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="port" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="logicalName" type="xs:Name">
											<xs:annotation>
												<xs:documentation>The assigned name of this port in bus specifications.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:choice>
											<xs:annotation>
												<xs:documentation>A port can carry both address and data, but may not mix this with a clock or reset</xs:documentation>
											</xs:annotation>
											<xs:sequence>
												<xs:element name="isAddress" type="xs:boolean" minOccurs="0">
													<xs:annotation>
														<xs:documentation>If this element is present, the port contains address information.</xs:documentation>
													</xs:annotation>
												</xs:element>
												<xs:element name="isData" type="xs:boolean" minOccurs="0">
													<xs:annotation>
														<xs:documentation>If this element is present, the port contains data information.</xs:documentation>
													</xs:annotation>
												</xs:element>
											</xs:sequence>
											<xs:element name="isClock" type="xs:boolean" minOccurs="0">
												<xs:annotation>
													<xs:documentation>If this element is present, the port contains only clock information.</xs:documentation>
												</xs:annotation>
											</xs:element>
											<xs:element name="isReset" type="xs:boolean" minOccurs="0">
												<xs:annotation>
													<xs:documentation>Is this element is present, the port contains only reset information.</xs:documentation>
												</xs:annotation>
											</xs:element>
										</xs:choice>
										<xs:element ref="spirit:requiresDriver" minOccurs="0"/>
										<xs:element name="onSystem" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Defines constraints for this port when present in a system bus interface with a matching group name.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:sequence>
													<xs:element ref="spirit:presence" minOccurs="0"/>
													<xs:element name="group" type="xs:Name">
														<xs:annotation>
															<xs:documentation>Used to group system signals into different groups within a common bus.</xs:documentation>
														</xs:annotation>
													</xs:element>
													<xs:element name="width" type="xs:positiveInteger" minOccurs="0">
														<xs:annotation>
															<xs:documentation>Number of bits required to represent this signal. Absence of this element indicates unconstrained number of bits, i.e. the component will define the number of bits in this signal.</xs:documentation>
														</xs:annotation>
													</xs:element>
													<xs:group ref="spirit:portProperties"/>
													<xs:element ref="spirit:protocol" minOccurs="0"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="onMaster" minOccurs="0">
											<xs:annotation>
												<xs:documentation>Defines constraints for this port when present in a master bus interface.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:sequence>
													<xs:element ref="spirit:presence" minOccurs="0"/>
													<xs:element name="width" type="xs:positiveInteger" minOccurs="0">
														<xs:annotation>
															<xs:documentation>Number of bits required to represent this signal. Absence of this element indicates unconstrained number of bits, i.e. the component will define the number of bits in this signal.</xs:documentation>
														</xs:annotation>
													</xs:element>
													<xs:group ref="spirit:portProperties"/>
													<xs:element ref="spirit:protocol" minOccurs="0"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="onSlave" minOccurs="0">
											<xs:annotation>
												<xs:documentation>Defines constraints for this port when present in a slave bus interface.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:sequence>
													<xs:element ref="spirit:presence" minOccurs="0"/>
													<xs:element name="width" type="xs:positiveInteger" minOccurs="0">
														<xs:annotation>
															<xs:documentation>Number of bits required to represent this signal. Absence of this element indicates unconstrained number of bits, i.e. the component will define the number of bits in this signal.</xs:documentation>
														</xs:annotation>
													</xs:element>
													<xs:group ref="spirit:portProperties"/>
													<xs:element ref="spirit:protocol" minOccurs="0"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="defaultDriver" minOccurs="0" maxOccurs="unbounded">
											<xs:annotation>
												<xs:documentation>Definition of a driver for this port.</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:choice>
													<xs:element name="value" type="spirit:signalValueType">
														<xs:annotation>
															<xs:documentation>The initial or default value on the port.</xs:documentation>
														</xs:annotation>
													</xs:element>
													<xs:sequence>
														<xs:element name="name" type="xs:string">
															<xs:annotation>
																<xs:documentation>Name of the driver for this port</xs:documentation>
															</xs:annotation>
														</xs:element>
														<xs:element name="parameters" minOccurs="0">
															<xs:annotation>
																<xs:documentation>Parameters of the driver</xs:documentation>
															</xs:annotation>
															<xs:complexType>
																<xs:sequence>
																	<xs:element ref="spirit:parameter" minOccurs="0" maxOccurs="unbounded"/>
																</xs:sequence>
															</xs:complexType>
														</xs:element>
														<xs:element ref="spirit:fileSets"/>
														<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
													</xs:sequence>
												</xs:choice>
											</xs:complexType>
										</xs:element>
										<xs:element ref="spirit:busDefPortConstraints" minOccurs="0"/>
										<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element ref="spirit:choices" minOccurs="0"/>
				<xs:element name="busDefParameters" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Container element for parameters defined for a bus definition.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="busDefParameter" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>Defines a parameter which can be specified on a bus interface. The parameter is fully described on the bus definition and then instantiated on the bus interface. Setting 'consistent' to true implies that the parameter must have the same value on the corresponding bus interface parameters on both sides of connected interfaces.</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:simpleContent>
										<xs:extension base="xs:string">
											<xs:attribute name="consistent" type="xs:boolean" use="optional" default="false"/>
											<xs:attribute name="name" type="xs:string" use="required"/>
											<xs:attributeGroup ref="spirit:parameterDefinition"/>
										</xs:extension>
									</xs:simpleContent>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="compatibleBusTypes" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="compatibleBusType" type="spirit:libraryRefType" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			<xs:element name="description" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>String for describing the bus definition to users</xs:documentation>
				</xs:annotation>
			</xs:element>
				<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
		<xs:key name="busDefChoiceKey">
			<xs:selector xpath="spirit:choices/spirit:choice"/>
			<xs:field xpath="spirit:name"/>
		</xs:key>
		<xs:keyref name="busDefChoiceRef" refer="spirit:busDefChoiceKey">
			<xs:selector xpath=".//*"/>
			<xs:field xpath="@spirit:choiceRef"/>
		</xs:keyref>
	</xs:element>
</xs:schema>
