Merge pull request #1435 from gsomlo/gls-yosys-flow3

yosys_nextpnr_toolchain: add flow3 option to abc9 mode
This commit is contained in:
enjoy-digital 2022-09-19 09:18:00 +02:00 committed by GitHub
commit 860c757f33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View file

@ -65,6 +65,7 @@ def oxide_args(parser):
toolchain_group = parser.add_argument_group(title="Toolchain options")
toolchain_group.add_argument("--yosys-nowidelut", action="store_true", help="Use Yosys's nowidelut mode.")
toolchain_group.add_argument("--yosys-abc9", action="store_true", help="Use Yosys's abc9 mode.")
toolchain_group.add_argument("--yosys-flow3", action="store_true", help="Use Yosys's abc9 mode with the flow3 script.")
toolchain_group.add_argument("--nextpnr-timingstrict", action="store_true", help="Use strict Timing mode (Build will fail when Timings are not met).")
toolchain_group.add_argument("--nextpnr-ignoreloops", action="store_true", help="Ignore combinatorial loops in Timing Analysis.")
toolchain_group.add_argument("--nextpnr-seed", default=1, type=int, help="Set Nextpnr's seed.")
@ -74,6 +75,7 @@ def oxide_argdict(args):
return {
"nowidelut": args.yosys_nowidelut,
"abc9": args.yosys_abc9,
"flow3": args.yosys_flow3,
"timingstrict": args.nextpnr_timingstrict,
"ignoreloops": args.nextpnr_ignoreloops,
"seed": args.nextpnr_seed,

View file

@ -153,6 +153,7 @@ def trellis_args(parser):
toolchain_group = parser.add_argument_group(title="Toolchain options")
toolchain_group.add_argument("--yosys-nowidelut", action="store_true", help="Use Yosys's nowidelut mode.")
toolchain_group.add_argument("--yosys-abc9", action="store_true", help="Use Yosys's abc9 mode.")
toolchain_group.add_argument("--yosys-flow3", action="store_true", help="Use Yosys's abc9 mode with the flow3 script.")
toolchain_group.add_argument("--nextpnr-timingstrict", action="store_true", help="Use strict Timing mode (Build will fail when Timings are not met).")
toolchain_group.add_argument("--nextpnr-ignoreloops", action="store_true", help="Ignore combinatorial loops in Timing Analysis.")
toolchain_group.add_argument("--nextpnr-seed", default=1, type=int, help="Set Nextpnr's seed.")
@ -165,6 +166,7 @@ def trellis_argdict(args):
return {
"nowidelut": args.yosys_nowidelut,
"abc9": args.yosys_abc9,
"flow3": args.yosys_flow3,
"timingstrict": args.nextpnr_timingstrict,
"ignoreloops": args.nextpnr_ignoreloops,
"bootaddr": args.ecppack_bootaddr,

View file

@ -86,6 +86,7 @@ class YosysNextPNRToolchain(GenericToolchain):
def build(self, platform, fragment,
nowidelut = False,
abc9 = False,
flow3 = False,
timingstrict = False,
ignoreloops = False,
seed = 1,
@ -100,6 +101,8 @@ class YosysNextPNRToolchain(GenericToolchain):
than native for the target (Yosys)
abc9 : str
use new ABC9 flow (Yosys)
flow3 : str
use ABC9 with flow3 (Yosys)
timingstrict : list
check timing failures (nextpnr)
ignoreloops : str
@ -110,6 +113,9 @@ class YosysNextPNRToolchain(GenericToolchain):
self._nowidelut = nowidelut
self._abc9 = abc9
if flow3:
self._abc9 = True
self._yosys_cmds.append("scratchpad -copy abc9.script.flow3 abc9.script")
self.timingstrict = timingstrict
self.ignoreloops = ignoreloops
self.seed = seed