4 Replies Latest reply on Jan 4, 2016 12:54 PM by scott.carlson

    Perform direct operations on external SRAM

    scott.carlson

      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

        • 1. Re: Perform direct operations on external SRAM
          hima

          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

          • 2. Re: Perform direct operations on external SRAM
            scott.carlson

            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.

            • 3. Re: Perform direct operations on external SRAM
              resh

              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.

              • 4. Re: Perform direct operations on external SRAM
                scott.carlson

                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