In the forth-coming version of 20-sim the option code-generation for targets will be available. After selection of a template, it’s filled in with model specific information. Then this adapted template can be compiled and linked such that it can be run on the target. Theo Lammerink designed around the often-used 8051 microcontroller a target with 64-Kb data and code memory.
The goal of this project was to implement a template for this target such that 20-sim code can run on it. The implementation of simulation elements within 20-sim of the target functions is completed successfully. This is shown by several simulation tests. Also the realisation of the template is accomplished.
Although the correct working of the template could not yet been shown, it is very likely that it will work. However some strong comments have to be made considering the speed on which the code will run and the restricted complexity of the controller that can be designed.
Also this project was a practical evaluation of the code-generation option of 20-sim. And some recommendations to improve it have been made:
- Code generation not only with floats but also with integers.
- Better replacement of simulation code with target c-code concerning target elements (like ADC, DAC, etc).
- Point out which functions are used so that only the necessary functions are compiled.
|Name||Report / Control Laboratory Electrical Engineering Department|
|Publisher||University of Twente, Department of Electrical Engineering|