class Platform(XilinxISEPlatform):
def __init__(self):
XilinxISEPlatform.__init__(self, "xc6slx45-fgg484-2", _io,
- lambda p: CRG_SE(p, "clk50", "user_btn", 20.0))
+ lambda p: CRG_SE(p, "clk50", "user_btn"))
def do_finalize(self, fragment):
try:
class Platform(XilinxISEPlatform):
def __init__(self):
XilinxISEPlatform.__init__(self, "xc6slx45-fgg484-3", _io,
- lambda p: CRG_SE(p, "clk50", None, 20.0))
+ lambda p: CRG_SE(p, "clk50", None))
self.add_platform_command("CONFIG VCCAUX=\"3.3\";\n")
def do_finalize(self, fragment):
from mibuild import tools
def _add_period_constraint(platform, clk, period):
- platform.add_platform_command("""NET "{clk}" TNM_NET = "GRPclk";
+ if period is not None:
+ platform.add_platform_command("""NET "{clk}" TNM_NET = "GRPclk";
TIMESPEC "TSclk" = PERIOD "GRPclk" """+str(period)+""" ns HIGH 50%;""", clk=clk)
class CRG_SE(SimpleCRG):
- def __init__(self, platform, clk_name, rst_name, period, rst_invert=False):
+ def __init__(self, platform, clk_name, rst_name, period=None, rst_invert=False):
SimpleCRG.__init__(self, platform, clk_name, rst_name, rst_invert)
_add_period_constraint(platform, self._clk, period)
class CRG_DS(Module):
- def __init__(self, platform, clk_name, rst_name, period, rst_invert=False):
+ def __init__(self, platform, clk_name, rst_name, period=None, rst_invert=False):
reset_less = rst_name is None
self.clock_domains.cd_sys = ClockDomain(reset_less=reset_less)
self._clk = platform.request(clk_name)