forked from M-Labs/artiq-zynq
phys FW: update csr
This commit is contained in:
parent
ab3620bac4
commit
a731b23e03
@ -70,10 +70,7 @@ mod rx {
|
||||
info!("waiting for rx setup...");
|
||||
timer.delay_us(50_000);
|
||||
for ch in 0..CXP_CHANNELS {
|
||||
info!(
|
||||
"rx_phaligndone = {}",
|
||||
(CXP[ch as usize].downconn_rxinit_phaligndone_read)()
|
||||
);
|
||||
info!("rx_phaligndone = {}", (CXP[ch as usize].rx_rxinit_phaligndone_read)());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -180,20 +177,20 @@ mod rx {
|
||||
fn gtx_read(channel: u8, address: u16) -> u16 {
|
||||
let channel = channel as usize;
|
||||
unsafe {
|
||||
(CXP[channel].downconn_gtx_daddr_write)(address);
|
||||
(CXP[channel].downconn_gtx_dread_write)(1);
|
||||
while (CXP[channel].downconn_gtx_dready_read)() != 1 {}
|
||||
(CXP[channel].downconn_gtx_dout_read)()
|
||||
(CXP[channel].rx_gtx_daddr_write)(address);
|
||||
(CXP[channel].rx_gtx_dread_write)(1);
|
||||
while (CXP[channel].rx_gtx_dready_read)() != 1 {}
|
||||
(CXP[channel].rx_gtx_dout_read)()
|
||||
}
|
||||
}
|
||||
|
||||
fn gtx_write(channel: u8, address: u16, value: u16) {
|
||||
let channel = channel as usize;
|
||||
unsafe {
|
||||
(CXP[channel].downconn_gtx_daddr_write)(address);
|
||||
(CXP[channel].downconn_gtx_din_write)(value);
|
||||
(CXP[channel].downconn_gtx_din_stb_write)(1);
|
||||
while (CXP[channel].downconn_gtx_dready_read)() != 1 {}
|
||||
(CXP[channel].rx_gtx_daddr_write)(address);
|
||||
(CXP[channel].rx_gtx_din_write)(value);
|
||||
(CXP[channel].rx_gtx_din_stb_write)(1);
|
||||
while (CXP[channel].rx_gtx_dready_read)() != 1 {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user