• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language Verilog
  • Created about 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iCESugar series FPGA dev board

iCESugar-pro

iCESugar-pro

iCESugar-pro is a FPGA board base on Lattice LFE5U-25F-6BG256C, which is fully supported by the open source toolchain (yosys & nextpnr), the board is designed in DDR2 SODIMM form with 106 usable IOs, with on-board 32MB SDRAM, it can run RISC-V Linux. the on board debugger iCELink (base on ARM Mbed DAPLink) support drag-and-drop program, you can just drag the FPGA bitstream into the virtual disk to program, and with a additional USB CDC serial port direct connect to FPGA, so you can only use one TYPE-C cable to develop and test.

Hardware

ECP5

LFE5U-25F-6BG256C (BGA256 0.8mm pitch)

  1. LUTs: 24K
  2. sysMEM Blocks: 18Kb x 56
  3. Embedded Memory: 1008Kb
  4. Distributed RAM bits: 194Kb
  5. 18 x 18 Multipliers: 28
  6. PLL x 1

SDRAM

SDRAM use IS42S16160B (32MB)

SPI-Flash

SPI Flash use W25Q256JV (32MB)

Clock

a 25MHz crystal is connect to P6

Peripheral

  1. a RGB LED is connected to {A11, A12, B11}
  2. a SDCARD slot, support SPI/SDIO
  3. 106 usable IOs out with SODIMM-DDR2-200P, can use with ext-board.

JTAG

the native JTAG of ECP5 is connect to the on-board iCELink, you can flash bistream with this JTAG interface (called JTAG1). and there is also another JTAG interface (actually just some GPIOs of ECP5) connect to the iCELink too (called JTAG2), if you design a SoC with a JTAG interface support, then you can use the JTAG2 to debug your SoC. only one JTAG work a one moment. so use the icesprog tool with command icesprog -j 1 or 2 to switch between these two JTAG interface.

$icesprog -j 1
JTAG --> [JTAG-1]
         [JTAG-1]
         TCK:  iCELink-PB6  -- ECP5-JTAG-TCK (25F-BG256-T10)
         TMS:  iCELink-PB4  -- ECP5-JTAG-TMS (25F-BG256-T11)
         TDI:  iCELink-PB5  -- ECP5-JTAG-TDI (25F-BG256-R11)
         TDO:  iCELink-PB3  -- ECP5-JTAG-TDO (25F-BG256-M10)

         [JTAG-2]
         TCK:  iCELink-PA14 -- ECP5-IO-PL8D  (25F-BG256-F5)
         TMS:  iCELink-PA13 -- ECP5-IO-PL17A (25F-BG256-H5)
         TDI:  iCELink-PA0  -- ECP5-IO-PL38A (25F-BG256-N4)
         TDO:  iCELink-PA1  -- ECP5-IO-PL17D (25F-BG256-J5)

done

iCELink

iCESugar-pro has a on board debugger named iCELink (base on APM32F1),you can only use one USB wire to program the FPGA and debug, here is detail:

  1. drag-and-drop program, just drop the bitstream into the virtual USB DISK iCELink, then wait a few second, the iCELink firmware will do the total program work
  2. USB CDC serial port, it can use to communicate with FPGA
  3. 2 JTAG interfaces for flash the ECP5 or debug the SoC on ECP5
  4. use the command tool icesprog to flash or do more config, here is the help info
$icesprog -h
usage: /home/pi/oss/icesugar/tools/icesprog.arm [OPTION] [FILE]
             -w | --write                   write spi-flash or gpio
             -r | --read                    read  spi-flash or gpio
             -e | --erase                   erase spi-flash
             -p | --probe                   probe spi-flash
             -o | --offset                  spi-flash offset
             -l | --len                     len of write/read
             -g | --gpio                    icelink gpio write/read
             -m | --mode                    icelink gpio mode
             -j | --jtag-sel                jtag interface select (1 or 2)
             -c | --clk-sel                 clk source select (1 to 4)
             -h | --help                    display help info

             -- version 1.1a --

