Skip to content

Commit

Permalink
WIP: make boards Gowin boards work with Apicula
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijndevos committed Aug 16, 2024
1 parent 81209b9 commit ea8ea07
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
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="GW1NR-9C")
GowinPlatform.__init__(self, "GW1NR-LV9QN88PC6/I5", _io, _connectors, toolchain=toolchain, devicename="GW1N-9C")
self.toolchain.options["use_mspi_as_gpio"] = 1

def create_programmer(self, kit="openfpgaloader"):
Expand Down
3 changes: 2 additions & 1 deletion litex_boards/targets/sipeed_tang_nano_20k.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ def __init__(self, sys_clk_freq=48e6,
with_led_chaser = True,
with_rgb_led = False,
with_buttons = True,
toolchain = "gowin",
**kwargs):

platform = sipeed_tang_nano_20k.Platform(toolchain="gowin")
platform = sipeed_tang_nano_20k.Platform(toolchain=toolchain)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)
Expand Down
4 changes: 3 additions & 1 deletion litex_boards/targets/sipeed_tang_nano_9k.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ class BaseSoC(SoCCore):
def __init__(self, sys_clk_freq=27e6, bios_flash_offset=0x0,
with_led_chaser = True,
with_video_terminal = False,
toolchain = "gowin",
**kwargs):
platform = sipeed_tang_nano_9k.Platform()
platform = sipeed_tang_nano_9k.Platform(toolchain=toolchain)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq, with_video_pll=with_video_terminal)
Expand Down Expand Up @@ -141,6 +142,7 @@ def main():
args = parser.parse_args()

soc = BaseSoC(
toolchain = args.toolchain,
sys_clk_freq = args.sys_clk_freq,
bios_flash_offset = int(args.bios_flash_offset, 0),
with_video_terminal = args.with_video_terminal,
Expand Down
4 changes: 3 additions & 1 deletion litex_boards/targets/sipeed_tang_primer_20k.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ def __init__(self, sys_clk_freq=48e6,
eth_ip = "192.168.1.50",
eth_dynamic_ip = False,
dock = "standard",
toolchain = "gowin",
**kwargs):

assert dock in ["standard", "lite"]

platform = sipeed_tang_primer_20k.Platform(dock, toolchain="gowin")
platform = sipeed_tang_primer_20k.Platform(dock, toolchain=toolchain)

if dock == "lite":
with_led_chaser = False # No leds on core board nor on dock lite.
Expand Down Expand Up @@ -208,6 +209,7 @@ def main():
args = parser.parse_args()

soc = BaseSoC(
toolchain = args.toolchain,
sys_clk_freq = args.sys_clk_freq,
with_spi_flash = args.with_spi_flash,
with_video_terminal = args.with_video_terminal,
Expand Down
3 changes: 2 additions & 1 deletion litex_boards/targets/sipeed_tang_primer_25k.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ def __init__(self, sys_clk_freq=50e6,
with_spi_flash = False,
with_led_chaser = True,
with_buttons = True,
toolchain = "gowin",
**kwargs):

platform = sipeed_tang_primer_25k.Platform(toolchain="gowin")
platform = sipeed_tang_primer_25k.Platform(toolchain=toolchain)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)
Expand Down

0 comments on commit ea8ea07

Please sign in to comment.