mirror of https://github.com/m-labs/artiq.git
firmware: fix a warning.
This commit is contained in:
parent
d051cec0dd
commit
14f6fa6699
|
@ -538,14 +538,13 @@ fn dac_prbs(dacno: u8) -> Result<(), &'static str> {
|
||||||
0b00*ad9154_reg::PHY_PRBS_PAT_SEL);
|
0b00*ad9154_reg::PHY_PRBS_PAT_SEL);
|
||||||
|
|
||||||
for i in 0..8 {
|
for i in 0..8 {
|
||||||
let mut lane_errors: u32 = 0;
|
|
||||||
/* step 9.a: select src err */
|
/* step 9.a: select src err */
|
||||||
write(ad9154_reg::PHY_PRBS_TEST_CTRL,
|
write(ad9154_reg::PHY_PRBS_TEST_CTRL,
|
||||||
i*ad9154_reg::PHY_SRC_ERR_CNT);
|
i*ad9154_reg::PHY_SRC_ERR_CNT);
|
||||||
/* step 9.b: retrieve number of errors */
|
/* step 9.b: retrieve number of errors */
|
||||||
lane_errors = (read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_LOBITS) as u32) |
|
let lane_errors = (read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_LOBITS) as u32) |
|
||||||
((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_MIDBITS) as u32) << 8) |
|
((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_MIDBITS) as u32) << 8) |
|
||||||
((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_HIBITS) as u32) << 16);
|
((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_HIBITS) as u32) << 16);
|
||||||
if lane_errors > 0 {
|
if lane_errors > 0 {
|
||||||
warn!("AD9154-{} PRBS errors on lane{}: {:06x}", dacno, i, lane_errors);
|
warn!("AD9154-{} PRBS errors on lane{}: {:06x}", dacno, i, lane_errors);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue