-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve naming of ILA data dumps #531
Conversation
Fixes the short name extraction of the ILA cell name to line up with the name, as it is set with Clash's `setName`.
465858d
to
d0fd448
Compare
d0fd448
to
3f78bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clarify the question of my comment.
set after_last [expr [string last "/" $cell_name] + 1] | ||
set ila_name_suffix [string range $cell_name $after_last end] | ||
set under_idx [expr [string first _ $ila_name_suffix] + 1] | ||
set short_name [string range $ila_name_suffix $under_idx end] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get how this matches with the examples of the PR description. As far as I understand these lines of code, they first drop all the prefix up till the last /
and then the prefix up till the first _
. But then
Bittide_Instances_Hitl_FullMeshSwCc_fullMeshSwCcTest_ilaWb58_result_22/ila_inst
would result in inst.csv
and not Instances_Hitl_FullMeshSwCc_fullMeshSwCcTest_ilaWb58_result_22.csv
, right?
I guess that I am just missing a bit here. Can you help me out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are completely right. This used to be present because of the example I gave here, but I don't see any ILA cell names with the structure {module-name}_{setName}/{module-name}_{setName}
which I explained there. I don't really understand why those aren't there anymore. But I will remove the commit where I change the Tcl, and only keep your initial commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither of our solutions work, specifically because of the 2 ILAs in processingElement
. Because they both get called the same name one will overwrite the data dump of the other...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand why those aren't there anymore.
It might have something to do with a code change which changed the way in which those functions end up being inlined somewhere or not. You can often prevent the prefix with a suitably placed OPAQUE
.
As Christiaan said here:
Normalization adds
prefixName X
when it inlines the functionX
. The idea was that you could track the provenance of a name, even after inlining.That’s why the naming mechanism does not ignore these
prefixName X
ticks. It allows you to distinguish two separatesetName Y
originating from two different inlined functions.
60bbd78
to
e813afb
Compare
e813afb
to
5753ae2
Compare
After a short discussion with @martijnbastiaan I've changed the way we extract a short name from the
|
4039ae8
to
5753ae2
Compare
Even after my changes explained in my previous comment the names of ILAs are unstable. My solution works for 3 out of the 4 instances with ILAs which run on staging. On the latest CI run the result was not what I expected for
Although this behaviour is still not what we want, I think it is an upgrade over what is happening on staging. So I think this PR could still be merged. If needed I can post a list of the ILA data dump file names before and after this PR. |
I'm in favor of PRs slightly improving the status quo btw. We don't have to go all the way for things to be useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like the way to go. It's a bit tough to see how hard / unexpected naming behaves in Clash though. This still needs to be paired with strategic {-# OPAQUE ... #-}
s right?
Also, is this now affected by clash-lang/clash-compiler#2722 or not @hiddemoll?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now.
Adding
I don't think our HITL infrastructure, where the names of certain VIO and ILA probes are hardcoded, was ever not dependent on that issue. |
Should be an option to turn this off IMO. Our TCL doesn't rely on this. |
@kleinreact proposed changing the way the Tcl inteprets an ILA name based on the cell-name in Vivado (see discussion on the closed PR #456 ). The goal is to get better file names for the ILA data dumps.
The
ilaWb
instances inprocessingElement
do not have proper naming, as thesetName
in the circuit notation seems to have no effect. See issue #530 .An example of the changes in file names for
fullMeshSwCcTest
:Cell names and ILA dump filenames on staging:
This branch: