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

feat(XSNoCDiffTop): wrap XSNoCTop with Difftest Interface #4089

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

Conversation

klin02
Copy link
Member

@klin02 klin02 commented Dec 25, 2024

build(Makefile): support PLDM_ARGS for make verilog

For PLDM_ARGS, we make it consistent with DEBUG_ARGS by default. User can set PLDM_ARGS in command line to extend it.
Examples as follows:

  1. By set PLDM_ARGS="--fpga-platform" and PLDM=1, we will disable
    XSLog(including PerfCounters) for both verilog and sim-verilog.
  2. By set PLDM_ARGS="--diffest-config ESBINP" and PLDM=1, we can
    accelerate Difftest in Palladium through some optimization feature.

feat(XSNoCDiffTop): wrap XSNoCTop with Difftest Interface

To apply Difftest framework for CHI NoC, we wrapper lazy XSNoCTop inside XSNoCDiffTop when difftest enabled, and expose necessary soc/core/difftest IOs.

Currently we use two-step flow for CHI-NoC-XS as follow:
Step1. Generate single-core XSNoCDiffTop with JsonProfile, which support generate another DifftestEndpoint seperately.
Step2. Generate n-core Difftest according to JsonProfile
Step3. Connect XS and Difftest manually or by some scripts.

As XSNoCDiffTop is only part of Difftest, we collect PerfCounters for each DiffTop, need control signals passed from Outer module. And to avoid potential connection problem, we add checker module and CI test.

An example usage:
make verilog PLDM=1 PLDM_ARGS=“--difftest-config H” CONFIG=XSNoCTopConfig

@klin02
Copy link
Member Author

klin02 commented Dec 25, 2024

May we can replace RELEASE_EXTRA_ARGS with better name. And add --enable-difftest to that by default

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: c572ac6

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
c572ac6 1.811 0.442 2.640 1.211 2.154 2.143 2.363 0.952 1.402 1.908 3.110 2.555 2.278 3.311

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
4863970 1.211 2.154 2.143 0.952 1.908 3.110 3.311
0a84afd
d33d62c
c559bb1

@klin02 klin02 requested a review from Tang-Haojin December 26, 2024 07:47
@klin02
Copy link
Member Author

klin02 commented Dec 27, 2024

May we can replace RELEASE_EXTRA_ARGS with better name. And add --enable-difftest to that by default

A better argName for "RELEASE_EXTRA_ARGS" is welcomed. It's just a demo name.
Maybe NOC_DIFF_ARGS ?

BTW, if Perf Counter is fully tested in Palladium and bring no speed loss. We may remove PLDM_ARGS latter to make it aligned with SIM_ARGS. Note current PLDM=1 only works for make sim-verilog.

@klin02 klin02 force-pushed the CHI-difftest branch 2 times, most recently from 45fb3df to 9b5a8d7 Compare December 27, 2024 10:08
@klin02
Copy link
Member Author

klin02 commented Dec 27, 2024

Mess of commit history. I will rebase it later.

@xiaokamikami xiaokamikami force-pushed the CHI-difftest branch 10 times, most recently from 56ac8e0 to 0883fed Compare December 30, 2024 06:28
@klin02 klin02 force-pushed the CHI-difftest branch 2 times, most recently from 00b8a0a to 6058443 Compare December 30, 2024 15:02
This change support switching TOPMAIN_ARGS from RELEASE_ARGS to
PLDM_ARGS by setting PLDM=1.

For PLDM_ARGS, we make it consistent with DEBUG_ARGS by default.
User can set PLDM_ARGS in command line to extend it.
Examples as follows:
1. By set PLDM_ARGS="--fpga-platform" and PLDM=1, we will disable
XSLog(including PerfCounters) for both verilog and sim-verilog.
2. By set PLDM_ARGS="--diffest-config ESBINP" and PLDM=1, we can
accelerate Difftest in Palladium through some optimization feature.
To apply Difftest framework for CHI NoC, we wrapper lazy XSNoCTop
inside XSNoCDiffTop when difftest enabled, and expose necessary
soc/core/difftest IOs.

Currently we use two-step flow for CHI-NoC-XS as follow:
Step1. Generate single-core XSNoCDiffTop with JsonProfile,
       which support generate another DifftestEndpoint seperately.
Step2. Generate n-core Difftest according to JsonProfile
Step3. Connect XS and Difftest manually or by some scripts.

As XSNoCDiffTop is only part of Difftest, we collect PerfCounters
for each DiffTop, need control signals passed from Outer module.
And to avoid potential connection problem, we add checker module
and CI test.

An example usage:
make verilog PLDM=1 CONFIG=XSNoCTopConfig
@klin02 klin02 changed the title feat(XSNoCDiffTop): wrapper XSNoCTop with Difftest Interface feat(XSNoCDiffTop): wrap XSNoCTop with Difftest Interface Dec 30, 2024
@klin02 klin02 force-pushed the CHI-difftest branch 4 times, most recently from 854b65b to 369b82a Compare January 2, 2025 03:34
@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: d5ed5b5

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
d5ed5b5 1.814 0.442 2.639 1.231 2.152 2.141 2.360 0.933 1.403 1.985 3.107 2.558 2.267 3.308

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
2f0227e 1.231 0.933 3.308
ca892e7 0.442 2.639 1.231 2.360 0.933 1.406 2.558 3.308
51aa1b6 1.814 0.442 2.639 1.231 2.152 2.141 2.360 0.933 1.403 1.985 3.107 2.558 2.267 3.308
ae39693 1.814 0.442 2.639 1.231 2.152 2.141 2.361 0.933 1.403 1.985 3.107 2.558 2.267 3.308

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