mirror of
https://github.com/saymrwulf/litex-boards.git
synced 2026-11-19 09:50:49 +00:00
sipeed_tang_nano_4k: Switch to LiteX's UART and expose hyperram parameter.
This commit is contained in:
parent
688a020f35
commit
926d54cb41
2 changed files with 2 additions and 3 deletions
Binary file not shown.
|
|
@ -74,7 +74,6 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
if "cpu_type" in kwargs and kwargs["cpu_type"] == "gowin_emcu":
|
if "cpu_type" in kwargs and kwargs["cpu_type"] == "gowin_emcu":
|
||||||
kwargs["with_uart"] = False # CPU has own UART
|
|
||||||
kwargs["integrated_sram_size"] = 0 # SRAM is directly attached to CPU
|
kwargs["integrated_sram_size"] = 0 # SRAM is directly attached to CPU
|
||||||
kwargs["integrated_rom_size"] = 0 # boot flash directly attached to CPU
|
kwargs["integrated_rom_size"] = 0 # boot flash directly attached to CPU
|
||||||
else:
|
else:
|
||||||
|
|
@ -87,8 +86,6 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# Gowin EMCU -------------------------------------------------------------------------------
|
# Gowin EMCU -------------------------------------------------------------------------------
|
||||||
if self.cpu_type == "gowin_emcu":
|
if self.cpu_type == "gowin_emcu":
|
||||||
# Use EMCU's UART.
|
|
||||||
self.cpu.connect_uart(platform.request("serial"))
|
|
||||||
# Use EMCU's SRAM.
|
# Use EMCU's SRAM.
|
||||||
self.bus.add_region("sram", SoCRegion(
|
self.bus.add_region("sram", SoCRegion(
|
||||||
origin = self.cpu.mem_map["sram"],
|
origin = self.cpu.mem_map["sram"],
|
||||||
|
|
@ -152,11 +149,13 @@ def main():
|
||||||
parser = LiteXArgumentParser(platform=sipeed_tang_nano_4k.Platform, description="LiteX SoC on Tang Nano 4K.")
|
parser = LiteXArgumentParser(platform=sipeed_tang_nano_4k.Platform, description="LiteX SoC on Tang Nano 4K.")
|
||||||
parser.add_target_argument("--flash", action="store_true", help="Flash Bitstream and BIOS.")
|
parser.add_target_argument("--flash", action="store_true", help="Flash Bitstream and BIOS.")
|
||||||
parser.add_target_argument("--sys-clk-freq", default=27e6, type=float, help="System clock frequency.")
|
parser.add_target_argument("--sys-clk-freq", default=27e6, type=float, help="System clock frequency.")
|
||||||
|
parser.add_target_argument("--with-hyperram", action="store_true", help="Enable HyperRAM.")
|
||||||
parser.add_target_argument("--with-video-terminal", action="store_true", help="Enable Video Terminal (HDMI).")
|
parser.add_target_argument("--with-video-terminal", action="store_true", help="Enable Video Terminal (HDMI).")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
soc = BaseSoC(
|
soc = BaseSoC(
|
||||||
sys_clk_freq = args.sys_clk_freq,
|
sys_clk_freq = args.sys_clk_freq,
|
||||||
|
with_hyperram = args.with_hyperram,
|
||||||
with_video_terminal = args.with_video_terminal,
|
with_video_terminal = args.with_video_terminal,
|
||||||
**parser.soc_argdict
|
**parser.soc_argdict
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue