tang nano 4k: fix removed default_clk_period, fix do_finalize signature

This commit is contained in:
Ilia Sergachev 2022-01-23 16:47:20 +01:00
parent 6238052b10
commit f078e55bb1
1 changed files with 3 additions and 2 deletions

View File

@ -85,6 +85,7 @@ _connectors = [
class Platform(GowinPlatform):
default_clk_name = "clk27"
default_clk_freq = 27e6
default_clk_period = 1e9 / default_clk_freq
def __init__(self):
GowinPlatform.__init__(self, "GW1NSR-LV4CQN48PC7/I6", _io, _connectors, toolchain="gowin", devicename="GW1NSR-4C")
@ -95,6 +96,6 @@ class Platform(GowinPlatform):
def create_programmer(self):
return OpenFPGALoader("tangnano4k")
def do_finalize(self, fragment):
GowinPlatform.do_finalize(self, fragment)
def do_finalize(self, fragment, *args, **kwargs):
GowinPlatform.do_finalize(self, fragment, *args, **kwargs)
self.add_period_constraint(self.lookup_request("clk27", loose=True), 1e9 / self.default_clk_freq)