It's about time I started experimenting with serial encoding in DLS.
First things first, What's the difference between parallel and serial communication?
In Sebastian's amazing Digital Logic Sim YouTube series, all communication has been done in parallel. This is where we send a given amount of bits all at the same time on their own wires. For serial communication, we need to send those bits one after the other, over time, on a single wire.
We'll need two chips to do this. A serializer, and a deserializer.
The serializer will take in a parallel binary input, and convert it into a series of pulses that represent the original number.
The deserializer will take in that series of pulses and convert it back into the original number.
So, in reality, at least for the way I went about this, the serial output will require two wires. one for the clock signal, and one for the data signal.
Here's how that would look;
Pretty neat, right? Don't worry, it get's very ugly from here! Boy, I really need to rework these things to be simpler, or at least look nicer.
Alas, here are my first iterations of the serializer and deserializer;
Serializer:
Deserializer:
To be honest with you, I'm quite terrified to try and explain how these actually work. I'm almost certain there's a far better way to accomplish this behavior, but this is what I came up with.
Long story short, they both use a counter and multiplexor to select which bit is being written/read to/from a register. There is some logic to decide when the clock runs the counter, and some logic to decide when to write to the registers.
One concern for the future that I have, is that I've made the serializer with an internal clock. This may, or may not come back to haunt me later on.
And that's as much as I currently feel comfortable saying about these things!
I'll happily answer any questions you ask to the best of my ability!
This one took some time to get right, as I pretty much just built it from scratch using the diagram I showed as my guide. I'd love to hear your opinions on it! I'd also love to see someone come up with their own version and share it with me. I can't wait to experiment with creating more components that use serialized signals!
That's all for now! I've more DLS hijinks to get up to! Thanks for reading! <3