Eye Diagram Generation
Build an eye diagram from a received serial waveform and measure the eye height and width, which is how a link's margin is judged.
Constraints
- Input is the waveform plus samples per symbol.
- Overlay two symbol periods per trace.
- Eye height is the vertical opening at the sampling instant.
- Eye width is the horizontal opening at the decision threshold.
- Return both measurements plus the overlaid trace matrix.
- Must handle a waveform that is not an exact multiple of the symbol length.
1function [height, width, traces] = eye_diagram(x, sps)2% TODO3end