Otawa  0.10
Scripts

Writing a chain of analyzes for a specific microprocessor target is a hard path made of the setup of a WCET computation method, analyzes of the target hardware and analyzes of non-standard facilities of the hardware. More...

Classes

class  otawa::script::ScriptItem
 These objects represents the item of the configuration of a script. More...
 
class  otawa::script::Script
 A script processor allows to interpret a file that performs a WCET computation. More...
 

Functions

Identifier< elm::system::Pathotawa::script::PATH ("otawa::script::PATH","")
 This identifier configures the Script to use the given path. More...
 
Identifier< Pair< string,
string > > 
otawa::script::PARAM ("otawa::script::PARAM", pair(string(""), string("")))
 This identifier configures the Script to use the argument (identifier, value) as a parameter. More...
 
Identifier< xom::Element * > otawa::script::SCRIPT ("otawa::script::SCRIPT", 0)
 Put by the Script intrepreter in the configuration properties launching the processor. More...
 
Identifier< xom::Element * > otawa::script::PLATFORM ("otawa::script::PLATFORM", 0)
 Put by the Script intrepreter in the configuration properties launching the processor. More...
 
Identifier< bool > otawa::script::ONLY_CONFIG ("otawa::script::ONLY_CONFIG", false)
 This property informs the script to stop its work just after parsing the configuration items. More...
 
Identifier< bool > otawa::script::TIME_STAT ("otawa::script::TIME_STAT", false)
 This property asks the script to time the performed steps. More...
 

Variables

Identifier< elm::system::Pathotawa::script::PATH
 This identifier configures the Script to use the given path. More...
 
Identifier< Pair< string,
string > > 
otawa::script::PARAM
 This identifier configures the Script to use the argument (identifier, value) as a parameter. More...
 
Identifier< xom::Element * > otawa::script::SCRIPT
 Put by the Script intrepreter in the configuration properties launching the processor. More...
 
Identifier< xom::Element * > otawa::script::PLATFORM
 Put by the Script intrepreter in the configuration properties launching the processor. More...
 
Identifier< bool > otawa::script::ONLY_CONFIG
 This property informs the script to stop its work just after parsing the configuration items. More...
 
Identifier< bool > otawa::script::TIME_STAT
 This property asks the script to time the performed steps. More...
 

Detailed Description

Writing a chain of analyzes for a specific microprocessor target is a hard path made of the setup of a WCET computation method, analyzes of the target hardware and analyzes of non-standard facilities of the hardware.

This work may be relieved using scripts: a script is an XML files that includes:

All parts of the script are fully dynamic using the XSLT language to generate the hardware description and the performed analyzes. More information may be found on this format in the developer manual of OTAWA. Below is a simple example of script:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<otawa-script xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<name>Trivial WCET computation</name>
<info>
This script may be used to compute trivial WCET (not realistic)
with scalar pipelined processors. In the extreme case, it may give
a rough overestimation of the real WCET.
</info>
<configuration>
<item name="virtual" type="bool" default="false" label="function call virtualization">
<help>Cause the function call to be replaced by inlining the function body.
Improve the precision of the WCET but may augment the computation time.</help>
</item>
<item name="stages" type="int" default="5" label="number of stages">
<help>Number of stages in the pipeline.</help>
</item>
</configuration>
<script>
<xsl:if test="$virtual!=0">
<step processor="otawa::Virtualizer"/>
</xsl:if>
<step processor="otawa::ipet::WCETComputation">
<config name="otawa::ipet::PIPELINE_DEPTH" value="{$stages}"/>
</step>
</script>
</otawa-script>

In addition to configuration items and to usual XPath symbols, the scripts provide convenient variables listed below:

Function Documentation

Identifier<bool> otawa::script::ONLY_CONFIG ( "otawa::script::ONLY_CONFIG"  ,
false   
)

This property informs the script to stop its work just after parsing the configuration items.

Identifier<Pair<string, string> > otawa::script::PARAM ( "otawa::script::PARAM"  ,
pair(string(""), string(""))   
)

This identifier configures the Script to use the argument (identifier, value) as a parameter.

There is usually several parameter that may be accumulated with PARAM(props).add(pair(identifier, value)) .

Identifier<elm::system::Path> otawa::script::PATH ( "otawa::script::PATH"  ,
""   
)

This identifier configures the Script to use the given path.

Identifier<xom::Element *> otawa::script::PLATFORM ( "otawa::script::PLATFORM"  ,
 
)

Put by the Script intrepreter in the configuration properties launching the processor.

XML node representing the configuration part of the script.

Identifier<xom::Element *> otawa::script::SCRIPT ( "otawa::script::SCRIPT"  ,
 
)

Put by the Script intrepreter in the configuration properties launching the processor.

XML node representing the script.

Identifier<bool> otawa::script::TIME_STAT ( "otawa::script::TIME_STAT"  ,
false   
)

This property asks the script to time the performed steps.

Variable Documentation

Identifier<bool> otawa::script::ONLY_CONFIG("otawa::script::ONLY_CONFIG", false)

This property informs the script to stop its work just after parsing the configuration items.

Referenced by otawa::script::Script::configure().

Identifier<Pair<string, string> > otawa::script::PARAM("otawa::script::PARAM", pair(string(""), string("")))

This identifier configures the Script to use the argument (identifier, value) as a parameter.

There is usually several parameter that may be accumulated with PARAM(props).add(pair(identifier, value)) .

Referenced by otawa::script::Script::work().

Identifier<elm::system::Path> otawa::script::PATH("otawa::script::PATH","")

This identifier configures the Script to use the given path.

Referenced by otawa::script::Script::configure().

Identifier<xom::Element *> otawa::script::PLATFORM("otawa::script::PLATFORM", 0)

Put by the Script intrepreter in the configuration properties launching the processor.

XML node representing the configuration part of the script.

Referenced by otawa::script::Script::work().

Identifier<xom::Element *> otawa::script::SCRIPT("otawa::script::SCRIPT", 0)

Put by the Script intrepreter in the configuration properties launching the processor.

XML node representing the script.

Referenced by otawa::script::Script::work().

Identifier<bool> otawa::script::TIME_STAT("otawa::script::TIME_STAT", false)

This property asks the script to time the performed steps.

Referenced by otawa::script::Script::configure().