GenDataModel.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>Generator Data Model</title>
  7. <title>CMSIS-Zone (Preview): Generator Data Model</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <link href="cmsis.css" rel="stylesheet" type="text/css" />
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="printComponentTabs.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="resize.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/search.js"></script>
  22. <script type="text/javascript">
  23. $(document).ready(function() { searchBox.OnSelectItem(0); });
  24. </script>
  25. </head>
  26. <body>
  27. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  28. <div id="titlearea">
  29. <table cellspacing="0" cellpadding="0">
  30. <tbody>
  31. <tr style="height: 46px;">
  32. <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  33. <td style="padding-left: 0.5em;">
  34. <div id="projectname">CMSIS-Zone (Preview)
  35. &#160;<span id="projectnumber">Version 0.0.1</span>
  36. </div>
  37. <div id="projectbrief">System Resource Management</div>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. <!-- end header part -->
  44. <div id="CMSISnav" class="tabs1">
  45. <ul class="tablist">
  46. <script type="text/javascript">
  47. <!--
  48. writeComponentTabs.call(this);
  49. //-->
  50. </script>
  51. </ul>
  52. </div>
  53. <!-- Generated by Doxygen 1.8.6 -->
  54. <script type="text/javascript">
  55. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  56. </script>
  57. <div id="navrow1" class="tabs">
  58. <ul class="tablist">
  59. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  60. <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
  61. <li>
  62. <div id="MSearchBox" class="MSearchBoxInactive">
  63. <span class="left">
  64. <img id="MSearchSelect" src="search/mag_sel.png"
  65. onmouseover="return searchBox.OnSearchSelectShow()"
  66. onmouseout="return searchBox.OnSearchSelectHide()"
  67. alt=""/>
  68. <input type="text" id="MSearchField" value="Search" accesskey="S"
  69. onfocus="searchBox.OnSearchFieldFocus(true)"
  70. onblur="searchBox.OnSearchFieldFocus(false)"
  71. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  72. </span><span class="right">
  73. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  74. </span>
  75. </div>
  76. </li>
  77. </ul>
  78. </div>
  79. </div><!-- top -->
  80. <div id="side-nav" class="ui-resizable side-nav-resizable">
  81. <div id="nav-tree">
  82. <div id="nav-tree-contents">
  83. <div id="nav-sync" class="sync"></div>
  84. </div>
  85. </div>
  86. <div id="splitbar" style="-moz-user-select:none;"
  87. class="ui-resizable-handle">
  88. </div>
  89. </div>
  90. <script type="text/javascript">
  91. $(document).ready(function(){initNavTree('GenDataModel.html','');});
  92. </script>
  93. <div id="doc-content">
  94. <!-- window showing the filter options -->
  95. <div id="MSearchSelectWindow"
  96. onmouseover="return searchBox.OnSearchSelectShow()"
  97. onmouseout="return searchBox.OnSearchSelectHide()"
  98. onkeydown="return searchBox.OnSearchSelectKey(event)">
  99. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  100. <!-- iframe showing the search results (closed by default) -->
  101. <div id="MSearchResultsWindow">
  102. <iframe src="javascript:void(0)" frameborder="0"
  103. name="MSearchResults" id="MSearchResults">
  104. </iframe>
  105. </div>
  106. <div class="header">
  107. <div class="headertitle">
  108. <div class="title">Generator Data Model </div> </div>
  109. </div><!--header-->
  110. <div class="contents">
  111. <div class="textblock"><p>The <b>Generator Data Model</b> defines the view on the <b>Zone Description</b> for code generators. By defining a common data model code generators can be developed independendly from actual CMSIS Zone Projects and vendor tools.</p>
  112. <p>The CMSIS-Zone data (structured according to the Generator Data Model) is combined with file templates using the FreeMarker template engine to generate arbitrary project files, see picture below..</p>
  113. <div class="image">
  114. <img src="generator.png" alt="generator.png"/>
  115. <div class="caption">
  116. FreeMarker Template Engine</div></div>
  117. <h1><a class="anchor" id="GenDataModel_Structure"></a>
  118. Data Model Structure</h1>
  119. <p>The class diagram below visualizes the overall structure of the <b>Generator Data Model</b>. The root element visible to the templates is FmZone.</p>
  120. <div class="image">
  121. <img src="genmodel.png" alt="genmodel.png"/>
  122. <div class="caption">
  123. Generator Data Model Class Diagram</div></div>
  124. <p> According to <a href="http://freemarker.org/docs/index.html" target="_blank">FreeMarker Documentation</a> one can access the named attributes like <a href="http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_var_hash" target="_blank">retrieving data from a hash</a>. The reference implementation documented in detail below make use of the default FreeMarker <a href="http://freemarker.org/docs/pgui_misc_beanwrapper.html" target="_blank">Bean wrapper</a>. This leads to all Java methods named like <em>get&lt;Attribute&gt;</em> or <em>is&lt;Attribute&gt;</em> to be visible just as <em>&lt;Attribute&gt;</em> to the template.</p>
  125. <p>Please take note about the multiplicities stated in the diagram:</p>
  126. <ul>
  127. <li>0..1 indicates an optional value which might be unavailable, consider using <a href="http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing" target="_blank">missing value handler operators</a>.</li>
  128. <li>1 indicates a mandatory value which is guaranteed to be valid.</li>
  129. <li>0..* indicates a collection or hash of values which might be empty.</li>
  130. <li>1..* indicates a collection or hash of values which is guaranteed to contain at least one element.</li>
  131. </ul>
  132. <p>For detailed descriptions of the data model elements please refere to the <a href="../genmodel/index.html" target="_blank">JavaDoc</a> documentation for</p>
  133. <ul>
  134. <li><a href="../genmodel/com/arm/cmsis/zone/gen/data/FmZone.html" target="_blank">FmZone</a></li>
  135. <li><a href="../genmodel/com/arm/cmsis/zone/gen/data/FmProcess.html" target="_blank">FmProcess</a></li>
  136. <li><a href="../genmodel/com/arm/cmsis/zone/gen/data/FmDevice.html" target="_blank">FmDevice</a></li>
  137. <li><a href="../genmodel/com/arm/cmsis/zone/gen/data/FmProcessor.html" target="_blank">FmProcesor</a></li>
  138. <li><a href="../genmodel/com/arm/cmsis/zone/gen/data/FmBlock.html" target="_blank">FmBlock</a></li>
  139. </ul>
  140. <h1><a class="anchor" id="GenDataModel_Examples"></a>
  141. Template Examples</h1>
  142. <p>To get an impression of how template files might look like please refere to the simplyfied examples in this section.</p>
  143. <h2><a class="anchor" id="GenDataModel_Examples_AssignedBlocks"></a>
  144. HTML table of all assigned memory blocks</h2>
  145. <p>This examples demonstrates how to iterate over the collection of memory blocks assigned to the project zone currently evaluated. The result of the template below is a HTML table with three columns listing block name, start address and size, respectively.</p>
  146. <div class="fragment"><div class="line">&lt;table&gt;</div>
  147. <div class="line"> &lt;th&gt;</div>
  148. <div class="line"> &lt;td&gt;Name&lt;/td&gt;</div>
  149. <div class="line"> &lt;td&gt;Start&lt;/td&gt;</div>
  150. <div class="line"> &lt;td&gt;Size&lt;/td&gt;</div>
  151. <div class="line"> &lt;/th&gt;</div>
  152. <div class="line">&lt;#list blocks as block&gt;</div>
  153. <div class="line"> &lt;tr&gt;</div>
  154. <div class="line"> &lt;td&gt;${block.name}&lt;/td&gt;</div>
  155. <div class="line"> &lt;td&gt;${block.start}&lt;/td&gt;</div>
  156. <div class="line"> &lt;td&gt;${block.size}&lt;/td&gt;</div>
  157. <div class="line"> &lt;/tr&gt;</div>
  158. <div class="line">&lt;/#list&gt;</div>
  159. <div class="line">&lt;/table&gt;</div>
  160. </div><!-- fragment --> </div></div><!-- contents -->
  161. </div><!-- doc-content -->
  162. <!-- start footer part -->
  163. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  164. <ul>
  165. <li class="footer">Generated on Wed Aug 1 2018 17:12:47 for CMSIS-Zone (Preview) by Arm Ltd. All rights reserved.
  166. <!--
  167. <a href="http://www.doxygen.org/index.html">
  168. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
  169. -->
  170. </li>
  171. </ul>
  172. </div>
  173. </body>
  174. </html>