mirror of
https://github.com/litex-hub/litex-boards.git
synced 2025-01-03 03:43:36 -05:00
beaglewire: Review/Cleanup for consistency with other targets.
- Now uses regular UART. - Build tested with: ./quertyembedded_beaglewire.py --cpu-type=serv --build - Can still be build with Crossover UART with --uart-name=crossover+bridge.
This commit is contained in:
parent
35df77258a
commit
ce254208ff
2 changed files with 21 additions and 34 deletions
|
@ -39,7 +39,8 @@ _io = [
|
||||||
Subsignal("cke", Pins("88")),
|
Subsignal("cke", Pins("88")),
|
||||||
Subsignal("ba", Pins("121 120")),
|
Subsignal("ba", Pins("121 120")),
|
||||||
Subsignal("dm", Pins("94")),
|
Subsignal("dm", Pins("94")),
|
||||||
IOStandard("LVCMOS33"), Misc("SLEWRATE=FAST")
|
IOStandard("LVCMOS33"),
|
||||||
|
Misc("SLEWRATE=FAST")
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -13,26 +13,20 @@ import argparse
|
||||||
from migen import *
|
from migen import *
|
||||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||||
|
|
||||||
from litex.build.io import DDROutput
|
|
||||||
|
|
||||||
from litex.build.io import CRG
|
|
||||||
|
|
||||||
|
|
||||||
from litex_boards.platforms import beaglewire
|
from litex_boards.platforms import beaglewire
|
||||||
|
|
||||||
from litex.soc.interconnect import wishbone
|
from litex.build.io import DDROutput
|
||||||
from litex.soc.cores.spi_flash import SpiFlash
|
|
||||||
from litex.soc.cores.clock import iCE40PLL
|
from litex.soc.cores.clock import iCE40PLL
|
||||||
from litex.soc.integration.soc_core import *
|
from litex.soc.integration.soc_core import *
|
||||||
from litex.soc.integration.soc import SoCRegion
|
from litex.soc.integration.soc import SoCRegion
|
||||||
from litex.soc.integration.builder import *
|
from litex.soc.integration.builder import *
|
||||||
|
from litex.soc.cores.spi_flash import SpiFlash
|
||||||
from litex.soc.cores.led import LedChaser
|
from litex.soc.cores.led import LedChaser
|
||||||
from litex.soc.cores.uart import UARTWishboneBridge
|
from litex.soc.cores.uart import UARTWishboneBridge
|
||||||
from litedram import modules as litedram_modules
|
|
||||||
from litedram.phy import GENSDRPHY
|
from litedram.phy import GENSDRPHY
|
||||||
from litedram.modules import MT48LC32M8
|
from litedram.modules import MT48LC32M8
|
||||||
from litex.soc.integration.builder import Builder
|
|
||||||
from litex.soc.interconnect.csr import AutoCSR, CSRStatus, CSRStorage
|
|
||||||
|
|
||||||
kB = 1024
|
kB = 1024
|
||||||
mB = 1024*kB
|
mB = 1024*kB
|
||||||
|
@ -80,9 +74,8 @@ class BaseSoC(SoCCore):
|
||||||
kwargs["integrated_rom_size"] = 0
|
kwargs["integrated_rom_size"] = 0
|
||||||
kwargs["integrated_sram_size"] = 2*kB
|
kwargs["integrated_sram_size"] = 2*kB
|
||||||
|
|
||||||
# Set CPU variant / reset address
|
# Set CPU reset address
|
||||||
kwargs["cpu_reset_address"] = self.mem_map["spiflash"] + bios_flash_offset
|
kwargs["cpu_reset_address"] = self.mem_map["spiflash"] + bios_flash_offset
|
||||||
kwargs["uart_name"] = "crossover"
|
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
SoCCore.__init__(self, platform, sys_clk_freq,
|
SoCCore.__init__(self, platform, sys_clk_freq,
|
||||||
|
@ -93,12 +86,14 @@ class BaseSoC(SoCCore):
|
||||||
# CRG --------------------------------------------------------------------------------------
|
# CRG --------------------------------------------------------------------------------------
|
||||||
self.submodules.crg = _CRG(platform, sys_clk_freq)
|
self.submodules.crg = _CRG(platform, sys_clk_freq)
|
||||||
|
|
||||||
# Wishbone ---------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
self.submodules.uart_bridge = UARTWishboneBridge(
|
if not self.integrated_main_ram_size:
|
||||||
platform.request("serial"),
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
sys_clk_freq,
|
self.add_sdram("sdram",
|
||||||
baudrate=115200)
|
phy = self.sdrphy,
|
||||||
self.add_wb_master(self.uart_bridge.wishbone)
|
module = MT48LC32M8(sys_clk_freq, "1:1"),
|
||||||
|
l2_cache_size = kwargs.get("l2_size", 1024)
|
||||||
|
)
|
||||||
|
|
||||||
# SPI Flash --------------------------------------------------------------------------------
|
# SPI Flash --------------------------------------------------------------------------------
|
||||||
self.add_spi_flash(mode="1x", dummy_cycles=8)
|
self.add_spi_flash(mode="1x", dummy_cycles=8)
|
||||||
|
@ -114,15 +109,6 @@ class BaseSoC(SoCCore):
|
||||||
self.submodules.leds = LedChaser(
|
self.submodules.leds = LedChaser(
|
||||||
pads = platform.request_all("user_led"),
|
pads = platform.request_all("user_led"),
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_csr("leds")
|
|
||||||
|
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq )
|
|
||||||
self.add_sdram("sdram",
|
|
||||||
phy = self.sdrphy,
|
|
||||||
module = MT48LC32M8(sys_clk_freq, "1:1"),
|
|
||||||
l2_cache_size = kwargs.get("l2_size", 1024)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Build --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue