Getting started: Difference between revisions

From iCEBreaker FPGA
Jump to navigation Jump to search
(added note about port swapping)
(Added kbob/nmigen-examples repo.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Programming with open tools ==
= Welcome =


All you need to do is to run iceprog and provide the bitstream .bin file as a parameter.
Welcome to the iCEBreaker community. This wiki is work in progress and the information included here might not be sufficient or not what you are looking for.


  iceprog mybitstream.bin
If you have any questions or suggestions please make sure to let us know in our [https://1bitsquared.com/pages/chat Discord chat (#icebreaker channel)] or in the [https://forum.icebreaker-fpga.com/ iCEBreaker forum].


The tool will detect your iCEBreaker erase and flash the binary file.
= Install the FPGA flow (toolchain) =


== Programming on windows using Radiant Programmer ==
The first thing you should do is install the necessary tools to synthesize, place, route your design and then generate the bitstream.


The official Lattice tool requires a bunch of manual settings to use.
Note: We sincerely recommend that you use a Linux or Mac computers when you start out. You can use Windows but unless you are comfortable with the vendor tools (The vendor tools have their own learning curve and complexity, we do not have examples or step by step guides for them for now, you are on your own ;) ) it requires more advanced knowledge of the tools as well as Windows and you will need to combine and match a few solutions together. We are working on a canned solution for Windows but it is not ready for prime time yet. The only simple path for Windows is to use icestudio. It will limit you to the use of their graphical design software for your projects. If that is what you are looking for go ahead, follow icestudio installation instructions on their website. We do have some example projects for icestudio on our GitHub. If you want to develop your designs using verilog, migen or nMigen then continue reading. :)


Here are two screenshots showing all the options you have to choose so that you can program your iCEBreaker.
The tools that are used for that are:


