#248: Minor cleanup.
This commit is contained in:
parent
a41fbea5e6
commit
54cee05986
|
@ -69,7 +69,7 @@ class _CRG(Module):
|
||||||
|
|
||||||
class BaseSoC(SoCCore):
|
class BaseSoC(SoCCore):
|
||||||
mem_map = {**SoCCore.mem_map, **{"spiflash": 0x80000000}}
|
mem_map = {**SoCCore.mem_map, **{"spiflash": 0x80000000}}
|
||||||
def __init__(self, bios_flash_offset, spi_chip='AT25SF161', sys_clk_freq=int(12e6),
|
def __init__(self, bios_flash_offset, spi_flash_module="AT25SF161", sys_clk_freq=int(12e6),
|
||||||
with_led_chaser=True, **kwargs):
|
with_led_chaser=True, **kwargs):
|
||||||
kwargs["uart_name"] = "usb_acm" # Enforce UART to USB-ACM
|
kwargs["uart_name"] = "usb_acm" # Enforce UART to USB-ACM
|
||||||
platform = fomu_pvt.Platform()
|
platform = fomu_pvt.Platform()
|
||||||
|
@ -104,14 +104,13 @@ class BaseSoC(SoCCore):
|
||||||
from litespi.opcodes import SpiNorFlashOpCodes as Codes
|
from litespi.opcodes import SpiNorFlashOpCodes as Codes
|
||||||
|
|
||||||
# lambdas for lazy module instantiation.
|
# lambdas for lazy module instantiation.
|
||||||
spi_provider = {
|
spi_flash_modules = {
|
||||||
'AT25SF161': lambda: AT25SF161(Codes.READ_1_1_4),
|
"AT25SF161": lambda: AT25SF161( Codes.READ_1_1_4),
|
||||||
'GD25Q16C': lambda: GD25Q16C(Codes.READ_1_1_1),
|
"GD25Q16C": lambda: GD25Q16C( Codes.READ_1_1_1),
|
||||||
'MX25R1635F': lambda: MX25R1635F(Codes.READ_1_1_4),
|
"MX25R1635F": lambda: MX25R1635F(Codes.READ_1_1_4),
|
||||||
'W25Q128JV': lambda: W25Q128JV(Codes.READ_1_1_4),
|
"W25Q128JV": lambda: W25Q128JV( Codes.READ_1_1_4),
|
||||||
}
|
}
|
||||||
|
self.add_spi_flash(mode="4x", module=spi_flash_modules[spi_flash_module](), with_master=False)
|
||||||
self.add_spi_flash(mode="4x", module=spi_provider[spi_chip](), with_master=False)
|
|
||||||
#self.add_spi_flash(mode="1x", dummy_cycles=8) # LiteX SPI Flash Core.
|
#self.add_spi_flash(mode="1x", dummy_cycles=8) # LiteX SPI Flash Core.
|
||||||
|
|
||||||
# Add ROM linker region --------------------------------------------------------------------
|
# Add ROM linker region --------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue