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

power(SC): dynamically close SC #4180

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

Conversation

Lawrence-ID
Copy link
Collaborator

@Lawrence-ID Lawrence-ID commented Jan 16, 2025

  • SC is open by default and can be dynamically closed by setting DynCloseSC to true.

  • SC closure is controlled by the value of scCloseConfCounter.
    When scCloseConfCounter >= 0, SC is closed. When it is less than 0, SC is enabled.

  • To avoid affecting timing, the update of the scCloseConfCounter is placed on the next
    clock cycle after SC update

  • The counter is adjusted based on the list for Agree and Disagree scenarios.

  • Agree Scenarios ( When SC opened ):

  • When TAGE and SC pred both taken (√) and the actual condition is also taken (√),
    SC performs "Negative action No.3" and scCloseConf will be increased by
    +x1(SCCloseConfIncWhenSCAgreeAndCorrect).
  • When TAGE and SC pred both taken (√) but the actual condition is not taken (×),
    SC performs "Negative action No.2" and scCloseConf will be increased by
    +x2(SCCloseConfIncWhenSCAgreeButWrong).
  • When neither TAGE nor SC pred taken (×) but the actual condition is taken (√),
    SC performs "Negative action No.2" and scCloseConf will be increased by
    +x2(SCCloseConfIncWhenSCAgreeButWrong).
  • When neither TAGE nor SC pred taken (×) and the actual condition is not taken (×),
    SC performs "Negative action No.3" and scCloseConf will be increased by
    +x1(SCCloseConfIncWhenSCAgreeAndCorrect).
  • Disagree Scenarios ( When SC opened ):
  • When TAGE pred taken (√) and SC is not taken (×), but the actual condition is taken (√),
    SC performs "Negative action No.1" and scCloseConf will be increased by
    +x3(SCCloseConfIncWhenSCDisagreeButTAGECorrect).
  • When TAGE pred taken (√) and SC is not taken (×), and the actual condition is not taken (×),
    SC performs "Positive action No.1" and scCloseConf will be decreased by
    -y(SCCloseConfDecWhenSCDisagreeAndSCCorrect).
  • When TAGE pred not taken (×) but SC is taken (√), and the actual condition is taken (√),
    SC performs "Positive action No.1" and scCloseConf will be decreased by
    -y(SCCloseConfDecWhenSCDisagreeAndSCCorrect).
  • When TAGE pred not taken (×) but SC is taken (√), and the actual condition is not taken (×),
    SC performs "Negative action No.1" and scCloseConf will be increased by
    +x3(SCCloseConfIncWhenSCDisagreeButTAGECorrect).
  • When SC Closed:
  • If TAGE pred wrong, SC should be opened, so scCloseConf will be
    increased by SCCloseConfIncWhenSCClosedAndTAGEWrong
  • If TAGE pred correct, SC can be closed, so scCloseConf will be
    decreased by SCCloseConfDecWhenSCClosedAndTAGEWrong
{1F2C68E6-C46A-4C0B-B747-ED8F3C697702} 1737004278808

@Lawrence-ID Lawrence-ID requested a review from Gao-Zeyu January 16, 2025 05:30
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: e430d9a

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
e430d9a 1.810 0.442 2.645 1.225 2.151 2.148 2.363 0.941 1.406 1.939 3.098 2.554 2.271 3.311

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
25a80bc 1.819 0.442 2.636 1.226 2.143 2.140 2.361 0.939 1.408 1.984 3.113 2.565 2.271 3.303
bcdee82 0.442 2.639 1.230 2.145 2.361 0.939 1.401 1.931 3.107 2.559 3.308
b7a6349 1.823 0.442 2.640 1.233 2.159 2.145 2.361 0.939 1.401 1.931 3.107 2.559 2.272 3.308
e9cac66 1.823 0.442 2.639 1.220 2.159 2.145 2.361 0.939 1.401 1.931 3.107 2.559 2.272 3.308
0b4afd3 1.823 0.442 2.639 1.225 2.159 2.145 2.361 0.939 1.405 1.931 3.107 2.559 2.272 3.308
0836852 1.823 0.442 2.639 1.237 2.159 2.145 2.361 0.939 1.405 1.931 3.107 2.559 2.272 3.308
5bd65c5 1.823 0.442 2.639 1.223 2.159 2.145 2.361 0.939 1.401 1.931 3.107 2.559 2.272 3.308
28bf033 1.823 0.442 2.639 1.223 2.159 2.145 2.361 0.939 1.407 1.931 3.107 2.556 2.272 3.308
63e777d 1.823 0.442 2.640 1.222 2.159 2.145 2.361 0.939 1.407 1.931 3.107 2.556 2.272 3.308
37f33e1 1.823 0.442 2.639 1.230 2.159 2.145 2.361 0.939 1.400 1.931 3.107 2.556 2.272 3.308

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 71b1dcf

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
71b1dcf 1.819 0.442 2.636 1.229 2.143 2.140 2.361 0.939 1.401 1.984 3.113 2.565 2.271 3.303

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
ebd53cd 2.636 1.223 2.143 1.501 2.140 2.361 0.939 1.401 1.984 3.113 2.565 3.303
8026b5a 1.819 0.442 2.636 1.234 2.143 1.501 2.140 2.361 0.939 1.405 1.984 3.113 2.565 2.271 3.303
a57c953 1.223 2.143 1.501 2.140 0.939 1.984 3.113 3.303
517c737 1.819 0.442 2.636 1.232 2.143 1.501 2.140 2.361 0.939 1.401 1.984 3.113 2.565 2.271 3.303
800b4e0 1.819 0.442 2.636 1.240 2.143 2.140 2.361 0.939 1.405 1.984 3.113 2.565 2.271 3.303
e836c77 1.819 0.442 2.636 1.230 2.143 2.140 2.361 0.939 1.408 1.984 3.113 2.565 2.271 3.303
25a80bc 1.819 0.442 2.636 1.226 2.143 2.140 2.361 0.939 1.408 1.984 3.113 2.565 2.271 3.303
bcdee82 1.823 0.442 2.639 1.230 2.159 2.145 2.361 0.939 1.401 1.931 3.107 2.559 2.272 3.308
b7a6349 1.823 0.442 2.640 1.233 2.159 2.145 2.361 0.939 1.401 1.931 3.107 2.559 2.272 3.308

Copy link
Member

@eastonman eastonman left a comment

Choose a reason for hiding this comment

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

LGTM

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