Compare commits

...

2 Commits

Author SHA1 Message Date
mwojcik 011757014f aux: increase max payload size 2024-05-07 14:59:08 +08:00
Sébastien Bourdeauducq 5abd274060 update copyright year 2024-04-26 12:26:30 +08:00
4 changed files with 6 additions and 8 deletions

View File

@ -62,7 +62,7 @@ Notes:
License
-------
Copyright (C) 2019-2023 M-Labs Limited.
Copyright (C) 2019-2024 M-Labs Limited.
ARTIQ is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

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;