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

[Darjeeling] Instantiate Darjeeling #25283

Merged
merged 16 commits into from
Nov 22, 2024

Conversation

Razer6
Copy link
Member

@Razer6 Razer6 commented Nov 21, 2024

No description provided.

@Razer6 Razer6 requested review from a team, msfschaffner and vogelpi as code owners November 21, 2024 09:03
@Razer6 Razer6 requested review from eshapira, timothytrippel and andreaskurth and removed request for a team, msfschaffner, eshapira and timothytrippel November 21, 2024 09:03
@Razer6 Razer6 force-pushed the darjeeling-and-lint branch 2 times, most recently from 5c661cf to d24efeb Compare November 21, 2024 09:33
Add jtag_id_pkg.sv, padring.sv, scan_role_pkg, ibex_pmp_reset_pkg.sv
padring.sv, top_pkg.sv

Signed-off-by: Robert Schilling <[email protected]>
The mi/dio signals are used in both cases, hardware strap
sampling enabled an not.

Signed-off-by: Robert Schilling <[email protected]>
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.

This PR is huge because files for Darjeeling get autogenerated and added. This is nicely separated into one commit, however, which makes it possible to manually review the other commits.

Overall LGTM, just a few minor suggestions/requests.

Note 1: hw/top_darjeeling still has a FUSESOC_IGNORE file, which is necessary to not disturb top_earlgrey until the FuseSoC update and virtual cores transition has happened. Those working with top_darjeeling need to

mv hw/top_{darjeeling,earlgrey}/FUSESOC_IGNORE
touch hw/top_englishbreakfast/FUSESOC_IGNORE

for now.

Note 2: Top-level simulations (even those without SW) don't yet work because chip_sim_cfg.hjson hasn't been added yet. I think it's okay to do this in a follow-up PR, though that could uncover a few more changes necessary to be able to elaborate the top-level design.

Note 3: Some IPs, including the DMA, can already be simulated through Darjeeling's top sim config (util/dvsim/dvsim.py hw/top_darjeeling/dv/top_darjeeling_sim_cfgs.hjson --select-cfgs dma ...), while others are still uncommented in top_darjeeling_sim_cfgs.hjson and of those some (such as clkmgr) don't elaborate yet. Also this, I think, is okay to resolve in a follow-up PR.

Thanks @Razer6!

