This invention relates to the fields of near-memory computing and integrated circuits, and discloses a sparse
data compression circuit and a near-memory computing
chip for near-memory computing. The invention includes: a first rearrangement unit, which rearranges the sparse input data of the
current cycle into locally compact data; a buffer unit, which stores the buffer data of the previous cycle; a
control unit, connected to the buffer unit, which generates an offset
control signal based on the buffer data; a second rearrangement unit, connected to the first rearrangement unit, the buffer unit, and the
control unit, which, based on the offset
control signal, concatenates the effective data of the locally compact data and the buffer data, and outputs the concatenated data; and an output unit, connected to the buffer unit and the second rearrangement unit, which, when the concatenated data reaches a preset transmission bit width, extracts data corresponding to the preset transmission bit width from the concatenated data as target data for output, and stores the remaining data in the concatenated data as buffer data in the buffer unit. This addresses the overall data
throughput performance problem in near-memory
computing systems.