blob: aefc29058cd046a92a2c96e78763adab4c01b9a1 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Susan Iwai">
<meta name="keywords" content="" />
<meta name="generator" content="Hugo 0.30.2" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,700,300,600,100" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="https://www.eclipse.org/app4mc/public/images/favicon.ico"/>
<title>APP4MC</title>
<meta property="og:title" content="" />
<meta property="og:description" content="APP4MC website" />
<meta property="og:image" content="https://www.eclipse.org/app4mc/images/logo/eclipse.png" />
<link rel="stylesheet" href="https://www.eclipse.org/app4mc/public/css/solstice.css">
</head>
<body class="" id="body_solstice">
<a class="sr-only" href="#content">Skip to main content</a>
<header role="banner">
<div class="container">
<div id="row-logo-search">
<div id="header-left" class="col-sm-14 col-md-16 col-lg-19">
<div class="row">
<div class="hidden-xs">
<a href="https://www.eclipse.org/app4mc/"><img src="https://www.eclipse.org/app4mc/public/images/logo/APP4MCLogo.png" alt="APP4MC logo" class="logo-eclipse-default"/></a>
</div>
<div id="main-menu" class="navbar row yamm">
<div id="navbar-collapse-1" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a class="" href="https://www.eclipse.org/app4mc/gettingstarted/">
Getting Started
</a>
</li>
<li>
<a class="" href="https://www.eclipse.org/app4mc/documentation/">
Documentation
</a>
</li>
<li>
<a class="" href="https://www.eclipse.org/app4mc/community/">
Community
</a>
</li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<span>About</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="https://www.eclipse.org/app4mc/history/">History</a> </li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle">More @ Eclipse<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<div class="row">
<ul class="col-sm-8 list-unstyled">
<li>
<p><strong>Community</strong></p>
</li>
<li><a href="http://marketplace.eclipse.org">Marketplace</a></li>
<li><a href="http://events.eclipse.org">Events</a></li>
<li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li>
<li><a href="https://eclipse.org/community/eclipse_newsletter/">Newsletter</a></li>
<li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li>
</ul>
<ul class="col-sm-8 list-unstyled">
<li>
<p><strong>Participate</strong></p>
</li>
<li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
<li><a href="https://eclipse.org/forums/">Forums</a></li>
<li><a href="https://eclipse.org/mail/">Mailing Lists</a></li>
<li><a href="https://wiki.eclipse.org/">Wiki</a></li>
<li><a href="https://wiki.eclipse.org/IRC">IRC</a></li>
<li><a href="https://eclipse.org/contribute/">How to Contribute</a></li>
</ul>
<ul class="col-sm-8 list-unstyled">
<li>
<p><strong>Working Groups</strong></p>
</li>
<li><a href="http://wiki.eclipse.org/Auto_IWG">Automotive</a></li>
<li><a href="http://iot.eclipse.org">Internet of Things</a></li>
<li><a href="http://locationtech.org">LocationTech</a></li>
<li><a href="http://lts.eclipse.org">Long-Term Support</a></li>
<li><a href="http://polarsys.org">PolarSys</a></li>
<li><a href="http://science.eclipse.org">Science</a></li>
<li><a href="http://www.openmdm.org">OpenMDM</a></li>
</ul>
</div>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://www.eclipse.org/app4mc/" class="navbar-brand visible-xs"><img src="https://www.eclipse.org/app4mc/public/images/logo/APP4MCLogo.png" alt="APP4MC logo" width="174" class="logo-eclipse-default"/></a>
</div>
</div>
</div>
</div>
<div id="header-right" class="form-inline col-sm-10 col-md-8 col-lg-5 hidden-print hidden-xs">
<div id="header-right-container">
<div id="custom-search-form" class="reset-box-sizing">
<script>
(function() {
var cx = '011805775785170369411:15ipmpflp-0';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchbox-only></gcse:searchbox-only>
</div>
<a id="btn-call-for-action" href="https://www.eclipse.org/app4mc//downloads" class="btn btn-huge btn-warning"><i class="fa fa-download"></i> Download</a>
</div>
</div>
</div>
</div>
</header>
<section id="breadcrumb" class="defaut-breadcrumbs hidden-print">
<div class="container">
<h3 class="sr-only">Breadcrumbs</h3>
<div class="col-xs-24">
<ol class="breadcrumb">
<li><a href="https://www.eclipse.org/app4mc/">home</a></li>
<li><a href="https://www.eclipse.org/app4mc/">APP4MC</a></li>
<li><a href='https://www.eclipse.org/app4mc/gs-create-model'>gs-create-model</a></li>
</ol>
</div>
</div>
</section>
<main role="main" class=" no-promo">
<div class="container background-image-none" id="novaContent">
<h1>Getting Started with APP4MC</h1>
<h1 id="general-model-content">General model content</h1>
<p>The purpose of this session is to get familiar with the structure of the <strong>AMALTHEA model</strong> itself as well as the currently available editor. Therefore, a new model should be created in its own project using the following steps and content.</p>
<p>The following image is a simplified overview of the model that will be created in this session.</p>
<div style="text-align: center"><img src="https://www.eclipse.org/app4mc/images/gs-create-model/training-overview-model.png" class="img-responsive"> </div>
<hr />
<h2 id="general-model-setup">General model setup</h2>
<ol>
<li><p>Create a new general project named <em>org.eclipse.amalthea.training.model</em></p>
<ul>
<li>From the <strong>File</strong> menu, select the item <strong>New &gt; Project&hellip;</strong></li>
<li>On the first page of the wizard, expand the item <strong>General</strong>
and select <strong>Project</strong>. Then click <strong>Next</strong></li>
<li>On the second page of the wizard fill the <strong>Project name</strong> field
with <em>org.eclipse.amalthea.training.model</em>, then click <strong>Finish</strong><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/01-create-project.png" class="img-responsive"><br /></li>
<li>The project created should appear in the <strong>Model Explorer</strong> view
<br /></li>
</ul></li>
<li><p>Create a new folder named &ldquo;model1&rdquo; inside the created project</p>
<ul>
<li>Select the created project</li>
<li>In the context menu (right mouse button) select <strong>New &gt; Folder</strong><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/02-create-folder.png" class="img-responsive"><br /></li>
<li>Fill the text field <strong>Folder name</strong> with <em>model1</em>, then click <strong>Finish</strong><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/03-create-folder.png" class="img-responsive"><br /></li>
</ul></li>
<li><p>Create a new AMALTHEA model</p>
<ul>
<li>Select the folder named <em>model1</em></li>
<li>In the context menu, select <strong>New &gt; AMALTHEA Model</strong><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/04-create-model.png" class="img-responsive"><br /></li>
<li>In the dialog
<ul>
<li>Keep the defaults (ie. folder: &ldquo;model1&rdquo;, filename: &ldquo;default.amxmi&rdquo;)</li>
<li>Click <strong>Finish</strong> to create an empty model</li>
</ul></li>
<li>The model is created and the standard AMALTHEA tree editor
is opened on the left side of the workbench.<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/05-create-model.png" class="img-responsive"><br /></li>
</ul></li>
</ol>
<hr />
<h2 id="adding-software-structure">Adding software structure</h2>
<ol>
<li><p>Right-click on the AMALTHEA model on the tree editor then select the menu item <strong>New Child &gt; Sw Model</strong>.<br />
It will add a child node named <strong>Software</strong> to the model<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/06-create-sw-model.png" class="img-responsive"></p></li>
<li><p>Create a label named <em>LabelA</em></p>
<ul>
<li>Under the <strong>Software</strong> item select the <strong>Labels</strong> item and right-click on <strong>New Child &gt; Label</strong>.<br />
This will add a new child under <strong>Labels</strong> by default labeled <strong>Label</strong>.</li>
<li>Select this <em>Label</em> then click on the <strong>Properties</strong> tab below the tree editor to display the label properties.</li>
<li>Click on the cell next to the property named <strong>Name</strong> and fill it with <em>LabelA</em>.<br />
Press enter. The label item in the tree editor should be renamed <em>LabelA</em>.<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/07-create-label.png" class="img-responsive"><br /></li>
</ul></li>
<li><p>Create a label named <em>LabelB</em></p></li>
<li><p>Create a Runnable named <em>Runnable1</em></p>
<ul>
<li>Under the <strong>Software</strong> item select the <strong>Runnables</strong> item and right-click on <strong>New Child &gt; Runnable</strong>.<br />
This will add a new child under <strong>Runnables</strong> by default labeled <strong>Runnable</strong></li>
<li>Select this <em>Runnable</em> then click on the <strong>Properties</strong> tab below the tree editor to name it <em>Runnable1</em>.
<br /></li>
</ul></li>
<li><p>Create 2 additional runnables named respectively <em>Runnable2</em> and <em>Runnable3</em>.<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/08-create-runnables.png" class="img-responsive"></p></li>
<li><p>Expand the runnable named <em>Runnable1</em></p>
<ul>
<li>Create an instance of * instructions (constant) 20 *
<ul>
<li>From the context menu under <strong>Runnable Items</strong>, select <strong>New Child &gt; Instructions Constant</strong></li>
<li>Select the child created then click on the <strong>Properties</strong> tab above the tree editor.</li>
<li>Change the value of the <strong>Value</strong> property to <em>20</em></li>
</ul></li>
<li>Create a <em>write access to LabelA</em>
<ul>
<li>Create another runnable item by selecting the menu item <strong>New Child &gt; Label Access</strong></li>
<li>Select the child created then click on the <strong>Properties</strong> tab above the tree editor.</li>
<li>Select for the <strong>Access</strong> property the value <em>write</em></li>
<li>Select for the <strong>Data</strong> property the value <em>Label LabelA</em><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/09-create-runnable1-label-access.png" class="img-responsive"><br />
<br /></li>
</ul></li>
</ul></li>
<li><p>Expand the runnable named <em>Runnable2</em> and, under its runnable items:</p>
<ul>
<li>Create a <em>read access to LabelA</em></li>
<li>Create a <em>25 constant instructions</em></li>
<li>Create a <em>write access to LabelB</em></li>
</ul></li>
<li><p>Expand the runnable named <em>Runnable3</em> and, under its runnable items:</p>
<ul>
<li>Create a <em>read access to LabelB</em></li>
<li>Create a <em>10 constant instructions</em><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/10-create-runnables-final.png" class="img-responsive"><br />
<br /></li>
</ul></li>
<li><p>Create 3 tasks named respectively <em>Task1</em>, <em>Task2</em> and <em>Task3</em></p>
<ul>
<li>Under the <strong>Software</strong> item select the <strong>Tasks</strong> item and right-click on <strong>New Child &gt; Task</strong>.<br />
It will add a new child by default labeled <strong>Task</strong>.</li>
<li>Select this <em>Task</em> then click on the <strong>Properties</strong> tab above the tree editor to name it <em>Task1</em>.</li>
<li>Repeat these steps to create the 2 other tasks.</li>
</ul></li>
<li><p>Create a <em>CallGraph</em> for the task <em>Task1</em></p>
<ul>
<li>Right-click on the task named <em>Task1</em> then select the menu item <strong>New Child &gt; Call Graph</strong></li>
<li>Create a Call Sequence <em>CS1</em>
<ul>
<li>Expand the task <em>Task1</em> to visualize its child</li>
<li>Right-click on the <strong>Call Graph</strong> child then select the menu item <strong>New Child &gt; Graph Entries &gt; Call Sequence</strong></li>
<li>Name this new call sequence <em>CS1</em></li>
</ul></li>
<li>Create a Task Runnable Call to <em>Runnable1</em>
<ul>
<li>Right-click on the call sequence <em>CS1</em><br />
then select the menu item <strong>New Child &gt; Calls &gt; Task Runnable Call</strong></li>
<li>Select the created child then click on the <strong>Properties</strong> tab<br />
and set the <strong>Runnable</strong> property to <em>Runnable Runnable1</em>.</li>
</ul></li>
</ul></li>
<li><p>Create a <em>CallGraph</em> for the task <em>Task2</em></p>
<ul>
<li>Right-click on the task named <em>Task2</em> then select the menu item <strong>New Child &gt; Call Graph</strong></li>
<li>Create a Call Sequence <em>CS1</em></li>
<li>Create a Task Runnable Call to <em>Runnable2</em></li>
</ul></li>
<li><p>Create a <em>CallGraph</em> for the task <em>Task3</em></p>
<ul>
<li>Right-click on the task named <em>Task3</em> then select the menu item <strong>New Child &gt; Call Graph</strong></li>
<li>Create a Call Sequence <em>CS1</em></li>
<li>Create a Task Runnable Call to <em>Runnable3</em><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/11-create-task-runnable-calls.png" class="img-responsive"></li>
</ul></li>
</ol>
<hr />
<h2 id="add-stimuli-to-tasks">Add Stimuli to Tasks</h2>
<p>Stimuli are describing the activation of Tasks.</p>
<ol>
<li><p>Create 3 Stimuli named <em>Stimuli1</em>, <em>Stimuli2</em>, and <em>Stimuli3</em></p>
<ul>
<li>Right-click on the AMALTHEA model on the tree editor then select the menu item <strong>New Child &gt; Stimuli Model</strong>.<br />
It will add a child node named <strong>Stimuli</strong> to the model.</li>
<li>Create a Periodic Stimuli named <em>Stimuli1</em> and set the recurrence to 10ms
<ul>
<li>Right-click on the Stimuli Model and select the menu item <strong>New Child &gt; Stimuli &gt; Periodic</strong></li>
<li>Expand the <em>Stimuli</em> node to visualize the created child.</li>
<li>Select the Child named by default <em>Periodic</em> then rename it <em>Stimuli1</em></li>
<li>Right-click on the renamed stimuli and select the menu item <strong>New Child &gt; Recurrence</strong></li>
<li>Select the created Recurrence</li>
<li>Set the value of the <strong>Unit</strong> property to <em>ms</em></li>
<li>Set the value of the <strong>Value</strong> property to <em>10</em></li>
</ul></li>
<li>Create a seconde Periodic Stimuli named *Stimuli2&rdquo; and set the recurrence to 30ms</li>
<li>Create an Inter Process Stimuli named <em>Stimuli3</em> and set the recurrence to 10ms
<ul>
<li>Right-click on the Stimuli Model and select the menu item <strong>New Child &gt; Stimuli &gt; Inter Process</strong></li>
<li>Select the Inter Process node and name it <strong>Stimuli3</strong><br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/12-create-stimuli.png" class="img-responsive"/></li>
</ul></li>
</ul></li>
<li><p>Add the Stimuli <em>Stimuli1</em> to the task <em>Task1</em></p>
<ul>
<li>Retrieve and select the task <em>Task1</em> which is located under the nodes AMALTHEA / Softwares / Tasks.<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/13-task1-stimulus-1.png" class="img-responsive"/><br /></li>
<li>On the <strong>Properties</strong>, click on the button next to the field
(<img src="https://www.eclipse.org/app4mc/images/gs-create-model/ui-edit-button.png"/>)
to open relationship dialog</li>
<li>Select the Stimuli <em>Periodic Stimuli1</em></li>
<li>Press the <strong>Add</strong> button<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/14-task1-stimulus-2.png" class="img-responsive"/><br /></li>
<li>Press <strong>OK</strong> to close the dialog.</li>
</ul></li>
<li><p>Add the Stimuli <em>Stimuli2</em> to the task <em>Task2</em></p></li>
<li><p>Add the Stimuli <em>Stimuli3</em> to the task <em>Task3</em></p></li>
<li><p>Add an <em>Interprocess Activation</em> from <em>Task2</em> to <em>Task3</em></p>
<ul>
<li>Expand the <em>Task2</em>,</li>
<li>Expand its <em>Call Graph</em> node</li>
<li>Select the call sequence <strong>CS1</strong></li>
<li>Right-click on the node and select the menu item <strong>New Child &gt; Calls &gt; Inter Process Activation</strong></li>
<li>Select the created node and in the <em>Stimuli</em> property, select the Stiuli named <strong>Inter Process Stimuli3</strong></li>
</ul></li>
</ol>
<hr />
<h2 id="create-simple-hardware-model">Create simple hardware model</h2>
<p>In this section we are creating a simple hardware model with 2 cores and 1 global memory.</p>
<ol>
<li><p>Right-click on the AMALTHEA model on the tree editor then select the menu item <strong>New Child &gt; Hw Model</strong>.<br />
It will add a child node named <strong>Hardware</strong> to the model</p></li>
<li><p>Create a new system name <em>DemoSystem</em></p>
<ul>
<li>Select the <em>Hardware</em> node previously created</li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; System</strong>.</li>
<li>Name the created item <em>DemoSystem</em> [PK: Is it expected that there is no type from this System?]</li>
</ul></li>
<li><p>Create a new ECU named <em>Ecu1</em></p>
<ul>
<li>Select the system named <em>DemoSystem</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; ECU</strong>.</li>
<li>Name the created item <em>Ecu1</em></li>
</ul></li>
<li><p>Add a microcontroller named <em>MC1</em> to the ECU <em>Ecu1</em></p>
<ul>
<li>Select the ECU <em>Ecu1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Microcontroller</strong>.</li>
<li>Name the created item <em>MC1</em></li>
</ul></li>
<li><p>Create a memory type named <em>GlobalMemoryType</em></p>
<ul>
<li>Select the <em>Hardware</em> node under the AMALTHEA model node</li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Memory type</strong>.</li>
<li>Set the name to <em>GlobalMemoryType</em></li>
<li>Set the size of memory to <em>512</em> (bytes)</li>
<li>Set the type of memory to RAM</li>
</ul></li>
<li><p>Add a memory named <em>GlobalMemory</em> to <em>MC1</em></p>
<ul>
<li>Select the microcontroller <em>MC1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Memory</strong></li>
<li>Name the created item <em>GlobalMemory</em></li>
<li>Set the type to <em>Memory Type GlobalMemoryType</em></li>
</ul></li>
<li><p>Add a quartz &ldquo;100MHz&rdquo; to &ldquo;MC1&rdquo;</p>
<ul>
<li>Select the microcontroller <em>MC1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Quartz</strong></li>
<li>Name the created item <em>100MHz</em></li>
<li>Set the <strong>Frequency</strong> property to <em>100000000</em></li>
</ul></li>
<li><p>Create a core type named <em>CT1</em></p>
<ul>
<li>Select the <em>Hardware</em> node under the AMALTHEA model node</li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Core type</strong></li>
<li>Set the name to <em>CT1</em></li>
<li>Set <strong>Instructions Per Cycle</strong> roperty of the core type to <em>1</em></li>
</ul></li>
<li><p>Add a core &ldquo;Core1&rdquo; to &ldquo;MC1&rdquo;</p>
<ul>
<li>Select the microcontroller <em>MC1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Core</strong></li>
<li>Name the created item <em>Core1</em></li>
<li>Set core type of &ldquo;Core1&rdquo; to &ldquo;CT1&rdquo;</li>
</ul></li>
<li><p>Add a <strong>Prescaler</strong> named <em>PS1</em> to <em>Core1</em></p>
<ul>
<li>Select the core <em>Core1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Prescaler</strong></li>
<li>Name the created item <em>PS1</em></li>
<li>Set the <strong>Clock Ratio</strong> property to <em>1.0</em></li>
<li>Set the <strong>Quartz</strong> property to &ldquo;100Mhz&rdquo;</li>
</ul></li>
<li><p>Add a core &ldquo;Core2&rdquo; to &ldquo;MC1&rdquo;</p>
<ul>
<li>Set core type of &ldquo;Core2&rdquo; to &ldquo;CT1&rdquo;</li>
</ul></li>
<li><p>Add a <strong>Prescaler</strong> named <em>PS2</em> to <em>Core2</em></p>
<ul>
<li>Add prescaler &ldquo;PS2&rdquo; to &ldquo;Core1&rdquo;</li>
<li>Set the <strong>Clock Ratio</strong> property to 2.0</li>
<li>Set the <strong>Quartz</strong> property to &ldquo;100Mhz&rdquo;</li>
</ul></li>
<li><p>Add a <strong>Latency Path</strong> from cores to memory</p>
<ul>
<li>Create a <strong>Latency Access Path</strong> named <em>Path1</em>
<ul>
<li>Select the <em>Hardware</em> node under the AMALTHEA model node</li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Access Paths &gt; Latency Access Path</strong></li>
<li>Name the created item <em>Path1</em></li>
<li>Set the <strong>Source</strong> property to <em>Core Core1</em></li>
<li>Set the <strong>Target</strong> property to <em>Memory GlobalMemory</em></li>
</ul></li>
<li>Create a <strong>Latency Access Path</strong> named <em>Path2</em>
<ul>
<li>Set the <strong>Source</strong> property to <em>Core Core1</em></li>
<li>Set the <strong>Target</strong> property to <em>Memory GlobalMemory</em></li>
</ul></li>
<li>Add a constant latency to &ldquo;Path1&rdquo; with access type &ldquo;RW&rdquo;, quartz &ldquo;100Mhz&rdquo; and value 20
<ul>
<li>Select the path <em>Path1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Latencies &gt; Latency Constant</strong></li>
<li>Select the created item</li>
<li>Set the <strong>Access Type</strong> property to <em>RW</em></li>
<li>Set the <strong>Quartz</strong> property to <em>Quartz 100Mhz</em></li>
<li>Set the <strong>Value</strong> property to <em>20</em></li>
</ul></li>
</ul></li>
<li><p>Optional: Feel free to add more memory elements to represent local memories
located at the cores with the proper latency access paths</p></li>
</ol>
<p>At this point you should get a contents tree which looks like that:<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/15-hardware.png" class="img-responsive"></p>
<hr />
<h2 id="create-simple-os-model">Create simple OS model</h2>
<p>Create a simple OS model, containing schedulers for both cores.</p>
<ol>
<li><p>Right-click on the AMALTHEA model on the tree editor then select the menu item <strong>New Child &gt; Os Model</strong>.<br />
It will add a child node named <strong>Operating System</strong> to the model</p></li>
<li><p>Add a new operating system with name <em>Default</em></p>
<ul>
<li>Select the <em>Operating System</em> node previously created</li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Operating Systems &gt; Operating System</strong>.</li>
<li>Name the created item <em>Default</em></li>
</ul></li>
<li><p>Add a Task Scheduler named <em>Scheduler1</em></p>
<ul>
<li>Right-click on the <em>Default</em> operating system
then select the menu item <strong>New Child &gt; Task Scheduler</strong></li>
<li>Name the created item <em>Scheduler1</em></li>
</ul></li>
<li><p>Add scheduling algorithm OSEK to <em>Scheduler1</em></p>
<ul>
<li>Right-click on the <em>Scheduler1</em> task scheduler
then select the menu item <strong>New Child &gt; Scheduling Algorithm &gt; OSEK</strong></li>
</ul></li>
<li><p>Add a Scheduling HW Unit to <em>Scheduler1</em></p>
<ul>
<li>Right-click on the <em>Scheduler1</em> task scheduler
then select the menu item <strong>New Child &gt; Scheduling Unit &gt; Scheduling HW Unit</strong></li>
</ul></li>
<li><p>Add a Task Scheduler named <em>Scheduler2</em></p></li>
<li><p>Add a scheduling algorithm OSEK to <em>Scheduler2</em></p></li>
<li><p>Add a Scheduling HW Unit to <em>Scheduler2</em></p></li>
</ol>
<p>At this point you should get a contents tree which looks like that:<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/16-operating-system.png" class="img-responsive"></p>
<hr />
<h2 id="add-timing-requirements-for-tasks">Add timing requirements for Tasks</h2>
<p>Adding some deadline informations to the already created tasks.</p>
<blockquote>
<p>Note: Doing this in a separate file, it can easy be reused for other models if the names of the tasks are the same!</p>
</blockquote>
<ol>
<li><p>Create a new AMALTHEA model &ldquo;constraints.amxmi&rdquo; in the same folder as the already created AMALTHEA meta model</p>
<ul>
<li>Select the folder <em>model1</em> created during the paragraph <strong>General model setup</strong></li>
<li>Right-click on the mouse and select the menu item <strong>New &gt; AMALTHEA Model</strong></li>
<li>Press <strong>Next</strong> to define the associated model file naming it <em>constraints.amxmi</em><br />
then press on <strong>Finish</strong> to create an empty model.</li>
</ul></li>
<li><p>Right-click on the AMALTHEA model on the tree editor then select the menu item <strong>New Child &gt; Constraints Model</strong>.<br />
It will add a child node named <strong>Constraints</strong> to the model</p></li>
<li><p>Add a new Process Requirement named <em>DeadlineTask1</em></p>
<ul>
<li>Select the <strong>Constraints</strong> item on the tree editor</li>
<li>Right-click on the mouse and select the menu item <strong>New Child &gt; Requirements &gt; Process Requirement</strong></li>
<li>Name the created item <em>DeadlineTask1</em></li>
<li>Set the <strong>Process</strong> property to the value <em>Task Task1</em></li>
</ul></li>
<li><p>Add a Time Requirement Limit to &ldquo;DeadlineTask1&rdquo; Process Requirement</p>
<ul>
<li>Select the Process Requirement named <em>DeadlineTask1 Task1</em></li>
<li>Right-click on the mouse and select the menu item <strong>New Child &gt; Limit &gt; Time Requirement Limit</strong></li>
<li>Set the <strong>Limit Type</strong> property to <em>UpperLimit</em></li>
<li>Set the <strong>Metric</strong> property to <em>ResponseTime</em></li>
<li>Add limit to TimeRequirementLimit
<ul>
<li>Right-click the mouse on the <em>ResponseTime</em> item and select the menu item <strong>New Child &gt; Limit Value</strong></li>
<li>Set the <strong>Unit</strong> property of the new item to <em>ms</em></li>
<li>Set the <strong>Value</strong> property to <em>10</em></li>
</ul></li>
</ul></li>
<li><p>Add a new Process Requirement named <em>DeadlineTask2</em> and set its <strong>Process</strong> property to the value <em>Task Task2</em></p></li>
<li><p>Add a Time Requirement Limit to &ldquo;DeadlineTask2&rdquo; Process Requirement</p>
<ul>
<li>Set the <strong>Limit Type</strong> property to <em>UpperLimit</em></li>
<li>Set the <strong>Metric</strong> property to <em>ResponseTime</em></li>
<li>Add limit to the Time Requirement Limit
<ul>
<li>Right-click the mouse on the <em>ResponseTime</em> item and select the menu item <strong>New Child &gt; Limit Value</strong></li>
<li>Set the <strong>Unit</strong> property of the new item to <em>ms</em></li>
<li>Set the <strong>Value</strong> property to <em>15</em></li>
</ul></li>
</ul></li>
<li><p>Add a new Process Requirement named <em>DeadlineTask3</em> and set its <strong>Process</strong> property to the value <em>Task Task3</em></p></li>
<li><p>Add a Time Requirement Limit to &ldquo;DeadlineTask3&rdquo; Process Requirement</p>
<ul>
<li>Set the <strong>Limit Type</strong> property to <em>UpperLimit</em></li>
<li>Set the <strong>Metric</strong> property to <em>ResponseTime</em></li>
<li>Add limit to the Time Requirement Limit
<ul>
<li>Right-click the mouse on the <em>ResponseTime</em> item and select the menu item <strong>New Child &gt; Limit Value</strong></li>
<li>Set the <strong>Unit</strong> property of the new item to <em>ms</em></li>
<li>Set the <strong>Value</strong> property to <em>15</em></li>
</ul></li>
</ul></li>
</ol>
<p>At this point your model should look like this:<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/17-constraints.png" class="img-responsive"></p>
<hr />
<h2 id="add-mapping-information-of-sw-elements-to-hardware">Add mapping information of SW elements to hardware</h2>
<p>The mapping represents which software elements are mapped to dedicated hardware elements.</p>
<blockquote>
<p>Note: The mapping is separated into an extra file, which makes it easier to replace or change a mapping!</p>
</blockquote>
<ol>
<li><p>Create a new AMALTHEA model &ldquo;mapping.amxmi&rdquo; in the same folder as the already created AMALTHEA meta model</p></li>
<li><p>Right-click on the AMALTHEA model on the tree editor then select the menu item <strong>New Child &gt; Mapping Model</strong>.<br />
It will add a child node named <strong>Mapping</strong> to the model</p></li>
<li><p>Add a <strong>Task Allocation</strong> element to the Mapping</p>
<ul>
<li>Right-click the mouse on the <em>Mapping</em> item and select<br />
the menu item <strong>New Child &gt; Process Allocation &gt; Task Allocation</strong></li>
<li>Set the <strong>Process</strong> property to <em>Task Task1</em></li>
<li>Set the <strong>Scheduler</strong> property to <em>Task Scheduler Scheduler1</em></li>
</ul></li>
<li><p>Add a second <strong>Task Allocation</strong> element to the Mapping and<br />
set the <strong>Process</strong> to <em>Task2</em> and the <strong>Scheduler</strong> to <em>Scheduler1</em></p></li>
<li><p>Add a third <strong>Task Allocation</strong> element to the Mapping<br />
and set the <strong>Process</strong> to <em>Task3</em> and the <strong>Scheduler</strong> to <em>Scheduler2</em></p></li>
<li><p>Under the Mapping item add a <strong>Core Allocation</strong> element</p>
<ul>
<li>Right-click the mouse on the <em>Mapping</em> item<br />
and select the menu item <strong>New Child &gt; Core Allocation</strong></li>
<li>Set the <strong>Core</strong> property to <em>Core Core1</em></li>
<li>Set the <strong>Scheduler</strong> property to <em>Task Scheduler Scheduler1</em></li>
</ul></li>
<li><p>Add a second <strong>Core Allocation</strong> element and set
the <strong>Core</strong> to <em>Core Core2</em> and the <strong>Scheduler</strong> to <em>Scheduler2</em></p></li>
<li><p>Add an Abstract Element Mapping at least for all Labels to map them to <em>GlobalMemory</em></p>
<ul>
<li>Right-click the mouse on the <em>Mapping</em> item and select<br />
the menu item <strong>New Child &gt; Mapping &gt; Abstract Element Mapping</strong></li>
<li>Set the <strong>Abstract Element</strong> property to <em>Label LabelA</em></li>
<li>Set the <strong>Mem</strong> property to <em>Memory GlobalMemory</em></li>
<li>Repeat the last 3 steps steps for the <em>Label LabelB</em></li>
</ul></li>
<li><p>Optional: If more memories are available, make a proper assignment to other memory elements.</p></li>
</ol>
<p>At this point your model should look like this:<br />
&nbsp;<br />
<img src="https://www.eclipse.org/app4mc/images/gs-create-model/18-mapping.png" class="img-responsive"></p>
<hr />
<h2 id="solution">Solution</h2>
<p>The solution for this exercise is available in this plugin: <a href="https://www.eclipse.org/app4mc/models/org.eclipse.app4mc.amalthea.solution1.zip">org.eclipse.app4mc.amalthea.solution1</a></p>
</div>
</main>
<p id="back-to-top">
<a class="visible-xs" href="#top">Back to the top</a>
</p>
<footer role="contentinfo" id="solstice-footer">
<div class="container">
<div class="row">
<section id="footer-eclipse-foundation" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0 hidden-print">
<h2 class="section-title">Eclipse Foundation</h2>
<ul class="nav">
<li><a href="https://eclipse.org/org/">About us</a></li>
<li><a href="https://eclipse.org/org/foundation/contact.php">Contact Us</a></li>
<li><a href="https://eclipse.org/donate">Donate</a></li>
<li><a href="https://eclipse.org/org/documents/">Governance</a></li>
<li><a href="https://eclipse.org/artwork/">Logo and Artwork</a></li>
<li><a href="https://eclipse.org/org/foundation/directors.php">Board of Directors</a></li>
</ul>
</section>
<section id="footer-legal" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0 hidden-print ">
<h2 class="section-title">Legal</h2>
<ul class="nav">
<li><a href="https://eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="https://eclipse.org/org/documents/epl-v10.php">Eclipse Public License </a></li>
<li><a href="https://eclipse.org/legal/">Legal Resources </a></li>
</ul>
</section>
<section id="footer-useful-links" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0 hidden-print">
<h2 class="section-title">Useful Links</h2>
<ul class="nav">
<li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
<li><a href="//help.eclipse.org/">Documentation</a></li>
<li><a href="https://eclipse.org/contribute/">How to Contribute</a></li>
<li><a href="https://eclipse.org/mail/">Mailing Lists</a></li>
<li><a href="https://eclipse.org/forums/">Forums</a></li>
<li><a href="//marketplace.eclipse.org">Marketplace</a></li>
</ul>
</section>
<section id="footer-other" class="col-xs-offset-1 col-xs-11 col-sm-7 col-md-6 col-md-offset-0 hidden-print">
<h2 class="section-title">Other</h2>
<ul class="nav">
<li><a href="https://eclipse.org/ide/">IDE and Tools</a></li>
<li><a href="https://eclipse.org/projects">Community of Projects</a></li>
<li><a href="https://eclipse.org/org/workinggroups/">Working Groups</a></li>
</ul>
<ul class="list-inline social-media">
<li><a href="https://twitter.com/EclipseFdn"><i class="fa fa-twitter-square"></i></a></li>
<li><a href="https://plus.google.com/+Eclipse"><i class="fa fa-google-plus-square"></i></a></li>
<li><a href="https://www.facebook.com/eclipse.org"><i class="fa fa-facebook-square"></i> </a></li>
<li><a href="https://www.youtube.com/user/EclipseFdn"><i class="fa fa-youtube-square"></i></a></li>
</ul>
</section>
<div id="copyright" class="col-xs-offset-1 col-sm-14 col-md-24 col-md-offset-0">
<div>
<span class="hidden-print"><img src="https://www.eclipse.org/app4mc/public/images/logo/eclipse-logo-bw-800x188.png" alt="Eclipse.org black and white logo" width="166" height="39" id="logo-eclipse-white"/></span>
<p id="copyright-text">Copyright &copy; 2015 The Eclipse Foundation. All Rights Reserved.</p>
</div>
</div>
<a href="#" class="scrollup">Back to the top</a>
</div>
</div>
</footer>
<script src="https://www.eclipse.org/app4mc/public/js/solstice.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-910670-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>