waive -rules RESET_USE -location {pinmux_strap_sampling.sv} -regexp {'rst_ni' is connected to 'prim_clock_mux2' port 'clk1_i
', and used as an asynchronous reset or set at pinmux_strap_sampling} \
waive -rules RESET_USE -location {pinmux_strap_sampling.sv} -regexp {'rst_ni' is connected to 'prim_clock_mux2' port 'clk1_i', and used as an asynchronous reset or set at pinmux_strap_sampling} \
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just a line break change that shouldn't semantically affect the waiver used for Earlgrey.

(Just a note; no action required.)

@@ -573,7 +575,6 @@ module rv_dm
// Tied-off and ignore signals from the DMI interface
assign dmi_intg_error = 1'b0;
assign dbg_intg_error = 1'b0;
assign dmi_gate_intg_error = 1'b0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an unused signal; OK to remove.

(Just a note; no action required.)

# Copyright lowRISC contributors (OpenTitan project).
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "lowrisc:systems:physical_pads:0.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: "lowrisc:systems:physical_pads:0.1"
name: "lowrisc:systems:top_darjeeling_physical_pads:0.1"

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as below.

# XXX: This name is currently required as global identifier until we have
# support for "interfaces" or a similar concept.
# Tracked in https://github.com/olofk/fusesoc/issues/235
name: "lowrisc:constants:top_pkg"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: "lowrisc:constants:top_pkg"
name: "lowrisc:constants:top_darjeeling_top_pkg"

Copy link
Member Author

Choose a reason for hiding this comment

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

Do those core files need to specify a virtual core?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, with virtual core support this core file would have the name suggested above and specify lowrisc:constants:top_pkg as virtual core.

Dependent cores then either have lowrisc:constants:top_pkg -- if they don't depend on a specific top -- or lowrisc:constants:top_darjeeling_top_pkg -- if they do depend on a specific top -- in their dependencies.

We don't have proper support for virtual cores just yet, so I leave it to you whether you want to do this in this or in a follow-up PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's do that (and the other Todo) in a follow up-PR to unblock multitop SW, which depends on that change. CI is green (so far it can), so let's get that in :)

Comment on lines -334 to -337
// Local versions of the input signals
logic [NMioPads-1:0] mio_out, mio_oe, mio_in;
logic [NDioPads-1:0] dio_out, dio_oe, dio_in;

Copy link
Contributor

Choose a reason for hiding this comment

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

These lines get moved further up due to a change in the template. No functional change.

(This is just a note; no action required.)

hw/ip/prim/lint/prim_ram_1r1w.waiver Outdated Show resolved Hide resolved
@@ -37,6 +37,26 @@ package top_${top["name"]}_pkg;
* Memory size for ${name} in top ${top["name"]}.
*/
parameter int unsigned ${region.size_bytes_name().as_c_define()} = ${hex_size_bytes};
## TODO: we need a more holistic approach to declare memories and IPs sitting in the
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create an issue and reference it here (TODO(#....)) so we can track this TODO item

Copy link
Contributor

Choose a reason for hiding this comment

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

Issue: #25313

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll link to that in a follow up PR

@andreaskurth
Copy link
Contributor

CI checks Verible lint and Check for and block unauthorized changes are failing due to the limitation in number of files. I'll run those checks locally before this PR gets merged.

@Razer6
Copy link
Member Author

Razer6 commented Nov 21, 2024

Thanks for the review @andreaskurth.

Note 2: Top-level simulations (even those without SW) don't yet work because chip_sim_cfg.hjson hasn't been added yet. I think it's okay to do this in a follow-up PR, though that could uncover a few more changes necessary to be able to elaborate the top-level design.

I think it's ok for now. Adding the chip_sim_cfg.hjson would pull in much more files. I would do that in a separate PR.

Note 3: Some IPs, including the DMA, can already be simulated through Darjeeling's top sim config (util/dvsim/dvsim.py hw/top_darjeeling/dv/top_darjeeling_sim_cfgs.hjson --select-cfgs dma ...), while others are still uncommented in top_darjeeling_sim_cfgs.hjson and of those some (such as clkmgr) don't elaborate yet. Also this, I think, is okay to resolve in a follow-up PR.

I added all IPs.

@andreaskurth
Copy link
Contributor

CHANGE AUTHORIZED: hw/ip/keymgr/rtl/keymgr.sv
CHANGE AUTHORIZED: hw/ip/keymgr/rtl/keymgr_input_checks.sv
CHANGE AUTHORIZED: hw/ip/rv_dm/rtl/rv_dm.sv
CHANGE AUTHORIZED: hw/top_earlgrey/ip_autogen/pinmux/rtl/pinmux.sv

The CI check cannot run on this PR (too many files), but I ran it locally. The files above need to be authorized. None of the changes has a functional impact on Earlgrey.

@andreaskurth
Copy link
Contributor

For the Verible lint check, which CI also cannot run due to the file limit, the report includes

hw/top_darjeeling/rtl/autogen/top_darjeeling.sv:71:101-106: Line length exceeds max: 100; is: 106 [Style: line-length] [line-length]

@Razer6 This is a generated line; would it be simple to insert line breaks?

@vogelpi
Copy link
Contributor

vogelpi commented Nov 22, 2024

CHANGE AUTHORIZED: hw/ip/keymgr/rtl/keymgr.sv
CHANGE AUTHORIZED: hw/ip/keymgr/rtl/keymgr_input_checks.sv
CHANGE AUTHORIZED: hw/ip/rv_dm/rtl/rv_dm.sv
CHANGE AUTHORIZED: hw/top_earlgrey/ip_autogen/pinmux/rtl/pinmux.sv

None of the changes in this PR have a functional impact on Earlgrey. This is fine.

@andreaskurth andreaskurth merged commit 32a974b into lowRISC:master Nov 22, 2024
37 of 40 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.

3 participants