def __init__(self, io):
self.io = io
self.ck = ck = Signal()
- self.cs = cs = Signal()
+ self.cs = cs = Signal(len(self.io.cs_n))
self.rst_n = rst_n = Signal()
self.dq_o = dq_o = Signal(8)
comb += [
self.io["rwds_o"].eq(rwds_o),
- self.io["csn_o"].eq(~cs),
+ self.io["cs_n"].eq(~cs),
self.io["csn_oe"].eq(0),
self.io["ck_o"].eq(ck),
self.io["ck_oe"].eq(0),
# dut = HyperRAM(io=HyperRamPads(), phy_kls=TestHyperRAMPHY)
class HyperRAMPads:
- def __init__(self, dw=8):
+ def __init__(self, dw=8, n_cs=1):
self.rst_n = Signal()
self.ck = Signal()
- self.cs_n = Signal()
+ self.cs_n = Signal(n_cs)
self.dq = Record([("oe", 1), ("o", dw), ("i", dw)])
self.rwds = Record([("oe", 1), ("o", dw//8), ("i", dw//8)])
self.dq.o.name = "dq_o"
def __init__(self, pads):
self.pads = pads
self.ck = pads.ck
- self.cs = Signal()
+ self.cs = Signal(len(self.pads.cs_n))
self.rst_n = pads.rst_n
self.dq_o = pads.dq.o
self.dq_i = pads.dq.i
This core favors portability and ease of use over performance.
Tested: Winbond W956D8MBYA latency=7
+ Cypress S27KL0641DABHI020 requires latency=6
"""
- def __init__(self, *, io, phy_kls, latency=6, bus=None,
- features=frozenset()):
+ def __init__(self, *, io, phy_kls,
+ latency=6,
+ addr_width=23, # 8 GBytes, per IC
+ bus=None, features=frozenset()):
super().__init__()
self.io = io
self.phy = phy_kls(io)
if __name__ == '__main__':
layout=[('rwds_o', 1), ('rwds_oe', 1),
- ('csn_o', 1), ('csn_oe', 1),
+ ('cs_n', 1), ('csn_oe', 1),
('ck_o', 1), ('ck_oe', 1),
('rst_n', 1)]
for i in range(8):