Elastic buffer is often used in the receiving module of the physical layer of serial high-speed interface, which is used to compensate the frequency and synchronize the phase of the recovered clock and the local clock in the physical layer receiver. Based on the protocol of PCIe4.0, an elastic buffer is designed for PCIe4.0 with half full implementation. On the basis of the protocol, the clock compensation function can be well realized, and the data interface of its module and block alignment module can also be combined. Through the simulation verification of VCS, the frequency and phase compensation between the recovery clock and the local clock can be realized, and the correctness of its data receiving function can also be proved.