OpenBus System - Configuring Processor Memory and Peripherals

Frozen Content

An OpenBus System incorporating a 32-bit processor will typically involve the connection of slave memory and peripheral devices – to the processor's MEM and IO ports respectively. Unlike schematic-based design however, you are not required to manually define the mapping of these devices into the processor's address space, it is handled for you. The mapping information is supplied through the respective configuration dialogs (processor, peripherals, memories and interconnects). The OpenBus System simply takes this information and dynamically maps each device memory or peripheral device accordingly.

The resulting 'memory map', as it is often called, is essentially the bridge between the hardware and software projects – the hardware team allocating each of the various memory and peripheral devices their own chunk of the processor's address space, the software team then writing their code to access the memory and peripherals at given locations.

Mapping Overview

Processor address space can be configured from within the OpenBus System (both memory and peripheral I/O) or the Embedded Software project (memory only). In terms of memory, there are two key pieces of terminology to be aware of:

  • Device Memory – these are blocks of memory that are mapped into the processor's memory architecture (i.e. its address space) based on the physical memory defined in the system. From the OpenBus System document, this is handled automatically (and dynamically). From the Embedded Software project, this can be achieved by manually importing directly from the FPGA project, or by automatically importing from the FPGA project upon compilation.
  • Application Memory – these are defined blocks of memory corresponding to the mapped blocks of device memory. Definable from the Embedded Software project only, these blocks enable you to handcraft exactly how the device memory is used by the embedded code. By default, an application memory block will be the same definition as its 'parent' device memory block. You might decide to define the application memory block to be smaller in size or maybe define multiple sub-blocks within the available application memory block.

Note: Device memory can not be manually defined or edited through the respective memory configuration dialogs. Such memory can only be changed by changing the configuration of the physical memory device itself.

You can also generate .asm and/or .h files for the Embedded Software project, upon FPGA project compilation, providing a means to quickly and efficiently address devices from within the embedded source code.

Figure 1 summarizes the key elements to defining processor address space in terms of memory and peripheral I/O and where such elements can be defined.


Figure 1. Key elements used to define processor address space.

Verification of Mapping from within the OpenBus System

Within the OpenBus System, defined memories and peripheral I/O devices will be automatically mapped into the processor's address space.

From within the OpenBus System, this mapping can be verified using the Configure Processor Memory and Configure Peripherals dialogs, respectively (Figure 2). Access these dialogs by right-clicking on the graphical representation of the processor and choosing Configure Processor Memory or Configure Processor Peripheral from the context menu that appears. The mapping is dynamic – any changes made to physical memory devices or peripheral I/O (e.g. base addresses) will be reflected directly in these dialogs.


Figure 2. Verifying configuration of processor memory and peripheral I/O from within the OpenBus system.

Should you wish to generate the corresponding assembly or C header file for the hardware in the system, ensure that the respective option to generate hardware.asm (Assembly File) or hardware.h (C Header File) is enabled. Enabling an option in one dialog will automatically enable it in the other. When you compile the FPGA project again, the respective file(s) will be generated and added as source to the linked Embedded Software project.

You are reporting an issue with the following selected text and/or image within the active document: