Testing

If you have a frequency counter to hand, measure the frequency on test point A: it should be about 6.3MHz. If you prefer something slower, you should find a frequency of about 0.7Hz on test point B.

Hardware Notes

Full schematics of the board are available in the user manual5. Here are some highlights, relevant to our simple project.

FPGA

The FPGA is a iCE40HX-1K in a 144-pin quad flat-pack.

Clock and PLL

A 12MHz clock from a ceramic resonator is provided on pin 12.

This FPGA has a PLL which lets us scale the incoming clock. Arbitrarily, we will try to get a 100MHz system clock, and to do this we need some magic numbers with which we can configure the PLL. Enter icepll:

As you can see the PLL can’t generate a 100MHz clock, so we will use 100.5MHz instead.

Notice too, that icepll helpfully writes the relevant verilog to a file. Sadly though, that verilog doesn’t use the global clock buffer, so it needs to be tweaked by hand.

LEDs

Four red LEDs are connected to pins 96–99; a green LED is connected to pin 95.

Test points

Dozens of spare IO pins exist, and we use two as test points: pins 44 and 45.

Programming

The board has a FTDI 2232H USB interface which can be used to program flash on the board with iceprog from the IceStorm Tools. However, unless you are prepared to wield a soldering iron, the SRAM in the FPGA can not be programmed directly.

Other peripherals

The manual also contains details of the other peripherals on the board, and, for example, how to use the FTDI chip to talk to a UART on the FPGA. Our needs are more specialized though.