sifive / freedom

Source files for SiFive's Freedom platforms
Apache License 2.0
1.11k stars 286 forks source link

Peripherals at higher Core Frequencies #163

Closed bchetwynd closed 4 years ago

bchetwynd commented 4 years ago

It seems the following statement attempts to scale the peripheral bus frequency based on the DevKitFPGAFrequencyKey

case PeripheryBusKey => up(PeripheryBusKey, site).copy(dtsFrequency = Some(BigDecimal(site(DevKitFPGAFrequencyKey)*1000000).setScale(0, BigDecimal.RoundingMode.HALF_UP).toBigInt))

Naturally, the UART and SDIO can't scale like the core frequency does, so can you help me understand how this statement ensures the peripherals operate at fixed frequencies "regardless" of how I scale the core?

By default, I have used the following: DevKitU500FPGADesign_WithDevKit50MHz

But I have recently looked @ trying this: DevKitU500FPGADesign_WithDevKit200MHz