diff --git a/libraries/io/fpga_temp_sens/src/vhdl/fpga_temp_sens.vhd b/libraries/io/fpga_temp_sens/src/vhdl/fpga_temp_sens.vhd index 727e24c05c3086c91471108735e1cc74e2d0913e..a9e9142f029ab2dc894d2bd5d1dd20bf4803202b 100644 --- a/libraries/io/fpga_temp_sens/src/vhdl/fpga_temp_sens.vhd +++ b/libraries/io/fpga_temp_sens/src/vhdl/fpga_temp_sens.vhd @@ -91,7 +91,8 @@ BEGIN gen_no_tech_fpga_temp_sens: IF g_sim=TRUE GENERATE - temp_data <= RESIZE_UVEC(x"45",10); + -- temp = (708 * adc)/1024 - 273 => adc = (temp + 273)*1024/708 + temp_data <= TO_UVEC(460, temp_data'LENGTH); -- choose temp = 45 degrees so adc temp_data = 460 mm_reg_temp_data <= RESIZE_UVEC(temp_data,c_mem_reg_dat_w); END GENERATE;