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] Lint fixes to top-level #25982

Merged
merged 8 commits into from
Jan 25, 2025
Merged

Conversation

Razer6
Copy link
Member

@Razer6 Razer6 commented Jan 22, 2025

This PR waives some expected lint errors.

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 mostly good @Razer6 , would you mind comibining the rst_a anb b waivers for the prim_ram_1r1w_async_adv into the same waiver file and making the comment more precise please?

hw/top_darjeeling/lint/top_darjeeling.waiver Show resolved Hide resolved
Comment on lines 124 to 126
waive -rules RESET_USE -location {spid_dpram.sv} \
-regexp {'(rst_sys_ni|rst_spi_ni)' is connected to 'prim_ram_1r1w_async_adv' port 'rst_a_ni', and used as an asynchronous reset or set} \
-comment "Asynchronous reset use in 1r1w ram primitive is legal."
Copy link
Contributor

Choose a reason for hiding this comment

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

I was suspicious because we don't need to waive similar warnings for the 2p variant in Earlgrey and I think the underlying issue here is that inside prim_generic_ram_1r1w which is instantiated inside prim_ram_1r1w_async_adv, the reset inputs are tied off:

  logic unused_signals;
  assign unused_signals = ^{cfg_i, rst_a_ni, rst_b_ni};

So I think this waiver here makes sense and is fine. I am leaving the comment for others.

We may want to make the comment more precise but I don't consider this a must.

Copy link
Member Author

Choose a reason for hiding this comment

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

Resets to prim_generic_ram_1r1w where recently added. Previously (like in the 2p version), there was no dedicated reset input to those prims, but they make sense from a generalization point of view and are used downstream.

Comment on lines 13 to 14
waive -rules {RESET_USE} -location {prim_ram_1r1w_async_adv.sv} -regexp {'rst_b_ni' is connected to 'prim_ram_1r1w' port 'rst_b_ni', and used as an asynchronous reset} \
-comment "rst_b_ni is a legal asynchronous reset."
Copy link
Contributor

Choose a reason for hiding this comment

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

A this is now the rst_b_ni port of the prim_ram_1r1w_async_adv.sv. The rst_a_ni waiver is in a different commit and I think in a different waiver file. Can you try putting them into the same file and maybe make the comment more precise (see my other review comment please)?

@Razer6 Razer6 force-pushed the darjeeling-lint branch 3 times, most recently from 4f075fc to 37fd142 Compare January 23, 2025 18:18
@Razer6
Copy link
Member Author

Razer6 commented Jan 24, 2025

@vogelpi Can you take another look?

Razer6 and others added 8 commits January 24, 2025 22:19
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
…in RTL

Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
This was previously unconnected and the default signal is not actually
defined.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
Until we have cleaned up the flow errors in chip_darjeeling_asic, this
lint config allows running lint on top_darjeeling including all the
instantiated modules via dvsim using the following command:

util/dvsim/dvsim.py \
    hw/top_darjeeling/lint/top_darjeeling_lint_cfgs.hjson \
    --tool ascentlint --local --purge --select-cfgs top_darjeeling

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
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.

LGTM!

As discussed offline, I've connected the missing soc_dbg_ctrl input signal that prevented running lint. I've also added a lint config for top_darjeeling. You can now run it via

util/dvsim/dvsim.py hw/top_darjeeling/lint/top_darjeeling_lint_cfgs.hjson --tool ascentlint --local --purge --select-cfgs top_darjeeling

You get IMO easier digestable reports with this and we should be able to add this to CI next week as well. I've also waived some SAME_NAME_TYPE errors (most of them we also have in Earlgrey) none of them are critical as the mentions are in different hierarchies.

@vogelpi
Copy link
Contributor

vogelpi commented Jan 25, 2025

I am merging this the failing CW310 ROM Test (e2e_bootstrap_rma_fpga_cw310_rom_with_fake_keys) is known to be flaky.

@vogelpi vogelpi merged commit 95950e2 into lowRISC:master Jan 25, 2025
37 of 38 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.

2 participants