CPC G06F 7/5443 (2013.01) [G06G 7/16 (2013.01); G11C 7/06 (2013.01); G11C 7/1006 (2013.01); G11C 7/1051 (2013.01); G11C 7/1078 (2013.01)] | 8 Claims |
1. An in-memory computing method, adapted to perform multiply-accumulate (MAC) operations by a processor using a memory, wherein the memory comprises a plurality of intersecting input lines and output lines, a plurality of memory cells respectively arranged at intersections of the input lines and the output lines, and a plurality of sensing amplifiers respectively connected to the output lines, the method comprising:
respectively dividing the input data and the weight data into multi-bit most significant bit (MSB) and multi-bit least significant bit (LSB), converting each bit of the multi-bit MSB and each bit of the multi-bit LSB into unary codes according to numeric values of the bits, and duplicating the converted unary codes to generate input data in an unfolded dot product format and weight data in the unfolded dot product format;
writing the input data in the unfolded dot product format and the weight data in the unfolded dot product format into the input lines and the memory cells in batches, sensing currents output from the output lines by using the plurality of sensing amplifiers to generate sensed values, and accumulating the sensed values of the sensing amplifiers to obtain a plurality of computation results;
filtering out the computation results with numeric values no greater than a threshold value; and
performing a post-processing operation on the filtered computation results according to portions to which the computation results correspond to obtain output data.
|