Page 30 - Embedded Microprocessor Systems Real World Design
P. 30

von  Neumann Architecture                    Harvard Architecture
                 Single memory space







                   1E( iingle path for both code and data
                            limits performance but permits       Sepamte &e  and data
                                                                 spaces aHow both to be
                            intermixing code and data.          accessed simunanaously
                                                                 bul require two address
                                                                   and data paths.

                 Figure 1.3
                 Von  Neumann versus Harvard Architecture.



                 implemented with a small number of pointers that can retrieve data from the code
                 space and with the inclusion of immediate instructions where a byte  (or word) of
                 data is  included  in  the  instruction  itself. Many  singlechip microcontrollers  use
                 the Harvard architecture, among them the 8031, Microchip PIC series, and Atmel
                 AVR9OS  series. Figure 1.3 shows the relative characteristics of  the von Neumann
                 and Harvard architectures.
                   The advantage of the Harvard architecture is that there are two separate memory
                 areas and often two separate data paths, so code and data can be fetched simulta-
                 neously, increasing the throughput of  the processor. From an embedded system
                 point  of view,  the difference  between  the architectures  is important if  compiled
                 data tables are needed. For example, a stepper motor controller may have a number
                 of ramp tables embedded in the code space.
                   If you choose a processor with a modified Harvard architecture, be sure the table
                 lookup features of the instruction set will not bog down the code. If you are con-
                 sidering an 8031 for this application, you will find that it has several registers that
                 can be used as pointers into the data RAM but only one register (DPTR) that can
                 be used as a pointer into the code PROM. An application that must simultaneously
                 use two tables in PROM constantly switches DPTR between the two pointers. One
                 solution to this is to move one or both tables into RAM, but then you must make
                 sure enough additional RAM is available to hold the tables.


                 Power Requirements
                 In some designs, power is not an issue-you  just put in whatever power supply you
                 need to run whatever the electronics requires. There are two areas in which power
                 is normally an issue. The first is designs that have a power restriction, such as the
                 need to operate from a wall-mounted power supply as found in  many consumer


                 System Design                                                         15
   25   26   27   28   29   30   31   32   33   34   35