The invention discloses a device and a method for matrix transposition based on a
static random access memory (SRAM). The device comprises an address decoding module, a read-write
bus, a
diagonal read control module and n matrix transposition storage bodies, wherein each matrix transposition storage body is formed by connecting n rows and n columns of matrix storage modules; a 14-
pipe SRAM storage module is positioned on a
diagonal from the left upper side to the right lower side, and a 12-
pipe SRAM storage module is positioned outside the
diagonal. The 14-
pipe SRAM storage module accesses elements, which are positioned on the diagonal, in a matrix, and the 12-pipe SRAM storage module accesses elements, which are positioned outside the diagonal, in the matrix. According to the method, corresponding accesses for single words, single rows, single columns or single diagonals are executed according to the type of an input matrix and the difference of access
modes, so that transposition is finished. The device and the method have the advantages of simple implementation method, simple and compact structure, low cost, high transposition speed, high efficiency, flexibility and multi-functionality.