mirror of https://github.com/m-labs/artiq.git
DMA: speed up playback
Time reduced from 1.53µs to 1.37µs.
This commit is contained in:
parent
41c4de4556
commit
e8f7f8ef9c
|
@ -398,6 +398,7 @@ extern fn dma_playback(timestamp: i64, ptr: i32) {
|
||||||
csr::cri_con::selected_write(0);
|
csr::cri_con::selected_write(0);
|
||||||
|
|
||||||
let status = csr::rtio_dma::error_status_read();
|
let status = csr::rtio_dma::error_status_read();
|
||||||
|
if status != 0 {
|
||||||
let timestamp = csr::rtio_dma::error_timestamp_read();
|
let timestamp = csr::rtio_dma::error_timestamp_read();
|
||||||
let channel = csr::rtio_dma::error_channel_read();
|
let channel = csr::rtio_dma::error_channel_read();
|
||||||
if status & rtio::RTIO_O_STATUS_UNDERFLOW != 0 {
|
if status & rtio::RTIO_O_STATUS_UNDERFLOW != 0 {
|
||||||
|
@ -414,6 +415,7 @@ extern fn dma_playback(timestamp: i64, ptr: i32) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsafe fn attribute_writeback(typeinfo: *const ()) {
|
unsafe fn attribute_writeback(typeinfo: *const ()) {
|
||||||
struct Attr {
|
struct Attr {
|
||||||
|
|
|
@ -605,7 +605,7 @@ class DMATest(ExperimentCase):
|
||||||
exp.playback_many(count)
|
exp.playback_many(count)
|
||||||
dt = self.dataset_mgr.get("dma_playback_time")
|
dt = self.dataset_mgr.get("dma_playback_time")
|
||||||
print("dt={}, dt/count={}".format(dt, dt/count))
|
print("dt={}, dt/count={}".format(dt, dt/count))
|
||||||
self.assertLess(dt/count, 7*us)
|
self.assertLess(dt/count, 3*us)
|
||||||
|
|
||||||
def test_handle_invalidation(self):
|
def test_handle_invalidation(self):
|
||||||
exp = self.create(_DMA)
|
exp = self.create(_DMA)
|
||||||
|
|
Loading…
Reference in New Issue