Access the FPGA external memory from MATLAB code or Simulink

Discussion in 'Embedded Systems and Microcontrollers' started by ljubica.milchevska, Mar 27, 2014.

  1. ljubica.milchevska

    Thread Starter New Member

    Mar 27, 2014

    I am new to FPGA, but quite familiar with MATLAB. I am doing some audio processing that needs to be real-time, and the data that is used should be read and written to an external memory of the board. I am using Nexys 3, Spartan 6 board. The final goal is to have a code, or a model that can be converted to HDL and flashed on the board.

    Thanks in advance
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Question: there doesn't seem to be a question.

    Happy accomplished your goal!

    And welcome to the forums!
  3. ljubica.milchevska

    Thread Starter New Member

    Mar 27, 2014
    The question is is there anyone that has solved the problem. How to access the memory?
    or how to read chunks of data, process them and send them back to memory
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    I have no idea how matlab interfaces with HDL. Nevertheless I think you will need some HDL module that will perform the read and write operations on the ram and then will interface these to the matlab code.
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    How you access the external memory depends on the memory type. What kind of RAM? What protocol(s) does it use?

    Are you trying to do audio processing with MATLAB, or just trying to make a configuration file for the FPGA from it?
  6. Brownout

    Well-Known Member

    Jan 10, 2012
    Look for a memory core that interfaces your memory. If you have not yet chosen a memory type (eg DDR3 ) then make sure there is a core available for the type you eventually choose. Xilinx has cores available, so look at that. Also, try Then you need an embedded microcontroller to read and write memory. Xilinx uses it's own Microblaze core, which interfaces with internal bus architecture.

    If you use Platform Studio, you can get basic drivers automatically. Fron there, you need to program the Microblaze to do the memory access. Look at Xilinx website for example code.

    Good luck.