From 5767dfcb6c80bda5577fc8dbdcffd6c4e4cfa689 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Tue, 11 Feb 2020 19:20:48 +0100 Subject: [PATCH] Honour --output-dir argument in generator --- liteeth/gen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/liteeth/gen.py b/liteeth/gen.py index 7a9af3b..ab9d296 100644 --- a/liteeth/gen.py +++ b/liteeth/gen.py @@ -20,6 +20,7 @@ TODO: identify limitations """ import argparse +import os from migen import * @@ -277,6 +278,7 @@ def main(): parser = argparse.ArgumentParser(description="LiteEth standalone core generator") builder_args(parser) soc_core_args(parser) + parser.set_defaults(output_dir="build") parser.add_argument("--phy", default="mii", help="Ethernet PHY(mii/rmii/gmii/rgmii)") parser.add_argument("--core", default="wishbone", help="Ethernet Core(wishbone/udp)") parser.add_argument("--endianness", default="big", choices=("big", "little"), help="Wishbone endianness") @@ -293,7 +295,7 @@ def main(): port = 6000) else: raise ValueError - builder = Builder(soc, output_dir="build", compile_gateware=False, csr_csv="build/csr.csv") + builder = Builder(soc, output_dir=args.output_dir, compile_gateware=False, csr_csv=os.path.join(args.output_dir, "csr.csv")) builder.build(build_name="liteeth_core") if __name__ == "__main__":