forked from M-Labs/artiq-zynq
aux: increase max payload size
This commit is contained in:
parent
5abd274060
commit
011757014f
|
@ -77,9 +77,8 @@ where F: FnOnce(&[u8]) -> Result<T, Error> {
|
||||||
let read_ptr = (DRTIOAUX[linkidx].aux_read_pointer_read)() as usize;
|
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;
|
let ptr = (DRTIOAUX_MEM[linkidx].base + DRTIOAUX_MEM[linkidx].size / 2 + read_ptr * 0x400) as *mut u32;
|
||||||
// work buffer to accomodate axi burst reads
|
// work buffer to accomodate axi burst reads
|
||||||
// buffer at maximum proto packet size, not maximum gateware supported size
|
// potentially: get length by checking the first byte to cut down on unnecessary copying
|
||||||
// to minimize copying time
|
const LEN: usize = 1024;
|
||||||
const LEN: usize = 512;
|
|
||||||
let mut buf: [u8; LEN] = [0; LEN];
|
let mut buf: [u8; LEN] = [0; LEN];
|
||||||
copy_work_buffer(ptr, buf.as_mut_ptr() as *mut u32, LEN as isize);
|
copy_work_buffer(ptr, buf.as_mut_ptr() as *mut u32, LEN as isize);
|
||||||
let result = f(&buf);
|
let result = f(&buf);
|
||||||
|
|
|
@ -41,9 +41,8 @@ where F: FnOnce(&[u8]) -> Result<T, Error> {
|
||||||
let read_ptr = (DRTIOAUX[linkidx].aux_read_pointer_read)() as usize;
|
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;
|
let ptr = (DRTIOAUX_MEM[linkidx].base + DRTIOAUX_MEM[linkidx].size / 2 + read_ptr * 0x400) as *mut u32;
|
||||||
// work buffer to accomodate axi burst reads
|
// work buffer to accomodate axi burst reads
|
||||||
// buffer at maximum proto packet size, not maximum gateware supported size
|
// potentially: get length by checking the first byte to cut down on unnecessary copying
|
||||||
// to minimize required copying time
|
const LEN: usize = 1024;
|
||||||
const LEN: usize = 512;
|
|
||||||
let mut buf: [u8; LEN] = [0; LEN];
|
let mut buf: [u8; LEN] = [0; LEN];
|
||||||
copy_work_buffer(ptr, buf.as_mut_ptr() as *mut u32, LEN as isize);
|
copy_work_buffer(ptr, buf.as_mut_ptr() as *mut u32, LEN as isize);
|
||||||
let result = f(&buf);
|
let result = f(&buf);
|
||||||
|
|
|
@ -3,7 +3,7 @@ use io::proto::{ProtoRead, ProtoWrite};
|
||||||
|
|
||||||
// maximum size of arbitrary payloads
|
// maximum size of arbitrary payloads
|
||||||
// used by satellite -> master analyzer, subkernel exceptions
|
// 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)
|
// 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;
|
pub const MASTER_PAYLOAD_MAX_SIZE: usize = SAT_PAYLOAD_MAX_SIZE - /*source*/1 - /*destination*/1 - /*ID*/4;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue