Skip to content

chore: add the version info to the simulation print output#4626

Merged
Tang-Haojin merged 1 commit intomasterfrom
printcommit
Apr 29, 2025
Merged

chore: add the version info to the simulation print output#4626
Tang-Haojin merged 1 commit intomasterfrom
printcommit

Conversation

@NewPaulWalker
Copy link
Copy Markdown
Contributor

This allows the Git commit SHA and dirty status to be known directly from the simulation output.

It helps in scenarios such as responding to issues in the XiangShan repository, where the version used can be identified directly from the provided log file.

NewPaulWalker added a commit to OpenXiangShan/difftest that referenced this pull request Apr 25, 2025
First, this does not introduce any functional changes.

Second, the reason for this modification is that with the
introduction of OpenXiangShan/XiangShan#4626,
the simulation output includes some less elegant messages:

Using simulated 32768B flash
Core  0's Commit SHA is: 6683fc49ec, dirty: 1
Using simulated 8386560MB RAM

This change makes the output look better.
Copy link
Copy Markdown
Member

@Tang-Haojin Tang-Haojin left a comment

Choose a reason for hiding this comment

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

You can parameterize shaWidth and hartIdlen in PrintCommitIDModule.

@XiangShanRobot
Copy link
Copy Markdown

[Generated by IPC robot]
commit: 36d3afa

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
36d3afa 1.823 0.442 2.643 1.232 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
a833aaf 1.235 1.679 0.938 3.110 3.314
98b165a 1.823 0.442 2.643 1.228 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
ee92d6f 1.821 0.442 2.643 1.234 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
6683fc4 1.821 0.442 2.643 1.222 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
00c6a8a 1.821 0.442 2.643 1.231 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
53bd4e1 1.821 0.442 2.643 1.231 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
1191982 1.823 0.442 2.643 1.233 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
d011b69 1.821 0.442 2.643 1.228 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
862747d 1.821 0.442 2.643 1.235 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
9833977 1.821 0.442 2.643 1.228 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314

This allows the Git commit SHA and dirty status to be known
directly from the simulation output.

It helps in scenarios such as responding to issues in the
XiangShan repository, where the version used can be identified
directly from the provided log file.
@XiangShanRobot
Copy link
Copy Markdown

[Generated by IPC robot]
commit: fc090c9

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
fc090c9 1.823 0.442 2.643 1.225 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314

master branch:

commit astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk
02734d5 0.442 2.643 1.679 2.362 1.376 2.540
4bbdccb 1.823 0.442 2.643 1.239 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
47c9480 1.821 0.442 2.643 1.234 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
9e1d4bb 1.821 0.442 2.643 1.234 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
4c2188a 1.823 0.442 2.643 1.224 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314
e6d8485 1.821 0.442 2.643 1.234 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
b5c2f4c 1.821 0.442 2.643 1.225 2.152 1.679 2.139 2.362 0.938 1.400 2.012 3.110 2.540 2.271 3.314
9680387 1.823 0.442 2.643 1.237 2.152 1.679 2.139 2.362 0.938 1.376 2.012 3.110 2.540 2.271 3.314

@NewPaulWalker NewPaulWalker marked this pull request as ready for review April 29, 2025 07:15
@Tang-Haojin Tang-Haojin merged commit e4651c4 into master Apr 29, 2025
10 checks passed
@Tang-Haojin Tang-Haojin deleted the printcommit branch April 29, 2025 07:21
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