Skip to content

Is fpga temperature conversion function correct?

At least, it is differenct from the one used in integrated test bench software:

impl FpgaTemp {
    pub fn in_celsius(self) -> f64 {
        ((self.0 & 3032) as f64) * 0.1230407714843 - 273.15
    }
}
            FPGA = (psb_reg_read(fd, PSB_ADDR_xADC_FPGA_temp_rd, ipsb) % 3032) * 0.1230407714843 - 273.15;

& and %