7.1. Memory resources

There is about 66KB of internal RAM in the targeted Cyclone
III FPGA on the Cyclone III Starter Board. There is 1MB of external
SSRAM, 16MB of external FLASH, and 32MB of DDR SDRAM.

Note

SDRAM is beyond the scope of this document, but is mentioned
because some specialized designs might require this resource.

The ITCM and DTCM tightly coupled memories in the processor
can be configured individually to use varying amounts of the internal
RAM resource from 0 to about 95%. In the example design, there is
32KB of instruction memory, and 16KB of data read/write memory.
This is generally sufficient for small programs.

If more memory is required for Cortex-M1 instructions or code,
the following applies:

Allocate more or all of the internal
memory resources to the ITCM. The DTCM size might have to be reduced
or removed altogether depending on the chosen ITCM size. If this
is the case, some of the external resources, that is SRAM, SDRAM
or both, must be allocated to the processor for its data space.

Supplement the internal memory resources with an
external memory resource, flash, SRAM, or SDRAM. It is advantageous
to have an additional amount of SRAM and flash to load and debug
large programs that would not fit into internal FPGA RAM. The drawback
to having code in an external RAM is that the code cannot be preloaded.

It might also be necessary to create a scatter-loaded
Cortex-M1 executable to load instructions into two distinct memories.
This is described in more detail later in this chapter.

Flash is recommended for instructions only after
the entire design and software have been debugged, and a release
version of the ARM Cortex-M1 code is ready.

If more memory is required for Cortex-M1 read/write data,
the following applies:

Allocate more or all of the internal
memory resources to the DTCM. The ITCM size might have to be reduced
or removed altogether depending on the chosen ITCM size. If this
is the case, some of the external resources such as FLASH, SRAM,
or SDRAM must be allocated to the Cortex-M1 for its instruction
space.

Supplement the internal memory resources with an
external memory resource: SRAM, or SDRAM. This is generally the
best solution for mid-size applications. Flash is not in read/write
space, and cannot be used for this purpose.