diff --git a/litex/build/lattice/radiant.py b/litex/build/lattice/radiant.py index 0cce1d78d..b635c539f 100644 --- a/litex/build/lattice/radiant.py +++ b/litex/build/lattice/radiant.py @@ -92,6 +92,7 @@ class LatticeRadiantToolchain(GenericToolchain): self._timingstrict = timingstrict self._synth_mode = synth_mode + self._quiet = kwargs.pop("quiet", False) return GenericToolchain.build(self, platform, fragment, **kwargs) @@ -123,7 +124,7 @@ class LatticeRadiantToolchain(GenericToolchain): self._yosys = YosysWrapper(self.platform, self._build_name, output_name=self._build_name+"_yosys", target="nexus", template=[], yosys_cmds=yosys_cmds, - yosys_opts=self._synth_opts, synth_format="vm") + yosys_opts=self._synth_opts, synth_format="vm", quiet = self._quiet) # Constraints (.ldc) --------------------------------------------------------------------------- diff --git a/litex/build/yosys_nextpnr_toolchain.py b/litex/build/yosys_nextpnr_toolchain.py index 1c637b94b..6491d7568 100644 --- a/litex/build/yosys_nextpnr_toolchain.py +++ b/litex/build/yosys_nextpnr_toolchain.py @@ -122,6 +122,7 @@ class YosysNextPNRToolchain(GenericToolchain): self.timingstrict = timingstrict self.ignoreloops = ignoreloops self.seed = seed + self._quiet = kwargs.pop("quiet", False) return GenericToolchain.build(self, platform, fragment, **kwargs) @@ -139,6 +140,7 @@ class YosysNextPNRToolchain(GenericToolchain): synth_format = self.synth_fmt, nowidelut = self._nowidelut, abc9 = self._abc9, + quiet = self._quiet, ) # NextPnr options diff --git a/litex/build/yosys_wrapper.py b/litex/build/yosys_wrapper.py index c720f5abc..c340e3f83 100644 --- a/litex/build/yosys_wrapper.py +++ b/litex/build/yosys_wrapper.py @@ -57,6 +57,7 @@ class YosysWrapper(): self._synth_format = synth_format self._yosys_opts = yosys_opts self._yosys_cmds = yosys_cmds + self._quiet = "" if not kwargs.pop("quiet", False) else '-Qq' self._target = target @@ -132,7 +133,7 @@ class YosysWrapper(): ======= str containing instruction and/or rule """ - base_cmd = f"yosys -l {self._build_name}.rpt {self._build_name}.ys" + base_cmd = f"yosys {self._quiet} -l {self._build_name}.rpt {self._build_name}.ys" if target == "makefile": return f"{self._build_name}.{self._synth_format}:\n\t" + base_cmd + "\n" elif target == "script": @@ -144,10 +145,12 @@ def yosys_args(parser): parser.add_argument("--yosys-nowidelut", action="store_true", help="Use Yosys's nowidelut mode.") parser.add_argument("--yosys-abc9", action="store_true", help="Use Yosys's abc9 mode.") parser.add_argument("--yosys-flow3", action="store_true", help="Use Yosys's abc9 mode with the flow3 script.") + parser.add_argument("--yosys-quiet", action="store_true", help="Use Yosys's '-Qq' to be quiet") def yosys_argdict(args): return { "nowidelut": args.yosys_nowidelut, "abc9": args.yosys_abc9, "flow3": args.yosys_flow3, + "quiet": args.yosys_quiet, }