-
Notifications
You must be signed in to change notification settings - Fork 909
[hw,ac_range_check,dv] Templify the DV code for ipgen generation #26537
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
base: master
Are you sure you want to change the base?
Conversation
martin-velay
left a comment
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.
If I follow the logic correctly, I think some names should also be templated.
Why do we need to give a different name to it? This is making the code hard to write as the tools to parse the code and help to code are lost.
hw/ip_templates/ac_range_check/dv/env/ac_range_check_env.core.tpl
Outdated
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/ac_range_check_env.sv.tpl
Outdated
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/ac_range_check_env.sv.tpl
Outdated
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_base_vseq.sv.tpl
Outdated
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/tests/ac_range_check_test.core.tpl
Outdated
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_base_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_base_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_base_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_base_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_common_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/ac_range_check_env.core.tpl
Outdated
Show resolved
Hide resolved
|
I think in DV we can get away with only unquifying the core files, the tb.sv (for the module instantiation) and the bind target (which uses the DUT name) as well as cases where packages from the RTL are used. Let me change that. |
eea55ea to
bb2ffda
Compare
|
@martin-velay I reworkd the templates. The only independent file where no templating is needed is |
|
Hi @Razer6! Is this PR still relevant? (Is there anything to extract or should it just be closed?) |
Yes it is. I am just about rebeasing. @davidschrammel is making some experiments internally. |
879906f to
3667050
Compare
|
@rswarbrick @martin-velay Can you please take a look? I properly templified the DV code now to deal with different module name instances. Code is tested downstream with different instances. |
rswarbrick
left a comment
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 looks sensible to me as an improvement. BUT it's a bit bonkers that we template most of this code! As a follow-up, I think it would probably be better to structure this like I did for racl_ctrl, where some non-templated DV code looks around at runtime to figure out what situation it is in.
That way, you only have to template a couple of files (tb.sv.tpl, for example) and everything else avoids getting duplicated.
|
Oh! But I notice that a test is failing in CI in a bound-in pwrmgr SVA interface. |
CI isn't actually passing (and I only noticed after approving the PR)
Looking into it. That one seems to be related to the clkmgr change (and is also failing on master). So not related to this one. |
martin-velay
left a comment
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 have some questions and remarks. But I guess nothing critical.
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_base_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_bypass_vseq.sv.tpl
Show resolved
Hide resolved
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_bypass_vseq.sv.tpl
Show resolved
Hide resolved
3667050 to
cff706b
Compare
hw/ip_templates/ac_range_check/dv/env/seq_lib/ac_range_check_lock_range_vseq.sv.tpl
Outdated
Show resolved
Hide resolved
I agree with this comment, the templatization is something we should keep at its minimum. Why don't we do something similar as Rupert did for |
I am very confused. Previously, in this comment, you suggested to templify every reference of ac_range_check? Furthermore, upon reviewing the code, you will notice that the current implementation is the minimum required for the current structure of the testbench code. In |
cff706b to
0dfa836
Compare
Actually, the approach that Rupert tried for racl_ctrl does not work. It uses module instance specifc types and packages in the common code. I opened #28648 to clean that up and make the code working with different module instance names. |
Signed-off-by: Robert Schilling <[email protected]>
0dfa836 to
98bd36f
Compare
|
If that is the case, can you give some more detail about why that doesn't work? Hopefully we can get things working without needing to check in multiple copies of the same file :-) |
Clearly not a discussion for this PR (so I'll shut up after this) but I really hope this is wrong. The whole point of the way I structured things was that the parameterisation can be done "at runtime" by the DV code. |
|
Let's continue the discussion in #28648 for that :) |
This PR templifies the core files and then creates template dependencies to the SV files. This is needed to render AC ranges with different names. Otherwise it comes to fusesoc errors due to collisions and naming requirements.