]
cont_source_data_d = Signal(32)
self.sync += \
- If(cont.source.stb,
+ If(cont.source.stb & (det == 0),
scrambler.sink.d.eq(cont.source.data)
)
)
fsm.act("WAIT_FIRST",
insert.eq(primitives["R_IP"]),
- If(cont.source.stb,
+ If(cont.source.stb & (det == 0),
NextState("COPY")
)
)
fsm.act("COPY",
- scrambler.sink.stb.eq(cont.source.stb),
+ scrambler.sink.stb.eq(cont.source.stb & ((det == 0) | eop)),
scrambler.sink.sop.eq(sop),
scrambler.sink.eop.eq(eop),
insert.eq(primitives["R_IP"]),
from lib.sata.common import *
from lib.sata import SATACON
-from lib.sata.bist import SATABIST
+from lib.sata.bist import SATABISTUnit
from lib.sata.test.hdd import *
from lib.sata.test.common import *
link_debug=False, link_random_level=0,
transport_debug=False, transport_loopback=False,
hdd_debug=True)
- self.controller = SATACON(self.hdd.phy)
- self.bist = SATABIST()
-
- self.pipeline = Pipeline(
- self.bist,
- self.controller,
- self.bist
- )
+ self.con = SATACON(self.hdd.phy)
+ self.bist = SATABISTUnit(self.con)
def gen_simulation(self, selfp):
hdd = self.hdd
r.append(signal[start:end].eq(item))
return r
-def _change_endianness(v):
- r = []
- for i in range(4):
- r.append(v[8*(3-i):8*(3-i+1)])
- return Cat(*r)
-
-def _big2little(v):
- return _change_endianness(v)
-
-def _little2big(v):
- return _change_endianness(v)
-
class SATATransportTX(Module):
def __init__(self, link):
self.sink = sink = Sink(transport_tx_description(32))