mirror of
https://github.com/enjoy-digital/litedram.git
synced 2025-01-04 09:52:25 -05:00
phy: BitSlip now integrated in LiteX
This commit is contained in:
parent
767b0144eb
commit
3fe29ddacc
2 changed files with 1 additions and 18 deletions
|
@ -1,17 +0,0 @@
|
|||
from litex.gen import *
|
||||
|
||||
|
||||
class BitSlip(Module):
|
||||
def __init__(self, dw):
|
||||
self.i = Signal(dw)
|
||||
self.o = Signal(dw)
|
||||
self.value = Signal(max=dw)
|
||||
|
||||
# # #
|
||||
|
||||
r = Signal(2*dw)
|
||||
self.sync += r.eq(Cat(r[dw:], self.i))
|
||||
cases = {}
|
||||
for i in range(dw):
|
||||
cases[i] = self.o.eq(r[i:dw+i])
|
||||
self.sync += Case(self.value, cases)
|
|
@ -2,12 +2,12 @@
|
|||
# tCK=5ns CL=7 CWL=6
|
||||
|
||||
from litex.gen import *
|
||||
from litex.gen.genlib.misc import BitSlip
|
||||
|
||||
from litex.soc.interconnect.csr import *
|
||||
|
||||
from litedram.common import PhySettings
|
||||
from litedram.phy.dfi import *
|
||||
from litedram.phy.bitslip import BitSlip
|
||||
|
||||
# TODO:
|
||||
# - verify read_latency in simulation (OSERDESE3/ISERDESE3)
|
||||
|
|
Loading…
Reference in a new issue