Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ ignore = [
"EM101", # String literals in exception
]

[tool.ruff.lint.flake8-copyright]
# Our headers carry no year, which ruff's default notice-rgx requires.
notice-rgx = "(?i)Copyright lowRISC contributors"

[tool.ruff.lint.per-file-ignores]
# Top-level CLIs should be allowed to print if needed
"src/dvsim/cli/**.py" = ["T201"]
Expand Down
4 changes: 4 additions & 0 deletions ruff-ci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ ignore = [
"UP031",
]

[lint.flake8-copyright]
# Our headers carry no year, which ruff's default notice-rgx requires.
notice-rgx = "(?i)Copyright lowRISC contributors"

[lint.per-file-ignores]
# Less strict in the tests
"tests/**.py" = [
Expand Down
4 changes: 2 additions & 2 deletions src/dvsim/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"""

import argparse
import datetime
import datetime as dt
import os
import random
import shlex
Expand Down Expand Up @@ -1064,7 +1064,7 @@ def main(argv: list[str] | None = None) -> None:
args.cfg = os.path.join(proj_root, cfg_path)

# Add timestamp to args that all downstream objects can use.
curr_ts = datetime.datetime.now(datetime.timezone.utc)
curr_ts = dt.datetime.now(dt.timezone.utc)
args.timestamp_long = curr_ts.strftime(TS_FORMAT_LONG)
args.timestamp = curr_ts.strftime(TS_FORMAT)

Expand Down
4 changes: 2 additions & 2 deletions src/dvsim/launcher/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"""Launcher abstract base class."""

import datetime
import datetime as dt
import os
import re
import sys
Expand Down Expand Up @@ -233,7 +233,7 @@ def _pre_launch(self) -> None:
"""
self.job_spec.pre_launch()
self._make_odir()
self.start_time = datetime.datetime.now()
self.start_time = dt.datetime.now()

@abstractmethod
def _do_launch(self) -> None:
Expand Down
6 changes: 3 additions & 3 deletions src/dvsim/launcher/nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"""Altair nc job launcher."""

import datetime
import datetime as dt
import os
import pathlib
import subprocess
Expand Down Expand Up @@ -164,7 +164,7 @@ def _do_launch(self) -> None:
self._close_process()

def minutes_since_start(self):
return (datetime.datetime.now() - self.start_time).total_seconds() / 60
return (dt.datetime.now() - self.start_time).total_seconds() / 60

def poll(self) -> JobStatus:
"""Check status of the running process.
Expand Down Expand Up @@ -194,7 +194,7 @@ def poll(self) -> JobStatus:
# If the job log size is more than the threshold,
# declare the job to have started running
# capture the run start time
self.start_time = datetime.datetime.now()
self.start_time = dt.datetime.now()
self.nc_job_state = "running"

if self.nc_job_state == "waiting": # noqa: SIM102
Expand Down
22 changes: 12 additions & 10 deletions src/dvsim/tool/meridianrdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,18 @@ def main() -> None:
# #39491: parameter in package
(
"flow_warning",
r"^ "
r"(?!WARN \[#25010\])"
r"(?!WARN \[#25011\])"
r"(?!WARN \[#25012\])"
r"(?!WARN \[#25013\])"
r"(?!WARN \[#26038\])"
r"(?!WARN \[#39035\])"
r"(?!WARN \[#39122\])"
r"(?!WARN \[#39491\])"
r"WARN .*",
(
r"^ "
r"(?!WARN \[#25010\])"
r"(?!WARN \[#25011\])"
r"(?!WARN \[#25012\])"
r"(?!WARN \[#25013\])"
r"(?!WARN \[#26038\])"
r"(?!WARN \[#39035\])"
r"(?!WARN \[#39122\])"
r"(?!WARN \[#39491\])"
r"WARN .*"
),
),
("flow_info", r"^ INFO .*"),
],
Expand Down
8 changes: 5 additions & 3 deletions src/dvsim/tool/verilator.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ def main() -> None:
# TODO(#10071) remove countermeasure waiver.
(
"flow_warning",
r"^(?!WARNING: Unknown item formal in section Target)"
r"(?!WARNING: Countermeasure.*)"
r"WARNING: .*",
(
r"^(?!WARNING: Unknown item formal in section Target)"
r"(?!WARNING: Countermeasure.*)"
r"WARNING: .*"
),
),
("flow_warning", r"^.*Warning: .* "),
("flow_warning", r"^W .*"),
Expand Down
50 changes: 27 additions & 23 deletions tests/job/test_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,33 +120,37 @@ class TestCompileSim:
(
{"dry_run": True},
{},
"make -f path/to/makefile build "
"-n "
"build_cmd=path/to/build_name/build_cmd "
"build_dir=build/dir "
"build_opts='-b path/here -a \"Quoted\"' "
"post_build_cmds='C && D' "
"post_build_opts=E "
"pre_build_cmds='A && B' "
"proj_root=/project "
"sv_flist_gen_cmd=gen_cmd "
"sv_flist_gen_dir=path/to/gen "
"sv_flist_gen_opts=''",
(
"make -f path/to/makefile build "
"-n "
"build_cmd=path/to/build_name/build_cmd "
"build_dir=build/dir "
"build_opts='-b path/here -a \"Quoted\"' "
"post_build_cmds='C && D' "
"post_build_opts=E "
"pre_build_cmds='A && B' "
"proj_root=/project "
"sv_flist_gen_cmd=gen_cmd "
"sv_flist_gen_dir=path/to/gen "
"sv_flist_gen_opts=''"
),
),
(
{"dry_run": False},
{},
"make -f path/to/makefile build "
"build_cmd=path/to/build_name/build_cmd "
"build_dir=build/dir "
"build_opts='-b path/here -a \"Quoted\"' "
"post_build_cmds='C && D' "
"post_build_opts=E "
"pre_build_cmds='A && B' "
"proj_root=/project "
"sv_flist_gen_cmd=gen_cmd "
"sv_flist_gen_dir=path/to/gen "
"sv_flist_gen_opts=''",
(
"make -f path/to/makefile build "
"build_cmd=path/to/build_name/build_cmd "
"build_dir=build/dir "
"build_opts='-b path/here -a \"Quoted\"' "
"post_build_cmds='C && D' "
"post_build_opts=E "
"pre_build_cmds='A && B' "
"proj_root=/project "
"sv_flist_gen_cmd=gen_cmd "
"sv_flist_gen_dir=path/to/gen "
"sv_flist_gen_opts=''"
),
),
],
)
Expand Down
42 changes: 21 additions & 21 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading