mirror of
https://github.com/saymrwulf/litex-boards.git
synced 2026-11-18 09:41:45 +00:00
pr243/platforms: Consistency with other platforms.
This commit is contained in:
parent
3fb73b3603
commit
2df3f9e664
4 changed files with 22 additions and 41 deletions
|
|
@ -54,26 +54,18 @@ _io = [
|
||||||
]
|
]
|
||||||
|
|
||||||
# Connectors ---------------------------------------------------------------------------------------
|
# Connectors ---------------------------------------------------------------------------------------
|
||||||
_connectors = [
|
|
||||||
]
|
_connectors = []
|
||||||
|
|
||||||
# Platform -----------------------------------------------------------------------------------------
|
# Platform -----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class Xc7A35t_Platform(XilinxPlatform):
|
class Platform(XilinxPlatform):
|
||||||
def __init__(self, io, conns ):
|
default_clk_name = "clk12"
|
||||||
XilinxPlatform.__init__(self, "xc7a35t-cpg236-1", io, conns, toolchain="vivado")
|
default_clk_period = 1e9/12e6
|
||||||
def do_finalize(self,fragment):
|
|
||||||
self.add_period_constraint(self.lookup_request("clk12", loose=True), self.default_clk_period)
|
|
||||||
|
|
||||||
def get_platform(base_platform):
|
|
||||||
class the_platform(base_platform):
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.default_clk_name = "clk12"
|
XilinxPlatform.__init__(self, "xc7a35t-cpg236-1", _io, _connectors, toolchain="vivado")
|
||||||
self.default_clk_period = 1e9/12e6
|
|
||||||
base_platform.__init__(self,_io, _connectors)
|
|
||||||
|
|
||||||
def do_finalize(self, fragment):
|
def do_finalize(self,fragment):
|
||||||
base_platform.do_finalize(self, fragment)
|
XilinxPlatform.do_finalize(self, fragment)
|
||||||
|
self.add_period_constraint(self.lookup_request("clk12", loose=True), self.default_clk_period)
|
||||||
return the_platform()
|
|
||||||
|
|
|
||||||
|
|
@ -45,26 +45,18 @@ _io = [
|
||||||
]
|
]
|
||||||
|
|
||||||
# Connectors ---------------------------------------------------------------------------------------
|
# Connectors ---------------------------------------------------------------------------------------
|
||||||
_connectors = [
|
|
||||||
]
|
_connectors = []
|
||||||
|
|
||||||
# Platform -----------------------------------------------------------------------------------------
|
# Platform -----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class Xc7A35t_Platform(XilinxPlatform):
|
class Platform(XilinxPlatform):
|
||||||
def __init__(self, io, conns ):
|
default_clk_name = "clk50"
|
||||||
XilinxPlatform.__init__(self, "xc7a35tftg256-1", io, conns, toolchain="vivado")
|
default_clk_period = 1e9/50e6
|
||||||
def do_finalize(self,fragment):
|
|
||||||
self.add_period_constraint(self.lookup_request("clk50", loose=True), self.default_clk_period)
|
|
||||||
|
|
||||||
def get_platform(base_platform):
|
|
||||||
class the_platform(base_platform):
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.default_clk_name = "clk50"
|
XilinxPlatform.__init__(self, "xc7a35tftg256-1", _io, _connectors, toolchain="vivado")
|
||||||
self.default_clk_period = 1e9/50e6
|
|
||||||
base_platform.__init__(self,_io, _connectors)
|
|
||||||
|
|
||||||
def do_finalize(self, fragment):
|
def do_finalize(self,fragment):
|
||||||
base_platform.do_finalize(self, fragment)
|
XilinxPlatform.do_finalize(self, fragment)
|
||||||
|
self.add_period_constraint(self.lookup_request("clk50", loose=True), self.default_clk_period)
|
||||||
return the_platform()
|
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,7 @@ def addAsyncSram(soc, platform, name, origin, size):
|
||||||
# BaseSoC ------------------------------------------------------------------------------------------
|
# BaseSoC ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class BaseSoC(SoCCore):
|
class BaseSoC(SoCCore):
|
||||||
def __init__(self,
|
def __init__(self, variant="a7-35",
|
||||||
variant="a7-35",
|
|
||||||
toolchain="vivado",
|
toolchain="vivado",
|
||||||
sys_clk_freq=int(100e6),
|
sys_clk_freq=int(100e6),
|
||||||
ident_version=True,
|
ident_version=True,
|
||||||
|
|
@ -122,8 +121,7 @@ class BaseSoC(SoCCore):
|
||||||
with_mapped_flash=False,
|
with_mapped_flash=False,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
|
||||||
xc7a35t_base = digilent_cmod_a7.Xc7A35t_Platform
|
platform = digilent_cmod_a7.Platform()
|
||||||
platform = digilent_cmod_a7.get_platform(xc7a35t_base)
|
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
SoCCore.__init__(self, platform, sys_clk_freq,
|
SoCCore.__init__(self, platform, sys_clk_freq,
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,7 @@ class BaseSoC(SoCCore):
|
||||||
enable_leds = True,
|
enable_leds = True,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
|
||||||
xc7a35t_base = micronova_mercury2.Xc7A35t_Platform
|
platform = micronova_mercury2.Platform()
|
||||||
platform = micronova_mercury2.get_platform(xc7a35t_base)
|
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
SoCCore.__init__(self, platform, sys_clk_freq,
|
SoCCore.__init__(self, platform, sys_clk_freq,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue