Forum Discussion
Altera_Forum
Honored Contributor
15 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.