Icecube2 Tutorial: December 3, 2020
Icecube2 Tutorial: December 3, 2020
December 3, 2020
Copyright
Copyright © 2020 Lattice Semiconductor Corporation. All rights reserved. This document may
not, in whole or part, be reproduced, modified, distributed, or publicly displayed without prior
written consent from Lattice Semiconductor Corporation (“Lattice”).
Trademarks
All Lattice trademarks are as listed at www.latticesemi.com/legal. Synopsys and Synplify Pro are
trademarks of Synopsys, Inc. Aldec and Active-HDL are trademarks of Aldec, Inc. ModelSim and
Questa are trademarks or registered trademarks of Siemens Industry Software Inc. or its
subsidiaries in the United States or other countries. All other trademarks are the property of their
respective owners.
Disclaimers
NO WARRANTIES: THE INFORMATION PROVIDED IN THIS DOCUMENT IS “AS IS”
WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING
WARRANTIES OF ACCURACY, COMPLETENESS, MERCHANTABILITY,
NONINFRINGEMENT OF INTELLECTUAL PROPERTY, OR FITNESS FOR ANY PARTICULAR
PURPOSE. IN NO EVENT WILL LATTICE OR ITS SUPPLIERS BE LIABLE FOR ANY
DAMAGES WHATSOEVER (WHETHER DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS,
BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OF
OR INABILITY TO USE THE INFORMATION PROVIDED IN THIS DOCUMENT, EVEN IF
LATTICE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME
JURISDICTIONS PROHIBIT THE EXCLUSION OR LIMITATION OF CERTAIN LIABILITY,
SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
Lattice may make changes to these materials, specifications, or information, or to the products
described herein, at any time without notice. Lattice makes no commitment to update this
documentation. Lattice reserves the right to discontinue any product or service without notice and
assumes no obligation to correct any errors contained herein or to advise any user of this
document of any correction if such be made. Lattice recommends its customers obtain the latest
version of the relevant information to establish that the information being relied upon is current
and before ordering any products.
Telephone Support Hotline Receive direct technical support for all Lattice products by calling
Lattice Applications from 5:30 a.m. to 6 p.m. Pacific Time.
For USA & Canada: 1-800-LATTICE (528-8423)
For other locations: +1 503 268 8001
In Asia, call Lattice Applications from 8:30 a.m. to 5:30 p.m. Beijing Time (CST), +0800 UTC.
Chinese and English language only.
For Asia: +86 21 52989090
E-mail Support
[email protected]
[email protected]
Version Revision
Software Version
This tutorial is based on iCEcube2 Software Version 2020.12. For more information about
acquiring the iCEcube2 software, visit the Lattice Semiconductor website:
http://www.latticesemi.com.
Software Requirements
This tutorial requires two software programs:
• iCEcube2 Tool Suite version 2013.12 or higher
• The stand-alone version of Lattice Diamond™ Programmer software, version 2.1 or
higher
The iCEcube2 software should be installed on a platform satisfying the following minimum
requirements:
• Pentium 4 computer (500 MHz) with 256 MB of RAM, 256MB of virtual memory, and
running one of the following operating systems:
• Windows 7 OS, 32-bit / 64-bit
• Windows XP Professional
• Red Hat Enterprise Linux WS v4.0
For installation help, refer to the iCEcube2 Installation Guide located in the
<icecube2_install_directory>/doc directory.
Figure 1 depicts the design flow using the iCEcube2 Tool Suite. The blue boxes indicate
functionality supported by iCEcube2 software. The purple boxes indicate the functionality
supported by the Synopsys Synplify Pro synthesis tools, Lattice Synthesis Engine (LSE), and the
Mentor ModelSim simulation tool. The iCEcube2 software, Synopsys Synplify Pro, LSE, and the
Mentor ModelSim software constitute the iCEcube2 Tool Suite.
1. Create a new project in the iCEcube2 Project Navigator and specify a target device and
its operating conditions. Add HDL (Verilog or VHDL) design files and constraint files to
the project.
2. Synthesize the design. iCEcube2 software supports both Lattice Synthesis Engine (LSE)
and Synplify Pro design software. For the purposes of this tutorial, we will be using
Synplify Pro. “Appendix A: Synthesizing the Design with Lattice Synthesis Engine” on
page 26 provides steps that demonstrate the use of Lattice Synthesis Engine (LSE).
3. Perform placement and routing using iCEcube2 Place and Route tools. iCEcube2 also
supports the Floor Planner tool to allow you to manually place logic cells and I/Os.
4. Perform timing simulation of your design using the Mentor ModelSim simulation tool or
any industry-standard HDL simulation tool. The files necessary for simulation are
automatically generated by the iCEcube2 physical implementation tools after the routing
phase.
5. Perform static timing analysis using the iCEcube2 Static timing analyzer.
6. Generate device programming and configuration files from the iCEcube2 Physical
Implementation tools.
7. Program the device on the iCEblink40-HX1K board using Lattice Stand-Alone
Programmer tool.
Create a Project
Start the iCEcube2 software. In Windows, from the Start menu, choose Lattice iCEcube2 >
iCEcube2. The iCECube2 main window appears, as shown in Figure 2.
To create a new project, choose File > New, or click the Create a New Project icon as shown in
Figure 2. This will launch the New Project Wizard, a shown in Figure 3.
This example is targeted for an iCE40-HX1K device installed in the iCEblink40-HX1K Evaluation
Board. Set up the project properties as follows:
• Project Name: Specify a project name (quick_start) in the Project Name field.
• Project Directory: Specify a directory in which to place the project. In this example, the
directory C:\ice40_tutor was chosen.
• Device Family: Choose iCE40.
• Device: Choose HX1K.
• Device Package: Choose VQ100.
• Operating Condition: Leave all selections as default.
• Start From Synthesis: This option allows you to start the flow from synthesis. For this
tutorial, select this option.
• Click Next to display the Add Files dialog box, as shown in Figure 4.
After successfully setting-up your project, you will return to the following iCEcube2 Project
Navigator, which should appear as shown in Figure 5.
The synthesis is run in the background, and the results of the synthesis are displayed in the
iCEcube2 output tab, as shown in Figure 7.
Select Implementation
Double-click Select Implementation. This sets the synthesis implementation to process for place
and route in iCECube2. If you have different synthesis implementations, you will be able to select
the synthesis implementation you wish to place and route. Since we only have one
implementation, click OK when the Select Synthesis Implementation dialog box appears, as
shown in Figure 8.
Physical constraints such as pin assignments are stored in a .PCF file (Physical Constraint File).
You will now add the .PCF file to your project.
In the iCEcube2 Project Navigator, expand Add P&R Files. Right-click on Constraint Files, and
select Add Files as shown in Figure 9.
Note: For information on importing physical constraints from iCEcube to iCEcube2, please refer
to the Importing Physical Constraints from iCEcube to iCEcube2 section in the iCEcube2
User Guide.
\
Figure 10. Add .pcf file
Figure 15 shows the timing analysis of our 100 MHz design running at over 123.02 MHz and our
1 MHz clock is running at over 170.76 MHz (worst case timing). If we were not meeting timing,
the timing analyzer allows you to see your failing paths and do a more in-depth analysis. For this
tutorial, we won’t go into details on timing slack analysis. See the iCEcube2 User Guide for
details on timing analysis.
1. Connect the fly wires of the Lattice HW-USBN-2A USB programming cable to the board as
shown in Table 1.
3. Connect the USB Mini Cable to the iCEblink40-HX1K board, and connect the other end to an
available USB port on your computer. This cable provides 5 V power to the board.
Start the stand-alone Diamond Programmer. In Windows, from the Start menu, choose Lattice
Diamond Programmer > Diamond Programmer.
The Diamond Programmer Getting Started dialog box appears, as shown in Figure 19.
Select Create a New Project from a Scan button and click OK.
Diamond Programmer will indicate in the bottom output tab that the Lattice HW-USBN-2A USB
programming cable was detected, as shown in Figure 20.
In the Programming File box, browse to the iceblink40_demo_bitmap.hex file you generated
with iCEcube2. In our example, the .hex file is located in:
C:\ice40_tutor\quick_start\quick_start_Implmnt\sbt\outputs\bitmap
The Device Properties dialog box should be configured as shown in Figure 23.
The external SPI Flash on the Lattice iCEblink40-HX1K evaluation board has been programmed,
and the iCE40 is configured from the SPI flash.
The four green LEDs on the iCEblink40-HX1K board should flash in sequence from top to bottom.
Congratulations, you have successfully programmed your design onto an iCE40 device.
Your design has now been synthesized with LSE. You can perform the same tasks as were
performed with the design that was synthesized using Synopsis Synthesis Pro, including:
• Place the Design (page 15)
• View Floor Planner (page 16)
• View the Package Viewer (page 17)
• Route the Design (page 17)
• Perform Static Timing Analysis (page 18)
• Perform Power Analysis (page 19)
• Generate Programming Files with iCEcube2 (page 19)
• Save the iCEcube2 Project (page 19)
• Program an iCE40 Device with Stand-Alone Diamond Programmer (page 20)