Endian Swapping Serializer
Communication bridges frequently translate between protocols with different bit-order conventions, such as SPI and UART. The endian-swapping serializer bridges these domains by dynamically reversing the transmission order based on a control signal.
The circuit accepts a 4-bit parallel input D and converts it to a serial output tx. A direction pin dir controls the shift direction.
Behavioral requirements:
- When
loadis 1, the 4-bit inputDis loaded into the internal register on the rising clock edge. - When
loadis 0, the register shifts its contents on each rising clock edge, shifting in 0s. - If
diris 1, the circuit operates in MSB-first mode. Thetxpin outputsD[3], thenD[2],D[1],D[0]on successive cycles. - If
diris 0, the circuit operates in LSB-first mode. Thetxpin outputsD[0], thenD[1],D[2],D[3]on successive cycles. - The
txoutput must reflect the current bit to be transmitted immediately after the clock edge.
Constraints
- Use D flip-flops for all state storage.
- Implement the shift logic using basic logic gates and multiplexers.
- Do not use pre-built serializer or shift register macros.
Topics
Solve this problem
Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.
This problem is part of Codiode Pro. The statement above is free to read.
The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.
Part of Interface and Communication Circuits
Problem 29 of 79 in the Interface and Communication Circuits track.
Related problems
Browse all problems · Digital logic design practice problems · Learning tracks