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, start makes the transmitter take data on that rising edge. From the next cycle busy is 1 and txd shows the start bit; busy is 1 for exactly the ten bit-cycles.
  • The caller holds data for the start cycle only, and may change it, or pulse start again, at any time after that. A start while busy is 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.