- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I want to know the bit ordering of FX3
======================================================
Update : Sorry, I mean CyU3PDmaBufferInit actually, not CyU3PDmaBufferDeInit.
======================================================
at the function CyU3PDmaBufferInit the source file cyfxtx.c,
there is a comment says
"make those bits beyond valid memory range as unavailable."
========================================================
For example :
If I set my heap size to 2292 byte , then
2292/32 =71 bit , 71 status bits are required , and also
71 mod 32 = 7 .
7 bits are in glBufferManager.usedStatus[size - 1]
and there is a local variable
temp = 32 -7 = 25,
so i have 25 bits beyond valid memory range.
and finally the masking
glBufferManager.usedStatus[size - 1] = ~((1 << 25) - 1)
then i set the highest 7 bits of
glBufferManager.usedStatus[size - 1] to 1.
========================================================
please correct me if I'm wrong.
訊息由此人編輯:學人 楊
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When the CY_U3P_BUFFER_HEAP_SIZE sets to 2292 and FX3_CACHE_LINE_SZ sets to 32, size is 72.
(On the line 723 in cyfxtx.c, (2292+31 & ~31) / 32 = 72)
> tmp = 32 - 7 = 25
That's correct.
> glBufferManager.usedStatus[size - 1] = ~((1 << 25) - 1)
That's correct.
> then i set the highest 7 bits of glBufferManager.usedStatus[size - 1] to 1.
That's correct.
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When the CY_U3P_BUFFER_HEAP_SIZE sets to 2292 and FX3_CACHE_LINE_SZ sets to 32, size is 72.
(On the line 723 in cyfxtx.c, (2292+31 & ~31) / 32 = 72)
> tmp = 32 - 7 = 25
That's correct.
> glBufferManager.usedStatus[size - 1] = ~((1 << 25) - 1)
That's correct.
> then i set the highest 7 bits of glBufferManager.usedStatus[size - 1] to 1.
That's correct.
Best regards,
Hirotaka Takayama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the helping (and the correction) .