Merge pull request #222 from daveshah1/rcd_fine_speed_int

init: Cast DDR4 RCD fine_speed to int
This commit is contained in:
enjoy-digital 2020-10-13 15:01:20 +02:00 committed by GitHub
commit 7d8f4713d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ def get_ddr4_phy_init_sequence(phy_settings, timing_settings):
def get_fine_speed(tck): def get_fine_speed(tck):
# JESD82-31A page 83 # JESD82-31A page 83
freq = 2/tck freq = 2/tck
fine_speed = (freq - 1240e6) // 20e6 fine_speed = int((freq - 1240e6) // 20e6)
fine_speed = max(fine_speed, 0) fine_speed = max(fine_speed, 0)
fine_speed = min(fine_speed, 0b1100001) fine_speed = min(fine_speed, 0b1100001)
return fine_speed return fine_speed