File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 22"""Run slang on a file list via pyslang's Driver API and emit a JSON diagnostic file."""
33
44import sys
5- import pyslang
5+
6+ from pyslang import CommandLineOptions , Driver
67
78
89def main ():
@@ -12,13 +13,23 @@ def main():
1213
1314 flist , output_json = sys .argv [1 ], sys .argv [2 ]
1415
15- driver = pyslang .driver .Driver ()
16- driver .parseCommandLine (
17- f"-f { flist } "
16+ driver = Driver ()
17+ driver .addStandardArgs ()
18+
19+ args = (
20+ f"{ sys .argv [0 ]} "
21+ f" -f { flist } "
1822 f" --top axi_lint_top"
1923 f" --error-limit 0"
2024 f" --diag-json { output_json } "
2125 )
26+ if not driver .parseCommandLine (args , CommandLineOptions ()):
27+ sys .exit (1 )
28+
29+ if not driver .processOptions ():
30+ sys .exit (1 )
31+
32+ driver .parseAllSources ()
2233 driver .runFullCompilation ()
2334 # Exit 0 regardless of compile errors so the CI step continues
2435 # and reviewdog can annotate the diagnostics.
Original file line number Diff line number Diff line change @@ -138,3 +138,7 @@ sources:
138138 - test/tb_axi_to_axi_lite.sv
139139 - test/tb_axi_to_mem_banked.sv
140140 - test/tb_axi_xbar.sv
141+
142+ - target : lint
143+ files :
144+ - lint/lint_top.sv
You can’t perform that action at this time.
0 commit comments