Page 109 - Mechatronic Systems Modelling and Simulation with HDLs
P. 109
98 5 SOFTWARE IN HARDWARE DESCRIPTION LANGUAGES
5.4.5 Debugging of software
The visualisation of software cannot be achieved in a worthwhile manner using the
tools of an electronics or mechanics simulator. Ideally, the tools used for pure soft-
ware development would be used. Such debuggers show the instruction currently
being executed and the content of the variables. Furthermore, it is possible to act
upon the sequence of the software by setting breakpoints and then investigating
particular points in steps. It should also be possible to change the value of the
variables during execution.
However, we are dealing with software that is run on virtual hardware. Fur-
thermore, feedback effects from electronic and possibly mechanical system com-
ponents, also have to be taken into account. Such a debugger has been developed,
see Pelz et al. [328], and correspondingly incorporated into the software model.
Figure 5.7 shows the user interface that has been developed for this.
The two buttons ‘Take Control’ and ‘Leave Control’, which allow us to take over
the control of the simulation or leave it again, are of primary importance. In control
mode we can move forward in ‘Single Step’ mode or proceed directly to the next
halt point ‘Go to break’. An ‘Interrupt’ interrupts such a sequence, whilst ‘Reset’
restores the original state. In the top window the system programme is displayed
at assembler or programming language level. Clicking on a line sets or recalls
a break. The bottom left window shows the most important system information,
and particularly the current content of the register, whilst the bottom right window
shows the variable contents.
5.5 Summary
In this chapter the inclusion of software using hardware description languages was
investigated. Using the results obtained we can now look at systems that incorpo-
rate software components in addition to electronics and other domains. Significant
features are the cyclically correct management of software operation on a con-
troller, efficiency as a result of the compiled simulation of the software, and the
options of linking in a debugger for the visualisation and control of the simulation
process. Using the methods for the modelling of mechanics in hardware descrip-
tion languages, dealt with in the next chapter, yields a universal modelling process
for mechatronic and micromechatronic systems that can be executed directly upon
available commercial simulators.