Skip to the content
4 layers80.7 × 65.8 mmPico hx, the printed circuit board in 3D

PCB combining Raspberry Pi Pico and iCE40 FPGA

Size
80.7 × 65.8 mm
Copper layers
4
Thickness
1.6 mm
Parts
75
Nets
181
Pads
491
Tracks, vias
795, 112
Pours
14
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
7 Apr 2021
Updated
8 May 2024

Overview

Pico hx is an open-source printed circuit board by dan-rodrigues, from the dan-rodrigues/pico-hx repository on GitHub. It is a 4-layer board of 80.7 × 65.8 mm with 75 parts on 181 nets, routed with 795 tracks and 112 vias.

It is built around the ICE40HX1K-TQ144 and MIC5504-1.2YM5-TR. Its parts include 20 capacitors, 13 resistors, 9 diodes, 9 connectors and 4 ICs. It belongs with the fPGA and programmable logic boards and the RP2040 and FPGA and CPLD boards of this library.

Main components

2

README

README.md

PicoHX

This is an FPGA board that combines an iCE40 HX FPGA with the Raspberry Pi Pico. The Pico can program the FPGA over USB using a script included in this repo and then interact with it using GPIO.

KiCad rendering

PCB rendering

DVI Demo

Pictured is an included DVI demo. First, the RP2040 was programmed with the USB software which then exposes a USB programmer device to the host. Then, the FPGA configuration containing the DVI test pattern config was uploaded from the host to the RP2040, which then programmed the FPGA, which then displayed the test pattern on screen. This DVI PMOD was used.

PCB DVI demo

Features

  • iCE40 HX FPGA (TQFP144, 1k pinout assumed)
  • 10 Pico GPIOs connected to FPGA
    • 2 are connected to GBIN inputs
  • 4x PMODs in a 2x double-PMOD arrangement
  • 8x user LEDs for FPGA
  • 1x CDONE LED
  • 2x users buttons for FPGA
  • 1x user button for Pico
  • RUN button for Pico
  • Headers for Pico SWD and hardware UART
  • Footprint for QSPI PSRAM or flash
  • Micro SD card slot

Design

Programming

All iCE40 configuration pins are routed to the RP2040 GPIO so the details of how or when it is programmed are up to the software. The included software in this repo will make the Pico present itself is a USB device with these interfaces:

  • Vendor programmer interface: This is how the user can program the iCE40 at any time over USB, using the included picoprog.py script.
  • CDC UART: This UART is separate to the hardware UART that is available on the dedicated pin header. By default, stdout is sent to the CDC UART for convenience.

FPGA clock

The pico exposes one pin that can directly output a clock from one of its PLLs with an optional divider. In the demo software, the USB PLL (48MHz) is divided by 4 to output a 12MHz clock for the FPGA. On the FPGA side, the GBIN5 pin is used for clock input so that the SB_PLL40_2F_PAD can be used.

Power

There is only a 1.2v regulator on the board as the Pico provides a 3.3v output. The 2V5_VPP input is tied to 3.3v as the NVCM isn't used in this project.

PIO support

The 10 GPIOs connected to the FPGA and 4 GPIOs connected to the SD card slot are in consecutive order, so PIO can be used.

Demo

A demo that displays several test patterns controlled by BTN-A and blinks the LEDs in succession can be found in rtl/demo.

text
cd rtl/demo
make prog

Usage

Building Pico software

It's assumed that the pico-sdk is installed and the required environment variables are set.

text
cd software
mkdir build
cd build
cmake ..
make

The software can then be flashed using picotool for example. Default behaviour of the software is to immediately flash the iCE40 with an included bitstream that runs a counter with output to the 8 user LEDs.

Programming iCE40 bitstream

It's assumed that the OSS FPGA toolchain is installed which includes yosys and nextpnr-ice40.

After the Pico software is flashed, it's ready to program the iCE40 using a custom USB driver script. The script is written in Python3 and requires pyusb.

text
pip3 install pyusb

It can then be programmed with similar usage to iceprog. The programmer script is picoprog.py.

text
./picoprog.py bitstream.bit

Parts

