]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/commitdiff
Improved documentatio.
authorCarlos Miguel Jenkins Pérez <carlos@jenkins.co.cr>
Mon, 17 Jun 2013 01:44:14 +0000 (03:44 +0200)
committerCarlos Miguel Jenkins Pérez <carlos@jenkins.co.cr>
Mon, 17 Jun 2013 01:44:14 +0000 (03:44 +0200)
README.txt
doc/reports/report/report.t2t
rpp/blocks/README.txt
rpp/lib/rpp/doc/rpp.txt
rpp/rpp/rpp_file_process.tlc

index cb0bf3f6f9f06247b3bb61f543c39ed95652d076..194d9b6f57f7b22cae0c5a8182f5233e8ba3e132 100644 (file)
@@ -24,3 +24,4 @@ is structured as follows:
     - rpp/rpp       Simulink RPP Target for code generation. See dedicated
                     README.txt file for more information.
 
+
index 70acc2bfe24e26e62fb4e687ac4852915d3cb6f5..ea9315b03e9398e003e9b7b23e868e5cbce31e1d 100644 (file)
@@ -5,6 +5,7 @@ Carlos Jenkins
 %!target: tex
 %!style(xhtmls): media/themes/Clean/style.css
 %!postproc(xhtmls): 'NEWPAGE' ''
+%!nested(xhtmls): --libs syntaxhighlighter
 %!options(tex): --enum-title --toc --toc-level 5
 %!postproc(tex): '\.pdf\.png' '.pdf'
 %!postproc(tex): 'NEWPAGE' '\\newpage'
@@ -20,28 +21,151 @@ NEWPAGE
 
 = Introduction =[introduction]
 
+This document describes the final results of the project ``Code generation for automotive rapid prototyping 
+platform using Matlab/Simulink".
 
-Code generation for automotive rapid prototyping platform using Matlab/Simulink
+The general layout of this document is as follows:
 
-= Project setup =[project_setup]
+- Project description, objetives and outcome. This section.
+- Software and Hardware setup for development and repository layout.
+- Extensive description for each of the four products delivered.
+- Glossary.
+- References.
+- Appendices.
 
 
+== Background ==[background]
 
-== Development environment ==[development_environment]
+%DONE
+
+Back in the beginning of 2012 a leading automotive company requested the Czech Technical University 
+to develop a Engine Control Unit (ECU) for automotive applications. Real-Time Systems group at the 
+Department of Control Engineering from the Faculty of Electrical Engineering developed a hardware and 
+Software platform to the needs of this industry. The hardware uses Texas Instruments TMS570LS3137 CPU 
+and has was built with automotive standards and interfaces in mind. It uses a real-time operating 
+system and was directly programmed in C.
+
+Nevertheless, in accordance to company policies the Software developed for the engine control unit must be 
+designed in a safe and auditable way. The company has the policy to implement the Software for their 
+system using Model-Based Design:
+
+       Model-Based Design (MBD) is a mathematical and visual method of addressing 
+       problems associated with designing complex control, signal processing and 
+       communication systems. It is used in many motion control, industrial equipment, 
+       aerospace, and automotive applications. Model-based design is a methodology 
+       applied in designing embedded software.
+
+In order to meet this requirement an interaction layer between the platform and the Software the company 
+uses, Matlab/Simulink, must be implemented. This document describes the implementation of this interaction
+system.
+
+NEWPAGE
+
+== Technologies involved ==[technologies_involved]
+
+%DONE
+
++ Matlab/Simulink data flow graphical programming language tool for modeling, simulating and analyzing 
+  multidomain dynamic systems.
++ Standard ANSI C programming.
++ FreeRTOS real-time operating system.
++ Texas Instruments TI Code Generation Tools (CGT).
++ RPP in-house automotive hardware board using Texas Instruments TMS570LS3137 CPU.
+
+== Objectives ==[objectives]
+
+%DONE
+
+Main objectives of this project are:
+
++ Allow C code generation from Matlab/Simulink models for custom made hardware platform.
++ Implement model blocks for some of the peripheral units of the board for use in Simulink programming.
+
+
+At the time of this writing the objectives of this project are considered successfully achieved.
+
+== Benefits ==[benefits]
+
+%DONE
+
+Expected benefits of this project are:
+
++ Enabling faster implementation and rapid-prototyping of Software components through the use of model-based 
+  programming.
++ Enabling better and clearer visualization of Software implementations for the hardware board through models.
++ Improve auditability of Software system for automotive applications.
+
+
+At the time of this writing the benefits of this project are considered enabled.
+
+== Final outcome ==[final_outcome]
+
+The main products generated for this project are:
+
+- Simulink RPP Target.
+- RPP Library and API.
+- Simulink RPP Block Library.
+- Simulink Demo Library.
 
 
+Each of this product is described deeply in the following sections.
+
+= Project setup =[project_setup]
+
+This sections describes the Software and Hardware setup for development. It also describes the layout of the project
+repository.
+
+== Development environment ==[development_environment]
+
+This section describes the Software setup for development.
 
 === Operating system ===[operating_system]
 
