Skip to content

[util] FPGA resource utilisation reporting + visualiser utility - #691

Open
thomas6785 wants to merge 1 commit into
lowRISC:mainfrom
thomas6785:utilisation_reporting
Open

[util] FPGA resource utilisation reporting + visualiser utility#691
thomas6785 wants to merge 1 commit into
lowRISC:mainfrom
thomas6785:utilisation_reporting

Conversation

@thomas6785

Copy link
Copy Markdown

This PR provides utility scripts (TCL, Python, and bash) for generating FPGA resource utilisation.
Resource utilisation is not currently constrained but could be in future - it is also a useful proxy for what is costing build time, and generally useful for building an intuitive view of the design.

TCL generates a text report which is quite difficult to read. I have a Python script to parse this and generate sunburst charts like the below:
image
(You can click on a wedge in this diagram to zoom in and see its children in more detail)

I found this utility handy as a way of intuitively understanding the resource cost of certain blocks

Some notes

  • This introduces Numpy and Plotly to the Python environment. These are both very popular and widely supported, but they are also quite "heavyweight" which may or may not be justified
  • The bash script is a little fragile as it needs to be run from the repository root due to relative file paths. I'm not sure of a universally supported way of avoiding this problem
  • Currently only generates sunbursts plots but many other visualisations are possible and potentially useful
  • Currently only analyses resource utilisation but this flow (open project -> run TCL script -> post process in Python) is plausibly very useful for reporting CDC, DRCs, power, timing results, and maybe even bus latency or other performance criteria
  • I would love to see a colour-coded diagram showing the physical implementation on FPGA regions. You can view this in the Vivado GUI but there is no mechanism for exporting as far as I know
  • Only reports on the current build - would be nice to get a plot showing change over time to identify any changes that may otherwise go unnoticed
  • This would be best implemented as a FuseSoC hook, but the docs on using those are currently three words: "TODO document hooks"

I most likely won't have time to address these issues/ideas as it is my last week with lowRISC, but documenting them here in case anybody finds them useful.

@thomas6785
thomas6785 force-pushed the utilisation_reporting branch 2 times, most recently from 6563239 to 6c8db26 Compare July 27, 2026 16:27

@marnovandermaas marnovandermaas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Some minor comments from my end. Any reason why this is still marked as draft? I would be happy to get this into the repository.

Comment thread util/utilisation_reporting/report_utilisation.sh Outdated
Comment thread util/utilisation_reporting/sunburst.py
Comment thread util/utilisation_reporting/sunbursts.py Outdated
Comment thread util/utilisation_reporting/sunbursts.py Outdated
Comment thread util/utilisation_reporting/parse_report.py Outdated
Comment thread util/utilisation_reporting/parse_report.py Outdated
Comment thread util/utilisation_reporting/sunbursts.py Outdated
@thomas6785
thomas6785 force-pushed the utilisation_reporting branch from 6c8db26 to b3182d1 Compare July 28, 2026 15:06
@thomas6785
thomas6785 marked this pull request as ready for review July 28, 2026 15:07
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