forked from M-Labs/artiq
1
0
Fork 0

wrpll: print DDMTD helper tags

This commit is contained in:
Sebastien Bourdeauducq 2019-12-09 17:39:22 +08:00
parent 0d4eccc1a5
commit 4919fb8765
1 changed files with 15 additions and 0 deletions

View File

@ -280,6 +280,14 @@ fn get_ddmtd_main_tag() -> u16 {
} }
} }
fn get_ddmtd_helper_tag() -> u16 {
unsafe {
csr::wrpll::ddmtd_helper_arm_write(1);
while csr::wrpll::ddmtd_helper_arm_read() != 0 {}
csr::wrpll::ddmtd_helper_tag_read()
}
}
pub fn init() { pub fn init() {
info!("initializing..."); info!("initializing...");
@ -311,4 +319,11 @@ pub fn init() {
pub fn select_recovered_clock(rc: bool) { pub fn select_recovered_clock(rc: bool) {
info!("select_recovered_clock: {}", rc); info!("select_recovered_clock: {}", rc);
if rc {
let mut tags = [0; 10];
for i in 0..tags.len() {
tags[i] = get_ddmtd_helper_tag();
}
info!("DDMTD helper tags: {:?}", tags);
}
} }