Skip to content

Commit

Permalink
Merge pull request #2055 from trabucayre/gowin_apicula_fix
Browse files Browse the repository at this point in the history
Gowin apicula fix
  • Loading branch information
enjoy-digital authored Sep 2, 2024
2 parents 15cd556 + babe233 commit af0dc7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion litex/build/gowin/apicula.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def finalize(self):
elif devicename == "GW2AR-18":
devicename = "GW2A-18"

# yosys doesn't know that some variant doesn't have lutram so we tell it
if devicename in ["GW1NS-4"]:
self._synth_opts += " -nolutram"

pnr_opts = "--write {top}_routed.json --top {top} --device {device}" + \
" --vopt family={devicename} --vopt cst={top}.cst"
self._pnr_opts += pnr_opts.format(
Expand All @@ -56,7 +60,9 @@ def finalize(self):
# use_mspi_as_gpio and friends
for option, value in self.options.items():
if option.startswith("use_") and value:
self._packer_opts += " --" + option[4:]
# Not all options are supported and may be just Gowin's software check
if option not in ["use_mode_as_gpio"]:
self._packer_opts += " --" + option[4:]

YosysNextPNRToolchain.finalize(self)

Expand Down

0 comments on commit af0dc7f

Please sign in to comment.