Overview

This document specifies what is and how should look Project Hardware (Hardware) used with Swart Service (Service).

Hardware describes cpu resources used in client’s project. The client is obligate to provide Hardware and to follow the rules how to define it explained in this document, if he wants to use Service.

General Hardware Rules

  • Hardware should contain only resources relative data and nothing else
  • Hardware should be encoded with UTF-8 settings
  • Hardware should be saved as xml file
  • Root element of the xml must be HW with no attributes
  • Child elements of the root must be RAM, ROM and DESCRIPTION with no attributes
  • All other elements should be resources, defined as child elements in some of those three elements based on their type
  • Resources should be described as RESOURCE elements
  • Resource properties should be defined as element attributes

Resource Rules

  • Every resource must contain following attributes:
    • core – mandatory
    • name – mandatory
    • value – mandatory
    • reserved – mandatory if type is RAM or ROM, otherwise optional
    • cached – mandatory if type is RAM or ROM, otherwise optional
    • alias – mandatory if type is RAM or ROM, otherwise optional

Resource’s Properties

core – defines resource’s core number

name – represents a name of the resource

value – resource’s value

reserved – defines if memory is reserved

cached – defines if memory is cached

alias – defines another memory range for already defined resource

Properties Rules

core:

  • only numbers
  • in range 0 .. N (N+1 core cpu)

name:

  • only letters, numbers and underscore are allowed

value:

  • range with start/end pair in hexadecimal form
  • start/end pair values separated with “;”
  • if type of the resource is description every char is allowed

reserved:

  • boolean value – true or false

cached:

  • boolean value – true or false

alias:

  • boolean value – true or false

Additional Resources (type description)

There are additional resources used to better define Hardware. They have description for type (defined as child elements of description element), and name-value pairs are as follows:

  • MCU – MCU name, string value
  • IVT – Interrupt Vector Table entry address – 1..N addresses in hexadecimal form, separated with “;”
  • IVTOFFSET – Offset in bytes for Interrupt Vector in Interrupt Vector Table – hexadecimal format, mandatory if IVT is defined
  • IVTSIZE – Size of Interrupt Vector Table – size in bytes, hexadecimal format, mandatory if IVT is defined
  • TVT – Trap Vector Table entry address – 1..N addresses in hexadecimal form, separated with “;”
  • TVTOFFSET – Offset in bytes for Trap Vector in Trap Vector Table – hexadecimal format, mandatory if TVT is defined
  • TVTSIZE – size of Trap Vector Table – size in bytes, hexadecimal format, mandatory if TVT is defined
  • INTERFACE – Interface name with type separated with “;”, interface type can be R (receiver) or S (sender), string value
  • RETURNVALUEREGISTER – Number of Data register used for return value from function
  • RETURNADDRESSREGISTER – Number of Address register used for return from pointers
  • IFACERECEIVERRETNCVALUE – Return not connected value for Receiver interface
  • IFACESENDERRETNCVALUE – Return not connected value for Sender interface

Example

<HW>
    <RAM>
        <RESOURCE core="2" name="PCTR2" value="0x501C0000;0x501C2FFF" reserved="false" cached="true" alias="true"/>
        <RESOURCE core="1" name="DLMU1" value="0x90010000;0x9001FFFF" reserved="false" cached="false" alias="false"/>
        <RESOURCE core="0" name="DAM0" value="0xB0400000;0xB040FFFF" reserved="false" cached="false" alias="true"/>
        <RESOURCE core="3" name="DLMU3" value="0xB0030000;0xB003FFFF" reserved="false" cached="false" alias="true"/>
    </RAM>
    <ROM>
        <RESOURCE core="2" name="PFI2" value="0x80600000;0x808FFFFF" reserved="false" cached="false" alias="false"/>
        <RESOURCE core="0" name="PFI0" value="0xA0000000;0xA02FFFFF" reserved="false" cached="false" alias="true"/>
    </ROM>
    <DESCRIPTION>
        <RESOURCE core="012" name="MCU" value="TC387"/>
        <RESOURCE core="012" name="IVT" value="0x80061000;0x80063000;0x80065000"/>
        <RESOURCE core="012" name="IVTOFFSET" value="0x20"/>
        <RESOURCE core="012" name="IVTSIZE" value="0x2000"/>
    </DESCRIPTION>
</HW>
Go to Top