Personal tools
User menu

Mapping Specification

Jump to: navigation, search

This page describes the specification of a mapping using XML. The mapping defines where and how the components of an application are executed on a distributed hardware platform. Mapping needs to be done in the spatial domain, which is referred to as binding, and in the temporal domain, which is referred to as scheduling. In DAL, the binding specification defined a mapping of processes to processors and software channels to communication paths in a certain scenario. The scheduling specification defines the scheduling policy on each resource and the according parameters, e.g. time division multiple access scheme and the associated slot length, fixed priority scheduling and the associated priorities, or static scheduling and the associated ordering. In the current version of DAL, the scheduling polity cannot be defined, but the framework just executes all processes according to the operating systems scheduling policy.

The mapping specification is therefore composed of

  • a set of mappings for each process network,
  • the correlation between scenarios of the finite state machine and individual mappings for each process network.

More information can be found in the CASES 2012 publication.

Mapping Correlation

Elements for Mapping Correlation Specification

mappingcorrelation

The mappingcorrelation element serves as container for the state elements. Besides the attributes to specify the namespace, it has a name attribute that is used to specify an identifier for the mapping correlation.

state

The element state is used to describe a state in the finite state machine which corresponds to a scenario or a system state with a set of applications running or paused. It has one attribute name which is a string and it may contain several child elements of type correlation. The name attribute has to correspond to a name of a state as defined in the finite state machine specification.

correlation

The correlation element serves for the definition of correlations. The correlation element has one attribute, namely name. The name attribute is used to specify an identifier for the correlation. Furthermore, the correlation has two child elements processnetwork and mapping, specifying which processnetwork (as defined by the name attribute of the process network) is correlated to which mapping (as defined by the name attribute of the mapping specification).

Example

  1. <mappingcorrelation name="mappingcorrelation1">
  2.   <state name="State_A">
  3.     <correlation name="correlation1">
  4.       <processnetwork name="pn1" />
  5.       <mapping name="mapping1" />
  6.     </correlation>
  7.     <correlation name="correlation2">
  8.       <processnetwork name="pn2" />
  9.       <mapping name="mapping1" />
  10.     </correlation>
  11.   </state>
  12.   <state name="State_B">
  13.     <correlation name="correlation3">
  14.       <processnetwork name="pn2" />
  15.       <mapping name="mapping1" />
  16.     </correlation>
  17.   </state>
  18.   <state name="State_C">
  19.     <correlation name="correlation4">
  20.       <processnetwork name="pn1" />
  21.       <mapping name="mapping2" />
  22.     </correlation>
  23.   </state>
  24.   <state name="State_D">
  25.     <correlation name="correlation5">
  26.       <processnetwork name="pn2" />
  27.       <mapping name="mapping2" />
  28.     </correlation>
  29.   </state>
  30. </mappingcorrelation>

Individual Mapping

The actual mapping of the processes to the available processing units is specified in a separate XML file. This is also used to define some specific properties for a process depending on its mapping.

Elements

The following code snippet shows an example binding for the square process onto a GPU. It is defined to use the OpenCL version of the process, which results into a transformation of the source code into an OpenCL kernel if it is not yet specified as such. There are also two mapping specific attributes given: the number of work-items per work-group and the number of work-groups.

  1. <binding name="square">
  2. 	<process name="square"/>
  3. 	<processor name="gpu"/>
  4. 	<target>
  5. 		<opencl workitems="256" workgroups="1">
  6. 			<port name="out" access="strided"/>
  7. 		</opencl>
  8. 	</target>
  9. </binding>
  1. The binding tag specifies a binding with name.
  2. The process tag selects the process to bind by using its name.
  3. The processor tag selects which processor to map onto depending on its name.
  4. The target tag is used to select which implementation to use of the specified process.
  5. The tag within target can be either posix, which has no further attributes and is the default, or it can be opencl, which can specify the number of workitems per work-group and the number of workgroups.
  6. For opencl tags, it is possible to specify the output access method in a port tag. The name attribute identifies the port and access can either be block or strided.

Example

The following example maps an exemplified application onto a quad-core architecture:

  1. <mapping name="Mapping">
  2. 	<binding name="generator">
  3. 		<process name="generator"/>
  4. 		<processor name="core_2"/>
  5. 		<target>
  6. 			<posix/>
  7. 		</target>
  8. 	</binding>
  9. 	<binding name="square">
  10. 		<process name="square"/>
  11. 		<processor name="gpu"/>
  12. 		<target>
  13. 			<opencl workitems="256" workgroups="1">
  14. 				<port name="out" access="strided"/>
  15. 			</opencl>
  16. 		</target>
  17. 	</binding>
  18. 	<binding name="consumer">
  19. 		<process name="consumer"/>
  20. 		<processor name="core_2"/>
  21. 		<target>
  22. 			<posix/>
  23. 		</target>
  24. 	</binding>
  25. </mapping>
!!! Dieses Dokument stammt aus dem ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the ETH Web archive and is no longer maintained !!!