diff --git a/litex/build/gowin/gowin.py b/litex/build/gowin/gowin.py index 130e8b06f..ea486a187 100644 --- a/litex/build/gowin/gowin.py +++ b/litex/build/gowin/gowin.py @@ -59,6 +59,19 @@ def _build_script(name, partnumber, files, options): f.write(tcl) class GowinToolchain(): + + attr_translate = { + "keep": None, + "no_retiming": None, + "async_reg": None, + "mr_ff": None, + "mr_false_path": None, + "ars_ff1": None, + "ars_ff2": None, + "ars_false_path": None, + "no_shreg_extract": None + } + def __init__(self): self.options = {} diff --git a/litex/build/gowin/platform.py b/litex/build/gowin/platform.py index dbe36e938..8ac93ebdb 100644 --- a/litex/build/gowin/platform.py +++ b/litex/build/gowin/platform.py @@ -32,7 +32,9 @@ class GowinPlatform(GenericPlatform): def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict(common.gowin_special_overrides) so.update(special_overrides) - return GenericPlatform.get_verilog(self, *args, special_overrides=so, **kwargs) + return GenericPlatform.get_verilog(self, *args, special_overrides=so, + attr_translate=self.toolchain.attr_translate, + **kwargs) def build(self, *args, **kwargs): return self.toolchain.build(self, *args, **kwargs)