<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Michael Brouhard (Mentor Graphics) -->
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Michael Brouhard (Mentor Graphics) -->
<!--
// Description : port.xsd
// Author : SPIRIT Electronic System Level Working Group
// Version:     $Revision$
// Date:        $Date$
// 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:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.4" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.4" elementFormDefault="qualified" attributeFormDefault="qualified">
	<xs:include schemaLocation="commonStructures.xsd"/>
	<xs:include schemaLocation="constraints.xsd"/>
	<xs:include schemaLocation="file.xsd"/>
	<xs:simpleType name="componentPortDirectionType">
		<xs:annotation>
			<xs:documentation>The direction of a component port.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:token">
			<xs:enumeration value="in"/>
			<xs:enumeration value="out"/>
			<xs:enumeration value="inout"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="protocol">
		<xs:annotation>
			<xs:documentation>defines the protocol of a port, it can be either wire, or cable</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="type">
					<xs:annotation>
						<xs:documentation>The protocol type: wire for simple ports, or cable for complex ports</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="wire"/>
							<xs:enumeration value="cable"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="name" type="xs:anyURI">
					<xs:annotation>
						<xs:documentation>Define the type and allow further documentation.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="parameters">
					<xs:annotation>
						<xs:documentation>list protocol parameters (e.g. template parameters for a systemC protocol)</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" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="vector">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="left" default="0">
					<xs:annotation>
						<xs:documentation>The optional elements left and right can be used to select a bit-slice of a signal vector to map to the bus interface. </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:nonNegativeInteger">
								<xs:attributeGroup ref="spirit:long.prompt.att"/>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="right" default="0">
					<xs:annotation>
						<xs:documentation>The optional elements left and right can be used to select a bit-slice of a signal vector to map to the bus interface. </xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:nonNegativeInteger">
								<xs:attributeGroup ref="spirit:long.prompt.att"/>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="portType">
		<xs:annotation>
			<xs:documentation>A port description, giving a name and an access type for high level ports. </xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="name" type="xs:NMTOKEN">
				<xs:annotation>
					<xs:documentation>The name of the port.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:choice>
				<xs:element name="direction" type="spirit:componentPortDirectionType" default="out"/>
				<xs:element ref="spirit:initiative"/>
			</xs:choice>
			<xs:element ref="spirit:vector" minOccurs="0"/>
			<xs:element ref="spirit:protocol" minOccurs="0"/>
			<xs:element name="driver" minOccurs="0">
				<xs:complexType>
					<xs:choice minOccurs="0">
						<xs:element name="defaultValue" type="spirit:signalValueType" minOccurs="0">
							<xs:annotation>
								<xs:documentation>The initial or default value on the port.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element ref="spirit:clockDriver" minOccurs="0"/>
						<xs:element ref="spirit:singleShotDriver" minOccurs="0"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="export" default="false" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Specifies whether a signal is to be exported out of the module.</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:boolean">
							<xs:attributeGroup ref="spirit:bool.prompt.att"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element ref="spirit:constraintSets" minOccurs="0"/>
			<xs:element ref="spirit:portAccessType" minOccurs="0"/>
			<xs:element ref="spirit:portAccessHandle" minOccurs="0"/>
			<xs:element name="description" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>String for describing the port to users</xs:documentation>
				</xs:annotation>
			</xs:element>			
			<xs:element ref="spirit:vendorExtensions" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="initiative" default="requires">
		<xs:annotation>
			<xs:documentation>If this element is present, the type of access is restricted to the specified value.</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="requires"/>
				<xs:enumeration value="provides"/>
				<xs:enumeration value="both"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="portAccessType">
		<xs:annotation>
			<xs:documentation>If present, indicates how a netlister accesses a port or all the ports of a busInterface</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="ref"/>
				<xs:enumeration value="ptr"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="portAccessHandle" type="xs:string">
		<xs:annotation>
			<xs:documentation>If present, a netlister should use this string instead of the port name to access the port</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="port">
		<xs:annotation>
			<xs:documentation>Describes port characteristics.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="spirit:portType"/>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
</xs:schema>
