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

[fpga] Increase CW310 base clock frequency to 24 MHz #19368

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

a-will
Copy link
Contributor

@a-will a-will commented Aug 4, 2023

Set clock frequencies for CW310 to the following

clk_main:    24 MHz (drives SYS and IO clocks on CW310)
clk_io_div4: 6 MHz

This should enable performing fast I2C mode at closer to 400 kHz, possibly enabling faster than 400 kHz I2C (fast-plus mode).

@a-will a-will force-pushed the cw310-reclock branch 2 times, most recently from 25c46c1 to 248e452 Compare August 8, 2023 21:21
@a-will a-will marked this pull request as ready for review August 9, 2023 15:16
@a-will a-will requested a review from a team as a code owner August 9, 2023 15:16
@a-will a-will requested review from alphan, marnovandermaas, msfschaffner and vogelpi and removed request for a team and alphan August 9, 2023 15:16
@a-will
Copy link
Contributor Author

a-will commented Aug 9, 2023

Since we are entering a phase where there might be longer-running tests for silicon validation, I figured I'd take up some of the slack on the FPGA build. The increase in frequencies does not materially affect build times, so CI should not be impacted.

It also doesn't materially decrease test times in CI, since most of the delays there are in software build, bitstream programming, and UART output, haha.

Copy link
Contributor Author

@a-will a-will Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This core file was moved over to the top_englishbreakfast folder. It is not used for Earl Grey, which includes the related RTL files directly in the FPGA chip-level cores.

Copy link
Contributor

@vogelpi vogelpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @a-will , this looks good to me. Thanks for taking care of English Breakfast as well. I have just one nit related to naming the main clocks for English Breakfast.

Put entropy_src into auto mode so the test doesn't run out.

Signed-off-by: Alexander Williams <awill@opentitan.org>
Set clock frequencies for CW310 to the following

clk_main:    24 MHz
clk_io_div4: 6 MHz

Also improve the SPI_HOST timing constraints to have the correct max
frequency, in addition to multicycle paths reflecting the correct
capture edges.

Signed-off-by: Alexander Williams <awill@opentitan.org>
@a-will a-will merged commit 40cb4e3 into lowRISC:master Aug 10, 2023
25 checks passed
@a-will a-will deleted the cw310-reclock branch August 10, 2023 18:40
@vogelpi
Copy link
Contributor

vogelpi commented Aug 11, 2023

What I had forgotten is that this will also impact SCA measurements. So for SCA measurements we should generate a custom bitstream with a 10 MHz main clock again in the future. But since we were anyway creating custom bitstreams for KMAC already (to switch the masking on), I think this is not a big issue. @wettermo , @vrozic , @bilgiday , @johannheyszl

lschuermann pushed a commit to lschuermann/tock that referenced this pull request Aug 22, 2023
This is in accordance with an upstream change [1]. While the register
set and other chip attributes are frozen for EarlGrey, the clock
frequencies are not. This change will also be backported to the
lowRISC/opentitan `earlgrey_es` branch [2].

[1]: lowRISC/opentitan#19368
[2]: lowRISC/opentitan#19479
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

2 participants