RTL Design #32 · 2026-10-25 · Serial transmitters · Medium · about 15 min
Serial transmitter that forgets its byte
ser_tx sends one byte at a time on txd, one bit per clock: a start bit 0, then data[0] to data[7] (least significant first), then a stop bit 1. txd idles at 1.
- When idle,
startmakes the transmitter takedataon that rising edge. From the next cyclebusyis 1 andtxdshows the start bit;busyis 1 for exactly the ten bit-cycles. - The caller holds
datafor thestartcycle only, and may change it, or pulsestartagain, at any time after that. Astartwhilebusyis ignored. rst_n(synchronous) abandons any frame in progress.
Run sends two bytes and prints the bits that came out. Fix tx.sv.
Write and run your answer in the browser. The hidden tests check it, and it’s free.