aux: increase max payload size

This commit is contained in:
mwojcik 2024-05-07 14:59:08 +08:00
parent 5abd274060
commit 011757014f
3 changed files with 5 additions and 7 deletions

View File

@ -77,9 +77,8 @@ where F: FnOnce(&[u8]) -> Result<T, Error> {
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);

View File

@ -41,9 +41,8 @@ where F: FnOnce(&[u8]) -> Result<T, Error> {
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);

View File

@ -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;