forked from M-Labs/artiq-zynq
Compare commits
2 Commits
3abe9caadb
...
011757014f
Author | SHA1 | Date |
---|---|---|
mwojcik | 011757014f | |
Sébastien Bourdeauducq | 5abd274060 |
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue