Skip to content

add Python script used to analyze an ELF file to see instructions from ELF file#1345

Merged
rosethompson merged 6 commits intoopenhwgroup:mainfrom
stineje:main
Apr 8, 2025
Merged

add Python script used to analyze an ELF file to see instructions from ELF file#1345
rosethompson merged 6 commits intoopenhwgroup:mainfrom
stineje:main

Conversation

@stineje
Copy link
Member

@stineje stineje commented Apr 8, 2025

Wanted to create a script for use in my class to do a histogram on an ELF file. Seem to work well - ran on CoreMark:

Instruction usage in work/coremark.bare.riscv:

addi       3,097
lw         973
beq        867
sw         714
add        538
jal        499
lbu        329

…ed it for benchmarks to see which instructions are being utilized.
@davidharrishmc
Copy link
Contributor

Looks good. Can you make it pass the Lint above?

@jordancarlin
Copy link
Member

Good reminder that I should add the pre-commit hook for ruff to our flow so that it will automatically fix these simple things (or at least warn you that there are issues) when you commit.

@rosethompson
Copy link
Contributor

Can you also add the SPDX header?

@rosethompson rosethompson merged commit e43f41b into openhwgroup:main Apr 8, 2025
1 check passed
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.

4 participants