- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have using on-chip FPGA register for my implementation using the register attribute like below:
float __attribute__((register)) sum1[48];.
With that I am able to infer register for this sum1 variable , but what is does is that, it is inferred as 1 register with depth 1 and width 1536(48*32) . rather than having 48 register which I initially thought it would do . Does is seem to be a correct behavior for it to be 1 register or how to tell compiler to generate 48 registers rather than 1 register ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is normal behavior since you can access all those registers as sum1[i] in a loop and they essentially have the same address space. if you want 48 32-bit registers, you should define 48 separate variables with different names but then you will lose the ability to access them in a loop using the loop variable. At the end of the day this wouldn't make much of a difference since the mapper will decide how to map the buffer(s) to FPGA resources and depending on how you access the sum1 buffer, it might be implemented as 48 separate registers in the end.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is normal behavior since you can access all those registers as sum1[i] in a loop and they essentially have the same address space. if you want 48 32-bit registers, you should define 48 separate variables with different names but then you will lose the ability to access them in a loop using the loop variable. At the end of the day this wouldn't make much of a difference since the mapper will decide how to map the buffer(s) to FPGA resources and depending on how you access the sum1 buffer, it might be implemented as 48 separate registers in the end.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page