[icestorm] 12/75: Bugfix in icebox_vlog -s

Ruben Undheim rubund-guest at moszumanska.debian.org
Wed Oct 7 15:52:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to branch master
in repository icestorm.

commit 828291051abd97536ef7204abfb634ac797d11a2
Author: Clifford Wolf <clifford at clifford.at>
Date:   Tue Jul 21 17:24:24 2015 +0200

    Bugfix in icebox_vlog -s
---
 icebox/icebox_vlog.py | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/icebox/icebox_vlog.py b/icebox/icebox_vlog.py
index 05a8197..11207f9 100755
--- a/icebox/icebox_vlog.py
+++ b/icebox/icebox_vlog.py
@@ -817,22 +817,30 @@ print("module %s (%s);\n" % (modname, ", ".join(text_ports)))
 
 new_text_wires = list()
 new_text_regs = list()
+new_text_raw = list()
 for line in text_wires:
     match = re.match(r"wire ([^ ;]+)(.*)", line)
+    if match:
+        if strip_comments:
+            if match.group(1) in wire_to_reg:
+                new_text_regs.append(match.group(1))
+            else:
+                new_text_wires.append(match.group(1))
+            continue
+        else:
+            if match.group(1) in wire_to_reg:
+                line = "reg " + match.group(1) + " = 0" + match.group(2)
     if strip_comments:
-        if match and match.group(1) in wire_to_reg:
-            new_text_regs.append(match.group(1))
-        elif match:
-            new_text_wires.append(match.group(1))
+        new_text_raw.append(line)
     else:
-        if match and match.group(1) in wire_to_reg:
-            line = "reg " + match.group(1) + " = 0" + match.group(2)
         print(line)
 for names in [new_text_wires[x:x+10] for x in range(0, len(new_text_wires), 10)]:
     print("wire %s;" % ", ".join(names))
 for names in [new_text_regs[x:x+10] for x in range(0, len(new_text_regs), 10)]:
     print("reg %s = 0;" % " = 0, ".join(names))
 if strip_comments:
+    for line in new_text_raw:
+        print(line)
     print()
 
 for line in text_func:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/icestorm.git



More information about the debian-science-commits mailing list