Skip to content

Commit 27051e9

Browse files
committed
boards: fix Trenz TEL0025 clock and RAM size
Use the usable 25MHz CLK1_25M input on G1 as the only exposed board clock, and default the target system clock to 25MHz. Map the TEL0025 HyperRAM window as 32MiB and refresh the generated board inventory default clock.
1 parent 1a68921 commit 27051e9

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

docs/boards_inventory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ python3 .github/scripts/generate_board_inventory.py --write
216216
| `trenz_te0741` | trenz_te0741 | vivado | `100000000.0` | - | included |
217217
| `trenz_te0890` | trenz_te0890 | vivado | `100000000.0` | - | included |
218218
| `trenz_tec0117` | trenz_tec0117 | gowin | `25000000.0` | SDCard, SPI SDCard | included |
219-
| `trenz_tel0025` | trenz_tel0025 | radiant | `50000000.0` | SDCard, SPI SDCard, SPI Flash | included |
219+
| `trenz_tel0025` | trenz_tel0025 | radiant | `25000000.0` | SDCard, SPI SDCard, SPI Flash | included |
220220
| `trenz_tem0006` | trenz_tem0006 | libero_soc | `12000000.0` | - | included |
221221
| `tul_pynq_z2` | tul_pynq_z2 | vivado | `100000000.0` | - | included |
222222
| `xilinx_ac701` | xilinx_ac701 | vivado | `100000000.0` | Ethernet, SPI Flash, PCIe | included |

litex_boards/platforms/trenz_tel0025.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
_io = [
1414
# Clk / Rst
15-
("clk25", 0, Pins("C1"), IOStandard("LVCMOS33")), # CLK_25M.
16-
("clk25_aux", 0, Pins("G1"), IOStandard("LVCMOS33")), # CLK1_25M.
17-
("clk12", 0, Pins("E6"), IOStandard("LVCMOS33")), # CLK_12M.
15+
("clk25", 0, Pins("G1"), IOStandard("LVCMOS33")), # CLK1_25M.
1816
("user_btn_n", 0, Pins("C8"), IOStandard("LVCMOS33"), Misc("PULLMODE=UP")),
1917

2018
# Leds (RGB LED, active-low).
@@ -153,6 +151,4 @@ def create_programmer(self, cable="ft2232"):
153151

154152
def do_finalize(self, fragment):
155153
LatticeNexusPlatform.do_finalize(self, fragment)
156-
self.add_period_constraint(self.lookup_request("clk25", loose=True), 1e9/25e6)
157-
self.add_period_constraint(self.lookup_request("clk25_aux", loose=True), 1e9/25e6)
158-
self.add_period_constraint(self.lookup_request("clk12", loose=True), 1e9/12e6)
154+
self.add_period_constraint(self.lookup_request("clk25", loose=True), 1e9/25e6)

litex_boards/targets/trenz_tel0025.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# Constants ----------------------------------------------------------------------------------------
2323

24-
_HYPERRAM_SIZE = 8*MEGABYTE
24+
_HYPERRAM_SIZE = 32*MEGABYTE
2525
_OPENSBI_OFFSET = 0x00f00000
2626
_OPENSBI_SIZE = 0x00080000
2727

@@ -60,7 +60,7 @@ def __init__(self, platform, sys_clk_freq):
6060
# BaseSoC ------------------------------------------------------------------------------------------
6161

6262
class BaseSoC(SoCCore):
63-
def __init__(self, sys_clk_freq=50e6, toolchain="radiant",
63+
def __init__(self, sys_clk_freq=25e6, toolchain="radiant",
6464
with_hyperram = True,
6565
with_led_chaser = True,
6666
with_sdcard = False,
@@ -82,8 +82,9 @@ def __init__(self, sys_clk_freq=50e6, toolchain="radiant",
8282
)
8383
if with_opensbi and main_ram_size < (_OPENSBI_OFFSET + _OPENSBI_SIZE):
8484
raise ValueError(
85-
"vexriscv_smp/vexiiriscv Linux variants place OpenSBI beyond "
86-
"the TEL0025 8MiB HyperRAM window; use vexriscv linux instead."
85+
"vexriscv_smp/vexiiriscv Linux variants place OpenSBI at "
86+
"main_ram + 0x00f00000; provide at least 16MiB of main RAM "
87+
"or use vexriscv linux instead."
8788
)
8889

8990
# CRG --------------------------------------------------------------------------------------
@@ -136,7 +137,7 @@ def __init__(self, sys_clk_freq=50e6, toolchain="radiant",
136137
def main():
137138
from litex.build.parser import LiteXArgumentParser
138139
parser = LiteXArgumentParser(platform=trenz_tel0025.Platform, description="LiteX SoC on Trenz TEL0025.")
139-
parser.add_target_argument("--sys-clk-freq", default=50e6, type=float, help="System clock frequency.")
140+
parser.add_target_argument("--sys-clk-freq", default=25e6, type=float, help="System clock frequency.")
140141
parser.add_target_argument("--no-hyperram", action="store_true", help="Disable HyperRAM support.")
141142
parser.add_target_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash support.")
142143
parser.add_target_argument("--flash", action="store_true", help="Flash bitstream to SPI Flash.")

0 commit comments

Comments
 (0)