Download TR0109 TSK3000 Embedded Tools Reference

Transcript
Linker Script Language
As with a core architecture, a derivative can have any number of parameters. These are identifiers
which get values assigned on instantiation or extension of the derivative. You can use them in any
expression within the derivative definition.
derivative name_child_deriv (parm1,parm2=1)
extends name_parent_derivh (arguments)
{
definitions
}
7.6.2
Instantiating Core Architectures
With the keyword core you instantiate a core architecture in a derivative.
• With the keyword architecture you tell the linker that the given core has a certain architecture.
The architecture name refers to an existing architecture definition in the same LSL file.
For example, if you have two cores (called mycore_1 and mycore_2) that have the same
architecture (called mycorearch), you must instantiate both cores as follows:
core mycore_1
{
architecture = mycorearch;
}
core mycore_2
{
architecture = mycorearch;
}
If the architecture definition has parameters you must specify the arguments that correspond with
the parameters. For example mycorearch1 expects two parameters which are used in the
architecture definition:
core mycore
{
architecture = mycorearch1 (1,2);
}
7.6.3
Defining Internal Memory and Buses
With the memory keyword you define physical memory that is present on the target board. The memory
name is used to identify the memory and does not conflict with other identifiers. It is common to define
internal memory (on-chip) in the derivative definition. External memory (off-chip memory) is usually
defined in the board specification (See section 7.7.3, Defining External Memory and Buses).
• The type field specifies a memory type:
-
rom:
read only memory
-
ram:
random access memory
-
nvram:
non volatile ram
7-25