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

refactor(ICache): refactor code style & eliminate IDE warnings #3947

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

ngc7331
Copy link
Member

@ngc7331 ngc7331 commented Nov 27, 2024

  • add type annotation to public members
  • add private qualifier to other members
  • add asUInt to shift results (Bits)
  • fix typo
  • remove unused imports
  • rename ICacheMSHR.waymask to way since it is not a mask
  • use idxBits for log2Up(nSets)
  • use wayBits for log2Up(nWays)
  • use foreach instead of map when return value is not needed
  • use {} instead of () for multi-line foreach and map

The generated verilog is checked and is identical with the original (except waymask -> way & order changes).

- add type annotation to public members
- add private qualifier to other members
- add `asUInt` to shift results (Bits)
- fix typo
- remove unused imports
- rename `ICacheMSHR.waymask` to `way` since it is not a mask
- use `idxBits` for `log2Up(nSets)`
- use `wayBits` for `log2Up(nWays)`
- use `foreach` instead of `map` when return value is not needed
- use `{}` instead of `()` for multi-line `foreach` and `map`
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 0e1d891

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
0e1d891 1.917 0.450 2.701 1.223 2.840 2.464 2.398 0.921 1.430 2.069 3.437 2.716 2.387 3.261

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
b00d582 1.917 0.450 2.701 1.230 2.840 2.464 2.398 0.921 1.430 2.069 3.437 2.716 2.387 3.261
e718f87
3956160 1.917 0.450 2.701 1.233 2.840 2.464 2.398 0.921 1.430 2.069 3.437 2.716 2.387 3.261
0d6f7fa 1.917 0.450 2.701 1.232 2.840 2.464 2.398 0.921 1.430 2.069 3.437 2.716 2.387 3.261
a5c77bc 1.917 0.450 2.701 1.230 2.840 2.464 2.398 0.921 1.430 2.069 3.437 2.716 2.387 3.261

@Gao-Zeyu Gao-Zeyu merged commit 415fcbe into master Nov 29, 2024
9 checks passed
@Gao-Zeyu Gao-Zeyu deleted the style-icache branch November 29, 2024 08:28
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