Need assistance with loopback modes

Discussions related to embedded firmware, driver, and user mode application software development
Post Reply
jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: Need assistance with loopback modes

Post by jynik »

Hi Jaco,

At GRCon 2014, there was a lot of interest in getting a polyphase channelizer into the FPGA for applications like OpenMHz (which was easy to get running at the con with the bladeRF since it uses gr-osmosdr :)). So that's definitely something that'll be queued up in the "TO DO" list.

With that said, we're going to be thinking about a good way of exposing processed data back to libbladeRF. I think this is something worth giving some good foresight in order to yield a sane API, and thoughts, feedback, pull requests, etc. will be appreciated.

One thought was for user-specific data formats, we could add a BLADERF_FORMAT_RAW_DATA value to the bladerf_format enumeration. In this format, our "sample" would simply be one byte, and it'd be up to the API user to parse that data as they wish.

In doing this, you'll need to add a couple cases to some switch statements, such as here and here.

Also, for a first cut at this, it'd probably be easiest to ensure data from the FPGA is padded out to the 4096-byte DMA blocks (which is the size of 1024 SC16Q11 samples) so you don't have to touch some of the existing assert() and error checks, firmware, and GPIF configuration. In the long-run, I think we most certainly want to dive into these items, though.

Hope that helps!
Jon
Jaco
Posts: 28
Joined: Wed Jul 30, 2014 2:03 am

Re: Need assistance with loopback modes

Post by Jaco »

Hi Jon,

The link to GRCon is useful indeed, I would definitely like to attend that at some point!

What you said makes sense, well, sort of. I'm still unsure how I'm actually going to get the signal on to the FPGA and get the transformed signal back. In other words, how do I access the embedded memory in the first place (since my sampled signal is stored on the PC and from what I understand there's no libbladeRF functionality that can do this at the moment)? I'm not sure whether it's what you've tried to explain, or if my brain is just having difficulty to understand how it works.

Regards,
Jaco
jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: Need assistance with loopback modes

Post by jynik »

Hi Jaco,

There's probably numerous aproaches here. I imagine that overhauling the FX3's GPIF configuration and FPGA<->FX3 interface could allow us to set up different USB endpoints for different functionalities, and move data from/to different FPGA modules. This is probably best in the long run, but the below might be a quick way to shoehorn in some additional functionality...

However, the current FX3 <-> FPGA interface simply moves the RX'd and TX'd samples to their respective destinations. '

Therefore, my suggestion was that we could simply use the existing RX and TX functions to move data from/to the FPGA. By adding additional format valus (e.g, BLADERF_FORMAT_RAW_DATA, BLADERF_FORMAT_FFT_4096), we could configure FPGA registers as needed by that format.

So for example -- if you added an FFT block in the FPGA, and all you wanted were the results of the FFT, you could specify the above format (that you'd add), and then just call bladerf_sync_rx() like you normally would. It'd be up to you to interpret the received FFT data correctly.

Hope that clarifies things a bit!
Jon
Jaco
Posts: 28
Joined: Wed Jul 30, 2014 2:03 am

Re: Need assistance with loopback modes

Post by Jaco »

Hi Jon,

That definitely clears it up! Thanks.

I'll see if I can figure something out with using the additional format as you've suggested.

Jaco.
Post Reply