![Lattice Semiconductor LatticeMico32 Скачать руководство пользователя страница 83](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852083.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Specifying User-Configurable Parameters
LatticeMico32 Hardware Developer User Guide
77
Predefined Software Parameters
A single predefined software parameter, CharIODevice, enables C/C++ SPE
to determine if your component supports character file input and output
operations. The default value of this parameter is set to “undef.” If, however,
your component (for example, UART) supports character file input and output
operations, you can set the value of this parameter to “def.”
C/C++ SPE makes instances of this component available as standard input
and output device selections when creating a managed-make C/C++ project.
You cannot change this parameter’s value when instantiating the component
in a platform. It applies to all instances of the component in a platform. C/C++
SPE ignores this parameter and its value for components declared as
memory components. Refer to Chapter 3 and Chapter 4 of the
LatticeMico
System Software Developer User Guide
for more information on the file
support implementation for LatticeMico32.
GUI Presentation
The MSB perspective displays a configuration dialog box for your custom
component when you try to insert your component into a platform. This dialog
box enables you to modify the parameter values through a GUI interface. The
available GUI widgets for configuring parameters are:
Check – Enables you to select or deselect a parameter.
Radio – Enables you to select one of multiple parameters.
Text – Enables you to enter a value.
Combo – Enables you to select pre-determined values from a drop-down
menu.
Spinner – Enables you to select a value from a pre-determined range.
List
Numeric type.
The difference between integer
and List is that List lets you
specify a predefined list of
values.
Any numeric value
#define PARAMETER (VALUE)
Frequency
Platform frequency (passed by
MSB when generating a
platform)
MSB provides the platform
frequency value, and SPE
translates it to
CPU_FREQUENCY macro (e.g.
25MHz is passed as 25000000)
#define CPU_FREQUENCY
(FREQUENCY_IN_HERTZ)
Table 8: Value Types for Added Parameters
Value Type
Description
Allowable Values
RTL Translation Example