Mixing memory models CMM, LMM and possibly cog?
pmrobert
Posts: 673
My application has one large supervisory loop running in the startup cog that is not as time sensitive as other cogs and runs properly and acceptably in CMM mode. I have other tasks in other cogs that require at least LMM speed. They also run properly in CMM mode but at an unacceptably degraded speed. Is it possible to mix these two models with the added caveat that it would be very nice if fcache would still be available for the LMM cogs? Is it possible to mix LMM, CMM and cog models? The time sensitive/intensive tasks run well when in fcache but are small enough to fit in cog mode. I suspect it's a matter of providing proper compilation and linking commands.
-Mike
-Mike
Comments
If your functions are small enough, they can run entirely at fcache speed regardless of memory model.
For example the function below is used in the SimpleLibraries simpletext.h library. It mixes C and ASM, but your code does not need to do that.
The __attribute_((fcache)) is a GCC thing that tags the function to run in fcache if possible. CMM fcached code is limited to 64 longs.
-Mike
-Mike
It all makes more sense now. But I'm still confused.
What you confused about?
So, my already precarious position causing second-guessing and commitment issues is about to grow exponentially.