mithro / valentyusb

USB Full-Speed core written in migen/LiteX
BSD 3-Clause "New" or "Revised" License
17 stars 3 forks source link

Figure out the issue with duplicate byte when packet ends in 0xfc #23

Open mithro opened 5 years ago

mithro commented 5 years ago

@xobs Can you dump some log here?

xobs commented 5 years ago

Example packets:

 a5 e0 86
 a5 c1 fd fd # Should be a5 e1 7e
 a5 e2 3e
---
 a5 fb 56
 a5 fc fc 2e # Should be a5 fc 2e
 65 fb ad
xobs commented 5 years ago

Switching to i_valid as seen in https://github.com/xobs/valentyusb/commit/d8e03e0c13be32b58cc67aa7709cb9172d98b279 fixes this problem, but other issues crop up.

xobs commented 5 years ago

Here's an example of a test that's failing:

    def test_usb2_stuffed_sof(self):
        return self.pkt_decode_test(
            dict(
                value    = "11 00000001 10100101 00010000 01111101 __111",
                data     = [0xa5, 0x10, 0x7d],
                pkt_good = True,
            ), "USB2 Stuffed SOF")