rocket-chip icon indicating copy to clipboard operation
rocket-chip copied to clipboard

config: add WithBootFreq configuration

Open cyyself opened this issue 2 years ago • 3 comments

The rocket-chip will set clock-frequency to 0 in the CPU fields of the device tree. And the value is taken from bootFreqHz in the RocketCoreParams which is zero by default. Some devices will use this property to calculate the clock divider ratio, but a zero value will cause division overflow.

This patch allows setting the value by simply adding WithBootFreq to the configuration, so we will have the correct clock-frequency in the dts.

cyyself avatar Apr 24 '23 16:04 cyyself

Can this be done by taking values from clockNode from diplomacy? ClockParameters has the freqMHz field.

ZenithalHourlyRate avatar Apr 24 '23 16:04 ZenithalHourlyRate

I think it would be more useful if this also set the ClockSinkParams

jerryz123 avatar Apr 24 '23 17:04 jerryz123

IIRC the tile ClockSinkParams currently are not given a freq

jerryz123 avatar Apr 24 '23 17:04 jerryz123