From a9d97101fc3b20fe237ae9df2158f9e49de12893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Tue, 12 Jun 2018 16:23:13 +0800 Subject: [PATCH] slave_fpga: add another check --- artiq/firmware/libboard_artiq/slave_fpga.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/firmware/libboard_artiq/slave_fpga.rs b/artiq/firmware/libboard_artiq/slave_fpga.rs index 2fabe5b24..d8ce4060a 100644 --- a/artiq/firmware/libboard_artiq/slave_fpga.rs +++ b/artiq/firmware/libboard_artiq/slave_fpga.rs @@ -60,6 +60,9 @@ pub fn load() -> Result<(), &'static str> { if csr::slave_fpga_cfg::in_read() & INIT_B_BIT == 0 { return Err("Did not exit INIT after releasing PROGRAM"); } + if csr::slave_fpga_cfg::in_read() & DONE_BIT != 0 { + return Err("DONE high despite PROGRAM"); + } for i in slice::from_raw_parts(GATEWARE.offset(8), length) { shift_u8(*i); @@ -72,7 +75,6 @@ pub fn load() -> Result<(), &'static str> { while csr::slave_fpga_cfg::in_read() & DONE_BIT == 0 { if clock::get_ms() > t + 100 { error!("Timeout wating for DONE after loading"); - error!("Boards not populated correctly?"); return Err("Not DONE"); } shift_u8(0xff);