Post Go back to editing

Access TX/RX DMA Addresses from BOOT.bin in PackRF

I used both MATLAB R2020b and Vivado 2018.3 to generate BOOT.bin from my customized transceiver for my PackRF. In Set Target Interface (Section 1.3) of the HDL Workflow Advisor in Simulink, I set the following:

* ch1_tx_dma_i as IP Data 0 IN [0:15]

ch1_tx_dma_q as IP Data 1 IN [0:15]

* ch2_tx_dma_i as IP Data 2 IN [0:15]

* ch2_tx_dma_q as IP Data 3 IN [0:15]

* ch1_rx_dma_i as IP Data 0 OUT [0:15]

* ch1_rx_dma_q as IP Data 1 OUT [0:15]

* ch2_rx_dma_i as IP Data 2 OUT [0:15]

* ch2_rx_dma_q as IP Data 3 OUT [0:15]

When I turn on PackRF with customized BOOT.bin, what will be the locations and addresses of these IQ DMAs?

Parents
  • I am testing the following script:

    printf("* Enabling IIO streaming channels\n");
    iio_channel_enable(rx0_i);
    iio_channel_enable(rx0_q);
    iio_channel_enable(rx1_i);
    iio_channel_enable(rx1_q);
    iio_channel_enable(tx0_i);
    iio_channel_enable(tx0_q);
    iio_channel_enable(tx1_i);
    iio_channel_enable(tx1_q);

    printf("* Creating non-cyclic IIO buffers with 1 MiS\n");
    rxbuf = iio_device_create_buffer(rx0, 1024*1024, false);
    if (!rxbuf) {
    perror("Could not create RX buffer");
    shutdown();
    }
    txbuf = iio_device_create_buffer(tx0, 1024*1024, false);
    if (!txbuf) {
    perror("Could not create TX0 buffer");
    shutdown();
    }

    // Schedule TX buffer
    nbytes_tx0 = iio_buffer_push(txbuf);
    printf("Number of TX bytes: %d\n",(int) nbytes_tx0);

    // Refill RX buffer
    nbytes_rx0 = iio_buffer_refill(rxbuf);
    printf("Number of RX bytes: %d\n",(int) nbytes_rx0);

    When I used the original BOOT.bin ADI provides, the results are

    * Creating non-cyclic IIO buffers with 1 MiS
    Number of TX bytes: 8388608
    Number of RX bytes: 8388608

    However, when I used my own customized BOOT.bin, the results are

    * Creating non-cyclic IIO buffers with 1 MiS
    Number of TX bytes: 8388608
    Number of RX bytes: -110

    What is the cause of this to get the negative number of RX bytes?

Reply
  • I am testing the following script:

    printf("* Enabling IIO streaming channels\n");
    iio_channel_enable(rx0_i);
    iio_channel_enable(rx0_q);
    iio_channel_enable(rx1_i);
    iio_channel_enable(rx1_q);
    iio_channel_enable(tx0_i);
    iio_channel_enable(tx0_q);
    iio_channel_enable(tx1_i);
    iio_channel_enable(tx1_q);

    printf("* Creating non-cyclic IIO buffers with 1 MiS\n");
    rxbuf = iio_device_create_buffer(rx0, 1024*1024, false);
    if (!rxbuf) {
    perror("Could not create RX buffer");
    shutdown();
    }
    txbuf = iio_device_create_buffer(tx0, 1024*1024, false);
    if (!txbuf) {
    perror("Could not create TX0 buffer");
    shutdown();
    }

    // Schedule TX buffer
    nbytes_tx0 = iio_buffer_push(txbuf);
    printf("Number of TX bytes: %d\n",(int) nbytes_tx0);

    // Refill RX buffer
    nbytes_rx0 = iio_buffer_refill(rxbuf);
    printf("Number of RX bytes: %d\n",(int) nbytes_rx0);

    When I used the original BOOT.bin ADI provides, the results are

    * Creating non-cyclic IIO buffers with 1 MiS
    Number of TX bytes: 8388608
    Number of RX bytes: 8388608

    However, when I used my own customized BOOT.bin, the results are

    * Creating non-cyclic IIO buffers with 1 MiS
    Number of TX bytes: 8388608
    Number of RX bytes: -110

    What is the cause of this to get the negative number of RX bytes?

Children