From: Dmitry Selyutin Date: Tue, 30 Nov 2021 13:41:19 +0000 (+0000) Subject: sv_analysis: fix single-line binutils comments X-Git-Tag: sv_maxu_works-initial~685 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c92136f93ba1c3cdad026b4fc74abb7b0a272b6a;p=openpower-isa.git sv_analysis: fix single-line binutils comments --- diff --git a/src/openpower/sv/sv_analysis.py b/src/openpower/sv/sv_analysis.py index edd4b9d6..013ba8ab 100644 --- a/src/openpower/sv/sv_analysis.py +++ b/src/openpower/sv/sv_analysis.py @@ -181,9 +181,13 @@ class Format(enum.Enum): def wrap_comment(self, lines): def wrap_comment_binutils(lines): - yield "/*" - yield from map(lambda line: f" * {line}", lines) - yield "*/" + lines = tuple(lines) + if len(lines) == 1: + yield f"/* {lines[0]} */" + else: + yield "/*" + yield from map(lambda line: f" * {line}", lines) + yield " */" def wrap_comment_vhdl(lines): yield from map(lambda line: f"-- {line}", lines)