Download GU0114 Using the MicroBlaze Embedded Tools

Transcript
Using the MicroBlaze Embedded Tools
6.9.5
The Derivative Definition
When you are building a personal ASIC (using FPGAs) you will probably not need to program the derivative definition (unless
you are using multiple cores), but the description below helps to understand the Linker Script Language and how the definitions
are interrelated.
A derivative is the design of a processor, as implemented on an FPGA. It comprises one or more cores and on−chip memory.
The derivative definition includes:
• core definition: an instance of a core architecture
• bus definition: the I/O buses of the core architecture
• memory definitions: internal (or on−chip) memory
Core
Each derivative must have at least one core and each core must have a specification of its core architecture. This core
architecture must be defined somewhere in the LSL file(s).
core MB
{
architecture = MB;
}
Bus
Each derivative can contain a bus definition for connecting external memory. In this example, the bus addr_bus maps to the
bus addr_bus defined in the architecture definition of core MB:
bus addr_bus
{
mau = 8;
width = 32;
map (dest=bus:MB:addr_bus, dest_offset=0, size=4G);
}
Memory
Memory is usually described in a separate memory definition, but you can specify on−chip memory for a derivative. For
example:
memory internal_code_rom
{
type = rom;
size = 2k;
mau = 8;
map(dest = bus:addr_bus, size=2k,
dest_offset = 0x00100000); // src_offset is zero by default)
}
This completes the LSL code in the derivative definition. Note that all code above goes into the derivative definition, thus
between:
derivative X
// name of derivative
{
All code above goes here.
}
If you create a derivative and you want to use Altium Designer to select sections, the derivative must be called "MB" for
the MicroBlaze, since Altium Designer uses this name in the generated LSL file. If you want to specify memory in Altium
Designer, the custom derivative must contain the bus "addr_bus" for the same reasons.
6−16