Font Size: a A A

Support The Research And Realization Of The Automatic Code Generation Of Simulink / Stateflow

Posted on:2012-02-20Degree:MasterType:Thesis
Country:ChinaCandidate:J H ZhouFull Text:PDF
GTID:2208330332486866Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
Generally speaking, automatic code generation uses some well-defined tokens or model as input, and transforms it into source code files. Well-defined token or model can be Simulink/Stateflow model, UML model. Target languages which interpret the source code files can be the high-level programming language or machine language or well-defined intermediate language. Automatic code generation system conceptlly equals to complier. This thesis focuses on automatic code generation technology uses Simulink/Stateflow as input, and produce ANSI C standard code. The main contribution of this thesis is:1. Research Model-based design and code generation support mechanism on Simulink/Stateflow. Research includes V-modeling and layered Simulink/Stateflow model's basic element.2. Analyze the implementation of already existed automatic code generation tools such as RTW, Gene-Auto and TargetLink and the related technology.3. Develop a prototype of automatic code generation system. The prototype uses principles of other code generation tools as a base which uses Simulink/Stateflow model as input and produce ASNI C standard code. The prototype includes two inter-mediate language models: domain-specific language model SystemModel and general programming language abstract model CodeModel. After transforming the Simulink/Stateflow model into SystemModel, then into CodeModel and then produce ANSI C standard code. In the test, model transformation rules are used to develop test cases. Then these test cases are used by simulation of the test model and running of the generated code of the test model respectively. At last, compare the simulation results and the running results. Another test method used in this thesis is to compare the generation code generated by RTW and by our prototype system. All these two methods certify the correctness of the prototype system and the generated code. Finally, we summarize the work of this thesis and point out some drawbacks of this prototype system and its research directions in the automatic code generation area. This thesis has some innovation points. The first is idea of code generating code which uses model recogenizer generation tool ANTLR to simplify the code generation process. The other idea used in the thesis is the two inter-midiate models. The use of these two models has the advantage of making the system independent of Simulink/Stateflow or target language code. Moreover, the system is modularized. The input and output of each module textualized which keeps the modules extensible and independent of each other.
Keywords/Search Tags:automatic code generation, Simulink/Stateflow, intermidiate model, serializer
PDF Full Text Request
Related items