help with slavefifo sync source code

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MoLa_3842091
Level 3
Level 3
5 likes given First like given

I want to implement loopback that is based on slavefifosync project, but my customized fx3 hardware supports only two flags connection on pins (G7 & G6),

but loopback source code uses 4 flags (flaga, flagb, flagc & flagd). Can I make loopback source code work with only two flags (example: flaga(full flag), flagc(empty flag))?

If yes, what changes should I do in the source code and pin configuration? And what do you suggest about this approach.

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

The slavefifosync application example uses 4 flags - 2 for write operations and 2 for read operations. Out of those 2 flags for each read and write, 1 flag is to know the readiness of the DMA buffer and the other flag is a watermark flag which is used to reduce the delays incurred.

So, since you have mentioned that your application can use only 2 flags, you can choose to use only the DMA ready flags for each thread used in your application omitting the watermark flags. The drawback of this is the loss of watermark flag.

Alternate option would be to use current thread DMA ready and current thread DMA watermark flags instead of using flags for dedicated thread. The disadvantage in this method is the delay caused during the switch from one thread to another thread.

Please refer to section 7. Flag Configuration of the AN65974 application note.

Best regards,
Srinath S

View solution in original post

0 Likes
1 Reply
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

The slavefifosync application example uses 4 flags - 2 for write operations and 2 for read operations. Out of those 2 flags for each read and write, 1 flag is to know the readiness of the DMA buffer and the other flag is a watermark flag which is used to reduce the delays incurred.

So, since you have mentioned that your application can use only 2 flags, you can choose to use only the DMA ready flags for each thread used in your application omitting the watermark flags. The drawback of this is the loss of watermark flag.

Alternate option would be to use current thread DMA ready and current thread DMA watermark flags instead of using flags for dedicated thread. The disadvantage in this method is the delay caused during the switch from one thread to another thread.

Please refer to section 7. Flag Configuration of the AN65974 application note.

Best regards,
Srinath S

0 Likes