boards/nexys4ddr: ethernet support fix-up
authorGabriel L. Somlo <gsomlo@gmail.com>
Fri, 17 May 2019 14:06:12 +0000 (10:06 -0400)
committerGabriel L. Somlo <gsomlo@gmail.com>
Fri, 17 May 2019 14:06:12 +0000 (10:06 -0400)
Commit 5f6e7874 added ethernet support, let's now also expose it via
the "--with-ethernet" command line argument.

litex/boards/targets/nexys4ddr.py

index fa9c3c4927d72f50151fae1676d57860e5674f9c..2cb638f092f64abe9a9c5122eca707c394231eee 100755 (executable)
@@ -102,9 +102,12 @@ def main():
     parser = argparse.ArgumentParser(description="LiteX SoC on Nexys4DDR")
     builder_args(parser)
     soc_sdram_args(parser)
+    parser.add_argument("--with-ethernet", action="store_true",
+                        help="enable Ethernet support")
     args = parser.parse_args()
 
-    soc = BaseSoC(**soc_sdram_argdict(args))
+    cls = EthernetSoC if args.with_ethernet else BaseSoC
+    soc = cls(**soc_sdram_argdict(args))
     builder = Builder(soc, **builder_argdict(args))
     builder.build()