blob: 71efaf5c6ad56de2dd1b2daff7730c9851b6e8b1 [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">
<title>Getting Started with APP4MC | The Eclipse Foundation</title>
<meta property="og:title" content="Getting Started with APP4MC | The Eclipse Foundation" />
<meta name="twitter:title" content="Getting Started with APP4MC | The Eclipse Foundation" />
<meta name="description" content="General model content The purpose of this session is to get familiar with the structure of the AMALTHEA model 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.
The following image is a simplified overview of the model that will be created in this session.
General model setup Create a new general project named org.">
<meta property="og:description" content="General model content The purpose of this session is to get familiar with the structure of the AMALTHEA model 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.
The following image is a simplified overview of the model that will be created in this session.
General model setup Create a new general project named org.">
<meta name="twitter:description" content="General model content The purpose of this session is to get familiar with the structure of the AMALTHEA model itself as well as the currently available editor. Therefore, a new model should be created …">
<meta name="author" content="Susan Iwai"/>
<link href='https://www.eclipse.org/favicon.ico' rel='icon' type='image/x-icon'/>
<meta property="og:image" content="https://www.eclipse.org/app4mc/images/logo.png" />
<meta name="twitter:image" content="https://www.eclipse.org/app4mc/images/logo.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@EclipseFdn" />
<meta name="twitter:creator" content="@EclipseFdn" />
<meta property="og:url" content="https://www.eclipse.org/gs-create-model/" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Application Platform Project for MultiCore (APP4MC)" />
<meta name="generator" content="Hugo 0.42.1" />
<link rel="canonical" href="https://www.eclipse.org/gs-create-model/" />
<link rel="alternate" href="https://www.eclipse.org/app4mc/index.xml" type="application/rss+xml" title="Application Platform Project for MultiCore (APP4MC)">
<link rel="stylesheet" href="https://eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/quicksilver.min.css">
<link href="//fonts.googleapis.com/css?family=Libre+Franklin:400,700,300,600,100" rel="stylesheet" type="text/css"/>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5WLCZXC');</script>
</head>
<body>
<a class="sr-only" href="#content">Skip to main content</a>
<header class="header-wrapper" id="header-wrapper">
<div class="clearfix toolbar-container-wrapper">
<div class="container">
<div class="text-right toolbar-row row hidden-print">
<div class="col-md-24 row-toolbar-col">
<ul class="list-inline">
<li><a href="https://accounts.eclipse.org/user/edit" class="" data-tab-destination="tab-profile"><i class="fa fa-edit fa-fw"></i> Edit my account</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row" id="header-row">
<div class="col-sm-5 col-md-4" id="header-left">
<div class="wrapper-logo-default">
<a title="Application Platform Project for MultiCore (APP4MC)" href="https://www.eclipse.org/app4mc/">
<img width="140" class="logo-eclipse-default img-responsive hidden-xs" src="https://www.eclipse.org/app4mc/images/logo.png" alt="Application Platform Project for MultiCore (APP4MC)" />
</a>
</div>
</div>
<div class="col-sm-19 col-md-20 reset margin-top-10" id="main-menu-wrapper">
<div class="navbar yamm" id="main-menu">
<div class="navbar-collapse collapse reset float-right" id="navbar-main-menu">
<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>
<a class="" href="https://www.eclipse.org/app4mc/downloads/">
Downloads
</a>
</li>
<li>
<a class="" href="https://www.eclipse.org/app4mc/news/">
News
</a>
</li>
<li class="dropdown eclipse-more">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<span>About</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<div class="yamm-content">
<li><a href="https://www.eclipse.org/app4mc/history/">History</a> </li>
<li><a href="https://www.eclipse.org/app4mc/snippets/">Snippets</a> </li>
</div>
</ul>
</li>
<li class="dropdown eclipse-more hidden-xs">
<a data-toggle="dropdown" class="dropdown-toggle" role="button">More<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://www.eclipse.org/community/eclipse_newsletter/">Newsletter</a></li>
<li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li>
<li><a href="https://blogs.eclipse.org">Blogs</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://www.eclipse.org/forums/">Forums</a></li>
<li><a href="https://www.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>
</ul>
<ul class="col-sm-8 list-unstyled">
<li>
<p><strong>Eclipse IDE</strong></p>
</li>
<li><a href="https://www.eclipse.org/downloads">Download</a></li>
<li><a href="https://help.eclipse.org">Documentation</a></li>
<li><a href="https://www.eclipse.org/getting_started">Getting Started / Support</a></li>
<li><a href="https://www.eclipse.org/contribute/">How to Contribute</a></li>
<li><a href="https://www.eclipse.org/ide/">IDE and Tools</a></li>
<li><a href="https://www.eclipse.org/forums/index.php/f/89/">Newcomer Forum</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-main-menu">
<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>
<div class="wrapper-logo-mobile">
<a class="navbar-brand visible-xs" title="Application Platform Project for MultiCore (APP4MC)" href="https://www.eclipse.org/app4mc/">
<img width="140" class="logo-eclipse-default-mobile img-responsive" src="https://www.eclipse.org/app4mc/images/logo.png" alt="Application Platform Project for MultiCore (APP4MC)" />
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section class="default-breadcrumbs hidden-print" id="breadcrumb">
<div class="container">
<h3 class="sr-only">Breadcrumbs</h3>
<div class="row">
<div class="col-sm-24">
<ol class="breadcrumb">
<li>
<a href="https://www.eclipse.org/app4mc/">Eclipse APP4MC</a>
</li>
<li class="active">
<a href="https://www.eclipse.org/app4mc/gs-create-model/">Getting Started with APP4MC</a>
</li>
</ol>
</div>
</div>
</section>
<main>
<div class="container">
<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 />
<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>Select the <strong>Software</strong> item and right-click on <strong>New Child &gt; Label</strong>.<br />
This will add a new child under <strong>Labels</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>Select the <strong>Software</strong> item and right-click on <strong>New Child &gt; Runnable</strong>.<br />
This will add a new child under <strong>Runnables</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 />
<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>Select the runnable named <em>Runnable1</em></p>
<ul>
<li>Right-click on <strong>New Child &gt; Call Graph</strong></li>
<li>Create * 20 constant ticks*
<ul>
<li>From the context menu under <strong>Call Graph</strong>, select <strong>New Child &gt; Items &gt; Ticks</strong></li>
<li>From the context menu under <strong>Ticks</strong>, select <strong>New Child &gt; Default &gt; Discrete Value Constant</strong></li>
<li>Select the child created then click on the <strong>Properties</strong> tab below 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 call graph item by selecting the menu item <strong>New Child &gt; Items &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 call graph:</p>
<ul>
<li>Create a <em>read access to LabelA</em></li>
<li>Create <em>25 constant ticks</em></li>
<li>Create a <em>write access to LabelB</em><br />
<br /></li>
</ul></li>
<li><p>Expand the runnable named <em>Runnable3</em> and, under its call graph:</p>
<ul>
<li>Create a <em>read access to LabelB</em></li>
<li>Create <em>10 constant ticks</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>Select the <strong>Software</strong> item and right-click on <strong>New Child &gt; 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.<br />
<br /></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 Runnable Call to <em>Runnable1</em>
<ul>
<li>Right-click on the call graph<br />
then select the menu item <strong>New Child &gt; Items &gt; 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>.<br />
<br /></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 Runnable Call to <em>Runnable2</em><br />
<br /></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 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"/><br />
<br /></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>Right-click on the node and select the menu item <strong>New Child &gt; Items &gt; Inter Process Trigger</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 structure named <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; Structure</strong>.</li>
<li>Name the created item <em>DemoSystem</em></li>
<li>Set the StructureType to <em>System</em><br />
<br /></li>
</ul></li>
<li><p>Create a new ECU named <em>Ecu1</em></p>
<ul>
<li>Select the structure named <em>DemoSystem</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Structure</strong>.</li>
<li>Name the created item <em>Ecu1</em></li>
<li>Set the StructureType to <em>ECU</em><br />
<br /></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; Structure</strong>.</li>
<li>Name the created item <em>MC1</em></li>
<li>Set the StructureType to <em>Microcontroller</em><br />
<br /></li>
</ul></li>
<li><p>Create a memory definition 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; Definitions &gt; Memory Definition</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<br />
<br /></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; Modules &gt; Memory</strong></li>
<li>Name the created item <em>GlobalMemory</em></li>
<li>Set the definition to <em>Memory Definition GlobalMemoryType</em><br />
<br /></li>
</ul></li>
<li><p>Create a frequency domain &ldquo;100MHz&rdquo;</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; Domains &gt; Frequency Domain</strong>.</li>
<li>Name the created item <em>100MHz</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Default Value</strong></li>
<li>Set value to 100.0 and unit to MHz<br />
<br /></li>
</ul></li>
<li><p>Create a frequency domain &ldquo;200MHz&rdquo;</p></li>
<li><p>Create a processing unit definition 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; Definitions &gt; Processing Unit Definition</strong></li>
<li>Set the name to <em>CT1</em></li>
<li>Set Pu Type to <em>CPU</em><br />
<br /></li>
</ul></li>
<li><p>Add a processing unit &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; Modules &gt; Processing Unit</strong></li>
<li>Name the created item <em>Core1</em></li>
<li>Set definition of &ldquo;Core1&rdquo; to &ldquo;CT1&rdquo;</li>
<li>Set frequency domain of &ldquo;Core1&rdquo; to &ldquo;100MHz&rdquo;<br />
<br /></li>
</ul></li>
<li><p>Add a processing unit &ldquo;Core2&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; Modules &gt; Processing Unit</strong></li>
<li>Name the created item <em>Core2</em></li>
<li>Set definition of &ldquo;Core2&rdquo; to &ldquo;CT1&rdquo;</li>
<li>Set frequency domain of &ldquo;Core2&rdquo; to &ldquo;200MHz&rdquo;<br />
<br /></li>
</ul></li>
<li><p>Add an access element from &ldquo;Core1&rdquo; to &ldquo;GlobalMemory&rdquo;</p>
<ul>
<li>Create an access element named <em>Path1</em>
<ul>
<li>Select &ldquo;Core1&rdquo;</li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Access Element</strong></li>
<li>Name the created item <em>Path1</em></li>
<li>Set the <strong>Destination</strong> property to <em>Memory GlobalMemory</em></li>
</ul></li>
<li>Add a constant read latency to &ldquo;Path1&rdquo; with value 10 (cycles)
<ul>
<li>Select the access element <em>Path1</em></li>
<li>Right-click on the item then select the menu item <strong>New Child &gt; Read Latency &gt; Discrete Value Constant</strong></li>
<li>Select the created item</li>
<li>Set the <strong>Value</strong> property to <em>20</em></li>
</ul></li>
<li>Add a constant write latency to &ldquo;Path1&rdquo; with value 10 (cycles)<br />
<br /></li>
</ul></li>
<li><p>Add an access element from &ldquo;Core2&rdquo; to &ldquo;GlobalMemory&rdquo;</p>
<ul>
<li>Create an access element named <em>Path2</em></li>
<li>Add a constant read latency to &ldquo;Path2&rdquo; with value 20 (cycles)</li>
<li>Add a constant write latency to &ldquo;Path2&rdquo; with value 20 (cycles)<br />
<br /></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><br />
<br /></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><br />
<br /></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><br />
<br /></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.<br />
<br /></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><br />
<br /></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><br />
<br /></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>Scheduler Allocation</strong> element Scheduler1 -&gt; Core1</p>
<ul>
<li>Right-click the mouse on the <em>Mapping</em> item and select<br />
the menu item <strong>New Child &gt; Scheduler Allocation</strong></li>
<li>Set the <strong>Scheduler</strong> property to <em>Task Scheduler Scheduler1</em><br /></li>
<li>Set the <strong>Responsibility</strong> property to <em>Processing Unit Core1</em><br />
<br /></li>
</ul></li>
<li><p>Add a <strong>Scheduler Allocation</strong> element Scheduler2 -&gt; Core2</p></li>
<li><p>Add a <strong>Task Allocation</strong> element Task1 -&gt; Scheduler1<br />
set the <strong>Task</strong> to <em>Task1</em> and the <strong>Scheduler</strong> to <em>Scheduler1</em></p></li>
<li><p>Add a <strong>Task Allocation</strong> element Task2 -&gt; Scheduler1</p></li>
<li><p>Add a <strong>Task Allocation</strong> element Task3 -&gt; Scheduler2</p></li>
<li><p>Add a <strong>Memory Mapping</strong> 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; Memory Mapping</strong></li>
<li>Set the <strong>Abstract Element</strong> property to <em>Label LabelA</em></li>
<li>Set the <strong>Memory</strong> property to <em>Memory GlobalMemory</em></li>
<li>Repeat the last 3 steps steps for the <em>Label LabelB</em><br />
<br /></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 id="solstice-footer">
<div class="container">
<div class="row">
<section class="col-sm-6 hidden-print" id="footer-eclipse-foundation">
<h2 class="section-title">Eclipse Foundation</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/org/">About Us</a></li>
<li><a href="https://www.eclipse.org/org/foundation/contact.php">Contact Us</a></li>
<li><a href="https://www.eclipse.org/donate">Donate</a></li>
<li><a href="https://www.eclipse.org/org/documents/">Governance</a></li>
<li><a href="https://www.eclipse.org/artwork/">Logo and Artwork</a></li>
<li><a href="https://www.eclipse.org/org/foundation/directors.php">Board of Directors</a></li>
</ul>
</section>
<section class="col-sm-6 hidden-print" id="footer-legal">
<h2 class="section-title">Legal</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="https://www.eclipse.org/legal/epl-2.0/">Eclipse Public License</a></li>
<li><a href="https://www.eclipse.org/legal/">Legal Resources </a></li>
</ul>
</section>
<section class="col-sm-6 hidden-print" id="footer-useful-links">
<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://www.eclipse.org/contribute/">How to Contribute</a></li>
<li><a href="https://www.eclipse.org/mail/">Mailing Lists</a></li>
<li><a href="https://www.eclipse.org/forums/">Forums</a></li>
<li><a href="//marketplace.eclipse.org">Marketplace</a></li>
</ul>
</section>
<section class="col-sm-6 hidden-print" id="footer-other">
<h2 class="section-title">Other</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/ide/">IDE and Tools</a></li>
<li><a href="https://www.eclipse.org/projects">Community of Projects</a></li>
<li><a href="https://www.eclipse.org/org/workinggroups/">Working Groups</a></li>
<li><a href="https://www.eclipse.org/org/research/">Research@Eclipse</a></li>
<li><a href="https://status.eclipse.org">Service Status</a></li>
</ul>
</section>
<div class="col-sm-24 margin-top-20">
<div class="row">
<div id="copyright" class="col-md-16">
<p id="copyright-text">Copyright &copy; Eclipse Foundation, Inc. All Rights Reserved.</p>
</div>
<div class="col-md-8 social-media">
<ul class="list-inline">
<li>
<a class="social-media-link fa-stack fa-lg" href="https://twitter.com/EclipseFdn">
<i class="fa fa-circle-thin fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x"></i>
</a>
</li>
<li>
<a class="social-media-link fa-stack fa-lg" href="https://plus.google.com/+Eclipse">
<i class="fa fa-circle-thin fa-stack-2x"></i>
<i class="fa fa-google-plus fa-stack-1x"></i>
</a>
</li>
<li>
<a class="social-media-link fa-stack fa-lg" href="https://www.facebook.com/eclipse.org">
<i class="fa fa-circle-thin fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x"></i>
</a>
</li>
<li>
<a class="social-media-link fa-stack fa-lg" href="https://www.youtube.com/user/EclipseFdn">
<i class="fa fa-circle-thin fa-stack-2x"></i>
<i class="fa fa-youtube fa-stack-1x"></i>
</a>
</li>
<li>
<a class="social-media-link fa-stack fa-lg" href="https://www.linkedin.com/company/eclipse-foundation">
<i class="fa fa-circle-thin fa-stack-2x"></i>
<i class="fa fa-linkedin fa-stack-1x"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<a href="#" class="scrollup">Back to the top</a>
</div>
</div>
</footer>
<script src="https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js"></script>
</body>
</html>
</body>
</html>