![Lattice Semiconductor LatticeMico32 Hardware Developer User Manual Download Page 97](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852097.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Making Custom Components Available in MSB
LatticeMico32 Hardware Developer User Guide
91
driver files containing user-defined application programming interfaces
(APIs).
Also inside the drivers folder are two subdirectories:
Device driver files (<
component_name
>.c and
<
component_name
>.h). The device driver files define the API
function calls available to the C/C++ SPE developer. The functions
are user-defined according to the specific needs of the custom
component.
System service driver files (<
component_name
>Service.c and
<
component_name
>Service.h). The service files must be
implemented to support the LatticeMico32 initialization process.
Each component must define a basic set of service functions that
have been defined by the LatticeMico32 boot process.
rtl folder – Contains the verilog subfolder.
verilog folder – Contains the component Verilog RTL files.
Figure 46: Typical Component Folder and File Structure
<
component_name
>
<
component_name
>.xml
document
Component folder
Component description file
“document” subfolder
<
component_name
>
.
htm
drivers
peripheral.mk
device
<
component_name
>.c
<
component_name
>
.
h
<
component_name
>service.c
<
component_name
>service
.
h
rtl
verilog
<
file
>.v
<
file
>
.
v
HTML file
“drivers” subfolder
peripheral.mk file
“device” subfolder
Device driver files
System service files
“rtl” subfolder
“verilog” subfolder
Verilog component RTL files