mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
build: Create toolchain parser group to improve --help readibility and cleanup.
This commit is contained in:
parent
0c1f0b17b4
commit
1279ebebe8
5 changed files with 24 additions and 38 deletions
|
@ -218,12 +218,10 @@ class LatticeIceStormToolchain:
|
|||
self.clocks[clk] = period
|
||||
|
||||
def icestorm_args(parser):
|
||||
parser.add_argument("--nextpnr-timingstrict", action="store_true",
|
||||
help="fail if timing not met, i.e., do NOT pass '--timing-allow-fail' to nextpnr")
|
||||
parser.add_argument("--nextpnr-ignoreloops", action="store_true",
|
||||
help="ignore combinational loops in timing analysis, i.e. pass '--ignore-loops' to nextpnr")
|
||||
parser.add_argument("--nextpnr-seed", default=1, type=int,
|
||||
help="seed to pass to nextpnr")
|
||||
toolchain_group = parser.add_argument_group("toolchain")
|
||||
toolchain_group.add_argument("--nextpnr-timingstrict", action="store_true", help="Make the build fail when Timing is not met.")
|
||||
toolchain_group.add_argument("--nextpnr-ignoreloops", action="store_true", help="Use strict Timing mode (Build will fail when Timings are not met).")
|
||||
toolchain_group.add_argument("--nextpnr-seed", default=1, type=int, help="Set Nextpnr's seed.")
|
||||
|
||||
def icestorm_argdict(args):
|
||||
return {
|
||||
|
|
|
@ -189,18 +189,13 @@ class LatticeOxideToolchain:
|
|||
self.false_paths.add((from_, to))
|
||||
|
||||
def oxide_args(parser):
|
||||
parser.add_argument("--yosys-nowidelut", action="store_true",
|
||||
help="pass '-nowidelut' to yosys synth_nexus")
|
||||
parser.add_argument("--yosys-abc9", action="store_true",
|
||||
help="pass '-abc9' to yosys synth_nexus")
|
||||
parser.add_argument("--nextpnr-timingstrict", action="store_true",
|
||||
help="fail if timing not met, i.e., do NOT pass '--timing-allow-fail' to nextpnr")
|
||||
parser.add_argument("--nextpnr-ignoreloops", action="store_true",
|
||||
help="ignore combinational loops in timing analysis, i.e. pass '--ignore-loops' to nextpnr")
|
||||
parser.add_argument("--nextpnr-seed", default=1, type=int,
|
||||
help="seed to pass to nextpnr")
|
||||
parser.add_argument("--nexus-es-device", action="store_true",
|
||||
help="device is a ES1 Nexus part")
|
||||
toolchain_group = parser.add_argument_group("toolchain")
|
||||
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("--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.")
|
||||
toolchain_group.add_argument("--nexus-es-device", action="store_true", help="Use Nexus-ES1 part.")
|
||||
|
||||
def oxide_argdict(args):
|
||||
return {
|
||||
|
|
|
@ -320,8 +320,8 @@ class LatticeRadiantToolchain:
|
|||
self.false_paths.add((from_, to))
|
||||
|
||||
def radiant_build_args(parser):
|
||||
parser.add_argument("--synth-mode", default="synplify", help="synthesis mode (synplify or yosys).")
|
||||
|
||||
toolchain_group = parser.add_argument_group("toolchain")
|
||||
toolchain_group.add_argument("--synth-mode", default="synplify", help="Synthesis mode (synplify or yosys).")
|
||||
|
||||
def radiant_build_argdict(args):
|
||||
return {"synth_mode": args.synth_mode}
|
||||
|
|
|
@ -250,22 +250,15 @@ class LatticeTrellisToolchain:
|
|||
self.false_paths.add((from_, to))
|
||||
|
||||
def trellis_args(parser):
|
||||
parser.add_argument("--yosys-nowidelut", action="store_true",
|
||||
help="pass '-nowidelut' to yosys synth_ecp5")
|
||||
parser.add_argument("--yosys-abc9", action="store_true",
|
||||
help="pass '-abc9' to yosys synth_ecp5")
|
||||
parser.add_argument("--nextpnr-timingstrict", action="store_true",
|
||||
help="fail if timing not met, i.e., do NOT pass '--timing-allow-fail' to nextpnr")
|
||||
parser.add_argument("--nextpnr-ignoreloops", action="store_true",
|
||||
help="ignore combinational loops in timing analysis, i.e. pass '--ignore-loops' to nextpnr")
|
||||
parser.add_argument("--ecppack-bootaddr", default=0,
|
||||
help="Set boot address for next image, i.e. pass '--bootaddr xxx' to ecppack")
|
||||
parser.add_argument("--ecppack-spimode", default=None,
|
||||
help="Set slave SPI programming mode")
|
||||
parser.add_argument("--ecppack-compress", action="store_true",
|
||||
help="Compress bitstream to reduce size")
|
||||
parser.add_argument("--nextpnr-seed", default=1, type=int,
|
||||
help="seed to pass to nextpnr")
|
||||
toolchain_group = parser.add_argument_group("toolchain")
|
||||
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("--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.")
|
||||
toolchain_group.add_argument("--ecppack-bootaddr", default=0, help="Set boot address for next image.")
|
||||
toolchain_group.add_argument("--ecppack-spimode", default=None, help="Set slave SPI programming mode.")
|
||||
toolchain_group.add_argument("--ecppack-compress", action="store_true", help="Use Bitstream compression.")
|
||||
|
||||
def trellis_argdict(args):
|
||||
return {
|
||||
|
|
|
@ -391,8 +391,8 @@ class XilinxVivadoToolchain:
|
|||
self.false_paths.add((from_, to))
|
||||
|
||||
def vivado_build_args(parser):
|
||||
parser.add_argument("--synth-mode", default="vivado", help="synthesis mode (vivado or yosys).")
|
||||
|
||||
toolchain_group = parser.add_argument_group("toolchain")
|
||||
toolchain_group.add_argument("--synth-mode", default="vivado", help="Synthesis mode (vivado or yosys).")
|
||||
|
||||
def vivado_build_argdict(args):
|
||||
return {"synth_mode": args.synth_mode}
|
||||
|
|
Loading…
Reference in a new issue