+This project was developed on a GNU/Linux operating system. For development it is recommended to use a Debian based 
+operating system for development as most of the tools are easily available from repositories. Relevant OS information 
+is:
+
+- Ubuntu 12.04.2 LTS AMD64.
+- Kernel 3.2.0-48-generic.
+- GCC version 4.6.3.
+
+
+No test for cross-platform interoperability was performed on the code developed. Although care was taken to try to 
+provide platform independent code and tools this are the elements that are know to be Linux dependent:
+
+- LCM1 hardware control tool. @@
+  This tool is both GUI and command line capable, the following just affects the GUI part. 
+  Command line should be usable under Windows systems. @@
+  __Cause__: Serial port search algorithm is Linux dependent and Gtk 3.0 dynamic Python bindings aren't available on 
+  Windows operating systems.
+- TI CGT support file for RPP Simulink Target ````target_tools.mk``". @@
+  __Cause__: Use UNIX path separator ``/``.
+- Simulink RPP Target download script ````rpp_download.m``". @@
+  __Cause__: Use UNIX path separator ``/``.
+- Simulink RPP Target install script ````rpp_setup.m``". @@
+  __Cause__: Use UNIX path separator ``/``.
+- Simulink RPP Block Library block compilation script ````compile_blocks.m``". @@
+  __Cause__: Call Matlab MEX executable with Unix name.
+- All CCS projects under ``<repo>/rpp/lib/apps/``. @@
+  __Cause__: Paths are configure using UNIX path separator ``/``.
+
 
 
 === Version Control System ===[version_control_system]
 
+The version control system used for this project is **git**. The repository of this project
+contains all the files produced during development, including documentation, references, code and
+graphics. Also the GUI application **gitk** was used to easily review changes. To install both
+execute on a terminal:
 
+{{{ bash
+sudo apt-get install git gitk
+}}}
 
 === TI Code Composer Studio ===[ti_code_composer_studio]
 
-
+Code Composer Studio (CCS) is the official integrated development environment for developing applications 
+for Texas Instruments embedded processors. CCS is multiplatform Software based on Eclipse Open Source IDE.
 
 === Matlab/Simulink ===[matlabsimulink]
 
@@ -169,31 +293,25 @@ Image of hardware modules.
 
 How to wire the board for testing.
 
-= Project development =[project_development]
-
-
-
 == Repository structure ==[repository_structure]
 
 
+The repository is hosted on the server of the Real-Time Systems group at the Department
+of Control Engineering
 
-== Outcome ==[outcome]
-
-
+= Programming standards =[programming_standards]
 
-== Programming standards ==[programming_standards]
 
 
+== TLC files ==[tlc_files]
 
-=== TLC files ===[tlc_files]
 
 
+== RPP API ==[rpp_api]
 
-=== RPP API ===[rpp_api]
 
 
-
-=== S-Functions ===[s_functions]
+== S-Functions ==[s_functions]
 
 
 
@@ -316,6 +434,8 @@ What was tested, resumen.
 
 
 
+NEWPAGE
+
 = Glossary =[glossary]
 
 : ADC
@@ -338,6 +458,12 @@ What was tested, resumen.
   In this project it is also used as mnemonic to refer to or something related to the CAN
   hardware module.
 
+: CGT
+  //Code Generation Tools.//
+  Name given to the tool set produced by Texas Instruments used to compile, link, optimize,
+  assemble, archive, among others. In this project is normally used as synonym for 
+  ``Texas Instruments ARM compiler and linker."
+
 : DAC
   //Digital to Analog Converter.//
   Hardware circuitry that converts a digital (usually binary) code to an analog signal
@@ -347,6 +473,11 @@ What was tested, resumen.
   //Digital Input.//
   Mnemonic to refer to or something related to the digital input hardware module.
 
+: ECU
+  //Engine Control Unit.//
+  A type of electronic control unit that controls a series of actuators on an internal combustion 
+  engine to ensure the optimum running.
+
 : ETH
   //Ethernet.//
   Mnemonic to refer to or something related to the Ethernet hardware module.
