targets: sync with litex targets

This commit is contained in:
Florent Kermarrec 2019-09-25 14:07:52 +02:00
parent 0ead12bae8
commit 48cd1208df
7 changed files with 22 additions and 22 deletions

View file

@ -44,10 +44,10 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCSDRAM): class BaseSoC(SoCSDRAM):
def __init__(self, sys_clk_freq=int(125e6), **kwargs): def __init__(self, sys_clk_freq=int(125e6), integrated_rom_size=0x8000, **kwargs):
platform = genesys2.Platform() platform = genesys2.Platform()
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq, SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
integrated_sram_size=0x8000, integrated_sram_size=0x8000,
**kwargs) **kwargs)
@ -70,7 +70,7 @@ class EthernetSoC(BaseSoC):
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, **kwargs): def __init__(self, **kwargs):
BaseSoC.__init__(self, **kwargs) BaseSoC.__init__(self, integrated_rom_size=0x10000, **kwargs)
self.submodules.ethphy = LiteEthPHYRGMII(self.platform.request("eth_clocks"), self.submodules.ethphy = LiteEthPHYRGMII(self.platform.request("eth_clocks"),
self.platform.request("eth")) self.platform.request("eth"))

View file

@ -46,10 +46,10 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCSDRAM): class BaseSoC(SoCSDRAM):
def __init__(self, sys_clk_freq=int(125e6), **kwargs): def __init__(self, sys_clk_freq=int(125e6), integrated_rom_size=0x8000, **kwargs):
platform = kc705.Platform() platform = kc705.Platform()
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq, SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
integrated_sram_size=0x8000, integrated_sram_size=0x8000,
**kwargs) **kwargs)
@ -72,7 +72,7 @@ class EthernetSoC(BaseSoC):
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, **kwargs): def __init__(self, **kwargs):
BaseSoC.__init__(self, **kwargs) BaseSoC.__init__(self, integrated_rom_size=0x10000, **kwargs)
self.submodules.ethphy = LiteEthPHY(self.platform.request("eth_clocks"), self.submodules.ethphy = LiteEthPHY(self.platform.request("eth_clocks"),
self.platform.request("eth"), clk_freq=self.clk_freq) self.platform.request("eth"), clk_freq=self.clk_freq)

View file

@ -80,10 +80,10 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCSDRAM): class BaseSoC(SoCSDRAM):
def __init__(self, sys_clk_freq=int(125e6), **kwargs): def __init__(self, sys_clk_freq=int(125e6), integrated_rom_size=0x8000, **kwargs):
platform = kcu105.Platform() platform = kcu105.Platform()
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq, SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
integrated_sram_size=0x8000, integrated_sram_size=0x8000,
**kwargs) **kwargs)
@ -108,7 +108,7 @@ class EthernetSoC(BaseSoC):
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, **kwargs): def __init__(self, **kwargs):
BaseSoC.__init__(self, **kwargs) BaseSoC.__init__(self, integrated_rom_size=0x10000, **kwargs)
self.comb += self.platform.request("sfp_tx_disable_n", 0).eq(1) self.comb += self.platform.request("sfp_tx_disable_n", 0).eq(1)
self.submodules.ethphy = KU_1000BASEX(self.crg.cd_clk200.clk, self.submodules.ethphy = KU_1000BASEX(self.crg.cd_clk200.clk,

View file

@ -49,10 +49,10 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCSDRAM): class BaseSoC(SoCSDRAM):
def __init__(self, sys_clk_freq=int(100e6), **kwargs): def __init__(self, sys_clk_freq=int(100e6), integrated_rom_size=0x8000, **kwargs):
platform = nexys_video.Platform() platform = nexys_video.Platform()
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq, SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
integrated_sram_size=0x8000, integrated_sram_size=0x8000,
**kwargs) **kwargs)
@ -75,7 +75,7 @@ class EthernetSoC(BaseSoC):
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, **kwargs): def __init__(self, **kwargs):
BaseSoC.__init__(self, **kwargs) BaseSoC.__init__(self, integrated_rom_size=0x10000, **kwargs)
self.submodules.ethphy = LiteEthPHYRGMII(self.platform.request("eth_clocks"), self.submodules.ethphy = LiteEthPHYRGMII(self.platform.request("eth_clocks"),
self.platform.request("eth")) self.platform.request("eth"))

View file

