Hello,
I am testing out the AXI features of the 4ch RP board (using ecosystem-2.00-192-811946c92). Everything appears to work perfectly, but I am not satisfied with the speed of the rp_AcqAxiGetDataRaw function. In the past, to speed up the function I edited the function inside of acq_handler.c file and then complied it.
Currently the old acq_handler.c does not have support the 4ch AXI features and I was wondering where to find the updated acq_handler.c to edit. I found the complied .a and .so files but cannot find the uncompiled C file.
Thank you so much,
MK
Edit 4ch AXI functions.
- redpitaya
- Site Admin
- Posts: 918
- Joined: Wed Mar 26, 2014 7:04 pm
Re: Edit 4ch AXI functions.
Hello matankeda,
Thank you for writing on the forum.
Would you be so kind as to tell us what you changed to speed up the function? Perhaps it is something we can implement with the new OS.
I will speak to the team and let you know the response.
Good luck with your projects.
Thank you for writing on the forum.
Would you be so kind as to tell us what you changed to speed up the function? Perhaps it is something we can implement with the new OS.
I will speak to the team and let you know the response.
Good luck with your projects.
- redpitaya
- Site Admin
- Posts: 918
- Joined: Wed Mar 26, 2014 7:04 pm
Re: Edit 4ch AXI functions.
A new OS release is just around the corner (1-2 weeks away). We will release the full code then.
-
- Posts: 8
- Joined: Tue Sep 12, 2023 7:05 am
Re: Edit 4ch AXI functions.
To speed up the function, implement a circular memcpy in the acq_axi_GetDataRaw function.
inside the function, it looks like this:
Credit goes to user @arparker who came up with this solution.
Thanks,
MK
Code: Select all
/* memcpy from circular source to linear target */
#define CIRCULARSRC_MEMCPY(target, src_base, src_offs, src_size, length) \
do { \
if ((src_offs) + (length) <= (src_size)) { \
memcpy((target), (void *)(src_base) + (src_offs), (length)); \
} else { \
unsigned int __len1 = (src_size) - (src_offs); \
memcpy((target), (void *)(src_base) + (src_offs), __len1); \
memcpy((void *)(target) + __len1, (src_base), (length) - __len1); \
} \
} while (0)
inside the function, it looks like this:
Code: Select all
CIRCULARSRC_MEMCPY(buffer, (const void *)raw_buffer, pos*2, buffer_size*2, (*size)*2);
Thanks,
MK
-
- Posts: 10
- Joined: Fri Jul 17, 2020 6:00 am
Re: Edit 4ch AXI functions.
Hello.
Maybe there is some meaning to this, but I never asked myself this question.
We have a function in our library optimized for arm processors that copies faster than memcpy.
https://github.com/RedPitaya/RedPitaya/ ... th.cpp#L97
if you suggest a new solution, we will add it to the implementation
Maybe there is some meaning to this, but I never asked myself this question.
We have a function in our library optimized for arm processors that copies faster than memcpy.
https://github.com/RedPitaya/RedPitaya/ ... th.cpp#L97
if you suggest a new solution, we will add it to the implementation
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 6 guests