Skip to content

Commit 6429654

Browse files
alees24marnovandermaas
authored andcommitted
Revert HyperRAM clock frequency to 100MHz
There is a suspected physical-level issue with recent builds which may be related to the increased clock frequency. Although that is uncertain, there are two other reasons to propose reverting the commit that increased the frequency: 1. There is a throughput mismatch between the HBMC read speed and the Sonata system with only a 32-bit Upstream FIFO. This could maybe lead to data loss because there is no braking/ backpressure mechanism. It was intended to widen `ufifo` to 64 bits but this has not yet been completed and proven. 2. The increased frequency offers a performance uplift of only about 10-16% with the current design. A greater boot should be possible later but that requires some rearchitecting.
1 parent 0c81ed9 commit 6429654

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

dv/verilator/sonata_system.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ int SonataSystem::Setup(int argc, char **argv, bool &exit_app) {
7777
// Note: calculate the period of the higher frequency clock first because
7878
// the period of the 'hr' reference clock must be exactly 3 times longer
7979
// to maintain the phase relationship.
80-
uint32_t hr3x_hperiod = (micro + 1199u) / 1200u; // 600MHz cycle
81-
uint32_t hr_hperiod = 3 * hr3x_hperiod; // 200MHz cycle
80+
uint32_t hr3x_hperiod = (micro + 599u) / 600u; // 300MHz cycle
81+
uint32_t hr_hperiod = 3 * hr3x_hperiod; // 100MHz cycle
8282

8383
// The HyperRAM requires a clock that is phase-shifted by 90 degress.
8484
uint32_t hr90p_offset = hr_hperiod / 2;

dv/verilator/top_verilator.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module top_verilator #(
2727
// System clock frequency.
2828
localparam int unsigned SysClkFreq = 40_000_000;
2929
// HyperRAM clock frequency.
30-
localparam int unsigned HyperRAMClkFreq = 200_000_000;
30+
localparam int unsigned HyperRAMClkFreq = 100_000_000;
3131
localparam int unsigned BaudRate = 921_600;
3232
// Number of CHERI error LEDs.
3333
localparam int unsigned CheriErrWidth = 9;

rtl/fpga/clkgen_sonata.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
module clkgen_sonata #(
66
// System Clock Frequency is parameterised, allowing it to be adjusted.
77
parameter int unsigned SysClkFreq = 50_000_000,
8-
parameter int unsigned HyperRAMClkFreq = 200_000_000,
8+
parameter int unsigned HyperRAMClkFreq = 100_000_000,
99

1010
// Frequency of IO_CLK input on the FPGA board.
1111
parameter int unsigned IOClkFreq = 25_000_000

rtl/fpga/top_sonata.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ module top_sonata
218218

219219
// System clock frequency.
220220
parameter int unsigned SysClkFreq = 40_000_000;
221-
parameter int unsigned HyperRAMClkFreq = 200_000_000;
221+
parameter int unsigned HyperRAMClkFreq = 100_000_000;
222222

223223
parameter SRAMInitFile = "";
224224

rtl/system/sonata_system.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module sonata_system
1212
parameter int unsigned CheriErrWidth = 9,
1313
parameter string SRAMInitFile = "",
1414
parameter int unsigned SysClkFreq = 30_000_000,
15-
parameter int unsigned HyperRAMClkFreq = 200_000_000
15+
parameter int unsigned HyperRAMClkFreq = 100_000_000
1616
) (
1717
// Main system clock and reset
1818
input logic clk_sys_i,

0 commit comments

Comments
 (0)