From eca5a25e270cf82c5ac6ddde838672011bee9dfc Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Tue, 29 Sep 2020 15:55:07 +0200 Subject: [PATCH] add dummy attr_translate --- litex/build/gowin/gowin.py | 13 +++++++++++++ litex/build/gowin/platform.py | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) 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)