![Lattice Semiconductor LatticeMico32 Hardware Developer User Manual Download Page 96](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852096.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Making Custom Components Available in MSB
90
LatticeMico32 Hardware Developer User Guide
If your directory structure is not one of these, use your best guess to
provide either the relative path or absolute path and see if Diamond issues
an error message saying that it cannot expand the .ngo definition.
Making Custom Components Available in MSB
LatticeMico System performs the following steps automatically through the
custom component dialog box to make your custom component available in
MSB. You do not have to take any action. This section is for information only.
Integrating Custom Component’s RTL
Design Files
The key step in connecting your custom component in a platform is to tie the
WISHBONE interface signals (master or slave) to the automatically generated
arbitration logic. The platform generator imposes internal naming
conventions, so a Verilog wrapper is created to implicitly enforce the internal
naming conventions without informing you. The automatically generated
Verilog wrapper instantiates your custom component, allowing MSB to
connect the custom component to the rest of the platform.
Saving the Settings
All the settings specified in the Import/Create Custom Component dialog box
are saved in a component description file in XML format. Also, the RTL and
the software files provided to the Import/Create Custom Component dialog
box are copied to the component creation directory.
Directory Structure
Figure 46 shows a typical directory and file structure that LatticeMico System
generates for a LatticeMico32 component.
The following is a brief description of the folders and files contained in a
typical custom component folder:
<
component_name
> folder – Contains the following files and directories:
<
component_name
>.xml – Contains the XML code required to attach
your component to the LatticeMico32 processor.
document folder – Contains documentation file or files. At a minimum,
this folder contains the <
component_name
>.htm file, which is an
HTML file that is displayed in the Component Help view in the MSB
main window.
drivers folder – Contains the peripheral.mk file, which is used to direct
C/C++ System Programming Environment (SPE) to the C/assembly