Forum Discussion
Altera_Forum
Honored Contributor
16 years agoCode in tightly coupled memory
Hi all, I placed a function in a section different from the main code. More exactly, my code is mapped to sdram and I linked a function testcall() into a tightly coupled memory section which I pr...
Altera_Forum
Honored Contributor
16 years agoFor a single variable I need in TCM I simply use the attribute directive after declaration.
int array_in_tcm[128] __attribute__ (section (".tc_data")); Same for a single function: int function_in_tcm(int param) __attribute__ (section (".tc_code")); tc_data and tc_code are the names I assigned to tcm blocks in sopc builder. I'm not sure, but don't think exception stack placement is so important for performance. This is executed only in case of exceptions, not in normal operation. Application runtime stack is important, since its data is continuosly accessed in function calls, especially if you use a lot of local variables.