- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm new to both C and using NIOS and I can't seem to figure out how to use the IOWR_32DIRECT macro. I'm trying to transfer a 2D unsigned char array (rx_frame) from on-chip memory to the SDRAM, 32 bits at a time. The data bus is 32 bits on both the on-chip memory and SDRAM controller. Here's what I have: for (i = 0; i < length; i++) { IOWR_32DIRECT(4*i, 0, rx_frame[0][4*i]); } The result is that I get rx_frame[0][0] at location 0x0 but locations 0x1,0x2 and 0x3 are 0. Then I get rx_frame[0][4] at location 0x4 but locations 0x5, 0x6 and 0x7 are 0. Then I get rx_frame[0][8] at location 0x8 but locations 0x9, 0xA and 0xB are 0. Then I get rx_frame[0][12] at location 0xC but locations 0xD, 0xE and 0xF are 0. etc... Any idea what I'm doing wrong and what I should be doing ?Link Copied
0 Replies
Reply
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