From a4f6f0e4c58aa22c8164658315f537cb06ab00c4 Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 14 Jan 2025 13:04:32 +0800 Subject: [PATCH] phys FW: update csr --- src/libboard_artiq/src/cxp_phys.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/libboard_artiq/src/cxp_phys.rs b/src/libboard_artiq/src/cxp_phys.rs index 27d662c..bfdf610 100644 --- a/src/libboard_artiq/src/cxp_phys.rs +++ b/src/libboard_artiq/src/cxp_phys.rs @@ -59,12 +59,12 @@ mod rx { pub fn setup(timer: &mut GlobalTimer) { unsafe { - csr::cxp_phys::downconn_qpll_reset_write(1); + csr::cxp_phys::rx_qpll_reset_write(1); info!("waiting for QPLL/CPLL to lock..."); - while csr::cxp_phys::downconn_qpll_locked_read() != 1 {} + while csr::cxp_phys::rx_qpll_locked_read() != 1 {} info!("QPLL locked"); - csr::cxp_phys::downconn_gtx_start_init_write(1); + csr::cxp_phys::rx_gtx_start_init_write(1); // DEBUG: printout info!("waiting for rx setup..."); @@ -84,12 +84,12 @@ mod rx { change_cdr_cfg(speed); unsafe { - csr::cxp_phys::downconn_qpll_reset_write(1); + csr::cxp_phys::rx_qpll_reset_write(1); info!("waiting for QPLL/CPLL to lock..."); - while csr::cxp_phys::downconn_qpll_locked_read() != 1 {} + while csr::cxp_phys::rx_qpll_locked_read() != 1 {} info!("QPLL locked"); - csr::cxp_phys::downconn_gtx_restart_write(1); + csr::cxp_phys::rx_gtx_restart_write(1); } } @@ -200,19 +200,19 @@ mod rx { #[allow(dead_code)] fn qpll_read(address: u8) -> u16 { unsafe { - csr::cxp_phys::downconn_qpll_daddr_write(address); - csr::cxp_phys::downconn_qpll_dread_write(1); - while csr::cxp_phys::downconn_qpll_dready_read() != 1 {} - csr::cxp_phys::downconn_qpll_dout_read() + csr::cxp_phys::rx_qpll_daddr_write(address); + csr::cxp_phys::rx_qpll_dread_write(1); + while csr::cxp_phys::rx_qpll_dready_read() != 1 {} + csr::cxp_phys::rx_qpll_dout_read() } } fn qpll_write(address: u8, value: u16) { unsafe { - csr::cxp_phys::downconn_qpll_daddr_write(address); - csr::cxp_phys::downconn_qpll_din_write(value); - csr::cxp_phys::downconn_qpll_din_stb_write(1); - while csr::cxp_phys::downconn_qpll_dready_read() != 1 {} + csr::cxp_phys::rx_qpll_daddr_write(address); + csr::cxp_phys::rx_qpll_din_write(value); + csr::cxp_phys::rx_qpll_din_stb_write(1); + while csr::cxp_phys::rx_qpll_dready_read() != 1 {} } } }