Skip to content

Commit

Permalink
make 9k work
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijndevos committed Aug 19, 2024
1 parent 751c4a4 commit 647a330
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion litex_boards/platforms/sipeed_tang_nano_4k.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Platform(GowinPlatform):

def __init__(self, toolchain="gowin"):
# Educational GoWin IDE v. 1.9.8.03
GowinPlatform.__init__(self, "GW1NSR-LV4CQN48PC6/I5", _io, _connectors, toolchain=toolchain, devicename="GW1NS-4")
GowinPlatform.__init__(self, "GW1NSR-LV4CQN48PC6/I5", _io, _connectors, toolchain=toolchain, devicename="GW1NSR-4C")
# Licensed GoWin IDE v. 1.9.7.06 Beta
# GowinPlatform.__init__(self, "GW1NSR-LV4CQN48PC7/I6", _io, _connectors, toolchain=toolchain, devicename="GW1NSR-4C")

Expand Down
2 changes: 1 addition & 1 deletion litex_boards/platforms/sipeed_tang_nano_9k.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Platform(GowinPlatform):
default_clk_period = 1e9/27e6

def __init__(self, toolchain="gowin"):
GowinPlatform.__init__(self, "GW1NR-LV9QN88PC6/I5", _io, _connectors, toolchain=toolchain, devicename="GW1N-9C")
GowinPlatform.__init__(self, "GW1NR-LV9QN88PC6/I5", _io, _connectors, toolchain=toolchain, devicename="GW1NR-9C")
self.toolchain.options["use_mspi_as_gpio"] = 1

def create_programmer(self, kit="openfpgaloader"):
Expand Down
5 changes: 4 additions & 1 deletion litex_boards/targets/sipeed_tang_nano_9k.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class BaseSoC(SoCCore):
def __init__(self, sys_clk_freq=27e6, bios_flash_offset=0x0,
with_led_chaser = True,
with_video_terminal = False,
no_sdram = False,
toolchain = "gowin",
**kwargs):
platform = sipeed_tang_nano_9k.Platform(toolchain=toolchain)
Expand All @@ -88,7 +89,7 @@ def __init__(self, sys_clk_freq=27e6, bios_flash_offset=0x0,
self.cpu.set_reset_address(self.bus.regions["rom"].origin)

# HyperRAM ---------------------------------------------------------------------------------
if not self.integrated_main_ram_size:
if not no_sdram and not self.integrated_main_ram_size:
# TODO: Use second 32Mbit PSRAM chip.
dq = platform.request("IO_psram_dq")
rwds = platform.request("IO_psram_rwds")
Expand Down Expand Up @@ -138,6 +139,7 @@ def main():
parser.add_target_argument("--bios-flash-offset", default="0x0", help="BIOS offset in SPI Flash.")
parser.add_target_argument("--with-spi-sdcard", action="store_true", help="Enable SPI-mode SDCard support.")
parser.add_target_argument("--with-video-terminal", action="store_true", help="Enable Video Terminal (HDMI).")
parser.add_target_argument("--no-sdram", action="store_true", help="Disable SDRAM support.")
parser.add_target_argument("--prog-kit", default="openfpgaloader", help="Programmer select from Gowin/openFPGALoader.")
args = parser.parse_args()

Expand All @@ -146,6 +148,7 @@ def main():
sys_clk_freq = args.sys_clk_freq,
bios_flash_offset = int(args.bios_flash_offset, 0),
with_video_terminal = args.with_video_terminal,
no_sdram=args.no_sdram,
**parser.soc_argdict
)

Expand Down

0 comments on commit 647a330

Please sign in to comment.