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

Fix ILA short name #456

Closed
wants to merge 1 commit into from
Closed

Fix ILA short name #456

wants to merge 1 commit into from

Conversation

kleinreact
Copy link
Contributor

Fixes the short name extraction of the ILA cell name to line up with the name, as it is set with Clash's setName.

@kleinreact kleinreact requested a review from hiddemoll January 24, 2024 15:26
@kleinreact kleinreact force-pushed the fix-ila-short-name branch 2 times, most recently from 048f9bb to c549d87 Compare January 24, 2024 16:56
Copy link
Contributor

@martijnbastiaan martijnbastiaan left a comment

Choose a reason for hiding this comment

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

I've done my drive-by review :-). I'll let @hiddemoll be the judge.

@kleinreact
Copy link
Contributor Author

Unfortunately, the resulting ILA cell names are still a bit unpredictable. fullMeshHwCC produces ilaPlot (set to that value with setName) and fullMeshHwCcTest165___VOID_TDECL_NOOP__ (auto-generated), but boardTestExtended produces boardTestExtended21_boardTestIla, although it is set to only to boardTestIla via setName.

I still think the given update is the correct the way it is, just naming probably has to be fixed/improved within Clash (cf. #2649).

@hiddemoll
Copy link
Contributor

hiddemoll commented Jan 25, 2024

Why would you still let Clash generate ILA names, instead of doing it with setName. I've tried that out locally for fullMeshHwCcTest and fullMeshSwCcTest, in both instances the ILAs get the cell name I expect.

ILA cell name in fullMeshSwCcTest without setName:
fullMeshSwCcTest196_Bittide_Instances_Hitl_FullMeshSwCc_fullMeshSwCcTest_fullMeshSwCcTest197_result_184/fullMeshSwCcTest196___VOID_TDECL_NOOP__
and with setName:
fullMeshSwCcTest196_fincFdecIla/fullMeshSwCcTest196_fincFdecIla

The cell_name for the ILA named ilaPlot is different though, it contains two slashes:
Bittide_Instances_Hitl_FullMeshSwCc_fullMeshSwCcTest_callistoClockControlWithIla_callistoResult/ilaPlot/ilaPlot
I don't understand why that ILA gets a cleaner name.

@kleinreact kleinreact force-pushed the fix-ila-short-name branch from 00ad372 to 850676e Compare April 5, 2024 03:55
@kleinreact
Copy link
Contributor Author

@hiddemoll Is there still any reason to keep this open or can we merge this PR?

Fixes the short name extraction of the ILA cell name to line up with
the name, as it is set with Clash's `setName`.
@kleinreact kleinreact force-pushed the fix-ila-short-name branch from 850676e to b962efc Compare April 5, 2024 05:44
Copy link
Contributor

@hiddemoll hiddemoll left a comment

Choose a reason for hiding this comment

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

We should give all ILAs a specific name in Clash with setName. If we don't, we get ILA cell names with the suffix ___VOID_TDECL_NOOP__.

These are the extracted $short_name in each instance (both fullMesh tests are pretty much identical). The old name is staging, the new name is your branch, the sug is my suggestion. All are after I added the setName for the ILA in fullMeshHwCcTest.

boardTestExtended:

cell: boardTestExtended21_boardTestIla/boardTestExtended21_boardTestIla
old : boardTestIla
new : boardTestExtended21_boardTestIla
sug : boardTestIla

fullMeshHwCcTest:

cell: Bittide_Instances_Hitl_FullMeshHwCc_fullMeshHwCcTest_callistoClockControlWithIla_callistoResult/ilaPlot/ilaPlot
old : Instances_Hitl_FullMeshHwCc_fullMeshHwCcTest_callistoClockControlWithIla_callistoResult
new : ilaPlot
sug : ilaPlot

cell: fullMeshHwCcTest69_fincFdecIla/fullMeshHwCcTest69_fincFdecIla
old : fincFdecIla
new : fullMeshHwCcTest69_fincFdecIla
sug : fincFdecIla

I can't suggest changes to files which you haven't altered, so I've created a new branch: shorter-ila-name. Do you agree on the new short_name which I suggest there?

@kleinreact
Copy link
Contributor Author

Alright. Then this all just originates from a wrong assumption on the behavior of cell names turning the whole PR obsolete. The only thing that probably should be updated is adding setName to the fincFdeIlas as you did on shorter-ila-name.

I'm still thinking about whether we should enforce the user to provide names for ILAs and VIOs via the API, as currently under discussion here: clash-lang/clash-compiler#2655.

@kleinreact kleinreact closed this Apr 7, 2024
@DigitalBrains1
Copy link
Contributor

If we don't, we get ILA cell names with the suffix ___VOID_TDECL_NOOP__.

A bug which will be fixed by clash-lang/clash-compiler#2662 once I get around to finishing it.

@hiddemoll
Copy link
Contributor

Alright. Then this all just originates from a wrong assumption on the behavior of cell names turning the whole PR obsolete. The only thing that probably should be updated is adding setName to the fincFdeIlas as you did on shorter-ila-name.

That's not all I changed on shorter-ila-name. I also changed how the TCL gets a short_name from the cell name, only a bit differently than you did. You can see that change in the ilaPlot ILA in fullMeshHwCcTest (see my comment above). The short_name for that ILA is definitely not correct on staging.

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