Page 1 of 1

Digital Loopback

Posted: Tue Sep 15, 2015 12:55 pm
by flo003

We have been studying for a while Blade's schematics. Our goal is to modify the fpga in order to implement the inner receiver of an OFDM demodulator. The idea is to then connect the output to a .grc in GNURadio to continue processing the signal.

We are interested in finding a way to provide a repetitive input to the fpga, a known signal to which we know what to expect in the output of each block we will implement.

We found in the bladder-hosted.vhd what appears to be a configuration of digital loopback of the FPGA. We think this could be exactly what we need in order to test our system.

Code: Select all

We have tried modifying the GPIO's value in the BladeRF-CLI in order to activate the digital loopback configuration with no success.

Has anyone tried using the digital loopback? We are not sure if it's implemented since it appears in the Tasks' list: .
Does anyone know another way to provide a repetitive input to our circuit?

Thanks in advance.

Re: Digital Loopback

Posted: Tue Sep 15, 2015 3:08 pm
by bpadalino
So the digital loopback assumes the RX and TX clocks are the same, and it also hopes that the RX and TX clocks are potentially slow enough to not cause metastable issues since the raw samples are going back into the RX side without a buffer inbetween them.

If I were you, I'd write a simple modulator for your OFDM signal, and feed it simple inputs and have it run all the time, feeding rx_sample_i/q/valid. Or take over the digital loopback mode and really just make it your own OFDM source.

At least that's how I would do it.

Re: Digital Loopback

Posted: Tue Sep 15, 2015 5:14 pm
by bpadalino
Take a look more like what the 12-bit or 32-bit counter does and how that mechanism works. That should be more insightful.

Re: Digital Loopback

Posted: Fri Sep 18, 2015 5:36 am
by math
Try this to set the rx mux mode using libbladerf

Code: Select all

typedef enum bladerf_fpga_mux {
} bladerf_fpga_mux_t;

static int bladerf_set_fpga_rx_mux(struct bladerf *dev, bladerf_fpga_mux_t mux) {
    uint32_t config_gpio;
    int status;

    if ((status = bladerf_config_gpio_read(dev, &config_gpio))) {
        return status;

    // rx_mux_sel is a 3-bit value starting at bit 8
    // clear value
    config_gpio &= ~((1 << 8) | (1 << 9) | (1 << 10));
    // set value
    config_gpio |= mux << 8;

    return bladerf_config_gpio_write(dev, config_gpio);

Re: Digital Loopback

Posted: Mon Sep 21, 2015 4:19 pm
by flo003
Hi, thanks for your answers. We made more tests and could activate the digital loopback.
In order to do this we connected to the blade via the CLI interface and used the following commands:

set frequency 557143000
set bandwidth 7M
set samplerate 10M

print gpio
set gpio 0x457
print gpio

rx config file=/Users/test/.. N=10
tx config file=/Users/test/..
tx config repeat = 0

tx start
rx start
tx stop

We made different tests and with a samplerate of 10M we received exactly what we sent.

We are pausing these tests for a while but we are thinking in incorporating the configuration in the CLI so thanks math! for the suggestion.