forked from M-Labs/artiq-zynq
cxp upconn fw: add proper word printout
cxp upconn fw: fmt
This commit is contained in:
parent
770d0b159a
commit
0b8f3ba466
|
@ -10,10 +10,11 @@ pub fn pipeline_test(timer: &mut GlobalTimer) {
|
|||
// 0x56, 0x86, 0x5D, 0x6f,
|
||||
];
|
||||
|
||||
const LEN: usize = 20;
|
||||
const LEN: usize = 4 * 8;
|
||||
let mut pak_arr: [u8; LEN] = [0; LEN];
|
||||
|
||||
unsafe {
|
||||
// eop = 1 (End of packet) at the last data input
|
||||
csr::cxp::txcore_din_len_write(arr.len() as u8);
|
||||
|
||||
for a in arr.iter() {
|
||||
|
@ -30,7 +31,17 @@ pub fn pipeline_test(timer: &mut GlobalTimer) {
|
|||
i += 1;
|
||||
}
|
||||
|
||||
println!("{:#04X?}", pak_arr);
|
||||
println!("arr = [");
|
||||
for i in 0..(LEN / 4) {
|
||||
println!(
|
||||
" {:#04X} {:#04X} {:#04X} {:#04X},",
|
||||
pak_arr[i * 4],
|
||||
pak_arr[i * 4 + 1],
|
||||
pak_arr[i * 4 + 2],
|
||||
pak_arr[i * 4 + 3]
|
||||
)
|
||||
}
|
||||
println!("]")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue