diff --git a/src/libboard_artiq/src/drtioaux.rs b/src/libboard_artiq/src/drtioaux.rs index 4731b774..4e9185d2 100644 --- a/src/libboard_artiq/src/drtioaux.rs +++ b/src/libboard_artiq/src/drtioaux.rs @@ -77,9 +77,8 @@ where F: FnOnce(&[u8]) -> Result { let read_ptr = (DRTIOAUX[linkidx].aux_read_pointer_read)() as usize; let ptr = (DRTIOAUX_MEM[linkidx].base + DRTIOAUX_MEM[linkidx].size / 2 + read_ptr * 0x400) as *mut u32; // work buffer to accomodate axi burst reads - // buffer at maximum proto packet size, not maximum gateware supported size - // to minimize copying time - const LEN: usize = 512; + // potentially: get length by checking the first byte to cut down on unnecessary copying + const LEN: usize = 1024; let mut buf: [u8; LEN] = [0; LEN]; copy_work_buffer(ptr, buf.as_mut_ptr() as *mut u32, LEN as isize); let result = f(&buf); diff --git a/src/libboard_artiq/src/drtioaux_async.rs b/src/libboard_artiq/src/drtioaux_async.rs index 0a400c82..6de3d57d 100644 --- a/src/libboard_artiq/src/drtioaux_async.rs +++ b/src/libboard_artiq/src/drtioaux_async.rs @@ -41,9 +41,8 @@ where F: FnOnce(&[u8]) -> Result { let read_ptr = (DRTIOAUX[linkidx].aux_read_pointer_read)() as usize; let ptr = (DRTIOAUX_MEM[linkidx].base + DRTIOAUX_MEM[linkidx].size / 2 + read_ptr * 0x400) as *mut u32; // work buffer to accomodate axi burst reads - // buffer at maximum proto packet size, not maximum gateware supported size - // to minimize required copying time - const LEN: usize = 512; + // potentially: get length by checking the first byte to cut down on unnecessary copying + const LEN: usize = 1024; let mut buf: [u8; LEN] = [0; LEN]; copy_work_buffer(ptr, buf.as_mut_ptr() as *mut u32, LEN as isize); let result = f(&buf); diff --git a/src/libboard_artiq/src/drtioaux_proto.rs b/src/libboard_artiq/src/drtioaux_proto.rs index 1b5272a3..d754c914 100644 --- a/src/libboard_artiq/src/drtioaux_proto.rs +++ b/src/libboard_artiq/src/drtioaux_proto.rs @@ -3,7 +3,7 @@ use io::proto::{ProtoRead, ProtoWrite}; // maximum size of arbitrary payloads // used by satellite -> master analyzer, subkernel exceptions -pub const SAT_PAYLOAD_MAX_SIZE: usize = /*max size*/512 - /*CRC*/4 - /*packet ID*/1 - /*last*/1 - /*length*/2; +pub const SAT_PAYLOAD_MAX_SIZE: usize = /*max size*/1024 - /*CRC*/4 - /*packet ID*/1 - /*last*/1 - /*length*/2; // used by DDMA, subkernel program data (need to provide extra ID and destination) pub const MASTER_PAYLOAD_MAX_SIZE: usize = SAT_PAYLOAD_MAX_SIZE - /*source*/1 - /*destination*/1 - /*ID*/4;