next_inactive up previous
Up: SESAME Users Guide

YMLPearl Users Guide

Joseph Coffland

jcofflan@users.sourceforge.net

April 5, 2006

Copyright ©2004 University of Amsterdam. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included with this documentation, GNU Free Documentation License.


Contents


1 Introduction

YMLPearl is the YML version of the Pearl event driven architecture simulator. Pearl models architecture simulations as networks of components which communicate via method calls. Pearl simulates at a high abstraction level and is therefore quite fast. Pearl simulations compute an estimate of the execution time of an application on a particular hardware by simulating events produced by an application simulation. These events tell the architecture simulation to either execute an instruction or perform a communication. Execution events cause simulation components to delay for a period of time. Communication events cause simulation components to synchronize their execution with other components.


2 Command Line Usage

YMLPearl simulations can be compiled with ymlpearl(1). Compiling a simulation results in an executable with a command line interface of its own, explained in ymlpearlexec(1).


3 YML Usage

This section is not complete. Please see the YMLEditor documentation for information on how to edit YMLPearl simulation files.


3.1 YML init string

An init string is used to initialize instances of YMLPearl classes. The string is read by the simulation executable at runtime from the architecture simulation's YML file. An init string is associated with a pearl class instance via a YML property. See the YML Users Guide for more information about using YML properties.

  <property name="init" value="1,arch,#[port1,port2,port3],<channel>"/>

An init string is a comma separated list of arguments which are passed to the YMLPearl class at creation time. This coincides with the variables listed in the .ps specification file. The order in the init string must match the order in the .ps file.

The arguments of in the init string are either an integer, a port type, regular expression matching port names in the YML file or an array of the first three argument types.

An integer is simply a whole number and may be positive, negative or zero.

A port type argument has the form '<type>' optionally preceded by a # symbol. YMLPearl creates an array of peers of the specified type by iterating through all the peers connected to output ports of the current object. A peer is added to the array if its class is the same as or is a subtype of the type specified. If the argument is preceded by a # symbol it represents two arguments, the size of the resulting array of matching peers followed by the array itself. # is not allowed when this argument is with in an array argument.

Regular expressions can be used to match port names. The resulting argument will be the peer id of the pearl object connected to the matching port. If this argument is not with in an array argument it must match one and only one port with only one peer connected to it. See the Unix man page about POSIX regular expressions for information on how to create regular expressions.

array arguments are used to pass a fixed or variable length array of values to a pearl object. An array argument has the form '[arg1,. . .,argN]' and is optionally preceded by a # symbol in which case it is actually two arguments, an integer representing the array length and the array itself. Within the square brackets is a comma separate list of the first three argument types. There are no sub-arrays. The resulting peer ids of port type and regular expression arguments are merely added to the array in order.


4 Programmers API

Not yet available. See the MJPEG example in SESAME distribution.


next_inactive up previous
Up: SESAME Users Guide
Joseph Coffland 2006-04-05