From d5a4a2bc10c1e951a72003c8ee7e5ba1f6153a24 Mon Sep 17 00:00:00 2001 From: Soumil Krishnanand Heble Date: Mon, 28 Sep 2020 15:31:31 -0400 Subject: [PATCH] serv on iCEstick HX1K FPGA Evaluation Board (#34) * Lattice iCEstick Evaluation Board PCF File * Added Lattice iCEstick Evaluation Board to servant fusesoc config * Fixed icestick pcf to use LED as q since default memfile is blinky * Updated README.md with iCEstick evaluation board details --- README.md | 8 ++++++++ data/icestick.pcf | 8 ++++++++ servant.core | 19 ++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 data/icestick.pcf diff --git a/README.md b/README.md index 81fc244..c407bba 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,14 @@ Pin 61 is used for UART output with 115200 baud rate. This pin is connected to a fusesoc run --target=alhambra servant iceprog -d i:0x0403:0x6010:0 build/servant_1.0.1/alhambra-icestorm/servant_1.0.1.bin +### iCEstick + +Pin 95 is used as the GPIO output which is connected to the board's green LED. Due to this board's limited Embedded BRAM, programs with a maximum of 7168 bytes can be loaded. The default program for this board is blinky.hex. + + cd $SERV/workspace + fusesoc run --target=icestick servant + iceprog build/servant_1.0.2/icestick-icestorm/servant_1.0.2.bin + ## Other targets The above targets are run on the servant SoC, but there are some targets defined for the CPU itself. Verilator can be run in lint mode to check for design problems by running diff --git a/data/icestick.pcf b/data/icestick.pcf new file mode 100644 index 0000000..e99e6a2 --- /dev/null +++ b/data/icestick.pcf @@ -0,0 +1,8 @@ +# 12 MHz clock input +set_io i_clk 21 + +# Onboard LED (Green) +set_io q 95 + +# UART TX +#set_io q 62 diff --git a/servant.core b/servant.core index df41dba..d28f6c0 100644 --- a/servant.core +++ b/servant.core @@ -46,6 +46,7 @@ filesets: tinyfpga_bx: {files: [data/tinyfpga_bx.pcf : {file_type : PCF}]} icebreaker : {files: [data/icebreaker.pcf : {file_type : PCF}]} alhambra : {files: [data/alhambra.pcf : {file_type : PCF}]} + icestick : {files: [data/icestick.pcf : {file_type : PCF}]} lx9_microboard: files: @@ -132,7 +133,6 @@ targets: speed : -2 toplevel : servant_lx9 - tinyfpga_bx: default_tool : icestorm filesets : [mem_files, soc, service, tinyfpga_bx] @@ -261,6 +261,17 @@ targets: vivado: {part : xczu7ev-ffvc1156-2-e} toplevel : servus + icestick: + default_tool : icestorm + filesets : [mem_files, soc, service, icestick] + generate: [icestick_pll] + parameters : [memfile=blinky.hex, memsize=7168, PLL=ICE40_CORE] + tools: + icestorm: + nextpnr_options : [--hx1k, --package, tq144, --freq, 32] + pnr: next + toplevel : service + parameters: PLL: datatype : str @@ -334,3 +345,9 @@ generate: parameters: freq_in : 12 freq_out : 32 + + icestick_pll: + generator: icepll + parameters: + freq_in : 12 + freq_out : 32