Forum Discussion
I see. Thank you!
Could I clearly define a variable as a register one or Block RAM?
And does a register variable have a memory address? If so, a pointer to it can be passed to some function as the argument. In a traditional CPU architecture, a register variable has no "memory address".
The decision of what resource to use for implementing buffers is directly made by the compiler. You can use the "__attribute__((register))" attribute in your buffer declaration to force buffers up to a certain size to be implemented using registers instead of Block RAM. However, there is a limit above which the compiler will refuse to perform this conversion and compilation will fail. It is usually best to leave the decision to the compiler.
There is no pointer for on-chip resources (be it register or Block RAM) and size of on-chip buffers must be known at compile-time. However, all on-chip buffers are addressable regardless of whether they are implemented using registers or Block RAM.