Tips

cause the iCELink connect some GPIOs to the ECP5, you can control this GPIOs with icesprog to do some self defined behavior, for example, to control the iCELink-PA14 -- ECP5-F5 line out low, type these command.

$icesprog -g PA14 -m out
$icesprog -g PA14 -w 0

How-To-Program

there are multiple ways to program the bitstream.

  1. drag-and-drop program, this may be the fastest and simplest way to flash.
  2. use the command icesprog xxx.bit, this can provide more configable parameters.
  3. use the command dapprog xxx.bit (program to flash) or dapprog xxx.svf (program to SRAM)
    the icesprog binary and source code is in icesugar repo, and the dapprog is a bash wrapper of openocd command, click here to check how to setup.

virtual-machine-image

link:https://pan.baidu.com/s/1vV2ckFpOuyd600Y47Tl1sw
verify code:i3en
user: ubuntu
passwd: ubuntu
or https://mega.nz/file/uvJTWKrK#1bBgBkJPZrszwHQSTHHL-RLjxGIru0Qv0qUgmULZZVs

the env include yosys, nextpnr, icestorm, gcc, sbt.

How-to-setup-env

Linux

recommend use the virtual machine, it simple and convenient
FPGA toolchain reference icestorm
gcc toolchain reference riscv-gnu-toolchain
Alternatively, you can download the pre-built toolchain provided by xPack or SiFive

Windows

now you can use the msys2 environment to setup the open source toolchain easily, download msys2 install executable here, install it, then open the msys2 mingw terminal (search msys2 in windows start menu)

#pacman -Syu
#pacman -S mingw-w64-x86_64-eda

select the yosys, nextpnr, icestorm, icesprog and install, after installed, everything is same as in linux!

How-to-buy

you can buy iCESugar-pro and PMOD peripherals from our offcial aliexpress shop Muse Lab Factory Store or search iCESugar-Pro FPGA on www.aliexpress.com

Copyright Statement

the hdmi test verilog source code is from https://github.com/DoctorWkt/ULX3S-Blinky
the linux related project is from https://github.com/litex-hub/linux-on-litex-vexriscv
for hobby and personal usage, you are free to use the iCESugar-pro, you can also make the board yourself by document & firmware in this repo.
for the commercial usage, if you got iCESugar-pro Board from our official shop and use in other commercial product, that's no problem, in other situation, please contact us in advance.

Reference

Colorlight-FPGA-Projects

https://github.com/wuxx/Colorlight-FPGA-Projects

icestorm toolchain

http://www.clifford.at/icestorm/

riscv gcc toolchain

https://xpack.github.io/riscv-none-embed-gcc/install/ https://www.sifive.com/software

iCESugar

https://github.com/wuxx/icesugar

iCESugar-nano

https://github.com/wuxx/icesugar-nano

Examples

https://github.com/damdoy/ice40_ultraplus_examples
https://github.com/icebreaker-fpga/icebreaker-examples

SpinalHDL

https://spinalhdl.github.io/SpinalDoc-RTD/SpinalHDL/Getting%20Started/index.html

More Repositories

1

nanoDAP

建议大家star此仓库,仓库会持续更新。由于部分淘宝卖家“借鉴”实验室出品的nanoDAP详情描述和资料,请大家认准实验室官方链接
C
1,010
star
2

nanoDLA

24MHz sampling rate Logic Analyzer based on fx2lafw
C
507
star
3

icesugar

iCESugar FPGA Board (base on iCE40UP5k)
Verilog
315
star
4

TD4-4BIT-CPU

simple 4-BIT CPU with 74-serials chip,origin by Kaoru Tonami in his book “How to build a CPU”
HTML
220
star
5

Colorlight-FPGA-Projects

current focus on Colorlight i5 and i9 & i9plus module
Verilog
208
star
6

