Typos and style fixes. NFC.
authorwhitequark <cz@m-labs.hk>
Wed, 5 Jun 2019 02:48:41 +0000 (02:48 +0000)
committerwhitequark <cz@m-labs.hk>
Wed, 5 Jun 2019 02:48:41 +0000 (02:48 +0000)
nmigen/build/plat.py
nmigen/vendor/lattice_ice40.py

index 6098b2a61f19311bc851bfd97cd2a2320fb40f85..43f0472441fa0a5b3edd750f2ddd3b087d9a35ff 100644 (file)
@@ -195,7 +195,7 @@ class TemplatedPlatform(Platform):
 
     def toolchain_prepare(self, fragment, name, **kwargs):
         # This notice serves a dual purpose: to explain that the file is autogenerated,
-        # and to incorporate
+        # and to incorporate the nMigen version into generated code.
         autogenerated = "Automatically generated by nMigen {}. Do not edit.".format(__version__)
 
         def emit_design(backend):
index 5b4d7aa0d691b21def5ff81da5d0bf1ceea05612..bb539ef2ee67377d116ae3607044f9a8e1efc063 100644 (file)
@@ -16,7 +16,7 @@ class LatticeICE40Platform(TemplatedPlatform):
 
     Available overrides:
         * ``verbose``: enables logging of informational messages to standard error.
-        * ``read_opts``: adds options for ``read`` Yosys command.
+        * ``read_verilog_opts``: adds options for ``read_verilog`` Yosys command.
         * ``synth_opts``: adds options for ``synth_ice40`` Yosys command.
         * ``script_after_read``: inserts commands after ``read_ilang`` in Yosys script.
         * ``script_after_synth``: inserts commands after ``synth_ice40`` in Yosys script.
@@ -76,9 +76,9 @@ class LatticeICE40Platform(TemplatedPlatform):
         """,
         "{{name}}_pre_pack.py": r"""
             # {{autogenerated}}
-            {% for port, frequency in platform.iter_clock_constraints() -%}
+            {% for port_name, frequency in platform.iter_clock_constraints() -%}
             {# Clock in MHz #}
-            ctx.addClock("{{port}}", {{frequency/1000000}})
+            ctx.addClock("{{port_name}}", {{frequency/1000000}})
             {% endfor%}
         """,
     }
@@ -92,9 +92,9 @@ class LatticeICE40Platform(TemplatedPlatform):
         """,
         r"""
         {{get_tool("nextpnr-ice40")}}
-            {{quiet("-q")}}
+            {{quiet("--quiet")}}
             {{get_override("nextpnr_opts")|default(["--placer","heap"])|join(" ")}}
-            -l {{name}}.tim
+            --log {{name}}.tim
             {{platform._nextpnr_device_options[platform.device]}}
             --package {{platform.package|lower}}
             --json {{name}}.json