utils/litex_read_verilog: fix generated indent on instance
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 22 Nov 2018 16:33:46 +0000 (17:33 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 22 Nov 2018 16:33:46 +0000 (17:33 +0100)
litex/utils/litex_read_verilog.py

index b939d2f658b42921e0b4582a72e6b46b2bebd52a..972d21539dafc764789df1e8da984ecc176518ed 100755 (executable)
@@ -38,17 +38,17 @@ def main():
             length = "" if len(info["bits"]) == 1 else len(info["bits"])
             migen_def.append(" " * 8 + "self.{} = Signal({})".format(name, length))
         migen_def.append("")
-        migen_def.append(" "*4 + "# # #")
+        migen_def.append(" "*8 + "# # #")
         migen_def.append("")
-        migen_def.append(" "*4 + "self.specials += Instance(\"{}\",".format(module))
+        migen_def.append(" "*8 + "self.specials += Instance(\"{}\",".format(module))
         for name, info in j["modules"][module]["ports"].items():
             io_prefix = {
                 "input": "i",
                 "output": "o",
                 "inout": "io"
             }[info["direction"]]
-            migen_def.append(" "*8 + "{}_{}=self.{},".format(io_prefix, name, name))
-        migen_def.append(" "*4 + ")")
+            migen_def.append(" "*12 + "{}_{}=self.{},".format(io_prefix, name, name))
+        migen_def.append(" "*8 + ")")
         migen_def.append("")
         print("\n".join(migen_def))