In-cache stack in MPC5674F (vs. MPC5777C)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

In-cache stack in MPC5674F (vs. MPC5777C)

Jump to solution
1,012 Views
ricardofranca
Contributor III

Hello,

 

I followed AN5191 to set a MPC5777C board up and, for a given application, noticed a sizeable performance gain (~10%) when the stack was inside the data cache, rather than the internal SRAM. I tried to repeat the experiment with a MPC5674F board and had no gain at all - in fact, I got a slight performance loss of ~3%.

Is this expected? I supposed gains might be smaller because the MPC5674F internal SRAM has a smaller latency than the MPC5777C one, but I did not expect to see a negative result.

Both boards are running at 264MHz.

Thanks,

Ricardo

0 Kudos
Reply
1 Solution
979 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @ricardofranca 

"because the MPC5674F internal SRAM has a smaller latency than the MPC5777C one" - this is the key point. The stack in cache can help significantly on MPC5777C because of the mentioned latency. This effect won't be so visible on MPC5674F. I guess that the performance loss can be caused by fact that the size of cache used for application is smaller, so more flash reads are needed in runtime.

Regards,

Lukas

View solution in original post

0 Kudos
Reply
1 Reply
980 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @ricardofranca 

"because the MPC5674F internal SRAM has a smaller latency than the MPC5777C one" - this is the key point. The stack in cache can help significantly on MPC5777C because of the mentioned latency. This effect won't be so visible on MPC5674F. I guess that the performance loss can be caused by fact that the size of cache used for application is smaller, so more flash reads are needed in runtime.

Regards,

Lukas

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1938496%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIn-cache%20stack%20in%20MPC5674F%20(vs.%20MPC5777C)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1938496%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20followed%20AN5191%20to%20set%20a%20MPC5777C%20board%20up%20and%2C%20for%20a%20given%20application%2C%20noticed%20a%20sizeable%20performance%20gain%20(~10%25)%20when%20the%20stack%20was%20inside%20the%20data%20cache%2C%20rather%20than%20the%20internal%20SRAM.%20I%20tried%20to%20repeat%20the%20experiment%20with%20a%20MPC5674F%20board%20and%20had%20no%20gain%20at%20all%20-%20in%20fact%2C%20I%20got%20a%20slight%20performance%20loss%20of%20~3%25.%3C%2FP%3E%3CP%3EIs%20this%20expected%3F%20I%20supposed%20gains%20might%20be%20smaller%20because%20the%20MPC5674F%20internal%20SRAM%20has%20a%20smaller%20latency%20than%20the%20MPC5777C%20one%2C%20but%20I%20did%20not%20expect%20to%20see%20a%20negative%20result.%3C%2FP%3E%3CP%3EBoth%20boards%20are%20running%20at%20264MHz.%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ERicardo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1939993%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20In-cache%20stack%20in%20MPC5674F%20(vs.%20MPC5777C)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1939993%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F47395%22%20target%3D%22_blank%22%3E%40ricardofranca%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%22because%20the%20MPC5674F%20internal%20SRAM%20has%20a%20smaller%20latency%20than%20the%20MPC5777C%20one%22%20-%20this%20is%20the%20key%20point.%20The%20stack%20in%20cache%20can%20help%20significantly%20on%20MPC5777C%20because%20of%20the%20mentioned%20latency.%20This%20effect%20won't%20be%20so%20visible%20on%20MPC5674F.%20I%20guess%20that%20the%20performance%20loss%20can%20be%20caused%20by%20fact%20that%20the%20size%20of%20cache%20used%20for%20application%20is%20smaller%2C%20so%20more%20flash%20reads%20are%20needed%20in%20runtime.%20%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E