nanoDAP-wireless

nanoDAP-wireless无线仿真器用户手册
126
star
7

openocd-toolbox

OpenOCD工具箱 (温馨提示:请点击本页面右侧绿色按钮处下载zip压缩包)
Tcl
122
star
8

AntRunner

a DIY Antenna Rotator by BG5DIW
C
108
star
9

nanoDAP-HS

DAPLink High Speed
C
102
star
10

icesugar-nano

iCESugar-nano FPGA board (base on iCE40LP1K)
AGS Script
83
star
11

ESPLink

designed for debug Espressif's ESP series chips, include ESP8266/ESP32/ESP32-S2/ESP32-C3/ESP32-S3...
C
63
star
12

USB-HS-Bridge

61
star
13

nanoCH32V003

Shell
57
star
14

nanoCH32V203

45
star
15

nanoESP32-S2

Shell
44
star
16

nanoESP32-S3

ESP32-S3 dev board
C
42
star
17

smachine

Simple Machine, include simulator、ccompiler、assembler
C
40
star
18

nanoCH55x

Shell
39
star
19

8086sos

simple os for 8086 on a MBR
Assembly
34
star
20

RPI-HAT-Programmer

树莓派多功能编程器
C
33
star
21

nanoESP32-C3

ESP32-C3 dev board by muselab
Shell
26
star
22

PDTricker

C
25
star
23

f1c100s-gpio-tools

Command-line access to F1C100s GPIO
C
23
star
24

HC6502

home computer 6502
C
22
star
25

CVE-2020-8004

Python
20
star
26

sigrok-firmware-fx2lafw

C
19
star
27

nrf24-ble

C
15
star
28

nanoCH32V305

15
star
29

sos

Simple OS for raspberry pi 2 model B
C
14
star
30

dslogic

C
13
star
31

pico-lab

C
12
star
32

nanoESP32-C6

11
star
33

ART-of-PCB

HTML
10
star
34

nanoUART

a mini Serial Tool based on CH343P, support up to 6Mbps baudrate.
10
star
35

nanoDAP-HS-wireless

10
star
36

nanoSTM32F0

C
8
star
37

CH32V203-makefile-example

C
7
star
38

DIY-UDISK

6
star
39

RPI-HAT-CoolingFan

树莓派扩展板-散热风扇
C
6
star
40

pyocd-toolbox

Python
6
star
41

linux-wild-tutorial

Shell
6
star
42

RPI-HAT-Pico-BreakoutBoard

RPI-HAT-Pico-BreakoutBoard
Shell
5
star
43

nanoUART-wl

4
star
44

smart_switch_hack

https://www.muselab-tech.com/zhi-neng-kai-guan-ni-xiang-bing-shua-ru-tasmotagu-jian/
Shell
4
star
45

snowflake-light

3
star
46

CH32V003-makefile-example

C
3
star
47

naooUART-wl

2
star
48

wch-riscv-openocd

C
2
star
49

Look4Sat-AntRunner-Controller

Use Look4Sat to control my AntRunner rotator
C
2
star
50

esp32-key

2
star
51

rpi_monitor

自己动手做视频监控
C
2
star
52

nes

C
2
star
53

ml-esp-link

2
star
54

dot

some dot scripts.
Makefile
1
star
55

nanoUART-wl-lr

long range wirelss UART Tool
1
star
56

u-things

iot project with USB interface
C
1
star
57

python

some python application, games.
Python
1
star
58

blues_200_licks

1
star
59

opencv

1
star
60

gnuplot

some gnuplot script
Gnuplot
1
star
61

caculator

caculator written in C, for myself to learn the decline recursive analysis
C
1
star
62

Converter

C++
1
star
63

RPI-HAT-Lora-SX1278

C
1
star
64

pyqt5

Python
1
star
65

tools

C
1
star
66

RPI-HAT-Color-Matrix

1
star