Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- FPGAs and Programmable Solutions
- FPGA Intellectual Property
- DSP builder - loading and indexing a vector

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-23-2008
11:24 AM

796 Views

DSP builder - loading and indexing a vector

Hi

I'm using the DSP builder in Simulink (Matlab), where I am implemeting a split-radix FFT. I would like to load in a vector from my workspace and then adress each element in the vector as I choose. When this is done I would like to store an element in the vector again. I have different index variables.. I have put a example of the matlab-code below: r1=xLink Copied

5 Replies

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-23-2008
04:12 PM

37 Views

You (sort of) explain what you want to achieve but don't really say what the problem is. Are you saying that you get an error when you execute the code you gave?

If so then it's because your brackets are wrong. MATLAB uses "(" and ")" for array indexing. e.g. r1 = x(i) + x(j)
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2008
09:55 AM

37 Views

Hi - thank you for the quick answer

My problem is that I would like to load a vector generated in Matlab and then access it via the FPGA. I have managed to load the vector into simulink and store it in RAM, but I would really like to have a more "free" access to each element of the vector. My problem is that I have 4 different variabels which I use to index the vector with. I have thought of a solution where I have a mux block which will choose which of the four variables index the RAM. Depending on which index variabel I use the output will have to be loaded to different adders. Therefore I will need a demux block after the RAM. Unfortunately this solution will require a lot of control. Therefore I would like to know if it possible to get a register which I can access independently of the other registers? -thanks
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-22-2008
08:50 PM

37 Views

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2008
08:54 AM

37 Views

Thanks for the answer

Yes I tried with LUTs, but the problem is that I can not write the result, I obtain after processing the loaded values, back into the LUTs. I have made an implementation where I use a combination of multiplexers, demultiplexers and Single Port RAM. It is complicated but it works!
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-18-2010
07:54 PM

37 Views

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.