# LimeSDR FPGA "hello world"

**URL:** <https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784>\
**Category:** LimeSDR\
**Created:** [4 October 2017 18:49 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784 "2017-10-04T18:49:41Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![hahnpv](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/hahnpv/32/172_2.png) [@hahnpv](https://discourse.myriadrf.org/u/hahnpv)\
**Post date:** [4 October 2017 18:49 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/1 "2017-10-04T18:49:42Z")

</div>

I am interested in learning about FPGA’s and would like to use the Cyclone IV on my LimeSDR to do so. Ultimately I want to decoed GPS (time, if not location fix) on a FPGA.

I saw the thread “LimeSDR for embedded use” and @Zero posted about using LimeUtil to flash the FPGA over USB, or using Quartus (presumably with JTAG? or can you use USB with Quartus?)

Anyways I was wondering if someone has or could share a “hello world” (toggle lights on the board or something) using the FPGA on the LimeSDR while retaining its RF functionality?

Thanks,

philip

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [5 October 2017 05:37 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/2 "2017-10-05T05:37:49Z")

</div>

> [@hahnpv](#):
>
> using LimeUtil to flash the FPGA over USB, or using Quartus (presumably with JTAG? or can you use USB with Quartus?)

You have two possibilities to flash FPGA on LimeSDR-USB board:

1. Using LimeSuiteGUI or LimeUtil;
2. Using Altera Byte Blaster programmer which is USB ↔ JTAG adapter.

> [@hahnpv](#):
>
> Anyways I was wondering if someone has or could share a “hello world” (toggle lights on the board or something) using the FPGA on the LimeSDR while retaining its RF functionality?

I don’t believe there is something like that. I would suggest to try re-compile FPGA gateware provided. Then upload it and check if everything is working again. Then you may try to blink LED. I can help you with this.

---

<div class="post-metadata">

**Author:** ![afiskon](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/afiskon/32/1131_2.png) [@afiskon](https://discourse.myriadrf.org/u/afiskon)\
**Post date:** [5 October 2017 10:12 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/3 "2017-10-05T10:12:02Z")

</div>

Before decoding GPS signal there is a lot to learn about Verilog, half-adders and stuff. The great book on this topic I would recommend - [Digital Design and Computer Architecture](https://www.amazon.com/Digital-Design-Computer-Architecture-Second/dp/0123944244/).

If you never programmed FPGAs before you may consider to start experimenting with a bit cheaper devices first. I personally would recommend Lattice iCEstick board. It costs about 30$ (depending on where you buy it) and there are tutorials and example projects for this board [on hackaday.com](https://hackaday.com/tag/icestick/). The best thing about this particular board is that there are completely free and open source development tools for it (yosys, arachne, icestorm).

---

<div class="post-metadata">

**Author:** ![Zero](https://avatars.discourse-cdn.com/v4/letter/z/a88e57/32.png) [@Zero](https://discourse.myriadrf.org/u/Zero)\
**Post date:** [5 October 2017 12:20 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/4 "2017-10-05T12:20:25Z")

</div>

The Lime FPGA source is VHDL, not Verilog (except the top level, which for some reason is Altera schematic blocks - which I haven’t seen since ~Quartus 5.0).

And IMO the Lime FPGA is not a good place to play and learn - it’s quite complex, and anyone not already familiar with the Altera tools, and VHDL, and FPGAs in general is going to have trouble following what’s going on.

A small FPGA dev board (as afiskon above recommends) is a better approach for starting out.

---

<div class="post-metadata">

**Author:** ![gerryk](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/gerryk/32/138_2.png) [@gerryk](https://discourse.myriadrf.org/u/gerryk)\
**Post date:** [5 October 2017 12:20 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/5 "2017-10-05T12:20:28Z")

</div>

Nice tip @afiskon however, they are back-ordered 26 weeks, and shipping is $45

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [5 October 2017 12:29 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/6 "2017-10-05T12:29:04Z")

</div>

> [@Zero](#):
>
> except the top level, which for some reason is Altera schematic blocks - which I haven’t seen since ~Quartus 5.0

It is more convenient to see quite complex structure as a schematic instead of digging into VHDL or Verilog 🙂

---

<div class="post-metadata">

**Author:** ![afiskon](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/afiskon/32/1131_2.png) [@afiskon](https://discourse.myriadrf.org/u/afiskon)\
**Post date:** [5 October 2017 12:29 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/7 "2017-10-05T12:29:32Z")

</div>

@gerryk I personally bought my iCEstick on AliExpress. There are still offers available ( [example](https://www.aliexpress.com/item/1-pcs-x-ICE40HX1K-STICK-EVN-Programmable-Logic-IC-Development-Tools-iCE40-HX1K-iCEstick-Eval-Board/32436885113.html) ) - 36$ and free shipping worldwide. There are also other ICE40HX1K based boards (on eBay as well), not iCEsticks and a little more expensive but should work as well.

UPD: [Amazon.com](http://Amazon.com) also is worth checking.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [5 October 2017 12:32 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/8 "2017-10-05T12:32:15Z")

</div>

myStorm is a nice board, but not sure what the current situation is with regards sales.

[https://mystorm.uk/](https://mystorm.uk/)

---

<div class="post-metadata">

**Author:** ![gerryk](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/gerryk/32/138_2.png) [@gerryk](https://discourse.myriadrf.org/u/gerryk)\
**Post date:** [5 October 2017 12:47 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/9 "2017-10-05T12:47:39Z")

</div>

Farnell also have them… no stock until November, but shipping is free.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [5 October 2017 13:40 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/10 "2017-10-05T13:40:25Z")

</div>

See also:

[https://www.olimex.com/Products/FPGA/iCE40/iCE40HX1K-EVB/open-source-hardware](https://www.olimex.com/Products/FPGA/iCE40/iCE40HX1K-EVB/open-source-hardware) (requires a programmer)

And:

[https://www.digikey.com/product-detail/en/trenz-electronic-gmbh/TE0887-03M/1686-1083-ND/7086896](https://www.digikey.com/product-detail/en/trenz-electronic-gmbh/TE0887-03M/1686-1083-ND/7086896) (more expensive, but nice build and can be programmed via the attached Pi)

---

<div class="post-metadata">

**Author:** ![gerryk](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/gerryk/32/138_2.png) [@gerryk](https://discourse.myriadrf.org/u/gerryk)\
**Post date:** [5 October 2017 13:42 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/11 "2017-10-05T13:42:42Z")

</div>

Thanks @andrewback I am following up on the Blackice board. It has the higher end ICE40 - 3.5K LEs, and an ARM CPU, onboard i2c and spi processors and a bunch of RAM.  
Not bad for €40

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [5 October 2017 14:01 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/12 "2017-10-05T14:01:38Z")

</div>

I would go with this one:  
[http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=139&No=593](http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=139&No=593)  
🙂

Or look at Terasic web site, there are more nice boards.

---

<div class="post-metadata">

**Author:** ![gerryk](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/gerryk/32/138_2.png) [@gerryk](https://discourse.myriadrf.org/u/gerryk)\
**Post date:** [5 October 2017 14:36 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/13 "2017-10-05T14:36:22Z")

</div>

I’d like one of those… as a born-again student I can take advantage of academic pricing too

---

<div class="post-metadata">

**Author:** ![hahnpv](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/hahnpv/32/172_2.png) [@hahnpv](https://discourse.myriadrf.org/u/hahnpv)\
**Post date:** [5 October 2017 15:29 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/14 "2017-10-05T15:29:13Z")

</div>

Thanks all. I was trying to get away with using the hardware I had on had as opposed to buying a development kit to learn but I can see the value in that. I’d like to focus on signal processing so it makes sense to me to use a board that had meaningful signals already connected to it 🙂 .

@zack I will start with recompiling firmware and seeing if I can tweak it. If there isn’t a hello world, with a bit of help to do so, I’d be happy to document/publish it.

@afiskon Thanks for the book recommendation.

---

<div class="post-metadata">

**Author:** ![will\_mysky](https://avatars.discourse-cdn.com/v4/letter/w/c0e974/32.png) [@will\_mysky](https://discourse.myriadrf.org/u/will_mysky)\
**Post date:** [14 November 2017 04:08 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-hello-world/1784/15 "2017-11-14T04:08:42Z")

</div>

For FPGA playtime, I just got a “Snickerdoodle” board that’s got a Zynq ARM/FPGA device on it. It wasn’t terribly expensive and i’m looking forward to playing with it. I would agree that the kind of middleware involved in the LimeSDR probably isn’t the best place to start tinkering as a beginner. I considered doing exactly the same thing until a more knowledgeable person pointed me to a cheap dev board and suggested I play there for a bit and learn to understand how VHDL works before delving into a large established codebase.

Cheers  
Will
