From: Luke Kenneth Casson Leighton Date: Tue, 1 Feb 2022 11:44:36 +0000 (+0000) Subject: add yosys-nowidelut command-option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb342ecdeb3f5cf5b99dfda8ca8c40e6f420f027;p=libresoc-litex.git add yosys-nowidelut command-option --- diff --git a/README.txt b/README.txt index 56adddf..3d008eb 100644 --- a/README.txt +++ b/README.txt @@ -11,5 +11,5 @@ terminal 2: openocd -f openocd.cfg -c init -c 'svf idcode_test2.svf' same thing: first build libresoc.v and copy it to the libresoc/ directory -./versa_ecp5.py --sys-clk-freq=55e6 --build +./versa_ecp5.py --sys-clk-freq=55e6 --build --yosys-nowidelut ./versa_ecp5.py --sys-clk-freq=55e6 --load diff --git a/versa_ecp5.py b/versa_ecp5.py index 638f564..e960d96 100755 --- a/versa_ecp5.py +++ b/versa_ecp5.py @@ -6,6 +6,7 @@ import sys import litex_boards.targets.versa_ecp5 as versa_ecp5 import litex_boards.targets.ulx3s as ulx3s +from litex.build.lattice.trellis import trellis_args, trellis_argdict from litex.soc.integration.soc_sdram import (soc_sdram_args, soc_sdram_argdict) @@ -122,8 +123,10 @@ def main(): parser.add_argument("--fpga", default="versa_ecp5", help="FPGA target " \ "to build for/load to") parser.add_argument("--load-from", default=None, help="svf to load, disables build") + parser.add_argument("--toolchain", default="trellis", help="Gateware toolchain to use, trellis (default) or diamond") builder_args(parser) + trellis_args(parser) soc_sdram_args(parser) args = parser.parse_args() @@ -141,6 +144,8 @@ def main(): if args.load_from == None: builder = Builder(soc, **builder_argdict(args)) + builder_kargs = trellis_argdict(args) \ + if args.toolchain == "trellis" else {} builder.build(run=args.build) if args.load: