摘要 |
Embodiments of the present invention provide a method and a device for writing data. The method includes: receiving a data block that is to be written in an EDRAM; obtaining, according to a status of a bank in the EDRAM, usable addresses corresponding to usable banks in the EDRAM; selecting an address from the usable addresses as a write-in address of the data block; and writing the data block in a bank corresponding to the write-in address. In the embodiments of the present invention, problems in the prior art that a conflict occurs when a data block is written in a bank and a conflict occurs when a data block is read from a bank can be avoided, and working efficiency of the EDRAM is improved.
|