75
QtyValueFootprintReferences
15100nFCapacitor_SMD:C_0603_1608MetricC3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C17, C18
92.2kResistor_SMD:R_0603_1608MetricR4, R5, R6, R7, R8, R9, R10, R11, R12
833RResistor_SMD:R_Array_Convex_4x0603RN1, RN2, RN3, RN4, RN5, RN6, RN7, RN8
8LEDLED_SMD:LED_0603_1608MetricD0, D1, D2, D3, D4, D5, D6, D7
4MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965H1, H2, H3, H4
310kResistor_SMD:R_0603_1608MetricR2, R3, R13
210uFCapacitor_SMD:C_0603_1608MetricC16, C19
21uFCapacitor_SMD:C_0603_1608MetricC1, C2
1 BTN_BButton_Switch_SMD:SW_SPST_PTS645SW3
1 BTN_RButton_Switch_SMD:SW_SPST_PTS645SW4
1100RResistor_SMD:R_0603_1608MetricR1
110nFCapacitor_SMD:C_0603_1608MetricC20
15V_ABConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ8
15V_CDConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ9
1BTN_AButton_Switch_SMD:SW_SPST_PTS645SW2
1ICE40HX1K-TQ144Package_QFP:TQFP-144_20x20mm_P0.5mmU2
1LED_BLED_SMD:LED_0603_1608MetricD8
1MIC5504-1.2YM5Package_TO_SOT_SMD:SOT-23-5U4
1Micro_SDConnector_Card:microSD_HC_Hirose_DM3D-SFJ3
1PMOD_APMOD:PMOD_Double_MirroredJ1
1PMOD_BPMOD:PMOD_Double_MirroredJ2
1PMOD_CPMOD:PMOD_Double_MirroredJ4
1PMOD_DPMOD:PMOD_Double_MirroredJ5
1PSRAMPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1PicoRPi_Pico:RPi_Pico_SMD_THU1
1RP_SWDConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ7
1RUNButton_Switch_SMD:SW_SPST_PTS645SW1
1TP_1V2TestPoint:TestPoint_Pad_D2.0mmTP1
1TP_3V3TestPoint:TestPoint_Pad_D2.0mmTP2
1TP_5VTestPoint:TestPoint_Pad_D2.0mmTP3
1TP_GNDTestPoint:TestPoint_Pad_D2.0mmTP4
1UARTConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ6

Similar boards

  • 4 layers148.3 × 147.3 mmSaintcon2019TopBoard, the printed circuit board in 3D

    Saintcon2019TopBoard

    compukidmike/Saintcon2019

    There is also a video of my badge talk at Saintcon https://www.youtube.com/watch?v=MAhJ2WoN14

    1,120 parts20
  • 4 layers65 × 30 mmIce4pi, the printed circuit board in 3D

    Ice4pi

    lightside-instruments/ice4pi

    KiCAD project of a Pi Hat with ice40hx1k FPGA

    57 parts8
  • 4 layers68.6 × 53.3 mmIcezum, the printed circuit board in 3D

    Icezum

    FPGAwars/icezum

    :star2: IceZUM Alhambra: an Arduino-like Open FPGA electronic board

    218 parts357GPL-3.0
  • 2 layers100 × 77.7 mmApple ice, the printed circuit board in 3D

    Apple ice

    ironsteel/apple-ice

    Apple II expansion prototyping board based on the ICE40 FPGA

    83 parts4CC-BY-SA-4.0
  • 2 layers68.8 × 78.7 mmHX1K Devboard, the printed circuit board in 3D

    HX1K Devboard

    RicBent/Hisame

    Development board for the Lattice iCE40 HX1K FPGA

    70 parts3
  • 4 layers30 × 42 mmM2-ice40, the printed circuit board in 3D

    M2-ice40

    mokus0/m2-ice40

    A M.2 3042 B-key card with an ICE40 FPGA. Currently intended for a specific application, but could easily be used for more general purposes.

    146 parts2
  • 2 layers100 × 72 mmPicow-1k, the printed circuit board in 3D

    Picow-1k

    Agilack/eCow-logic

    164 parts1
  • 2 layers141 × 150 mmMidiori, the printed circuit board in 3D

    Midiori

    fabPlane/x68000-midi

    X68000 MIDI and 8 MB RAM expansion card: Gowin GW1NR-9, YM3802-compatible gateware in Amaranth, and a universal I/O slot breakout. CC0.

    92 partsCC0-1.0

Questions

How big is the Pico hx PCB?

It measures 80.7 × 65.8 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Pico hx use?

75 parts, built around the ICE40HX1K-TQ144 and MIC5504-1.2YM5-TR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Pico hx KiCad files?

From the dan-rodrigues/pico-hx repository on GitHub, at the commit this page was made from: the board is pcb/pico-hx.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pico hx design in my own project?

Its repository states no licence, so its author keeps all rights: ask dan-rodrigues before reusing the design.