[[File:Radiant-programmer-main-window.png|thumb|left]]
* [http://www.clifford.at/yosys/ Yosys] (Synthesis)
* [https://github.com/YosysHQ/nextpnr nextpnr] (Place & Route)
* [http://www.clifford.at/icestorm/ icestorm] (Provide the database to nextpnr. Generate and program the bitstream to the iCEBreaker as well as some other useful ice40 tools.)


[[File:Raidant-programmer-device-icebreaker.png|thumb|left]]
There are several ways to install the tools.


== Troubleshooting ==
On '''Linux''' an easy way to install the tools is the [https://github.com/esden/summon-fpga-tools summon-fpga-tools script]. This will build the most up to date tools for you and install them in your home subdirectory. You don't need admin rights except for the udev rules file.


If the above instructions still result in an error similar to:
On '''Mac OS''' you can either use the [https://github.com/esden/summon-fpga-tools summon-fpga-tools script] or use the [https://github.com/ktemkin/homebrew-oss-fpga awesome ktemkin homebrew tap].


  INFO - Device1 iCE40UP5K: W25Q128JV: Erase, Program, Check
= Workshops =
 
  Initialization ...
 
  Verifying IDCode ...
  ERROR - Function: CHECK_ID
  Expected Data: h17 Actual: hFF
 
  ERROR - Operation: failed.
 
  ERROR - Programming Error


You might want to try switching the cable Port. Windows likes to swap them sometimes.
We have developed two workshops so far. WTFpga and icebreaker-workshop. Depending on which Pmods you have you might choose one or the other, or both. :)
 
== WTFpga Workshop ==
 
The [https://github.com/icebreaker-fpga/wtfpga WTFpga Workshop] requires an [https://1bitsquared.com/products/icebreaker iCEBreaker], [https://1bitsquared.com/products/pmod-7-segment-display 7-Segment Display Pmod] and [https://1bitsquared.com/products/pmod-dip-switch Dip Switch Pmod]. You can find all the [https://github.com/icebreaker-fpga/wtfpga current materials on github]. It includes a PDF that is meant as a guide, the whole workshop is self guided. But if you have questions ask us in the [https://1bitsquared.com/pages/chat Discord Chat] and we will try to help you. :)
 
== iCEBreaker Stopwatch Workshop ==
 
The [https://github.com/icebreaker-fpga/icebreaker-workshop iCEBreaker Stopwatch Workshop] requires an [https://1bitsquared.com/products/icebreaker iCEBreaker] and two [https://1bitsquared.com/products/pmod-7-segment-display 7-segment Display Pmod]. This workshop does a better job of teaching synchronous logic and better practices than WTFpga.
 
= Try out examples =
 
The iCEBreaker community keeps creating more and more great examples for the iCEBreaker. Here is a list of links to the different github repositories containing small and big examples.
 
* [https://github.com/icebreaker-fpga/icebreaker-examples iCEBreaker Verilog Examples]
* [https://github.com/icebreaker-fpga/icebreaker-migen-examples iCEBreaker Migen Examples]
* [https://github.com/icebreaker-fpga/icebreaker-nmigen-examples iCEBreaker nMigen Examples]
* [https://github.com/kbob/nmigen-examples kbob's iCEBreaker nMigen Examples]
* [https://github.com/icebreaker-fpga/icebreaker-icestudio-examples iCEBreaker icestudio Examples]
* [https://github.com/kbob/icebreaker-candy kbob iCEBreaker candy RGB LED Panel Matrix examples]
* [https://github.com/smunaut/ice40-playground tnt iCEBreaker projects]
* [https://github.com/scanlime/icebreaker-icestudio-ledmatrix scanlime icestudio RGB LED Panel design]
* [https://github.com/scanlime/icebreaker-video-stuff scanlime icestudio Digital Video design]
 
If you know of more repositories we should include in this list make sure to let us know in the [https://1bitsquared.com/pages/chat Discord Chat].

Latest revision as of 01:03, 22 October 2019

Welcome

Welcome to the iCEBreaker community. This wiki is work in progress and the information included here might not be sufficient or not what you are looking for.

If you have any questions or suggestions please make sure to let us know in our Discord chat (#icebreaker channel) or in the iCEBreaker forum.

Install the FPGA flow (toolchain)

The first thing you should do is install the necessary tools to synthesize, place, route your design and then generate the bitstream.

Note: We sincerely recommend that you use a Linux or Mac computers when you start out. You can use Windows but unless you are comfortable with the vendor tools (The vendor tools have their own learning curve and complexity, we do not have examples or step by step guides for them for now, you are on your own ;) ) it requires more advanced knowledge of the tools as well as Windows and you will need to combine and match a few solutions together. We are working on a canned solution for Windows but it is not ready for prime time yet. The only simple path for Windows is to use icestudio. It will limit you to the use of their graphical design software for your projects. If that is what you are looking for go ahead, follow icestudio installation instructions on their website. We do have some example projects for icestudio on our GitHub. If you want to develop your designs using verilog, migen or nMigen then continue reading. :)

The tools that are used for that are:

  • Yosys (Synthesis)
  • nextpnr (Place & Route)
  • icestorm (Provide the database to nextpnr. Generate and program the bitstream to the iCEBreaker as well as some other useful ice40 tools.)

There are several ways to install the tools.

On Linux an easy way to install the tools is the summon-fpga-tools script. This will build the most up to date tools for you and install them in your home subdirectory. You don't need admin rights except for the udev rules file.

On Mac OS you can either use the summon-fpga-tools script or use the awesome ktemkin homebrew tap.

Workshops

We have developed two workshops so far. WTFpga and icebreaker-workshop. Depending on which Pmods you have you might choose one or the other, or both. :)

WTFpga Workshop

The WTFpga Workshop requires an iCEBreaker, 7-Segment Display Pmod and Dip Switch Pmod. You can find all the current materials on github. It includes a PDF that is meant as a guide, the whole workshop is self guided. But if you have questions ask us in the Discord Chat and we will try to help you. :)

iCEBreaker Stopwatch Workshop

The iCEBreaker Stopwatch Workshop requires an iCEBreaker and two 7-segment Display Pmod. This workshop does a better job of teaching synchronous logic and better practices than WTFpga.

Try out examples

The iCEBreaker community keeps creating more and more great examples for the iCEBreaker. Here is a list of links to the different github repositories containing small and big examples.

If you know of more repositories we should include in this list make sure to let us know in the Discord Chat.