element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog John Beetem's IceStorm Notes
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: johnbeetem
  • Date Created: 10 Jul 2015 11:11 PM Date Created
  • Views 3169 views
  • Likes 4 likes
  • Comments 10 comments
  • icestorm
  • fpga
  • xxicc
Related
Recommended

John Beetem's IceStorm Notes

johnbeetem
johnbeetem
10 Jul 2015

Project IceStorm, by Clifford Wolf and Mathias Lasser, is an amazing project that has reverse-engineered the Lattice iCE40 FPGA's bitstream so that it's finally possible to write open-source FPGA design tools for a real FPGA.  I've been playing with IceStorm and its companion tool arachne-pnr (place & route) over the last few days and it's been loads of fun with very few problems.  I'm going to add IceStorm as a synthesis target for my XXICC (21st Century Co-design) project.  That will give me a complete open-source FPGA design system, something I've been wanting for decades.

 

This 'blog is for collecting links and notes for IceStorm so that others can find them quickly and easily.  I will be adding to it as I learn more.  This content is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License so others can share it.

 

Here is the official Project IceStorm wiki: Project IceStorm

 

Here is my original IceStorm discussion here at element14: Project IceStorm: fully open-source FPGA tools for Lattice iCE40


IceStorm uses a Lattice iCEstick as a development board.  It's available for US$21 in the USA: Lattice Semiconductor: ICE40HX1K-STICK-EVN iCEstick Evaluation Kit.


Here are instructions for installing IceStorm and its companion tools: Projet IceStorm: le FPGA libéré! [the FPGA set free!].  The instructions are a combination of French and GNU/Linux.  The IceStorm steps are out of date, since IceStorm is now at GitHub.  Here are the specific steps for IceStorm:


1.  Install "libftdi-dev" so IceStorm can talk to iCEstick's FT2232H:


$ sudo apt-get install libftdi-dev


2.  You can install IceStorm anywhere, but the standard place is in "/opt".  You'll probably need to change permissions on "/opt" so you can write to it.


$ cd /opt/

 

3.  Clone IceStorm from GitHub:


$ git clone https://github.com/cliffordwolf/icestorm.git icestorm

 

4.  Make the IceStorm software.  Some of it is in C++11, so your GCC will need to support it (GCC 4.8.1 or later).  The "make" step builds textual chip databases using a Python program, which takes a while on a slow computer.


$ cd icestorm

$ make

$ sudo make install


That's it!  IceStorm is ready to go.


Here is a partial list of IceStorm programs.  Like many open-source projects, IceStorm does not have a lot of documentation.  The IceStorm wiki is your best starting point.  However, each program does have a way to print help.


icepack takes a FPGA configuration data in text form (usually from arachne-pnr) and packs it into a binary file for downloading.  Here is a typical icepack command:


$ icepack moebius.txt moebius.bin


To list icepack options, give the command "icepack -h".


iceprog downloads a bitstream to an iCE40 FPGA or to a serial flash.  Here is a typical iceprog command:


$ sudo iceprog moebius.bin


If you don't want to use sudo, you can add a "rules" file to "/etc/udev/rules.d": see udev rules file for FTDI FT2232D/H, FT232H, and Papilio DUO.


To list iceprog options, give the "iceprog" command with no arguments.  For an iCEstick, iceprog programs the serial flash and then resets the FPGA so that it programs itself from the serial flash.  You can't program the FPGA's internal SRAM directly because of the way the SPI interfaces are wired together.  It is possible to modify iCEstick to program SRAM directly, but you lose the serial flash chip.  The "iceprog" command with no arguments tells you how to do this.

  • Sign in to reply

