Post Go back to editing

Adalm Pluto Cyclic Buffer Count

Hello,

I am using the Adlam Pluto with Python to transimit a prebiuld vector with an activated cyclic buffer. 

In my application I will repeat this a number of times and then stop the transmission.
Now I am searching for a way to query the number of cycles the buffer has taken. 

Is there a register, that counts the number of revolmentes of the Buffer?
If not can I query the current position of the read pointer and than track the cycle count myself?
Maybe somethong like:

last_postion = 0
num_of_cyles=0

sdr = adi.Pluto()
r = <The correct Register>
position = dev.reg_read(r)
if position < last_postion: #Cycle has happend
    num_of_cyles += 1
    print(num_of_cyles)
last_postion = position

Any help would be greatly appreciated!
Best regrads.

  • Hello slevon, 

    Unfortunately there is no register that counts the cycles the buffer has taken. A register that checks the DMA pointer is the 

    0x10e 0x0438 CURRENT_SRC_ADDRESS
    [31:0] CURRENT_SRC_ADDRESS RO 0x00

    Address form which the next data sample is read. This register is only valid if the DMA channel has been configured for read from memory support.

    https://wiki.analog.com/resources/fpga/docs/axi_dmac#register_map

    However depending on the parameters of the buffer, you will not be able to count the number of cycles reliably as significant delays exist when reading back registers via USB from a remote target to your host PC.

    If the sample rate is low enough, you can stream the data into the Pluto and count the buffers that are streamed into the device.

    Without modifying the HDL, there is no way to reliably count the number of cycles.

    -Adrian