Page 122 - The Art of Designing Embedded Systems
P. 122

CHAPTER 6


                         Hardware Musings




















                        Debuggable Designs

                        An unhappy reality of our business is that we’ll surely spend lots of
                    time-far   too much time-debugging both hardware  and firmware. For
                    better or worse, debugging consumes project-months with reckless aban-
                    don. It’s usually  a prime cause  of  schedule collapse, disgruntled team
                    members, and excess stomach acid.
                        Yet debugging will never go away. Practicing even the very best de-
                    sign techniques will never eliminate mistakes. No one is smart enough to
                    anticipate every nuance and implication of each design decision on even a
                    simple little 4k 8051 product; when complexity soars to hundreds of thou-
                    sands of lines of code coupled to complex custom ASICs we can only be
                    sure that bugs will multiply like rabbits.
                        We know, then, up front when making basic design decisions that in
                    weeks or months our grand scheme will go from paper scribbles to hard-
                    ware and software ready for testing. It behooves us to be quite careful with
                    those initial choices we make, to be sure that the resulting design isn’t an
                    undebuggable mess.


                         Test Points Galore

                        Always  remember  that,  whether  you’re  working  on  hardware  or
                    firmware problems, the oscilloscope  is one of the most useful of  all de-
                    bugging tools. A scope gives instant insight into difficult code issues such
                    as operation of I/O ports, ISR sequencing, and performance problems.


                                                                                 1 09
   117   118   119   120   121   122   123   124   125   126   127