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

Merged
sb10q merged 1 commits from pca006132/artiq-zynq:core0-buffer into master 2020-08-05 18:32:39 +08:00

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

Closes #77.

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

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 ---------------------------------------------------------------------- ```

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 2020-08-05 15:07:31 +08:00
@ -333,6 +354,10 @@ pub fn main(timer: GlobalTimer, cfg: &config::Config) {
}
};
// initialize stores

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.

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.

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 2020-08-05 18:32:39 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#86
There is no content yet.