10.07.2015 Views

Delphi User Guide for TargetLink - dSPACE

Delphi User Guide for TargetLink - dSPACE

Delphi User Guide for TargetLink - dSPACE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Why?• To generate efficient code.• To create interfaces <strong>for</strong> integration of generated code into asoftware application.How?• Replace <strong>User</strong> library blocks (subsystems) in original Model withcorresponding <strong>Delphi</strong> Simulink and Stateflow <strong>User</strong> library blocks(subsystems): Timers, Counters, Filters, PIDs. These library blocksassure efficient <strong>TargetLink</strong> code generation.• Follow <strong>Delphi</strong> structure of Component’s model.• Follow <strong>Delphi</strong> Procedures and <strong>Guide</strong>lines <strong>for</strong> Modeling and<strong>TargetLink</strong> code generation.16 May 2002 <strong>dSPACE</strong> <strong>User</strong>s Conference 5


Structure of Component’s ModelFunctionsUtility BlockTask ManagerProvides model structuresimilar to that of softwarefile:• File Task Manager defines function execution orderInterface Block• Function Blocks: Initialization Block, SL Block(s), SF Block(s) represent correspondingfunction in generated software• Utility Block models functions that already exist outside of current model but need to beimplemented in a component <strong>for</strong> proper model simulation ( like library functions ).• Interface Block models calls to functions that already exist outside of current model (likecalls to HWIO routines). These functions are not needed <strong>for</strong> proper model simulation.6


<strong>Delphi</strong> Procedures and <strong>Guide</strong>lines<strong>for</strong> Modeling and <strong>TargetLink</strong> code generationExecutable Specifications:1. <strong>Delphi</strong> Executable Specification Style <strong>Guide</strong>lines2. <strong>Delphi</strong> Simulink/Stateflow Reusable Libraries3. <strong>Delphi</strong> <strong>Guide</strong> <strong>for</strong> Modeling/Autocoding- How to do the initialization of the Model- How to work with OS- How create a model <strong>for</strong> efficient code generationAutocode:<strong>Delphi</strong> <strong>User</strong> <strong>Guide</strong> <strong>for</strong> <strong>TargetLink</strong>- How to work with <strong>TargetLink</strong> Property Manager <strong>for</strong> generation of efficient code.- How to generate code per <strong>Delphi</strong> C-language coding standards.- How to integrate auto-code with hand-written legacy codeSoftware Validation:<strong>Delphi</strong> Procedure <strong>for</strong> Code Verification vs. Executable Specifications.16 May 2002 <strong>dSPACE</strong> <strong>User</strong>s Conference 7


<strong>Delphi</strong> <strong>User</strong> <strong>Guide</strong> <strong>for</strong> <strong>TargetLink</strong> targets followingCriteria <strong>for</strong> Autocoding:• Model must comply with MAAB Style <strong>Guide</strong>lines and<strong>Delphi</strong> Executable Specification <strong>Guide</strong>lines.• No hand modifications in autocode s/w• Limited or no increase in Project budget(ROM/RAM/Throughput)• Usage of existing hand-written standard routines( Lookups, Timers, Filters, etc)• Straight <strong>for</strong>ward integration process of Autocodeinto hand-written s/w16 May 2002 <strong>dSPACE</strong> <strong>User</strong>s Conference 8


<strong>Delphi</strong> <strong>User</strong> <strong>Guide</strong> <strong>for</strong> <strong>TargetLink</strong>Detailed document walking through the process of applying <strong>TargetLink</strong> to aSimulink/Stateflow model to generate production-quality code.9


BenchmarksROM RAM Stack ThroughputHand-written files 1-8 KByte 50-200 Bytes 20-200 Bytes Machine cyclesRatio:<strong>TargetLink</strong> autocode /Hand-written code0.96 -1.1 0.97 - 1.2 1.2 - 1.25 0.98 - 1.2Comparison of <strong>TargetLink</strong>-generated code vs. hand-written production code <strong>for</strong> anumber of <strong>Delphi</strong> algorithms <strong>for</strong> CPU32 and HC12 target processors.16 May 2002 <strong>dSPACE</strong> <strong>User</strong>s Conference 10


Verification16 May 2002 <strong>dSPACE</strong> <strong>User</strong>s Conference 11


Summary• <strong>TargetLink</strong> proved to have technical ability to generate code per <strong>Delphi</strong>software standards.• <strong>TargetLink</strong> support group of <strong>dSPACE</strong> provides outstanding technicalsupport from offices in USA and Germany.• <strong>Delphi</strong> will continue use <strong>TargetLink</strong> as a code generator <strong>for</strong> productionsoftware.Area of <strong>TargetLink</strong> improvement:• Enable to work with Nested Data Structures and Bus Structures.• Modify <strong>TargetLink</strong> Property Manager graphical appearance.• Add new features <strong>for</strong> easy up-integration and reusability of autocode:– Ability to modify interfaces between model components without changes of TLproperties of individual components.– Ability to disable scaling <strong>for</strong> subsystems that represent subroutines.• Provide ability to develop autocode under Software ConfigurationManagement system (CM Synergy)• Add features <strong>for</strong> code validation: generation of Test Vectors and codecoverage.12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!