Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: add WithBootFreq configuration #3331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cyyself
Copy link
Contributor

@cyyself cyyself commented Apr 24, 2023

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.

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.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
src/main/scala/subsystem/Configs.scala Outdated Show resolved Hide resolved
@ZenithalHourlyRate
Copy link
Contributor

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

@jerryz123
Copy link
Contributor

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

@jerryz123
Copy link
Contributor

IIRC the tile ClockSinkParams currently are not given a freq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants