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): follow new style guide #4338

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Conversation

ngc7331
Copy link
Member

@ngc7331 ngc7331 commented Feb 28, 2025

  • move InstrUncache out of package ICache (as it is actually a submodule of Ifu)
  • each class in a separate file (except Bundles / Utils)
  • module IO inside module class
  • extract similar codes and define them as helper functions for reuse
  • renames:
    • camel cases
    • unify bundle naming convention
    • re-organize IO

@ngc7331 ngc7331 changed the title refactor(frontend): follow new style guide refactor(ICache): follow new style guide Feb 28, 2025
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 2a0373a

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
2a0373a 1.794 0.442 2.641 1.230 2.158 1.676 2.143 2.362 0.943 1.378 1.961 3.102 2.538 2.275 3.276

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
a67fd0f 1.231 1.676 0.943 1.961 3.102 3.276
0d55e1d 1.794 0.442 2.641 1.226 2.158 1.676 2.143 2.362 0.943 1.378 1.961 3.102 2.538 2.275 3.276
66e9b54 1.807 0.442 2.635 1.228 2.144 1.678 2.144 2.362 0.944 1.389 1.953 3.112 2.559 2.271 3.300
0907eaa 1.807 0.442 2.635 1.225 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300
f486573 1.807 0.442 2.635 1.235 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300
4b2c87b 1.807 0.442 2.635 1.232 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300
4e7fa70 1.807 0.442 2.635 1.232 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300
eca6983 1.807 0.442 2.635 1.228 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300
4a699e2 1.807 0.442 2.635 1.229 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300
b6c1432 1.807 0.442 2.635 1.220 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300

@ngc7331 ngc7331 force-pushed the refactor-icache branch 3 times, most recently from 6b6ef31 to 14804c4 Compare March 3, 2025 03:08
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 14804c4

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
14804c4 1.795 0.442 2.641 1.231 2.158 1.676 2.143 2.362 0.943 1.389 1.961 3.102 2.538 2.275 3.276

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
10cfb21 1.795 0.442 2.641 1.222 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
76cb49a 1.797 0.442 2.641 1.232 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276
f5d5a4f 1.795 2.641 1.241 2.158 1.676 2.143 0.943 1.378 1.961 3.102 2.275 3.276
7ea4836 1.795 0.442 2.641 1.236 2.158 1.676 2.143 2.362 0.943 1.389 1.961 3.102 2.538 2.275 3.276
2caa7ef 1.795 0.442 2.641 1.222 2.158 1.676 2.143 2.362 0.943 1.389 1.961 3.102 2.538 2.275 3.276
9928cec 1.795 0.442 2.641 1.227 2.158 1.676 2.143 2.362 0.943 1.389 1.961 3.102 2.538 2.275 3.276
a67fd0f 1.794 0.442 2.641 1.231 2.158 1.676 2.143 2.362 0.943 1.378 1.961 3.102 2.538 2.275 3.276
0d55e1d 1.794 0.442 2.641 1.226 2.158 1.676 2.143 2.362 0.943 1.378 1.961 3.102 2.538 2.275 3.276
66e9b54 1.807 0.442 2.635 1.228 2.144 1.678 2.144 2.362 0.944 1.389 1.953 3.112 2.559 2.271 3.300
0907eaa 1.807 0.442 2.635 1.225 2.144 1.678 2.144 2.362 0.944 1.382 1.953 3.112 2.559 2.271 3.300

@ngc7331 ngc7331 force-pushed the refactor-icache branch 3 times, most recently from 397ce33 to 82598b7 Compare March 4, 2025 11:42
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 82598b7

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
82598b7 1.795 0.442 2.641 1.237 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
d084f29 1.794 0.442 2.641 1.230 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
e0d20e1 1.794 0.442 2.641 1.230 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
168f199 1.795 0.442 2.641 1.230 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
fd4d6c2 1.797 0.442 2.641 1.228 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276
0a16c8b 1.795 0.442 2.641 1.215 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
c081b71 1.794 0.442 2.641 1.238 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276
10cfb21 1.795 0.442 2.641 1.222 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
76cb49a 1.797 0.442 2.641 1.232 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276
f5d5a4f 1.795 2.641 1.241 2.158 1.676 2.143 0.943 1.378 1.961 3.102 2.275 3.276

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 0d46d6c

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
0d46d6c 1.795 0.442 2.641 1.219 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
a2ecedc 1.823 0.442 2.641 1.234 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
ac5be75 1.822 1.242 2.158 1.676 2.144 0.940 1.972 3.112 2.272 3.300
eaf1474 1.823 0.442 2.641 1.228 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300
90f8d3c 1.823 0.442 2.641 1.232 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
455e3b5 1.795 0.442 2.641 1.235 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276
4c91604 1.795 0.442 2.641 1.236 2.158 1.676 2.143 2.363 0.943 1.389 1.961 3.102 2.538 2.275 3.276
25381b7 1.795 0.442 2.641 1.234 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
aa78128 1.795 0.442 2.641 1.235 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
d084f29 1.794 0.442 2.641 1.230 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276
e0d20e1 1.794 0.442 2.641 1.230 2.158 1.676 2.143 2.363 0.943 1.378 1.961 3.102 2.538 2.275 3.276

