Page 37 - Embedded Microprocessor Systems Real World Design
P. 37
In a simple design, the software definition, like the hardware definition, may
describe the software for a single board. In a more complex design, where differ-
ent software engineers work on different parts of the code for a single board, there
may be a software definition for each individual engineer’s code. In a complex
multiprocessor system, there may be an overall software document, which I con-
sider to be part of the system engineering specification. The software specifications
should include the following:
A statement of the requirements, including the requirements definition, engi-
neering specifications, and hardware definition, as appropriate.
The communication protocol to any other software, whether to another pro-
cessor or to another piece of the software for this processor. This should include
descriptions of buffer interface mechanisms, command/response protocols, sem-
aphore definitions, and, in short, anything to which the complementing code
needs to talk.
A description of how the design was implemented, using flowcharts, pseudocode,
or other methods. (Chapter 3 describes these in more detail.)
Because software can be broken down more flexibly than hardware, it is difficult
to pin down a single software definition format that works for everybody all the
time. The key is to define any interfaces that other engineers need to know about
and idenw the design details that engineers in the future might need to know.
This discussion assumes that the hardware and software are fairly independent.
In a simple system like the pool timer, that is a good model. The hardware is
designed, the software is.mitten around that hardware, and that is that. While the
actual design implementations may proceed in parallel, the software engineer
basically writes code around the available hardware. In a more complex system, the
process may be iterative. For example, the software and hardware engineers may
have a meeting at which they jointly decide what hardware is required to perform
the function. Large amounts of memory may be required for data buffers, or the
software group may request a specific peripheral IC because an interface library
already has been developed for it. There are tradeoffs in this game between ease
of software development and cost or complexity of hardware.
HardwardSoftware Partitioning
Once, while having lunch with a group of engineers, I jokingly made the statement
that my design philosophy was to put everything under software control. That way,
bugs in the design were by definition the fault of the software engineer.
This flippant conversation touches on a real problem in any embedded system:
Which functions should be performed in hardware and which should be performed
22 Embedded Micrqtwocessor Systems