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

[tlul/rtl] Fix SRAM timing #22588

Merged
merged 3 commits into from
Apr 19, 2024
Merged

[tlul/rtl] Fix SRAM timing #22588

merged 3 commits into from
Apr 19, 2024

Conversation

GregAC
Copy link
Contributor

@GregAC GregAC commented Apr 16, 2024

With my hacky block synthesis with these fixes and the previous work (#22497) I believe I have eliminated all feedthroughs from the incoming tilelink signals to the outgoing tilelink signals in sram_ctrl.

These fixes will also have a positive effect on timing elsewhere as tlul_sram_adapter and tlul_err_resp are used in various places. In turn this could give us some modest area improvements as buffers are removed and cell drive strengths can be lowered. Though note this also means increases verification risk in more places.

Contributes to resolving #22462.

I'm doing a final synthesis to confirm everything now, block level regressions (on sram_ctrl other blocks are effect, haven't run regressions for them yet) are looking healthy. I've had issues running the sram_ctrl top-level smoke test (not related to these changes) but chip_sw_sram_ctrl_scrambled_access is passing successfully.

I'm going to do some block level regressions of the other blocks that use the altered primitives and check some other sram related top-level tests.

Signed-off-by: Greg Chadwick <gac@lowrisc.org>
Copy link
Contributor

@marnovandermaas marnovandermaas left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me based on just a code review. It would be good to get someone else to have a look at this as well.

@@ -310,7 +328,7 @@ module tlul_adapter_sram
d_data : d_data,
d_user : '{default: '0, data_intg: data_intg},
d_error : d_valid && d_error,
a_ready : (gnt_i | error_internal) & reqfifo_wready & sramreqfifo_wready
a_ready : (gnt_i | missed_err_gnt_q) & reqfifo_wready & sramreqfifo_wready
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing I had noticed while working on Sonata is that a missed error causes an a_ready to be sent but the error response never gets written to the request FIFO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Odd, the ready shouldn't be signalled unless there's space in the FIFO and the FIFO is written when you have a_ready and a_valid asserted. It would be good to understand the issue you'd be seeing in more detail.

@andreaskurth andreaskurth changed the title SRAM timing fixes [tlul/rtl] Fix SRAM timing Apr 16, 2024
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.

This looks all good to me. Many thanks @GregAC for your work on this and for clearly describing the motivation for the changes.

Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

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

Thx Greg, small suggestion but overall LGTM

hw/ip/tlul/rtl/tlul_err_resp.sv Outdated Show resolved Hide resolved
@GregAC
Copy link
Contributor Author

GregAC commented Apr 18, 2024

Kick off a kokoro rerun, assuming that's all good I will bypass CI for a new version that adds the missing space @andreaskurth highlighted given this is an important fix to get in.

@GregAC
Copy link
Contributor Author

GregAC commented Apr 18, 2024

Local block level regression runs are all looking good

hw/ip/tlul/rtl/tlul_adapter_sram.sv Outdated Show resolved Hide resolved
Previously there was a combinational path from the incoming tilelink
request to the outgoing ready due to the error checking factoring into
the ready. This breaks that path by introducing a potential 1 extra
cycle of latency when an error response has to be returned.

Signed-off-by: Greg Chadwick <gac@lowrisc.org>
Previously the logic of tlul_err_resp was more complex than was required
(having seperate flops for tracking a pending request and response where
it's sufficient to just track a pending response).

This simplifies the logic and cuts a path from the incoming data ready
to the outgoing address ready.

Signed-off-by: Greg Chadwick <gac@lowrisc.org>
@vogelpi
Copy link
Contributor

vogelpi commented Apr 19, 2024

I am merging this, the i2c_target_test_fpga_cw310_sival test keeps failing but it's also failing for other PRs. I am going to mark it as broken.

@vogelpi vogelpi merged commit ec71152 into lowRISC:master Apr 19, 2024
30 of 32 checks passed
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

5 participants