@@ -368,6 +499,11 @@ What was tested, resumen.
   Mnemonic to refer to or something related to the 10A, PWM, with current sensing, high-power
   output hardware module.
 
+: IDE
+  //Integrated Development Environment.//
+  An IDE is a Software application that provides comprehensive facilities to computer programmers 
+  for software development.
+
 : LIN
   //Local Interconnect Network.//
   The LIN is a serial network protocol used for communication between components in vehicles.
@@ -379,6 +515,11 @@ What was tested, resumen.
   Mnemonic to refer to or something related to the digital output hardware module.
   It is logic output (100mA), as opposed to power outputs (2A, 10A).
 
+: MBD
+  //Model-Based Design.//
+  Model-Based Design (MBD) is a mathematical and visual method of addressing problems associated 
+  with designing complex control, signal processing and communication systems.
+
 : MEX
   //Matlab Executable.//
   Type of binary executable that can be called within Matlab. In this document the common term
@@ -420,12 +561,14 @@ What was tested, resumen.
 
 NEWPAGE
 
-
 = References =[references]
 
 - Horn, M. (2013). //Software obsluhující periferie a flexray na automobilové rídicí jednotce//.
   (Unpublished master's thesis, Czech Technical University in Prague, Prague, Czech Republic).
 
+- //Model-based design//. (n.d.). In Wikipedia. 
+  Retrieved March 10, 2013, from http://en.wikipedia.org/wiki/Model-based_design
+
 
 NEWPAGE
 
index 2b64ddebdfab1ea5d586969195ed5669be67d67f..ac0d2388b3b481ffdb7e765b8b4842f3edfcb25d 100644 (file)
@@ -16,12 +16,12 @@ The blocks ideally included in this library are:
     Logic IO blocks
                 Digital Input block         I           [DIN ]      rpp_din.h
                 Digital Output block        T           [LOUT]      rpp_lout.h
-                Analog Input block          I           [AIN ]      rpp_ain.h
-                Analog Output block         I           [AOUT]      rpp_aout.h
+                Analog Input block          T           [AIN ]      rpp_ain.h
+                Analog Output block         T           [AOUT]      rpp_aout.h
 
     Power output blocks
-                H-Bridge Control block      I           [HBR ]      rpp_hbr.h
-                Power output block          I           [MOUT]      rpp_mout.h
+                H-Bridge Control block      T           [HBR ]      rpp_hbr.h
+                Power output block          T           [MOUT]      rpp_mout.h
                 High-Power output block     X           [HOUT]      rpp_hout.h
 
     Communication blocks
@@ -31,14 +31,14 @@ The blocks ideally included in this library are:
                 LIN send msg block          X           [LINS]      - Idem -
                 FlexRay receive block       X           [FRR ]      rpp_fr.h
                 FlexRay send msg block      X           [FRS ]      - Idem -
-                SCI receive block           I           [SCIR]      rpp_sci.h
-                SCI send msg block          I           [SCIS]      - Idem -
-                SCI configure block         I           [SCIC]      - Idem -
+                SCI receive block           T           [SCIR]      rpp_sci.h
+                SCI send msg block          T           [SCIS]      - Idem -
+                SCI configure block         T           [SCIC]      - Idem -
                 Ethernet receive block      X           [ETHR]      rpp_eth.h
                 Ethernet send msg block     X           [ETHS]      - Idem -
 
     Logging/Storage blocks
-                SD Card write block         I           [SDCW]      rpp_sdc.h
+                SD Card write block         T           [SDCW]      rpp_sdc.h
                 SDRAM write block           X           [SDRW]      rpp_sdr.h
 
     Trigger blocks
index 56b935228b8a9691d485d14b9c40f4a11c6915d3..e77c53ca940c990a85e35e628bd52b61cf801712 100644 (file)
@@ -88,4 +88,3 @@ Library file layout:
 
             sudo apt-get install doxygen graphviz
 
-    ->
index 161b2a45e59d5774ab17a6eaa8ffe0798e8614ca..faa55b889277424ea8260a7098fa4f2f532e63b1 100644 (file)
 %<LibSetCodeTemplateComplianceLevel(1)>
 
 %% Create a the main file
-%include "rpp_srmain.tlc"
-%<FcnSingleTaskingMain()>
+%if LibIsSingleRateModel() || LibIsSingleTasking()
+    %include "rpp_srmain.tlc"
+    %<FcnSingleTaskingMain()>
+%else
+    %include "rpp_srmain.tlc"
+    %<FcnSingleTaskingMain()>
+%endif