UART TX Frame Shifter
Build the shift register that serializes a UART frame.
Task
Load a UART frame containing one start bit, eight data bits LSB-first, and one stop bit. While `shift` is high, advance the frame by one bit.
Examples
- data_in=8'h41, load=1 → frame contains start + 8 data bits + stop
- shift=1 → the next serial bit moves to bit 0
Constraints
- UART idles high.
- Start bit is 0 and stop bit is 1.
- Transmit data LSB-first.
What this problem is testing
A strong answer translates the requirement into synthesizable state and combinational logic, states reset and update semantics precisely, and handles boundary conditions rather than only the nominal case.
Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.
Verification plan
- Check reset or initialization before normal operation.
- Exercise the nominal sequence cycle by cycle.
- Test boundaries such as zero, maximum count, wraparound, full/empty, or simultaneous controls when they apply.
- Prove the design holds state when an enable or qualifying condition is absent.
Edge cases worth testing
- Back-to-back frames.
- Start/stop timing and LSB-first ordering.
Common mistakes
- Incomplete combinational assignments that infer a latch.
- Blocking/non-blocking assignments that do not match combinational versus sequential intent.
- Parameter-width and boundary errors.
- Passing the happy path while missing reset, overflow, simultaneous operations, or illegal requests.
Interview follow-up questions
- How would you parameterize this design without introducing width or boundary bugs?
- What changes if reset timing or polarity changes?
Concepts to review
UART, shift-register, framing
Open UART TX Frame Shifter in the HDLForge interactive editor.
Related problems
- 2:1 Multiplexer — Easy
- Parameterized Counter — Easy
- Priority Encoder — Medium
- Synchronous FIFO — Hard
- Shift Register — Easy
Explore the RTL Design Practice & Interview Preparation hub.