From: Jacob Lifshay Date: Thu, 2 Dec 2021 00:49:51 +0000 (-0800) Subject: fix sv_analysis command, cuz script created by setup.py passes no parameters to function X-Git-Tag: sv_maxu_works-initial~677 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=baa7b53de54912d29a75dfd2630a4d4a597a1ac6;p=openpower-isa.git fix sv_analysis command, cuz script created by setup.py passes no parameters to function --- diff --git a/setup.py b/setup.py index 8220279c..2f505dbf 100644 --- a/setup.py +++ b/setup.py @@ -60,7 +60,7 @@ setup( 'console_scripts': [ 'pywriter=openpower.decoder.pseudo.pywriter:pywriter', 'pyfnwriter=openpower.decoder.pseudo.pyfnwriter:pyfnwriter', - 'sv_analysis=openpower.sv.sv_analysis:process_csvs', + 'sv_analysis=openpower.sv.sv_analysis:main', 'pypowersim=openpower.decoder.isa.pypowersim:run_simulation', 'pysvp64asm=openpower.sv.trans.svp64:asm_process' ] diff --git a/src/openpower/sv/sv_analysis.py b/src/openpower/sv/sv_analysis.py index f0a6601d..b14be43f 100644 --- a/src/openpower/sv/sv_analysis.py +++ b/src/openpower/sv/sv_analysis.py @@ -817,10 +817,16 @@ def output(format, svt, csvcols, insns, csvs_svp64, stream): stream.write(f"{line}\n") -if __name__ == '__main__': +def main(): parser = argparse.ArgumentParser() parser.add_argument("-f", "--format", type=Format, choices=Format, default=Format.VHDL, help="format to be used (binutils or VHDL)") args = parser.parse_args() process_csvs(args.format) + + +if __name__ == '__main__': + # don't do anything other than call main() here, cuz this code is bypassed + # by the sv_analysis command created by setup.py + main()