Close

YGMII7-16

A project log for YGMII

YG's Media Independent Interface, in case your miniMAC is on a different chip than your miniPHY

yann-guidon-ygdesYann Guidon / YGDES 04/11/2026 at 19:580 Comments

Let's start with an easy implementation, with the simplest protocol:

As usual, the data precedes the clock transition so the emitting circuit is DDR, running at 1 clock cycle per nibble. So it's "simple, synchronous design" and should not be hard to design.

So let's start with MAJ4 to toggle the bus. That makes 5 bits and 6 counts:

The circuit here is a reduced version of the previous ones.

Adding the buffer is pretty simple, as shown in this extended circuit:

Just be sure that it's possible to synchronously clear the output.

So foor, so gad.

Then it becomes a bit more funky, as the clock generator must be designed. It's based around the classic "quadrature counter" or "2-bit Johnson counter" or "2-bit Gray counter": that's all the same circuit. It must generate at least 4 sequences:

One half can be realised by swapping the outputs with a pair of MUX.

The other half controls how signals are generated and circulate between the registers.

Here is what we get :

OK I made a tiny mistake for the one-shot sequence, the feedback is behind the AND2:

So all that's left for a transmitter is the 16->4 MUX4, which is quite large/cumbersome with CircuitJS but you get the idea. As you can see:

I have added a protection to the START signal so it can only work when DONE.

And then, one still has to design the FSM, but you see it's not difficult with the control and status signals:

The decoder/receiver is a different pizza party though. This is why I create the "easy" encoder, so I can get the decoder right.

Discussions