Skip to content

Unable to run Ascentlint #119

Closed
Closed

Description

@elliotb-lowrisc

This appears to be a regression relative to the version of dvsim still living in the OpenTitan repository.

In the OpenTitan repository with the OT nix shell loaded, when I attempt to run:

dvsim hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --select-cfg=aes --tool=ascentlint

I get the following output and error:

eb@eb-ThinkPad-T14-Gen-4:~/opentitan$ dvsim hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --select-cfg=aes --tool=ascentlint
[I 260323 10:34:49 run:840] [proj_root]: /home/eb/opentitan
[I 260323 10:34:49 one_shot:90] [scratch_path]: [aes] [/home/eb/opentitan/scratch/secded/aes-lint-ascentlint]
Traceback (most recent call last):
  File "/usr/bin/dvsim", line 10, in <module>
    sys.exit(main())
  File "/nix/store/p46ncq7pgjz9p81dha5krqsdvj03xbc9-opentitan-env/lib/python3.10/site-packages/dvsim/cli/run.py", line 906, in main
    cfg.create_deploy_objects()
  File "/nix/store/p46ncq7pgjz9p81dha5krqsdvj03xbc9-opentitan-env/lib/python3.10/site-packages/dvsim/flow/base.py", line 407, in create_deploy_objects
    item._create_deploy_objects()
  File "/nix/store/p46ncq7pgjz9p81dha5krqsdvj03xbc9-opentitan-env/lib/python3.10/site-packages/dvsim/flow/one_shot.py", line 144, in _create_deploy_objects
    item = CompileOneShot(build, self)
  File "/nix/store/p46ncq7pgjz9p81dha5krqsdvj03xbc9-opentitan-env/lib/python3.10/site-packages/dvsim/job/deploy.py", line 470, in __init__
    super().__init__(sim_cfg)
  File "/nix/store/p46ncq7pgjz9p81dha5krqsdvj03xbc9-opentitan-env/lib/python3.10/site-packages/dvsim/job/deploy.py", line 77, in __init__
    self._variant_suffix = f"_{self.sim_cfg.variant}" if self.sim_cfg.variant else ""
AttributeError: 'LintCfg' object has no attribute 'variant'

When I instead use util/dvsim/dvsim.py, it runs Ascentlint without issue.

Activity

  1. machshev commented on Mar 27, 2026

    @machshev
    Collaborator

    Thanks! When I run it now I get another error as well.

    This is due to the way inheritance is used in DVSim. The sim_cfg variable is misleading as it implies that only sim configs are used. Where in this case it's a LintCfg.

    We can fix this up fairly easily, but longer term we need to remove the inheritance to avoid unintended side effects like this.

    dvsim ~/base/opentitan/hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --select-cfg=aes --tool=ascentlint
    [I 260327 09:22:05 run:860] [proj_root]: /home/jamesm/base/opentitan
    [I 260327 09:22:05 one_shot:92] [scratch_path]: [aes] [/home/jamesm/base/opentitan/scratch/master/aes-lint-ascentlint]
    [C 260327 09:22:05 logging:108] Unhandled exception
    Traceback (most recent call last):
      File "/home/jamesm/base/dvsim/.venv/bin/dvsim", line 10, in <module>
        sys.exit(main())
                 ~~~~^^
      File "/home/jamesm/base/dvsim/src/dvsim/cli/run.py", line 950, in main
        results = cfg.deploy_objects()
      File "/home/jamesm/base/dvsim/src/dvsim/flow/base.py", line 423, in deploy_objects
        jobs = [d.get_job_spec() for d in deploy]
                ~~~~~~~~~~~~~~^^
      File "/home/jamesm/base/dvsim/src/dvsim/job/deploy.py", line 120, in get_job_spec
        commit=self.sim_cfg.commit,
               ^^^^^^^^^^^^^^^^^^^
    AttributeError: 'LintCfg' object has no attribute 'commit'
    Traceback (most recent call last):
      File "/home/jamesm/base/dvsim/.venv/bin/dvsim", line 10, in <module>
        sys.exit(main())
                 ~~~~^^
      File "/home/jamesm/base/dvsim/src/dvsim/cli/run.py", line 950, in main
        results = cfg.deploy_objects()
      File "/home/jamesm/base/dvsim/src/dvsim/flow/base.py", line 423, in deploy_objects
        jobs = [d.get_job_spec() for d in deploy]
                ~~~~~~~~~~~~~~^^
      File "/home/jamesm/base/dvsim/src/dvsim/job/deploy.py", line 120, in get_job_spec
        commit=self.sim_cfg.commit,
               ^^^^^^^^^^^^^^^^^^^
    AttributeError: 'LintCfg' object has no attribute 'commit'
    
  2. added theissue type on Apr 1, 2026
  3. AlexJones0 commented on Apr 1, 2026

    @AlexJones0
    Contributor

    See my comment here: #133 (comment), as that issue is now essentially a duplicate of the new error James is reporting in this issue.

    I agree that a longer term fix is very necessary to prevent future breakages like this, but the easy fix is available in a PR here: #139

    I can't run the lint locally at the moment to verify it works, but I at least don't get any errors and I'm getting through to the scheduler, so hopefully that should fix this issue as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions