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 = []
|
||||
|
||||
# Platform -----------------------------------------------------------------------------------------
|
||||
|
||||
class Xc7A35t_Platform(XilinxPlatform):
|
||||
def __init__(self, io, conns ):
|
||||
XilinxPlatform.__init__(self, "xc7a35t-cpg236-1", io, conns, toolchain="vivado")
|
||||
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):
|
||||
class Platform(XilinxPlatform):
|
||||
default_clk_name = "clk12"
|
||||
default_clk_period = 1e9/12e6
|
||||
|
||||
def __init__(self):
|
||||
self.default_clk_name = "clk12"
|
||||
self.default_clk_period = 1e9/12e6
|
||||
base_platform.__init__(self,_io, _connectors)
|
||||
XilinxPlatform.__init__(self, "xc7a35t-cpg236-1", _io, _connectors, toolchain="vivado")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
base_platform.do_finalize(self, fragment)
|
||||
|
||||
return the_platform()
|
||||
def do_finalize(self,fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
self.add_period_constraint(self.lookup_request("clk12", loose=True), self.default_clk_period)
|
||||
|
|
|
|||
|
|
@ -45,26 +45,18 @@ _io = [
|
|||
]
|
||||
|
||||
# Connectors ---------------------------------------------------------------------------------------
|
||||
_connectors = [
|
||||
]
|
||||
|
||||
_connectors = []
|
||||
|
||||
# Platform -----------------------------------------------------------------------------------------
|
||||
|
||||
class Xc7A35t_Platform(XilinxPlatform):
|
||||
def __init__(self, io, conns ):
|
||||
XilinxPlatform.__init__(self, "xc7a35tftg256-1", io, conns, toolchain="vivado")
|
||||
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):
|
||||
class Platform(XilinxPlatform):
|
||||
default_clk_name = "clk50"
|
||||
default_clk_period = 1e9/50e6
|
||||
|
||||
def __init__(self):
|
||||
self.default_clk_name = "clk50"
|
||||
self.default_clk_period = 1e9/50e6
|
||||
base_platform.__init__(self,_io, _connectors)
|
||||
XilinxPlatform.__init__(self, "xc7a35tftg256-1", _io, _connectors, toolchain="vivado")
|
||||
|
||||
def do_finalize(self, fragment):
|
||||
base_platform.do_finalize(self, fragment)
|
||||
|
||||
return the_platform()
|
||||
def do_finalize(self,fragment):
|
||||
XilinxPlatform.do_finalize(self, fragment)
|
||||
self.add_period_constraint(self.lookup_request("clk50", loose=True), self.default_clk_period)
|
||||
|
|
|
|||
|
|
@ -113,17 +113,15 @@ def addAsyncSram(soc, platform, name, origin, size):
|
|||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
class BaseSoC(SoCCore):
|
||||
def __init__(self,
|
||||
variant="a7-35",
|
||||
toolchain="vivado",
|
||||
def __init__(self, variant="a7-35",
|
||||
toolchain="vivado",
|
||||
sys_clk_freq=int(100e6),
|
||||
ident_version=True,
|
||||
with_jtagbone=True,
|
||||
with_mapped_flash=False,
|
||||
**kwargs):
|
||||
|
||||
xc7a35t_base = digilent_cmod_a7.Xc7A35t_Platform
|
||||
platform = digilent_cmod_a7.get_platform(xc7a35t_base)
|
||||
platform = digilent_cmod_a7.Platform()
|
||||
|
||||
# SoCCore ----------------------------------------------------------------------------------
|
||||
SoCCore.__init__(self, platform, sys_clk_freq,
|
||||
|
|
|
|||
|
|
@ -119,8 +119,7 @@ class BaseSoC(SoCCore):
|
|||
enable_leds = True,
|
||||
**kwargs):
|
||||
|
||||
xc7a35t_base = micronova_mercury2.Xc7A35t_Platform
|
||||
platform = micronova_mercury2.get_platform(xc7a35t_base)
|
||||
platform = micronova_mercury2.Platform()
|
||||
|
||||
# SoCCore ----------------------------------------------------------------------------------
|
||||
SoCCore.__init__(self, platform, sys_clk_freq,
|
||||
|
|
|
|||
Loading…
Reference in a new issue