Top Comments

  • johnbeetem
    johnbeetem over 10 years ago in reply to DAB +3
    Thank you for your comments. IceStorm isn't my project -- I'm just using the results. IceStorm's authors Clifford Wolf and Mathias Lasser are the ones who might need to watch their backs. IANAL, but I…
  • Former Member
    Former Member over 9 years ago +3
    Hi johnbeetem . Thank you for taking the time to publish your notes on this. It looks very promising!
  • shabaz
    shabaz over 10 years ago in reply to johnbeetem +2
    Hi John, I believe you're correct, in Europe it is possible to reverse engineer for the purposes of interoperability at interfaces (e.g. say between an industrial machine and its remote control unit).…
  • Former Member
    Former Member over 9 years ago in reply to johnbeetem

    Thanks John; that's definitely what I was missing, and I've managed to get a verilog program compiled and working on the dev board after staring at the I/O diagrams for a while.  I appreciate the advice. =)

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • johnbeetem
    johnbeetem over 9 years ago in reply to Former Member

    Chris Rowlands wrote:

     

    So far I seem to have everything compiled and working in a fresh Ubuntu 14.04 virtual machine, but on trying to run the demo file via arachne-pnr; "arachne-pnr -d 8k -p rot.pcf rot.blif -o rot.txt", I get the output;

     

              seed: 1

              device: 8k

              read_chipdb +/share/arachne-pnr/chipdb-8k.bin...

                   supported packages: cb132, cb132:4k, cm121, cm121:4k, cm225, cm225:4k, cm81, cm81:4k, ct256, tq144:4k

              read_blif rot.blif...

              rot.pcf:1: fatal error: unknown pin '99' on package 'ct256'

     

    Note that I specify an "8k" device, rather than the default.  I'm under the impression I should do that for the larger FPGA chip I'm using.

    Hi Chris,

     

    The file "rot.pcf" is the physical constraint file, which specifies the pinout for your design.  For example,

     

         set_io D1 99

     

    specifies that signal D1 should be connected to pin 99.  The "rot.pcf" that comes with the example is for iCEstick's TQ144 package.  "-d 8k" specifies the HX8K, which assumes a CT256 package.  You need need to look at the schematic for your dev board to see what the pin names are for the LEDs and clock pin and make a CT256 version of "rot.pcf" with pin names like "B5" instead of "99".

     

    This might be useful: you can get help instructions for arachne-pnr with the command "arachne-pnr -h".  There's a way to switch to a different package if CT256 isn't what's on your dev board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago

    Hi; can anyone give me a bit of advice?  I'm pretty new to these tools, and I've run into a problem I'm not quite sure how to fix.

     

    I currently have access to an ICE40-HX8K development board I am trying to use, and I have followed the above notes and other reference materials at "Project IceStorm " and similar.

     

    So far I seem to have everything compiled and working in a fresh Ubuntu 14.04 virtual machine, but on trying to run the demo file via arachne-pnr; "arachne-pnr -d 8k -p rot.pcf rot.blif -o rot.txt", I get the output;

     

              seed: 1

              device: 8k

              read_chipdb +/share/arachne-pnr/chipdb-8k.bin...

                   supported packages: cb132, cb132:4k, cm121, cm121:4k, cm225, cm225:4k, cm81, cm81:4k, ct256, tq144:4k

              read_blif rot.blif...

              rot.pcf:1: fatal error: unknown pin '99' on package 'ct256'

     

     

    Note that I specify an "8k" device, rather than the default.  I'm under the impression I should do that for the larger FPGA chip I'm using.  I generated the .blif file via;

     

       yosys -p "synth_ice40 -blif rot.blif" rot.v

     

     

    And yeah.  I'm unsure of how to solve this issue, or whether I'm missing/doing something silly.  Any help would be greatly appreciated, thanks!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago

    Hi johnbeetem .  Thank you for taking the time to publish your notes on this.  It looks very promising!

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • johnbeetem
    johnbeetem over 10 years ago

    I updated the installation instructions for the 19 July 2015 IceStorm, which includes the iCE40 HX8K.  IceStorm software is now at GitHub, so the instructions have changed. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube