From 039be2a248fb3ccd3c7e805c9b174575e0cf619b Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Fri, 16 Aug 2024 15:56:24 +0200 Subject: [PATCH] add dual use gpio options --- litex/build/gowin/apicula.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litex/build/gowin/apicula.py b/litex/build/gowin/apicula.py index 5f33b4d09..fa802b6c4 100644 --- a/litex/build/gowin/apicula.py +++ b/litex/build/gowin/apicula.py @@ -17,6 +17,7 @@ class GowinApiculaToolchain(YosysNextPNRToolchain): def __init__(self): super().__init__() + self.options = {} self.additional_cst_commands = [] def build_io_constraints(self): @@ -37,6 +38,11 @@ class GowinApiculaToolchain(YosysNextPNRToolchain): top = self._build_name ) + # use_mspi_as_gpio and friends + for option, value in self.options.items(): + if option.startswith("use_") and value: + self._packer_opts += " --" + option[4:] + YosysNextPNRToolchain.finalize(self) # family is gowin but NextPNRWrapper needs to call 'nextpnr-himbaechel' not 'nextpnr-gowin'