Skip to content

Commit f8a6f0c

Browse files
Merge pull request #770 from litex-hub/efinix-ti60-hyperram-integration
targets/efinix_ti60: use common HyperRAM integration
2 parents 78eb0cf + 33d2ff9 commit f8a6f0c

1 file changed

Lines changed: 9 additions & 32 deletions

File tree

litex_boards/targets/efinix_ti60_f225_dev_kit.py

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
from litex.soc.cores.clock import *
1717
from litex.soc.integration.soc import *
1818
from litex.soc.integration.builder import *
19-
from litex.soc.integration.soc import SoCRegion
20-
from litex.soc.interconnect import wishbone
21-
22-
from litex.soc.cores.hyperbus import HyperRAM
2319

2420
from liteeth.phy.titaniumrgmii import LiteEthPHYRGMII
2521

@@ -87,35 +83,16 @@ def __init__(self, sys_clk_freq=200e6,
8783

8884
# HyperRAM ---------------------------------------------------------------------------------
8985
if with_hyperram:
90-
# HyperRAM Parameters.
91-
hyperram_device = "W958D6NW"
92-
hyperram_size = 32 * MEGABYTE
93-
hyperram_cache_size = 16 * KILOBYTE
94-
95-
# HyperRAM Bus/Slave Interface.
96-
hyperram_bus = wishbone.Interface(data_width=32, address_width=32, addressing="word")
97-
self.bus.add_slave(name="main_ram", slave=hyperram_bus, region=SoCRegion(origin=0x40000000, size=hyperram_size, mode="rwx"))
98-
99-
# HyperRAM L2 Cache.
100-
hyperram_cache = wishbone.Cache(
101-
cachesize = hyperram_cache_size//4,
102-
master = hyperram_bus,
103-
slave = wishbone.Interface(data_width=32, address_width=32, addressing="word")
104-
)
105-
hyperram_cache = FullMemoryWE()(hyperram_cache)
106-
self.hyperram_cache = hyperram_cache
107-
self.add_config("L2_SIZE", hyperram_cache_size)
108-
109-
# HyperRAM Core.
110-
self.hyperram = HyperRAM(
111-
pads = platform.request("hyperram"),
112-
latency = 7,
113-
latency_mode = "variable",
114-
sys_clk_freq = sys_clk_freq,
115-
clk_ratio = "2:1",
116-
dq_i_cd = "sys2x_ps",
86+
self.add_hyperram(
87+
region_name = "main_ram",
88+
origin = self.mem_map["main_ram"],
89+
size = 32*MEGABYTE,
90+
l2_cache_size = 16*KILOBYTE,
91+
latency = 7,
92+
latency_mode = "variable",
93+
clk_ratio = "2:1",
94+
dq_i_cd = "sys2x_ps",
11795
)
118-
self.comb += self.hyperram_cache.slave.connect(self.hyperram.bus)
11996

12097
# Ethernet / Etherbone ---------------------------------------------------------------------
12198
if with_ethernet or with_etherbone:

0 commit comments

Comments
 (0)