alexforencich / cocotbext-eth

Ethernet interface modules for Cocotb
MIT License
51 stars 15 forks source link

XGMII interface needs to send control codes #5

Open nltcn opened 1 month ago

nltcn commented 1 month ago

Control codes cannot be sent out due to the _run requiring preamble to payload. When a local fault occurs on the receive side, we must advise link partner and restart sync with a control code. Add a way to transmit control codes.

alexforencich commented 1 month ago

What control codes do you want to send? Ordered sets?

As far as I can tell, the local fault/remote fault ordered sets are only for indication, they have no effect over the actual link. CDR and block lock is completely independent of the data being sent over the link.

nltcn commented 1 month ago

When in local fault, the XGMII will output 0x0100009c with control mask 0x11. The system must send 0x0200009c with control mask 0x11 (yes, it is part of the ordered set) to let the link partner that it is not ready yet and that resync is required. Once local fault has been cleared, we can send the idle.

alexforencich commented 1 month ago

So you want to have the local fault/remote fault indication. What's the purpose? It has no effect on the operation of the actual link.

alexforencich commented 1 month ago

Ah sorry, I just realized this is the cocotbext-eth repo, not the actual HDL one. I need to figure out the proper way of handing ordered sets, as they're not data and it doesn't really make sense to handle them as such, at least in terms of local fault and remote fault.