Simulation of Hardware and Mechanics
To Develop Software without Hardware?
In embedded development this dilemma is encountered very often. Software development must start, but:
- the target hardware dose not exist yet
- the "machine" to be controlled is not ready either
- the user interface is unclear, many stakeholders are involved: marketing, management, software, hardware, mechanics, industrial design
Hardware and Mechanics out of the PC: Simulation
Instead of loosing a lot of time while waiting for the real world, electronics and mechanics can be simulated on a PC.
How does this work? Solcept has developed a framework based on .NET/ C#/ managed C++. It can be used to simulate the operating system, drivers, hardware (down to the controller registers) and the underlying physics of the machine to be controlled on which the application is based.
The simulation is as accurate as needed and as simple as possible. This means the e.g. physical processes which are strongly influencing a controller design are modeled accurately. Other elements, e.e.g valves are simulated digitally (pass/ no pass).
Results
- Integration of software and hardware is acomplished in one day (the drivers have been implemted and tested on evaluation-boards)
- Simpler testing leads to better test coverage and better software quality (e.g. because erors can be injected more easily, time in the simualtion can be slowed and accelerated)
- The customer gets "exactly the user interface we wanted" (the PC simualtion of the system can be evaluated by all stakeholders in an early stage which allows an iterative/ agile development style)
- The industrial designer sees the interplay of the mechanical part (e.g. buttons) of the user interface with its software part very early in the project
Advantages
For development a better understanding forms of the machine to be controlled, respectively its physics. In implementation and debugging PC development systems ca be used which still offer more posibilities than than most embedded tools.
A well programmed simulator allows to extract logs, call chains and offers other functions like alterable execution speed to complete stop at any point. Together with complete reproducibility, which is seldom in teh real world, embedded systems can be developed very efficiently.
Error conditions which are diffcult or impossible (e.g. due to possible hazards) to create on a real machine, can be generated easily during tests. In addition automated tests can be conducted without modifications (e.g. test access ports, user interface exercising robots) of the target system, because it is not part of the test by definition.
The supposed big disadvantage of course is the increased effort. According to our experience it is paid back manifold over the duration of the project.

