enjoy-digital/usb3_pipe

Scrambling

enjoy-digital opened this issue · 1 comments

USB3 scrambling is similar to SATA srambling, so LiteSATA scrambling code can be directly reused:
https://github.com/enjoy-digital/litesata/blob/master/litesata/core/link.py#L254-L337
https://github.com/enjoy-digital/litesata/blob/master/test/scrambler.c
https://github.com/enjoy-digital/litesata/blob/master/test/link_scrambler_tb.py

When implementing LiteSATA, lfsr_coefs were directly reused from the specification to speedup development. It would be good to improve that and be able to generate these coefficients directly from the polynom.

Scrambling is now implemented and tested against a USB3 Host. (https://github.com/enjoy-digital/usb3_pipe/blob/master/usb3_pipe/scrambling.py)