![Lattice Semiconductor LatticeMico32 Hardware Developer User Manual Download Page 81](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852081.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Specifying User-Configurable Parameters
LatticeMico32 Hardware Developer User Guide
75
RTL Parameters
You define the RTL parameters by selecting the parameter value in the Flags
drop-down box. The other controls in the Parameter Attributes group box
determine the properties of the parameter.
MSB uses the parameter in two ways:
It passes the parameter in the prolog to the Verilog module.
It stores the parameter as a `define in the soc/system_conf.v source file.
In the first method, the parameters are passed to a specific component
instance, so each instance can be configured independently.
In the second case, the `define is a global value, which is useful for
configuring every instance of a component, not just a single instance of a
component.
Writing code that uses the system_conf.v file to find parameters is not
recommended.
RTL Parameter Value Types
The parameters specified in the Parameters tab are made available to you for
configuration through a component configuration dialog box in MSB. You
enter or select the parameter’s value through this component configuration
dialog box. In this tab, you can also specify the display behavior for entering
the parameter’s value in the component configuration dialog box in MSB. You
declare these parameters for RTL usage by selecting the flag field as
“parameter.”
Table 7: RTL Parameter Value Types
Value Type
Description
Allowable Values
RTL Translation Example
Define
Conditional type
def
undef
.PARAMETER(1)
.PARAMETER(0)
String
Character string type
Any printable characters
.PARAMETER(“VALUE”)
Integer
Numeric type
Any numeric value
.PARAMETER(VALUE)
List
Numeric type.
The difference between Integer
and List is that List lets you
specify a predefined list of
values.
Any numeric value
.PARAMETER(VALUE)
Frequency
Platform frequency (passed by
MSB when generating a
platform)
MSB provides the platform
frequency value (for example,
25 MHz is passed as 25).
.PARAMETER(FREQUENCY_I
N_MHz)