Skip to content

Commit

Permalink
ffix
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-holenko committed Jun 30, 2020
1 parent da5b557 commit 530879c
Show file tree
Hide file tree
Showing 22 changed files with 77 additions and 20 deletions.
5 changes: 4 additions & 1 deletion targets/basys3/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class BaseSoC(SoCCore):
}}

def __init__(self, platform, spiflash="spiflash_1x", **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

sys_clk_freq = int(100e6)
Expand Down
5 changes: 4 additions & 1 deletion targets/cmod_a7/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class BaseSoC(SoCCore):
}}

def __init__(self, platform, spiflash="spiflash_1x", **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

sys_clk_freq = int(100e6)
Expand Down
5 changes: 4 additions & 1 deletion targets/galatea/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, spiflash="spiflash_1x", **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x4000)

sys_clk_freq = 50*1000000
Expand Down
5 changes: 4 additions & 1 deletion targets/matrix_voice/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x4000)

kwargs['uart_baudrate']=230400
Expand Down
4 changes: 2 additions & 2 deletions targets/mimas_a7/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class BaseSoC(SoCSDRAM):

def __init__(self, platform, spiflash="spiflash_1x", **kwargs):
if kwargs.get('cpu_type', None) == "mor1kx":
dict_set_max(kwargs, 'integrated_rom_size', 0x14000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x10000)

sys_clk_freq = int(100e6)
Expand Down
4 changes: 4 additions & 0 deletions targets/mimas_a7/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from liteeth.mac import LiteEthMAC
from liteeth.phy.s7rgmii import LiteEthPHYRGMII

from targets.utils import dict_set_max
from .base import BaseSoC


Expand All @@ -12,6 +13,9 @@ class NetSoC(BaseSoC):
}}

def __init__(self, platform, *args, **kwargs):
# Need a larger integrated ROM to fit the BIOS with TFTP support.
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)

BaseSoC.__init__(self, platform, *args, **kwargs)

# Ethernet ---------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions targets/mimasv2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def __init__(self, platform, **kwargs):
platform.spiflash_total_size)

if kwargs.get('cpu_type', None) == "mor1kx":
bios_size = 0x14000
else:
bios_size = 0x10000
else:
bios_size = 0x8000

self.add_constant("ROM_DISABLE", 1)
self.add_memory_region(
Expand Down
6 changes: 5 additions & 1 deletion targets/minispartan6/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def __init__(self, platform, **kwargs):
self.mem_map["spiflash"],
platform.spiflash_total_size)

bios_size = 0x10000
if kwargs.get('cpu_type', None) == "mor1kx":
bios_size = 0x10000
else:
bios_size = 0x8000

self.add_constant("ROM_DISABLE", 1)
self.add_memory_region(
"rom", kwargs['cpu_reset_address'], bios_size,
Expand Down
5 changes: 4 additions & 1 deletion targets/neso/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, spiflash="spiflash_1x", **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

clk_freq = int(100e6)
Expand Down
5 changes: 4 additions & 1 deletion targets/netv2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, csr_data_width=8, **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

clk_freq = int(100e6)
Expand Down
3 changes: 3 additions & 0 deletions targets/netv2/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class NetSoC(BaseSoC):
}}

def __init__(self, platform, *args, **kwargs):
# Need a larger integrated ROM to fit the BIOS with TFTP support.
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)

BaseSoC.__init__(self, platform, *args, **kwargs)

self.submodules.ethphy = LiteEthPHYRMII(
Expand Down
5 changes: 4 additions & 1 deletion targets/nexys_video/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ class BaseSoC(SoCSDRAM):
# "uart_phy",

def __init__(self, platform, spiflash="spiflash_1x", **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

sys_clk_freq = int(100e6)
Expand Down
4 changes: 4 additions & 0 deletions targets/nexys_video/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from liteeth.mac import LiteEthMAC
from liteeth.phy.s7rgmii import LiteEthPHYRGMII

from targets.utils import dict_set_max
from targets.nexys_video.base import SoC as BaseSoC


Expand All @@ -14,6 +15,9 @@ class NetSoC(BaseSoC):
)

def __init__(self, platform, *args, **kwargs):
# Need a larger integrated ROM to fit the BIOS with TFTP support.
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)

BaseSoC.__init__(self, platform, *args, **kwargs)

# Ethernet PHY
Expand Down
4 changes: 2 additions & 2 deletions targets/opsis/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class BaseSoC(SoCSDRAM):

def __init__(self, platform, **kwargs):
if kwargs.get('cpu_type', None) == "mor1kx":
dict_set_max(kwargs, 'integrated_rom_size', 0x15000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

sys_clk_freq = 50*1000000
Expand Down
4 changes: 4 additions & 0 deletions targets/opsis/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from gateware.s6rgmii import LiteEthPHYRGMII

from targets.utils import dict_set_max
from .base import BaseSoC


Expand All @@ -13,6 +14,9 @@ class NetSoC(BaseSoC):
}}

def __init__(self, platform, *args, **kwargs):
# Need a larger integrated ROM to fit the BIOS with TFTP support.
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)

BaseSoC.__init__(self, platform, *args, **kwargs)

# Ethernet ---------------------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion targets/pano_logic_g2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

sys_clk_freq = int(50e6)
Expand Down
4 changes: 2 additions & 2 deletions targets/pipistrello/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class BaseSoC(SoCSDRAM):

def __init__(self, platform, **kwargs):
if kwargs.get('cpu_type', None) == "mor1kx":
dict_set_max(kwargs, 'integrated_rom_size', 0x14000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x4000)

sys_clk_freq = (83 + Fraction(1, 3))*1000*1000
Expand Down
5 changes: 4 additions & 1 deletion targets/saturn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x4000)

sys_clk_freq = (31 + Fraction(1, 4))*1000*1000
Expand Down
4 changes: 4 additions & 0 deletions targets/sim/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class BaseSoC(SoCSDRAM):

def __init__(self, platform, **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)
dict_set_max(kwargs, 'firmware_ram_size', 0x10000)

Expand Down
4 changes: 4 additions & 0 deletions targets/sim/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from liteeth.phy.model import LiteEthPHYModel
from liteeth.core.mac import LiteEthMAC

from targets.utils import dict_set_max
from targets.sim.base import BaseSoC


Expand All @@ -12,6 +13,9 @@ class NetSoC(BaseSoC):
}}

def __init__(self, *args, **kwargs):
# Need a larger integrated ROM to fit the BIOS with TFTP support.
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)

BaseSoC.__init__(self, *args, **kwargs)

self.submodules.ethphy = LiteEthPHYModel(self.platform.request("eth"))
Expand Down
5 changes: 4 additions & 1 deletion targets/waxwing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ class BaseSoC(SoCSDRAM):
}}

def __init__(self, platform, **kwargs):
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
if kwargs.get('cpu_type', None) == 'mor1kx':
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
else:
dict_set_max(kwargs, 'integrated_rom_size', 0x8000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

sys_clk_freq = (31 + Fraction(1, 4))*1000*1000
Expand Down
2 changes: 1 addition & 1 deletion targets/waxwing/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

class BaseSoC(SoCSDRAM):
def __init__(self, platform, **kwargs):
# Need a larger integrated ROM to fit the BIOS with TFTP support.
dict_set_max(kwargs, 'integrated_rom_size', 0x10000)
dict_set_max(kwargs, 'integrated_sram_size', 0x8000)

clk_freq = (31 + Fraction(1, 4))*1000*1000
SoCSDRAM.__init__(self, platform, clk_freq, **kwargs)
Expand Down

0 comments on commit 530879c

Please sign in to comment.