Data writing method and apparatus, and electronic device
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsHaoyang Li, Yuan Ruan
Life of this patent
Estimating the term…
Abstract
In the field of data reading and writing technologies, a data writing method is associated with a data writing apparatus and an electronic device. The data writing method includes: determining whether a start storage address of a first data block is aligned with a bus bit width of a storage; in response to that the start storage address of the first data block is not aligned with the bus bit width of the storage, determining whether a second data block which is a data block immediately before the first data block is compressed; in response to that the second data block is compressed, executing complete writing on a first beat of the first data block.
Claims20
A data writing method, comprising:
- determining whether a start storage address of a first data block is aligned with a bus bit width of a storage;
- in response to that the start storage address of the first data block is not aligned with the bus bit width of the storage, determining whether a second data block which is a data block immediately before the first data block is compressed;
- and
- in response to that the second data block is compressed, executing complete writing on a first beat of the first data block, wherein a bit width of the complete writing is equal to the bus bit width of the storage.
An electronic device, comprising:
- at least one processor;
- and
- a storage configured to be communicatively connected to the at least one processor,
- wherein an instruction configured to be executed by the at least one processor is stored in the storage, and the at least one processor is configured to execute the instruction to implement a data writing method, the data writing method including:
- determining whether a start storage address of a first data block is aligned with a bus bit width of the storage,
- in response to that the start storage address of the first data block is not aligned with the bus bit width of the storage, determining whether a second data block which is a data block immediately before the first data block is compressed, and
- in response to that the second data block is compressed, executing complete writing on a first beat of the first data block, wherein a bit width of the complete writing is equal to the bus bit width of the storage.
A non-volatile computer-readable storage medium storing therein a computer instruction, the computer instruction configured to enable a computer to implement a data writing method, the date writing method including:
- determining whether a start storage address of a first data block is aligned with a bus bit width of a storage,
- in response to that the start storage address of the first data block is not aligned with the bus bit width of the storage, determining whether a second data block which is a data block immediately before the first data block is compressed, and
- in response to that the second data block is compressed, executing complete writing on a first beat of the first data block, wherein a bit width of the complete writing is equal to the bus bit width of the storage.
Dependencies are inferred from the claim text.