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

[tl_agent,dv] Disable covg_disable_cg for xcelium #24926

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

Razer6
Copy link
Member

@Razer6 Razer6 commented Oct 29, 2024

The code successfully removes the covg_disable_cg flag for xcelium.

However, the test still fails for xcelium with:

UVM_WARNING @ 0 ps: reporter [BDTYP] Cannot create a component of type 'tl_agent_base_test' because it is not registered with the factory.
                UVM_FATAL @ 0 ps: reporter [INVTST] Requested test from command line +UVM_TESTNAME=tl_agent_base_test not found.
                UVM_INFO /tools/eda/cadence/xcelium/23.09-s004/tools/methodology/UVM/CDNS-1.2/sv/src/base/uvm_report_catcher.svh(705) @ 0 ps: reporter [UVM/REPORT/CATCHER]
                --- UVM Report catcher Summary ---

@rswarbrick As an UVM expert, could you help me on that one?

@Razer6 Razer6 requested a review from a team as a code owner October 29, 2024 08:28
@Razer6 Razer6 requested review from marnovandermaas and rswarbrick and removed request for a team and marnovandermaas October 29, 2024 08:28
@Razer6 Razer6 added the Component:DV DV issue: testbench, test case, etc. label Oct 29, 2024
@rswarbrick
Copy link
Contributor

That's odd! Can you show me the command you're running? I've run something that worked just fine with VCS, but suspect you're doing something slightly different :-)

nix:rjs@sole:~/work/opentitan$ util/dvsim/dvsim.py hw/dv/sv/tl_agent/dv/tl_agent_sim_cfg.hjson -i smoke --tool=vcs
INFO: [FlowCfg] [results]: [tl_agent]:
## TL_AGENT Simulation Results
### Tuesday October 29 2024 09:57:24 UTC
### GitHub Revision: [`cf8184f355`](https://github.com/lowrisc/opentitan/tree/cf8184f3556866b3f21cba7cae53dcef7d0fcd88)
### Branch: tmp
### [Testplan](https://opentitan.org/book/hw/dv/sv/tl_agent/data/tl_agent_testplan.html)
### Simulator: VCS

### Test Results
|  Stage  |      Name      | Tests          |  Max Job Runtime  |  Simulated Time  |  Passing  |  Total  |  Pass Rate  |
|:-------:|:--------------:|:---------------|:-----------------:|:----------------:|:---------:|:-------:|:-----------:|
|         | Unmapped tests | tl_agent_smoke |      6.860s       |     37.124us     |     1     |    1    |  100.00 %   |
|         |                | **TOTAL**      |                   |                  |     1     |    1    |  100.00 %   |


INFO: [FlowCfg] [scratch_path]: [tl_agent] [/home/rjs/work/opentitan/scratch/tmp/tl_host_if-sim-vcs]

          [   legend    ]: [Q: queued, D: dispatched, P: passed, F: failed, K: killed, T: total]                                         
00:01:33  [    build    ]: [Q: 0, D: 0, P: 1, F: 0, K: 0, T: 1] 100%                                                                     
00:02:01  [     run     ]: [Q: 0, D: 0, P: 1, F: 0, K: 0, T: 1] 100%                                                                     

@Razer6
Copy link
Member Author

Razer6 commented Oct 29, 2024

Yes, with vcs it passes for me as well. I'm doing the same but with --tool=xcelium

@rswarbrick
Copy link
Contributor

Duh, sorry! You're right and I've managed to reproduce it. Figuring out the problem took me ages, but it's a 1-line fix! I wrote a commit but it doesn't really make sense without the work you've got here anyway, so maybe the best thing would be to fold the change into your commit?

[tl_agent,dv] Include tl_agent_test_pkg in tb.sv

This is needed to make sure that the `uvm_component_utils
initialisation stuff runs (registering tl_agent_base_test with the UVM
database) before we try to create a tl_agent_base_test instance
through that database.

Apparently, this already works with VCS (presumably because the
include ordering happens to be convenient), but it doesn't work
without the patch on Xcelium.

Signed-off-by: Rupert Swarbrick <[email protected]>

1 file changed, 1 insertion(+)
hw/dv/sv/tl_agent/dv/tb/tb.sv | 1 +

modified   hw/dv/sv/tl_agent/dv/tb/tb.sv
@@ -8,6 +8,7 @@ module tb;
   import dv_utils_pkg::*;
   import tl_agent_pkg::*;
   import tl_agent_env_pkg::*;
+  import tl_agent_test_pkg::*;
 
   // macro includes
   `include "uvm_macros.svh"

Xcelium does not support the cov_disable_cg flag. Create a
runmode that dynamically selects between different build flags
depending on the selected tool.

Explicitly include tl_agent_test_pkg.
This is needed to make sure that the `uvm_component_utils
initialisation stuff runs (registering tl_agent_base_test with the UVM
database) before we try to create a tl_agent_base_test instance
through that database.

Apparently, this already works with VCS (presumably because the
include ordering happens to be convenient), but it doesn't work
without the patch on Xcelium.

Co-authored-by: Rupert Swarbrick <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
@Razer6 Razer6 force-pushed the tl-agent-base-xcelium branch from cf8184f to d9866d3 Compare October 29, 2024 14:28
@Razer6
Copy link
Member Author

Razer6 commented Oct 30, 2024

@rswarbrick Thanks for the help, could you take another look?

Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

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

Sorry for the slow response. Looks good to me!

@rswarbrick rswarbrick merged commit 6581ef8 into lowRISC:master Oct 30, 2024
41 checks passed
@Razer6 Razer6 deleted the tl-agent-base-xcelium branch October 30, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants