<?xml version="1.0" encoding="UTF-8"?>
<!--
// Description : cardbus.xml
// Original Author : SPIRIT Schema Working Group
// Version: 1.0
//
// Copyright 2006-2013 Accellera Systems Initiative
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<spirit:busDefinition xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.2"
							xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
							xsi:schemaLocation="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.2
																http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.2/index.xsd">

<!-- use lower case to avoid os confusion -->
	<spirit:vendor>spiritconsortium.org</spirit:vendor>
		<!-- busdef vendor domain name -->
	<spirit:library>busdef.owner.interface_family</spirit:library>
		<!-- busdef = required -->
		<!-- owner = bus owner, e.g. arm, ieee, etc. -->
		<!-- interface_family = interface group, e.g. amba, 802, etc. -->
		<!-- e.g. busdef.arm.amba, busdef.ieee.802 -->
	<spirit:name>interface.name_busversion</spirit:name>
		<!-- interface.name = specific interface, e.g. ahb, apb, xaui, xgmii -->
		<!-- include _busversion to differentiate various releases of the bus specifcation -->
		<!-- add .internal qualifer for internal digital versions of external interface standards -->
		<!-- e.g. interface.pci_2.2 -->
	<spirit:version>1.0</spirit:version>
		<!-- file version, not bus or interface version -->
		<!-- include the bus or interface version in either the library or name -->

	<spirit:directConnection>false</spirit:directConnection>
		<!-- true allows direct master to slave connection -->
		<!-- false requires a channel (master to mirrorMaster, slave to mirrorSlave, system to mirrorSystem)  -->
	<spirit:extends spirit:vendor="spiritconsortium.org" spirit:library="interface.family" spirit:name="interface.base" spirit:version="1.0"/>
		<!-- optional entry, use only when required -->
	<spirit:maxMasters>1</spirit:maxMasters>
		<!-- optional entry, use only when required -->
		<!-- unbounded when not specified -->
		<!-- refer to the User Guide for the definition of master and slave -->
		<!-- if all interfaces are the same, then all should be masters -->
	<spirit:maxSlaves>1</spirit:maxSlaves>
		<!-- optional entry, use only when required -->
		<!-- unbounded when not specified -->
		<!-- refer to the User Guide for the definition of master and slave -->
		<!-- if all interfaces are the same, then all should be masters, set maxSlaves to 0 -->

	<spirit:signals>
		<spirit:signal>
			<spirit:logicalName>template_clock</spirit:logicalName>
			<spirit:isClock>true</spirit:isClock>
			<spirit:requiresDriver spirit:driverType="clock">true</spirit:requiresDriver>
			<spirit:onSystem>
				<spirit:group>clock_reset_group</spirit:group>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onSystem>
			<spirit:onMaster>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_reset_n</spirit:logicalName>
				<!-- in general follow the bus specification for bus signal names -->
				<!-- for names with illegal characters, such as PCI (which uses #), use _n to indicate negative active signals -->
			<spirit:isReset>true</spirit:isReset>
			<spirit:requiresDriver spirit:driverType="singleShot">true</spirit:requiresDriver>
			<spirit:onSystem>
				<spirit:group>clock_reset_group</spirit:group>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onSystem>
			<spirit:onMaster>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_addr_only</spirit:logicalName>
			<spirit:isAddress>true</spirit:isAddress>
			<spirit:onMaster>
				<spirit:bitWidth>32</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>32</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_addr_data</spirit:logicalName>
			<spirit:isAddress>true</spirit:isAddress>
			<spirit:isData>true</spirit:isData>
				<!-- this is order dependent, isAddress must precede isData -->
			<spirit:onMaster>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>inout</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>inout</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>

<!-- the following is an example of how to represent the internal connections for a tristate -->
<!-- or off-chip interface using the above signal for reference -->
		<spirit:signal>
			<spirit:logicalName>template_addr_data_in</spirit:logicalName>
			<spirit:isAddress>true</spirit:isAddress>
			<spirit:isData>true</spirit:isData>
				<!-- this is order dependent, isAddress must precede isData -->
			<spirit:onMaster>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_addr_data_out</spirit:logicalName>
			<spirit:isAddress>true</spirit:isAddress>
			<spirit:isData>true</spirit:isData>
				<!-- this is order dependent, isAddress must precede isData -->
			<spirit:onMaster>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_addr_data_en</spirit:logicalName>
			<spirit:isAddress>true</spirit:isAddress>
			<spirit:isData>true</spirit:isData>
				<!-- this is order dependent, isAddress must precede isData -->
			<spirit:onMaster>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>16</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>

		<spirit:signal>
			<spirit:logicalName>template_wdata</spirit:logicalName>
			<spirit:isData>true</spirit:isData>
			<spirit:onMaster>
				<spirit:bitWidth>32</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>32</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_rdata</spirit:logicalName>
			<spirit:isData>true</spirit:isData>
			<spirit:onMaster>
				<spirit:bitWidth>32</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<spirit:bitWidth>32</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_busreq</spirit:logicalName>
			<spirit:onMaster>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<!-- <spirit:direction>illegal</spirit:direction> -->
				<!-- this signal is not present on a slave interface -->
			</spirit:onSlave>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_busgrant</spirit:logicalName>
			<spirit:onMaster>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>in</spirit:direction>
			</spirit:onMaster>
			<spirit:onSlave>
				<!-- <spirit:direction>illegal</spirit:direction> -->
				<!-- this signal is not present on a slave interface -->
			</spirit:onSlave>
			<spirit:defaultValue>
				<!-- specify a default value for signals that may be optional or unused on one end  -->
				<!-- this value will be overridden at the component level by any components that specify a default on the signal in the component xml  -->
				<spirit:value>0</spirit:value>
			</spirit:defaultValue>
		</spirit:signal>
		<spirit:signal>
			<spirit:logicalName>template_slave_error</spirit:logicalName>
			<spirit:onSlave>
				<spirit:bitWidth>1</spirit:bitWidth>
				<spirit:direction>out</spirit:direction>
			</spirit:onSlave>
		</spirit:signal>
	</spirit:signals>

<!-- list of values for busDefParameters (when specified) -->
	<spirit:choices>
		<spirit:choice>
			<spirit:name>busParm</spirit:name>
			<spirit:enumeration>fire</spirit:enumeration>
			<spirit:enumeration>ice</spirit:enumeration>
		</spirit:choice>
	</spirit:choices>

<!-- optional list of busDefParamters that are used to characterize bus behavior -->
	<spirit:busDefParameters>
		<spirit:busDefParameter spirit:name="busStyle" spirit:format="choice" spirit:choiceRef="busParm">fire</spirit:busDefParameter>
	</spirit:busDefParameters>

	<!-- spirit:vendorExtensions/ -->
		<!-- standard bus definitions should not include vendor extensions -->
</spirit:busDefinition>
