Download ZiLOG Developer Studio II--ZNEO User Manual

Transcript
ZiLOG Developer Studio II
ZNEO™ User Manual
251
6
Configuring Memory for Your Program
The ZNEO CPU architecture provides a single unified address space for both internal and
external memory and I/O. Several address ranges within this space can be configured for
various purposes, providing a great deal of flexibility for creating a program configuration
tailored to your target design and application needs. The cost of this flexibility is that you
need to understand how to set up the project settings and initialization to support your preferred configuration. This chapter gives you the information needed to configure your
project to support the programming model that best fits your needs.
This chapter covers the following topics:
•
•
•
“ZNEO Memory Layout” on page 251
“Programmer’s Model of ZNEO Memory” on page 253
“Program Configurations” on page 258
The first two sections describe the relationship between the ZNEO CPU’s physical memory layout and the functional address ranges available to the programmer. Understanding
this relationship is the key to correctly configuring your project. The last section presents
several examples of program configuration, covering the configurations that are expected
to be most commonly used.
ZNEO MEMORY LAYOUT
The ZNEO CPU has a unique memory architecture with a unified 24-bit physical address
space. (ZNEO CPU effective addresses are 32 bits wide, but current devices ignore bits
[31:24].) The physical address space can address four types of memory and I/O, as follows:
•
•
•
•
Internal nonvolatile memory
Internal RAM
Internal I/O memory and special-function registers (SFRs)
External memory and memory mapped peripherals.
The internal memory and I/O are always present in ZNEO devices, and are located at specific address ranges in the unified address space. External memory or I/O is optional, and
its location in the address space is determined by the target hardware design.
To promote code efficiency, the ZNEO CPU supports shorter 16-bit data addressing for
the address ranges 00_0000H-00_7FFFH and FF_8000H-FF_FFFFH. 32-bit addressing
can also be used in these ranges. The range 00_8000H–FF_7FFFH requires 32-bit
addresses. Figure 87 on page 252 shows the typical address layout of memory types available in the ZNEO architecture.
6 Configuring Memory for Your Program
UM017103-0207