Forum Discussion
Altera_Forum
Honored Contributor
15 years agoOkay, now everything works fine in SOPCBuilder. But I experience a strange behaviour when I'm trying to use the DMA from C-Code through the NIOS Eclipse SBT.
For the hardware design I used the SOPC Builder reference design example which was provided on one of CDs which came with the board (DE2 Dev board). I just disabled and disconnected yet unnecessary devices (e.g. VGA or Audio). I integrated the SGDMA, generated, compiled and loaded the system; On the software side, I'm using a simple DMA test program, which should 'DMA'-copy an array of 8 'alt_u32'. I appended the source code. The output of my test program is the following. -- DMA Test --. Read-address: 8455696 Write-address: 8455736 Preparing memory... Memory before transfer: From value 0: 1 From value 1: 4 From value 2: 9 From value 3: 16 From value 4: 25 From value 5: 36 From value 6: 49 From value 7: 64 To value 0: 0 To value 1: 0 To value 2: 0 To value 3: 0 To value 4: 0 To value 5: 0 To value 6: 0 To value 7: 0 Preparing descriptor... Writing descriptor, Starting DMA... DMA done... To value 0: 1 To value 1: 4 To value 2: 9 To value 3: 16 To value 4: 25 To value 5: 0 To value 6: 0 To value 7: 0 Test read, a few seconds later: To value 0: 1 To value 1: 4 To value 2: 9 To value 3: 16 To value 4: 25 To value 5: 0 To value 6: 0 To value 7: 0 As you see, not all values are getting copied. The values which are copied change, if I change something in the code (uncommenting/commenting some printfs e.g.), but for one 'code-version' stay the same for every program execution. Any idea what causes this behaviour? Regards, Sebastian