@ -19,10 +19,10 @@ from liteeth.mac import LiteEthMAC
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCCore): class BaseSoC(SoCCore):
def __init__(self, platform, **kwargs): def __init__(self, platform, integrated_rom_size=0x8000, **kwargs):
sys_clk_freq = int(1e9/platform.default_clk_period) sys_clk_freq = int(1e9/platform.default_clk_period)
SoCCore.__init__(self, platform, clk_freq=sys_clk_freq, SoCCore.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
integrated_main_ram_size=16*1024, integrated_main_ram_size=16*1024,
**kwargs) **kwargs)
self.submodules.crg = CRG(platform.request(platform.default_clk_name)) self.submodules.crg = CRG(platform.request(platform.default_clk_name))
@ -35,7 +35,7 @@ class EthernetSoC(BaseSoC):
} }
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, platform, **kwargs): def __init__(self, platform, integrated_rom_size=0x10000, **kwargs):
BaseSoC.__init__(self, platform, **kwargs) BaseSoC.__init__(self, platform, **kwargs)
self.submodules.ethphy = LiteEthPHY(platform.request("eth_clocks"), self.submodules.ethphy = LiteEthPHY(platform.request("eth_clocks"),
@ -43,7 +43,7 @@ class EthernetSoC(BaseSoC):
self.add_csr("ethphy") self.add_csr("ethphy")
self.submodules.ethmac = LiteEthMAC(phy=self.ethphy, dw=32, self.submodules.ethmac = LiteEthMAC(phy=self.ethphy, dw=32,
interface="wishbone", endianness=self.cpu.endianness, with_preamble_crc=False) interface="wishbone", endianness=self.cpu.endianness, with_preamble_crc=False)
self.add_wb_slave(mem_decoder(self.mem_map["ethmac"]), self.ethmac.bus) self.add_wb_slave(self.mem_map["ethmac"], self.ethmac.bus, 0x2000)
self.add_memory_region("ethmac", self.mem_map["ethmac"] | self.shadow_base, 0x2000) self.add_memory_region("ethmac", self.mem_map["ethmac"] | self.shadow_base, 0x2000)
self.add_csr("ethmac") self.add_csr("ethmac")
self.add_interrupt("ethmac") self.add_interrupt("ethmac")

View file

@ -76,10 +76,10 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCSDRAM): class BaseSoC(SoCSDRAM):
def __init__(self, sys_clk_freq=int(75e6), toolchain="diamond", **kwargs): def __init__(self, sys_clk_freq=int(75e6), toolchain="diamond", integrated_rom_size=0x8000, **kwargs):
platform = versa_ecp5.Platform(toolchain=toolchain) platform = versa_ecp5.Platform(toolchain=toolchain)
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq, SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
**kwargs) **kwargs)
# crg # crg
@ -107,7 +107,7 @@ class EthernetSoC(BaseSoC):
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, toolchain="diamond", **kwargs): def __init__(self, toolchain="diamond", **kwargs):
BaseSoC.__init__(self, toolchain=toolchain, **kwargs) BaseSoC.__init__(self, toolchain=toolchain, integrated_rom_size=0x10000, **kwargs)
self.submodules.ethphy = LiteEthPHYRGMII( self.submodules.ethphy = LiteEthPHYRGMII(
self.platform.request("eth_clocks"), self.platform.request("eth_clocks"),

View file

@ -50,10 +50,10 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------ # BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCSDRAM): class BaseSoC(SoCSDRAM):
def __init__(self, sys_clk_freq=int(100e6), **kwargs): def __init__(self, sys_clk_freq=int(100e6), integrated_rom_size=0x8000, **kwargs):
platform = netv2.Platform() platform = netv2.Platform()
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq, SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
integrated_rom_size=0x8000, integrated_rom_size=integrated_rom_size,
integrated_sram_size=0x8000, integrated_sram_size=0x8000,
**kwargs) **kwargs)
@ -76,7 +76,7 @@ class EthernetSoC(BaseSoC):
mem_map.update(BaseSoC.mem_map) mem_map.update(BaseSoC.mem_map)
def __init__(self, **kwargs): def __init__(self, **kwargs):
BaseSoC.__init__(self, **kwargs) BaseSoC.__init__(self, integrated_rom_size=0x10000, **kwargs)
self.submodules.ethphy = LiteEthPHYRMII(self.platform.request("eth_clocks"), self.submodules.ethphy = LiteEthPHYRMII(self.platform.request("eth_clocks"),
self.platform.request("eth")) self.platform.request("eth"))