ngc7331 added 10 commits March 10, 2025 14:16
 Naming:
- I/O:
  - ICache inner use only: xxxBundle
  - Other modules use: ICacheXxxBundle, consider move to FrontendBundle.scala
- Sram/register: xxxEntry

Try avoiding directed Bundle, unless it's req-resp pair

Add ICacheToIfuIO & move resp/perf/topdown/icacheReady into it
- ICacheIO.toIFU / IFUICacheIO.icacheReady -> ICacheToIfuIO.fetchReady
- ICacheIO.perfInfo / NewIFUIO.icachePerfInfo -> ICacheToIfuIO.perf
- ICacheMainPipeBundle.topdown.* / IFUICacheIO.topdown* -> ICacheToIfuIO.topdown.*

Add IfuToICacheIO & move stall into it
- NewIFUIO.icacheStop / ICacheIO.stop -> IfuToICacheIO.stall

Add FtqToICacheIO
- ICacheIO.fetch -> FtqToICacheIO.fetchReq
- ICacheIO.ftqPrefetch / FtqToPrefetchIO -> FtqToICacheIO.prefetchReq

Other renames
- ICacheIO.softPrefetch -> ICacheIO.softPrefetchReq
TODO: ICacheMainPipe & ICachePrefetchPipe

we need to discuss how to deal with pipeline stage signals (sx_abc)
reused by ICachePrefetchPipe & ICacheWayLookup
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 01719eb

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
01719eb 1.822 0.442 2.641 1.227 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
fad7c42 0.442 2.641 1.676 2.364 1.389 2.538
dfb03ba 1.822 0.442 2.641 1.234 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
d6b0a27 1.823 0.442 2.641 1.226 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
591ae1c 1.822 0.442 2.641 1.236 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300
11269ca 1.823 0.442 2.641 1.231 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300
7fbc1cb 1.823 0.442 2.641 1.233 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
0bac66c 1.823 0.442 2.641 1.223 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
0837330 1.822 0.442 2.641 1.231 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
ba0bece 1.823 0.442 2.641 1.231 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
db3923f 1.822 0.442 2.641 1.237 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: c936f3b

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
c936f3b 1.806 0.442 2.641 1.233 2.150 1.676 2.149 2.364 0.933 1.389 2.010 3.108 2.538 2.274 3.309

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
42b75a5 2.641 1.229 1.676 0.933 1.378 3.309
f9395f7 1.806 0.442 2.641 1.229 2.150 1.676 2.149 2.364 0.933 1.389 2.010 3.108 2.538 2.274 3.309
c1eb288 1.806 0.442 2.641 1.237 2.150 1.676 2.149 2.364 0.933 1.389 2.010 3.108 2.538 2.274 3.309
9d7a35d 1.822 0.442 2.641 1.228 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
fad7c42 1.823 0.442 2.641 1.228 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300
dfb03ba 1.822 0.442 2.641 1.234 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
d6b0a27 1.823 0.442 2.641 1.226 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300
591ae1c 1.822 0.442 2.641 1.236 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300
11269ca 1.823 0.442 2.641 1.231 2.158 1.676 2.144 2.364 0.940 1.389 1.972 3.112 2.538 2.272 3.300
7fbc1cb 1.823 0.442 2.641 1.233 2.158 1.676 2.144 2.364 0.940 1.378 1.972 3.112 2.538 2.272 3.300

@ngc7331 ngc7331 marked this pull request as ready for review March 11, 2025 10:42
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