Perform direct operations on external SRAM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
sccac_1236541
Level 4
Level 4

Hi all,

   

 

   

I have some external SRAM I've hooked up with the EMIF component.  What I want to know is if it's possible to perform direct operations on values stored in this SRAM.  

   

 

   

Basically I have some arrays that are so large I cannot store them on the internal SRAM but I want to use functions that take in the pointers and perform some computations on these arrays..

   

 

   

for example 

   

    int32 my_array[10000]; //stored on the ext SRAM

   

 

   

    arm_q31_cfft(my_array);

   

 

   

Is this possible?  I know I can transfer the data to the internal SRAM but I want to avoid doing this as I have many arrays I have to do it to in a short amount of time.

   

 

   

Thanks,

   

scarlson

0 Likes
4 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello Scarlson,

   

I believe that it is possible to access the data on EMIF address range directly by pointer. But I'll confirm this and will get back to you. Meanwhile I just want to know if you are facing any issues while implementing this.

   

Thanks,

   

Hima

0 Likes
sccac_1236541
Level 4
Level 4

Thank you Hima,

   

so far I am not seeing any issues, I followed the steps outlined in the EMIF example project, but I'm currently trying to show the contents of the EXT SRAM on my LCD and have had no success.  

   

since I'm actually new to using external SRAM I should clarify what I'm wanting to accomplish. 

   

 

   

I have SRAM that has an 8-bit data channel width, but I'm trying to use a function that takes in the pointer to an array of 32 bit values.. is it capable of this because I am not having any luck?  the 8 bit chan width and 32 bit values the function expects are worrying me.

0 Likes
Anonymous
Not applicable

Hello Scarlson,

   

EMIF does not break up any multi-byte accesses into 8-bit accesses. If it is a 16-bit EMIF memory, it can do 16-bit or 32-bit data reads and writes.

0 Likes
sccac_1236541
Level 4
Level 4

Thanks SmartPSoC for your reply,

   

If I can clarify what you said it would help me,

   

1) You speak of 16 bit memory, is this the same for 8-bit?

   

2) Am I to assume then if I access a 32-bit variable stored on my 8-bit sram with a pointer the emif would return the full 32-bit variable not just the first 8-bits?

   

 

   

Thank you for your help,

   

Scarlson

0 Likes