Method for performing model simulation and code generation on custom hardware by using Simulink

A model simulation and code generation technology, applied in software simulation/interpretation/simulation, program control devices, etc., can solve problems such as time-consuming system development and custom hardware models

Inactive Publication Date: 2011-06-08
LIANCHUANG AUTOMOBILE ELECTRONICS
View PDF1 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the hardware model set in Simulink is limited, and Simulink cannot be used to perform model-in-the-loop simulation of customized hardware. In this way, when performing hardware-in-the-loop simulation without setting a hardware m...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for performing model simulation and code generation on custom hardware by using Simulink
  • Method for performing model simulation and code generation on custom hardware by using Simulink
  • Method for performing model simulation and code generation on custom hardware by using Simulink

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The present invention utilizes Simulink to carry out model simulation and code generation method one embodiment of custom hardware as Figure 7 shown, including the following steps:

[0030] 1. Write custom hardware-specific device driver codes, that is, header files, macro definitions, and I / O device code libraries for certain custom hardware; write custom hardware C MEX S files, and the C MEXS files include descriptions of custom hardware-specific input , output, model sampling time, etc. and the transformation relationship between the output and the input, the extension is "c"; write a TLC file, the TLC file is the same as the file name of the C MEX S file, and the extension "TLC ”; save the three files in a specific folder;

[0031] Two. With the specific folder as the current path, input the mexC MEX S file name in the MATLAB command window, at this moment the mex command can generate a C MEX S file name .mexw32 file in the specific folder, in Matlab / During simu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for performing model simulation on custom hardware by using Simulink. The method comprises the following steps of: compiling a C MEX S file of the custom hardware, and generating a C MEX S file name.mexw32 file in an MATLAB command window according to a mex command; establishing a new model file comprising an S-function module of the custom hardware in the simulink, and packaging the S-function module of the custom hardware to ensure that a connected is established between the C MEX S file and the C MEX S file name.mexw32 file, and a panel and a dialog box of the S-function module of the custom hardware are generated; editing and compiling the model file to obtain MODEL.RTW of the model file; during the simulation of Matlab/simulink, popping up the dialog box of the S-function module of the custom hardware, inputting corresponding parameters from the dialog box and then submitting the parameters; and running a Start Simulation command to output a simulation graph. The invention also discloses a method for performing model code generation on the custom hardware by using the Simulink. The method can be used for performing the model simulation and the code generation on the custom hardware by using the Simulink, so that the time for system development is saved.

Description

technical field [0001] The invention relates to a method for model-based development in the field of automobile engineering, in particular to a method for using Simulink to perform model simulation and code generation on customized hardware. Background technique [0002] At present, the design method of Model-Based Development (MBD) has been more and more familiar and applied in engineering fields such as automobile and aerospace. Using the model-based V-type development method can realize rapid prototype simulation of the controller model, hardware-in-the-loop simulation, and model-based automatic code generation. The development environment commonly used today is the Matlab / Simulink modeling environment. Using the RTW (RealTime Workshop) software package in Matlab, automatic code generation based on the model can be realized. RTW provides multiple target configurations suitable for different application development environments. However, the hardware model set in Simulin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/455
Inventor 陈意瑶罗来军黄东亚
Owner LIANCHUANG AUTOMOBILE ELECTRONICS
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products