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

[top_darjeeling] Instantiate AC Range checks #25862

Merged
merged 14 commits into from
Feb 4, 2025

Conversation

Razer6
Copy link
Member

@Razer6 Razer6 commented Jan 14, 2025

This PR instantiates the AC ranges for a single egress port. All Egress ports are muxed to a single egress port before leaving Darjeeling. An additional external miscellaneous port is added to the system that is coming from the external uncore but muxed with same mux and going through the AC ranges.

@Razer6 Razer6 requested review from a team and cfrantz as code owners January 14, 2025 12:47
@Razer6 Razer6 requested review from hcallahan-lowrisc, moidx, rswarbrick, andreaskurth and vogelpi and removed request for a team, cfrantz, hcallahan-lowrisc and moidx January 14, 2025 12:47
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

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

Crikey, these patches are enormous! (I understand that the code is autogenerated, but it's still an awful lot!)

Am I right in thinking these commits are orthogonal? If so, maybe it makes sense to split up the PR?

@Razer6
Copy link
Member Author

Razer6 commented Jan 14, 2025

I don't think splitting up makes sense. The one big commit instantiates the ac ranges on the HJSON (5 lines or so) and this triggers ipgen to copy over the IP. If we split it up, there would be inconsistent IPs

@Razer6 Razer6 force-pushed the ac-ranges-instance branch from 4066f22 to 112e519 Compare January 20, 2025 16:24
@Razer6 Razer6 requested a review from rswarbrick January 20, 2025 16:25
@Razer6
Copy link
Member Author

Razer6 commented Jan 20, 2025

@rswarbrick @vogelpi Since #25894 is merged, this now correctly maps the AC ranges. Can you take another look?

@Razer6 Razer6 force-pushed the ac-ranges-instance branch 3 times, most recently from 17c5cb1 to c9e2994 Compare January 23, 2025 16:39
Copy link
Contributor

Choose a reason for hiding this comment

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

A thought for the future: Perhaps we'll want to formally introduce a TL-UL to TL-UL bus bridge with base address translation in hw/ip/tlul at some point. Then we can extend topgen / tlgen and do traversals to understand reachability.

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 good, a few nits and you may want to consider tuning the TLUL MUX in SoC Proxy for timing and area. But this can also happen later. I think this probably needs to be rebased after #25986 gets merge.d

hw/top_darjeeling/ip/soc_proxy/rtl/bat.sv Outdated Show resolved Hide resolved
hw/top_darjeeling/ip/soc_proxy/rtl/bat.sv Outdated Show resolved Hide resolved
hw/top_darjeeling/ip/soc_proxy/rtl/soc_proxy.sv Outdated Show resolved Hide resolved
@vogelpi
Copy link
Contributor

vogelpi commented Jan 31, 2025

Oh and CI flags a failing whitespace check:

Checking whitespace on files changed since 90a9ea57711d6b953edb1c7b655a4a2502eab573
Would have fixed 1 files.
Fixing file: "hw/top_darjeeling/ip_autogen/ac_range_check/data/ac_range_check.hjson"

@Razer6 Razer6 force-pushed the ac-ranges-instance branch from c9e2994 to 59a9d7a Compare February 1, 2025 12:16
@Razer6 Razer6 requested a review from msfschaffner as a code owner February 1, 2025 12:16
@Razer6 Razer6 force-pushed the ac-ranges-instance branch 2 times, most recently from ff8dbc9 to 4f905a6 Compare February 2, 2025 10:17
@Razer6 Razer6 force-pushed the ac-ranges-instance branch 2 times, most recently from 5838567 to af82526 Compare February 3, 2025 11:34
@vogelpi vogelpi force-pushed the ac-ranges-instance branch 5 times, most recently from 5ddc911 to 616c034 Compare February 3, 2025 14:24
@Razer6 Razer6 force-pushed the ac-ranges-instance branch 2 times, most recently from 3259101 to b7b8e54 Compare February 3, 2025 15:39
Razer6 and others added 14 commits February 3, 2025 08:29
Signed-off-by: Robert Schilling <[email protected]>
Co-authored-by: Pirmin Vogel <[email protected]>
This adds a base address translation (BAT) on the muxed
host TLUL port before exiting to the AC ranges. This BAT
removes the 1-2GB offset and downlifts the address to
0-1GB when exiting.

Co-authored-by: Robert Schilling <[email protected]>
Signed-off-by: Pirmin Vogel <[email protected]>
@Razer6 Razer6 force-pushed the ac-ranges-instance branch from b7b8e54 to 55f0ae0 Compare February 3, 2025 20:19
@vogelpi
Copy link
Contributor

vogelpi commented Feb 4, 2025

Thanks for cleaning up ac_range_check.sv @Razer6 !

@vogelpi vogelpi merged commit def5a09 into lowRISC:master Feb 4, 2025
38 checks passed
@Razer6 Razer6 deleted the ac-ranges-instance branch February 4, 2025 09:02

ipgen_render("ac_range_check", topname, params, out_path)
ipgen_render('ac_range_check', topname, params, out_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not have quote vs double quotes discrepancies? The overwhelming number of strings are double quoted, and we have the policy of preserving the prevailing convention. You can see topcfg/validate.py is mostly single quotes.

@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
${gencmd}
<% import textwrap %>\
<% racl_role_vec_len = 2 ** racl_config['nr_role_bits'] %>\

package top_racl_pkg;
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird this doesn't get some uniquifying name. The name top_racl_pkg can become confusing in multi-top.

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.

5 participants