Font Size: a A A

Research On Automatic Code Generation Based On Open Source Simulation Platform

Posted on:2022-07-05Degree:MasterType:Thesis
Country:ChinaCandidate:T Y LiuFull Text:PDF
GTID:2518306326483254Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
System simulation is a necessary means of embedded control system design,but the control source code still needs to be written manually after the simulation.Automatic code generation technology can automatically convert the model into control code and improve the development efficiency.Automatic code generation technology is according to the object code rules,access to the project required files and model information,generate computer source code files in line with the specifications.Based on the open source graphical simulation platform siros / xcos,this paper develops an automatic code generation tool1)Open source graphical simulation platform analysis,research system simulation deduction mechanism,modular architecture for automatic code generation toolkit to provide mount interface2)This paper analyzes the advantages and disadvantages of the existing automatic code generation schemes,focuses on the template based and model-based code generation principles,and proposes an automatic code generation system model.The implementation is based on template file,nested model dynamic behavior,driven by generator engine,mounted to the simulation platform in the form of function package to run,and realize the code generation of system simulation model.3)According to the requirements of the target system,the template file is determined,the hardware port is transformed into the interface of the simulation system,and the simulation model of the controlled system is transformed into the code of the embedded system to realize the control of the embedded system.In this paper,the functions of system deduction and automatic code generation of open source graphical simulation platform are preliminarily realized,which can complete system simulation deduction and realize code generation of super block model.Finally,the function of the code generation tool is tested,and the test results show that the generated code meets the expected system requirements,has good readability,and can run in the embedded system.
Keywords/Search Tags:Open source graphical simulation platform, Automatic code generation, Template, Model, Generator
PDF Full Text Request
Related items