![Lattice Semiconductor LatticeMico32 Скачать руководство пользователя страница 82](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852082.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Specifying User-Configurable Parameters
76
LatticeMico32 Hardware Developer User Guide
Predefined RTL Parameters
The following parameters are not passed to the custom component but are
required by MSB when generating the platform RTL:
Instance Name – Specifies the default instance name assigned by MSB.
You can only change the default instance name. You can change this
value when instantiating the component in a platform.
Base Address – Specifies the default base address assigned by MSB. It is
overridden by MSB when the custom component is used in a platform if
this component is not locked by MSB. You can change this value when
you instantiate the component in a platform.
Size – Specifies the default address space that is assigned to the
component, in bytes. This parameter is used by MSB for address decode
generation when generating a platform. You can change this value when
you instantiate the component in a platform.
Address Lock – Specifies the default value for “lock,” as used in MSB. You
can change this value when you instantiate the component in a platform
Disable – Specifies the default value for the Disable check box in MSB.
Software Parameters
If your custom component has parameters meant for software use, you make
them available to the software by not declaring these parameters as
“parameter.” See Figure 41. Parameters used for RTL are also available for
software use.
For platform-specific managed-make projects, C/C++ SPE generates a
header file named system_conf.h, which enumerates the various parameters
and their value types. See Chapter 5 of the
LatticeMico System Software
Developer User Guide
for more information on the system_conf.h file.
Table 8 shows how the various value types are translated into this header file.
Table 8: Value Types for Added Parameters
Value Type
Description
Allowable Values
RTL Translation Example
Define
Conditional type
def
undef
#define PARAMETER (1)
#define PARAMETER (0)
String
Character string type
Any printable characters
#define PARAMETER “VALUE”
Integer
Numeric type
Any numeric value
#define PARAMETER(VALUE)