Improved Memory Management
A critical part of embedded software development is memory management. The Summer 09 release of Altium Designer brings significant advances in this area, by providing a new methodology for setting up memory in your software systems.
New Device Memory Types
Previously, the memory types available when defining Device memory were Volatile RAM
, Non-Volatile RAM
and ROM
. These, considering they were representing the physical device memory, were not very intuitive. These memory types have now been revisited, with the following new types available:
ROM
RAM
Block RAM
Parallel Flash
If you are creating a schematic-only based FPGA design, simply use the Import From Schematic feature when configuring your processor memory. The memory capabilities in your system will be selected automatically and, with the new naming for memory types, provides an obvious relationship between the configured memory space and the physical memory devices in your design.
If you are building an OpenBus System to define the main processor system in your design, the memory capabilities are, as they always have been, selected and the memory space configured automatically – no having to specify an import from the design or manually define memories.
When the Device memory is mapped across to Application memory, these new memory types are mapped to memory locate types as follows:
Block RAM
------------> Non-Volatile RAM
RAM
-----------------------> Volatile RAM
ROM
-----------------------> ROM
Parallel Flash
----> ROM
Smarter Linking
The Block RAM defined for internal processor memory comes across as Non-Volatile RAM for the application memory. No longer do you need to create 'dummy' ROM and RAM for this internal memory space – the Linker has been enhanced, with the smarts to now put code and/or data in this space.
This smarter linking, in addition to the new memory types used to represent device memory, results in simpler management of the memory – so simple in fact, that you can just place your memory and leave them at their defaults. When taken across to application memory for the embedded software project, the memory will be organized automatically and will work. You of course can hand-craft application memory further to suit your software needs, but the base memory configuration does not need any 'tweaks' to get it to work!
Greater Control over Memory Usage
A new page has been added to the Project Options dialog for an embedded software project – Locate Options. This page provides you with options to determine, with greater control, how each of the physical device memories in your FPGA design are used by your embedded software application.
The whole memory management is divided into three main areas:
- Code and Constants
- Variables and Data
- Special Read-Only Items
Click on an entry in the Description field to learn more about an option or setting in the Description pane at the bottom.
The software will, by default, provide a base suggestion as to memory usage, using a green tick symbol to identify required (or allowed) memory use. You can change this as required, simply by clicking on a tick symbol to change it to a red cross.
There is also an option at the bottom left of the page – Use RAM memories only, also for read-only sections. Enable this option to tell the Linker that the application must not be located in ROM. The Linker will locate all read-only sections, including a copy table if present, in RAM. When the application is started, the data sections are re-initialized and the BSS sections are cleared as usual.
This option is, for example, useful when you want to test the application in RAMbefore you put the final application in ROM. This saves you having to flash the application in ROM over and over again!