Embedded Software Colin Walls
Colin Walls has over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, Colin is an embedded software technologist with Mentor … More » Why develop embedded software bottom up?November 16th, 2020 by Colin Walls
It is a very simplistic view, but, broadly speaking, there are two ways to design an embedded software application [or pretty much anything really]: either top-down or bottom-up. There are pros and cos of each approach and it is hard to say, in the general sense, that one is better than the other. So much for design, but how development is approached is another matter … Software design is not a topic that I talk about much. This is not because I have no experience in that area – I have been designing software all my adult life. It is simply that, in recent years, I have worked for a company offering a number of tools and IP for embedded software development, but not design. And they pay the bills. However, I think it is safe to say that most people tend to favor top-down design. First define the overall functionality of the application, then break it down iteratively into simpler and simpler functional units. There is some apparent sense in doing implementation top-down – following the logic of the design. This involves creating the high-level components first – commonly the user interface [UI] – with these functions calling “stub” functions which do not do anything [or nothing useful anyway]. In my experience, this approach has a distinct psychological benefit, as getting the UI to work first makes the device appear to be doing something, which feels like progress. In reality, top down implementation is rarely possible in the true sense, as lower level software – operating system, drivers etc. – needs to be in place before anything else can run. But there is a more important reason why top-down implementation may be troublesome: all embedded systems have limited resources. Those limitations vary from system to system, but, ultimately, there is a fixed amount of memory and a specific amount of CPU power available, along with a power budget. The difficulty with a top-down implementation approach is that, if resource limits are hit, it may not be apparent until quite a late stage in development, when there is little time to do anything about it. A bottom-up approach to development enables the software to be constructed as a series of increasingly complex components. Each component can have its resource utilization measured and optimized straight away. This results in less possibility for surprises late in the project. Every engineer needs to be equipped with the appropriate tools and skills:
I am sure that there are other perspectives and arguments against my proscription. Comments, email and communication via social networking are all welcome. |