runtime/kernel: store DMA and cache buffer on core0. #86

Merged
sb10q merged 1 commits from pca006132/artiq-zynq:core0-buffer into master 2 years ago
Owner

Compiles, and tested with the example DMA, need more testing.

Closes #77.

Compiles, and tested with the example DMA, need more testing. Closes #77.
Poster
Owner

This PR also fixes the crash in #83 and memory corruption mentioned in https://github.com/m-labs/artiq/issues/1167.

However, 2 DMA tests still failed.

======================================================================
FAIL: test_dma_delta (test_rtio.DMATest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pca006132/code/artiq/artiq/test/coredevice/test_rtio.py", line 699, in test_dma_delta
    self.assertEqual(exp.delta, 1000200)
AssertionError: 0 != 1000200

----------------------------------------------------------------------
======================================================================
FAIL: test_dma_trace (test_rtio.DMATest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pca006132/code/artiq/artiq/test/coredevice/test_rtio.py", line 683, in test_dma_trace
    self.assertEqual(dump.messages[0].channel, 1)
AssertionError: 5 != 1

----------------------------------------------------------------------

This PR also fixes the crash in #83 and memory corruption mentioned in https://github.com/m-labs/artiq/issues/1167. However, 2 DMA tests still failed. ``` ====================================================================== FAIL: test_dma_delta (test_rtio.DMATest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pca006132/code/artiq/artiq/test/coredevice/test_rtio.py", line 699, in test_dma_delta self.assertEqual(exp.delta, 1000200) AssertionError: 0 != 1000200 ---------------------------------------------------------------------- ``` ``` ====================================================================== FAIL: test_dma_trace (test_rtio.DMATest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pca006132/code/artiq/artiq/test/coredevice/test_rtio.py", line 683, in test_dma_trace self.assertEqual(dump.messages[0].channel, 1) AssertionError: 5 != 1 ---------------------------------------------------------------------- ```
Owner

This PR also fixes the crash in #83

Do you know why it crashed before?

> This PR also fixes the crash in #83 Do you know why it crashed before?
sb10q reviewed 2 years ago
}
};
// initialize stores
sb10q commented 2 years ago
Owner

Can't we use the const initializer? I upgraded rustc and enabled the feature for BTreeMap and it seems to work fine.

Can't we use the const initializer? I upgraded rustc and enabled the feature for BTreeMap and it seems to work fine.
Poster
Owner

OK, my rust-analyzer did not show the initializer is const so I thought we have not updated that. Would fix.

OK, my rust-analyzer did not show the initializer is const so I thought we have not updated that. Would fix.
Poster
Owner

This PR also fixes the crash in #83

Do you know why it crashed before?

Not sure, I guess there could be relocation happend in the BTree between getting the data and using the data which invalidates the pointer.

> > This PR also fixes the crash in #83 > > Do you know why it crashed before? Not sure, I guess there could be relocation happend in the BTree between getting the data and using the data which invalidates the pointer.
sb10q closed this pull request 2 years ago
The pull request has been merged as 4b6c5d5679.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.