﻿<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance"
    ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/SpecIFications/db/IP_Modes.xsd"
    xmlns="http://mcd.rou.st.com/modules.php?name=mcu"
    DBVersion="V4.0"
    IPType="middleware"
    IpGroup="Middleware"
    Name="OPENAMP"
    Version="STM32H7xx_v1.0.0_Cube">
    <About>OPENAMP: Open Asymmetric Multi-Processing</About>

    <!-- RefParameters for OPENAMP - Version-->
    <RefParameter Name="Instance" DefaultValue="" Comment="Instance" Type="String"  Visible="true">
	<Condition Expression="$IpInstance=OPENAMP_M4" Diagnostic=""/>
		<PossibleValue Comment="OPENAMP_M4" Value="OPENAMP_M4"/>
	</RefParameter>
	
	<RefParameter Name="Instance" DefaultValue="" Comment="Instance" Type="String"  Visible="true">
	    <Condition Expression="$IpInstance=OPENAMP_M7" Diagnostic=""/>
		<PossibleValue Comment="OPENAMP_M7" Value="OPENAMP_M7"/>
	</RefParameter>
	
    <RefParameter Name="OPENAMP_Version" Comment="OPENAMP version" DefaultValue="v2018.10_rc1" Type="String"  Group="Version">
        <PossibleValue Comment="Current version of OPENAMP" Value="v2018.10"/>
    </RefParameter>

	<RefParameter Name="METAL_MAX_DEVICE_REGIONS_NUMBER" Comment="METAL_MAX_DEVICE_REGIONS" Type="integer" Group="Configuration"  DefaultValue="2" Min="1" Max="32" Visible="true">        
	<Description>MAX IO regions created by libmetal.</Description> 
    </RefParameter>
	
	<RefParameter Name="RPMSG_BUFFER_SIZE" Comment="RPMSG_BUFFER_SIZE" Type="integer" Group="Configuration"  DefaultValue="512" Min="1" Max="8192" Visible="true">        
    <Description>Messaging buffer size.</Description>
	</RefParameter>

	<RefParameter Name="MODE" Comment="Mode" DefaultValue="SLAVE" Type="List"  Group="Communication Mode" Visible="true">
	  <Condition Expression="$IpInstance=OPENAMP_M4" Diagnostic=""/>
	    <PossibleValue Comment="MASTER" Value="MASTER" Semaphore="S_MASTER_MODE_SET$context"/>
        <PossibleValue Comment="SLAVE" Value="SLAVE" Semaphore="S_SLAVE_MODE_SET$context"/>
	<Description>Configure the OPENAMP application to run as Master or Slave on Cortex-M4.</Description>
	</RefParameter>	

	<RefParameter Name="MODE" Comment="Mode" DefaultValue="MASTER" Type="List"  Group="Communication Mode" Visible="true">
	  <Condition Expression="$IpInstance=OPENAMP_M7" Diagnostic=""/>
	    <PossibleValue Comment="MASTER" Value="MASTER" Semaphore="S_MASTER_MODE_SET$context"/>
        <PossibleValue Comment="SLAVE" Value="SLAVE" Semaphore="S_SLAVE_MODE_SET$context"/>
	<Description>Configure the OPENAMP application to run as Master or Slave on Cortex-M7.</Description>
	</RefParameter>	
	
  <!--<RefParameter Name="SHM_START_ADDRESS" Comment="SHM_START_ADDRESS" DefaultValue="0x38001000" Type="hex" Min="0x0" Max="0xFFFFFFFF" Group="Configuration" Visible="false"/>
    <RefParameter Name="SHM_SIZE" Comment="SHM_SIZE" DefaultValue="0x000FFF000" Min="0x0" Max="0xFFFFFFFF" Type="hex"  Group="Configuration" Visible="false"/>
    <RefParameter Name="VRING_RX_ADDRESS" Comment="VRING_RX_ADDRESS" DefaultValue="+SHM_START_ADDRESS" Type="hex" Min="=SHM_START_ADDRESS" Max="0xFFFFFFFF"  Group="Configuration" Visible="false"/>
    <RefParameter Name="VRING_TX_ADDRESS" Comment="VRING_TX_ADDRESS" DefaultValue="+SHM_START_ADDRESS" Type="hex" Min="0x0" Max="0xFFFFFFFF" Group="Configuration" Visible="false"/>
    <RefParameter Name="VRING_BUFF_ADDRESS" Comment="VRING_BUFF_ADDRESS" DefaultValue="+SHM_START_ADDRESS" Type="hex" Min="0x0" Max="0xFFFFFFFF"  Group="Configuration" Visible="false"/>
    <RefParameter Name="VRING_ALIGNMENT" Comment="VRING_ALIGNMENT" DefaultValue="4" Type="integer" Min="0" Max="512"  Group="Configuration" Visible="false"/>
    <RefParameter Name="VRING_NUM_BUFFS" Comment="VRING_NUM_BUFFS" DefaultValue="4" Type="integer" Min="0" Max="512"  Group="Configuration" Visible="false"/> -->
    
    <!-- Fixed parameters-->
    <RefParameter Name="NUM_RESOURCE_ENTRIES" Comment="NUM_RESOURCE_ENTRIES" DefaultValue="2" Type="string" Group="Configuration" Visible="true">
		<Description>Number of Resources. Fixed value = 2.</Description>
	</RefParameter>	
    <RefParameter Name="VRING_COUNT" Comment="VRING_COUNT" DefaultValue="2" Type="string"  Group="Configuration" Visible="true">
		<Description>Number of Vrings. Fixed value = 2.</Description>
	</RefParameter>	
    <RefParameter Name="VDEV_ID" Comment="VDEV_ID" DefaultValue="0xFF" Type="string"  Group="Configuration" Visible="true">
		<Description>Virtio Device ID. Fixed value = 0xFF.</Description>
	</RefParameter>	
    <RefParameter Name="VRING0_ID" Comment="VRING0_ID" DefaultValue="0" Type="string"  Group="Configuration" Visible="true">
		<Description>VRING0 ID (master to remote). Fixed value = 0.</Description>
	</RefParameter>	
    <RefParameter Name="VRING1_ID" Comment="VRING1_ID" DefaultValue="1" Type="string"  Group="Configuration" Visible="true">
		<Description>VRING1 ID (remote to master). Fixed value = 1.</Description>
	</RefParameter>	
    
    <RefMode Name="OpenAmp_Enabled">
        <ConfigForMode>OPENAMP_Init</ConfigForMode>
		<Parameter Name="Instance"/>
        <Parameter Name="OPENAMP_Version"/>
		<Parameter Name="MODE"/>
		<Parameter Name="METAL_MAX_DEVICE_REGIONS_NUMBER"/>
		<Parameter Name="RPMSG_BUFFER_SIZE"/>
       <!--<Parameter Name="SHM_START_ADDRESS"/>
        <Parameter Name="SHM_SIZE"/>
        <Parameter Name="VRING_RX_ADDRESS"/>
        <Parameter Name="VRING_TX_ADDRESS"/>
        <Parameter Name="VRING_BUFF_ADDRESS"/>
        <Parameter Name="VRING_ALIGNMENT"/>
        <Parameter Name="VRING_NUM_BUFFS"/> -->
        <Parameter Name="NUM_RESOURCE_ENTRIES"/>
        <Parameter Name="VRING_COUNT"/>
        <Parameter Name="VDEV_ID"/>
        <Parameter Name="VRING0_ID"/>
        <Parameter Name="VRING1_ID"/>
    </RefMode>


    <ModeLogicOperator Name="AND">
		<Mode Name="Enabled">
			<ModeLogicOperator Name="XOR">
				<Mode Name="OpenAmp_Enabled">
                  <SignalLogicalOp Name="AND">
                        <Signal IOMode="Basic" Name="VS_OPENAMP"/>
                    </SignalLogicalOp>
					<Semaphore>S_OPENAMP_SET$context</Semaphore>
                </Mode>
			</ModeLogicOperator>
		</Mode>
   </ModeLogicOperator>
	
    <!-- RefSignal for OPENAMP -->
    <RefSignal Name="VS_OPENAMP" Virtual="true" />    

</IP>