# LimeSDR FPGA secrets

**URL:** <https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903>\
**Category:** LimeSDR\
**Created:** [8 March 2017 14:53 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903 "2017-03-08T14:53:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [8 March 2017 14:53 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/1 "2017-03-08T14:53:49Z")

</div>

Now that I have received my forum ‘Member’ badge - oh what joy! - I’d like to challenge any member (badged or non badged) to explain to me what the FPGA does on the LimeSDR (in less than 400 characters)?

I’ve read the manual for the home grown lime chip and it kind of makes sense to me. Is there a datasheet/resource that tells me what the FPGA does? I’ve not used one of these gadgets before so am intrigued!

---

<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:** [8 March 2017 15:02 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/2 "2017-03-08T15:02:57Z")

</div>

> [@TegwynTwmfatt](#):
>
> in less than 400 characters

1. Glue logic between LMS7002M and FX3 USB MCU;
2. Signal waveform player (WFM) implementation;
3. Tx and Rx data stream synchronization if necessary;
4. NIOS MCU to control LMS7002M and on board devices like thermometer, Si5351C clock synthesizer etc.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [8 March 2017 15:28 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/3 "2017-03-08T15:28:05Z")

</div>

Thanks Zack!  
I’m guessing that using the FPGA is a great deal quicker than programming a microprocessor to do the same thing?  
Does the FPGA also switch in/out components such as capacitors/resistors/inductors/aerial sockets?

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [8 March 2017 18:22 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/4 "2017-03-08T18:22:17Z")

</div>

Good question. I also wonder how much room is leftover/available to do more stuff with the FPGA?

Just came across this:

> The FPGA is presently used to take care of things such as interfacing, digital down-conversion and tuning, and sample time-stamping.

[http://fossi-foundation.org/gsoc17-ideas.html#limesdr-integrate-risc-v-core](http://fossi-foundation.org/gsoc17-ideas.html#limesdr-integrate-risc-v-core)

FYI see the announcement here:

> [@Work on a LimeSDR project with Google Summer of Code](https://discourse.myriadrf.org/t/work-on-a-limesdr-project-with-google-summer-of-code/905):
>
> Fantastic opportunity for students with digital design experience to get paid to work on an open source LimeSDR-based project over the course of the summer, courtesy of the Free and Open Source Silicon Foundation’s participation in Google Summer of Code 2017. For details see: [https://myriadrf.org/blog/work-limesdr-project-google-summer-code/](https://myriadrf.org/blog/work-limesdr-project-google-summer-code/)

---

<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:** [8 March 2017 19:29 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/5 "2017-03-08T19:29:21Z")

</div>

> [@TegwynTwmfatt](#):
>
> I’m guessing that using the FPGA is a great deal quicker than programming a microprocessor to do the same thing?

Yes and no. If you took the same processor design and synthesized it for an FPGA and had a custom ASIC made, the latter should run a lot faster — at least an order of magnitude. So why use FPGAs? You can easily build a system-on-chip that integrates a processor and lots of other custom stuff, like glue logic to hook up other devices, along with DSP blocks and clock circuitry. You can do that in quantity 1 if you like (a 1 off ASIC would cost a _lot_ more…) and you can also modify and update the design just by replacing a configuration file in flash.

Cost and ability to reconfigure/update aside, FPGAs allow you to implement application-specific stuff in hardware, such as signal processing, and that can run a lot faster than when implemented in software, given FPGAs are inherently parallel. Maybe a couple of orders of magnitude? A great deal faster anyway.

> [@TegwynTwmfatt](#):
>
> Does the FPGA also switch in/out components such as capacitors/resistors/inductors/aerial sockets

RF switching is handled by the LMS7002M, with I think the exception the loopback function. The GPIO is connected to the FPGA and custom logic could be implemented there to control/interface with this.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [10 March 2017 12:21 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/6 "2017-03-10T12:21:59Z")

</div>

Thanks for your help Andrew. I’m determined to unravel the secrets of this SDR gadget. I’ll read the LMS7002M datasheet again and try and glean some info from the Limesuite GUI. There is so much RF terminology and abbreviations that a glossary of terms would be really useful if there is such a thing?

---

<div class="post-metadata">

**Author:** ![M0GLO](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/m0glo/32/999_2.png) [@M0GLO](https://discourse.myriadrf.org/u/M0GLO)\
**Post date:** [10 March 2017 13:55 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/7 "2017-03-10T13:55:26Z")

</div>

You might want to take a look at the HPSDR projects and Anand’s code for direction on that, they have spent the last decade optimizing their kit and offloading as much as they can into the FPGA, and the HPSDR FPGA’s are smaller so I would think we’'d have more room to play in.

The signal processing code and algo’s should be freely transportable, only the HPSDR hardware specific and PowerSDR code relocation segments need to be stripped out and replaced with code specific to our needs. I myslef am not sure of how much that is. I code but haven’t gotten into DSP coding, just let Phil and the others deal with that and enjoyed their work. They are very good at it.  
I do believe there are a few of the HPSDR design and programming team here waiting for or already working on their boards.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [10 March 2017 16:33 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/8 "2017-03-10T16:33:24Z")

</div>

Cyclone IV - NIOS II (soft core or a.k.a. embedded core) = what’s left to play with

At least that is my rudimentary understanding with Andrew’s help.

---

<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:** [11 March 2017 08:15 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/9 "2017-03-11T08:15:17Z")

</div>

It would be interesting to see what from HPSDR could be reused. Also, one of the GSoC project ideas is to re-factor the LimeSDR FPGA platform to use FuseSoC for packaging, integration and build. This would make it easier to have numerous FPGA configurations each with different features.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [14 April 2017 03:05 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/10 "2017-04-14T03:05:14Z")

</div>

…meant to comment on this…

I hope LimeSDR-FPGA/FuseSoC project moves forward. Has the deadline come yet for the summer of code projects?

I am certain that if the tools and IP were more open that FPGAs would see much wider use/adoption/contribution/etc. Why don’t hardware vendors still not understand that without software most hardware is a lump.

With Altera now owned by Intel I don’t think the situation improves.

---

<div class="post-metadata">

**Author:** ![M0GLO](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/m0glo/32/999_2.png) [@M0GLO](https://discourse.myriadrf.org/u/M0GLO)\
**Post date:** [14 April 2017 14:42 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/11 "2017-04-14T14:42:25Z")

</div>

I ran some side by side tests with my HPSDR last night and I am extremely impressed with the receive perf of the Lime kit.  
Bare front ends sharing the same antenna produced nearly identical results on both bits of kit with PowerSDR tipping the balance for me on weak signals, the noise filters on PowerSDR are nothing short of amazing.

Would love to see those moved across and made available in SDR Console and GQRX.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [26 June 2017 11:25 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/12 "2017-06-26T11:25:54Z")

</div>

@andrewback I’ve just seen your FPGA project on DesignSpark - very nice! [https://www.rs-online.com/designspark/build-an-open-source-mcu-and-program-it-with-arduino?cm\_mmc=GB-EM-](https://www.rs-online.com/designspark/build-an-open-source-mcu-and-program-it-with-arduino?cm_mmc=GB-EM-)_-DSN\_20170626-_-DM65355-\_-HB\_URL&cid=DM65355&bid=340261836 How far away are we from getting an arduino inside the LimeSDR? Would certainly benefit my repeater project. 🎛

---

<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:** [26 June 2017 13:23 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/13 "2017-06-26T13:23:45Z")

</div>

There’s a NIOS II MCU soft-core in the FPGA already and this provides SPI interfacing to the LMS7002M. Presumably it could be programmed to run some other program that configures the transceiver to do your bidding.

If you mean actual Arduino compatible and programmed via the IDE, I have no idea. Fun project for someone to port that Freedom E310 SoC 😃

Of course, @cairo.caplan is replacing the NIOS II with a RISC-V core and I’m not sure which one it will be, but I guess it could be made Arduino compatible (this may _just_ be a case of then porting the Arduino libs and packaging a toolchain and e.g. OpenOCD for the IDE).

---

<div class="post-metadata">

**Author:** ![cairo.caplan](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@cairo.caplan](https://discourse.myriadrf.org/u/cairo.caplan)\
**Post date:** [26 June 2017 13:39 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/14 "2017-06-26T13:39:51Z")

</div>

> [@andrewback](#):
>
> a RISC-V core and I’m not sure which one it will be, but I guess it could be made Arduino compatible (this may just b

Hello @andrewback and @TegwynTwmfatt, my goal is to have the Pulpino working ([http://www.pulp-platform.org/](http://www.pulp-platform.org/) ).

I have integrated the Orca and PicoRV32 but not tested yet. I know the Pulpino project has the Arduino base and some libraries ported to it:

> **[pulpino/sw/libs/Arduino\_lib at master · pulp-platform/pulpino](https://github.com/pulp-platform/pulpino/tree/master/sw/libs/Arduino_lib)**
>
> An open-source microcontroller system based on RISC-V - pulp-platform/pulpino

---

<div class="post-metadata">

**Author:** ![Axeman](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/axeman/32/728_2.png) [@Axeman](https://discourse.myriadrf.org/u/Axeman)\
**Post date:** [26 July 2017 00:28 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/15 "2017-07-26T00:28:15Z")

</div>

> [@TegwynTwmfatt](#):
>
> … There is so much RF terminology and abbreviations that a glossary of terms would be really useful if there is such a thing?

I really need this glossary of all the mnemonics used. The definitions are dispersed throughout many documents but used all in one place. I have very little time but if I am going to master this device I will have to learn this. I have been trying to make configurations in LimeSuiteGUI but they never seem to act the way I want.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [26 July 2017 16:54 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/16 "2017-07-26T16:54:13Z")

</div>

As with most engineering specialities, language is the key to success IMO. The plumbing world has a particularly interesting dialect, many of which are rather ‘fruity’ eg. nipples and flanges although my favourite is the ‘munsen ring’. Of course, electricians have the ‘grommet’, which is hard to beat!

ps. IMO = in my opinion.

---

<div class="post-metadata">

**Author:** ![Axeman](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/axeman/32/728_2.png) [@Axeman](https://discourse.myriadrf.org/u/Axeman)\
**Post date:** [26 July 2017 21:05 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/17 "2017-07-26T21:05:34Z")

</div>

I once wrote a post on a forum almost entirely in mnemonics and it made sense.  
Electricians like their grommets hard to beat.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [26 July 2017 21:32 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/18 "2017-07-26T21:32:35Z")

</div>

PS. I got some more info on repeaters from a professional who private messaged me. Seems that they don’t upconvert / downconvert as it adds too much noise to the signal. Instead they use vertical and polar antenna separation on the same frequency, which is actually a lot simpler. If you still want to set up a repeater on your mountain side I think it could be done reasonably easily.

---

<div class="post-metadata">

**Author:** ![Axeman](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/axeman/32/728_2.png) [@Axeman](https://discourse.myriadrf.org/u/Axeman)\
**Post date:** [26 July 2017 21:46 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/19 "2017-07-26T21:46:32Z")

</div>

That makes sense to me. Thanks for the info. I made a high gain antenna and set it up high and it brought in a very clear signal. Weak but clear. Just using it as a passive repeater with an omnidirectional at the other end of the coax brings the signal up one bar, near the omni.

---

<div class="post-metadata">

**Author:** ![TegwynTwmfatt](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/tegwyntwmfatt/32/193_2.png) [@TegwynTwmfatt](https://discourse.myriadrf.org/u/TegwynTwmfatt)\
**Post date:** [26 July 2017 21:53 UTC](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903/20 "2017-07-26T21:53:10Z")

</div>

@Axeman … Would you like to test one of my repeater PCBs? It should be full duplex soon. I need some interesting examples for my ‘portfolio’. PM me if you are interested!

[Next page](https://discourse.myriadrf.org/t/limesdr-fpga-secrets/903.md?page=2)
