# US 10,504,566 B2 · Storage device and operating method of storage device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,504,566 B2
- Document ID: US10504566B2
- Status: Granted
- Kind: B2
- Application number: 14/674,404
- Filed: 2015-03-31
- Published: 2016-01-28
- Granted: 2019-12-10
- Earliest claimed: 2014-07-23
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Juhyung Hong
- Web page: https://patentgrep.com/patent/US10504566B2

## CPC

- G11C 7/00: Arrangements for writing information into, or reading information out from, a digital store (G11C5/00 takes precedence; auxiliary circuits for stores using semiconductor devices G11C11/4063, G11C11/413)
- G06F 11/1004: {to protect a block of data words, e.g. CRC or checksum (G06F11/1076 takes precedence; security arrangements for protecting computers or computer systems against unauthorized activity G06F21/00)}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G11C 16/32: Timing circuits
- G06F 2212/1016: Performance improvement
- G06F 2212/7202: Allocation control and policies
- G06F 2212/7203: Temporary buffering, e.g. using volatile buffer or dedicated buffer blocks
- G11C 7/22: Read-write [R-W] timing or clocking circuits; Read-write [R-W] control signal generators or management
- G11C 16/10: Programming or data input circuits
- G11C 2207/2245: Memory devices with an internal cache buffer
- G11C 2207/2263: Write conditionally, e.g. only if new data and old data differ
- G11C: STATIC STORES (semiconductor memory devices H10B)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The method of operating a storage device includes receiving a command, an address, and data, and comparing data previously stored at a storage space of the nonvolatile memory corresponding to the address with the received data in response to the command. The method includes writing the received data at a nonvolatile memory when the previously stored data is different from the received data. Writing of the received data is terminated when the previously stored data is equal to the received data.

## Claims

### Claim 1

A method of operating a storage device that includes a nonvolatile memory and a memory controller configured to control the nonvolatile memory, the method comprising:
receiving a first write command, an address, and first data at the memory controller;
writing the first data in the nonvolatile memory based on the address in response to the first write command;
receiving at the memory controller a second command, the address, and second data;
upon determining that the second command is a write command, writing the second data in the nonvolatile memory based on the address in response to the second command; and
upon determining that the second command is a compare command including a first fused operation code,
comparing, by the memory controller, the first data previously stored at a storage space of the nonvolatile memory corresponding to the address with the second data in response to the compare command;
receiving at the memory controller a second write command including a second fused operation code associated with the first fused operation code, the second write command being received along with the address and the second data;
upon determining that the first data previously stored are not equal to the second data in response to the first fused operation code, writing the second data in the nonvolatile memory based on the address in response to the second write command; and
upon determining that the first data previously stored are equal to the second data in response to the first fused operation code, not writing the second data in response to the second write command.

### Claim 2 (depends on 1)

The method of claim 1, wherein said comparing further comprises:
reading the first data previously stored from the nonvolatile memory; and
comparing the read first data previously stored and the second data.

### Claim 3 (depends on 1)

The method of claim 1, wherein said comparing further comprises:
producing first hash data from the second data;
reading the first data previously stored from the nonvolatile memory;
producing second hash data from the read first data previously stored; and
comparing the first hash data and the second hash data.

### Claim 4 (depends on 1)

The method of claim 1, wherein the storage device further comprises a random access memory configured to operate in response to control of the memory controller,
wherein said comparing further comprises:
determining whether the first data previously stored is stored in the random access memory;
upon determining that the first data previously stored is stored in the random access memory, comparing the first data previously stored in the random access memory and the second data; and
upon determining that the first data previously stored is not stored in the random access memory, reading the first data previously stored from the nonvolatile memory and comparing the read first data previously stored and the second data.

### Claim 5 (depends on 1)

The method of claim 1, wherein the storage device further comprises a random access memory configured to operate in response to control of the memory controller,
wherein said comparing further comprises:
producing first hash data of the second data;
determining whether second hash data of the first data previously stored is stored in the random access memory;
upon determining that the second hash data of the first data previously stored is stored in the random access memory, comparing the second hash data from the random access memory and the first hash data; and
upon determining that the second hash data of the first data previously stored is not stored in the random access memory, reading the first data previously stored from the nonvolatile memory, producing the second hash data from the read first data previously stored, and comparing the first hash data and the second hash data produced from the read first data previously stored.

### Claim 6 (depends on 1)

The method of claim 1, wherein the compare command further comprises a first flag code indicating a first specific operation.

### Claim 7 (depends on 6)

The method of claim 6, wherein the second write command further comprises a second flag code indicating a second specific operation.

### Claim 8 (depends on 7)

The method of claim 7, further comprising outputting a first response as a result of said comparing when the first data previously stored is different from the second data, and wherein the second write command is received after the first response is output.

### Claim 9 (depends on 7)

The method of claim 7, wherein the compare command and the second write command are received regardless of operating steps of the storage device.

### Claim 10 (depends on 7)

The method of claim 7, wherein the compare command and the second write command comprise a Non Volatile Memory express (NVMe) format.

### Claim 11 (depends on 1)

The method of claim 1, wherein the storage device further comprises a random access memory configured to operate in response to control of the memory controller, and wherein said comparing comprises:
producing a first error check code of the second data;
determining whether a second error check code of the first data previously stored is stored in the random access memory;
upon determining that the second error check code of the first data previously stored is stored in the random access memory, comparing the second error check code stored in the random access memory with the first error check code; and
upon determining that the second error check code of the first data previously stored is not stored in the random access memory, reading the second error check code from the nonvolatile memory and comparing the read second error check code and the first error check code.

### Claim 12

A storage device comprising:
a nonvolatile memory; and
a memory controller configured to control the nonvolatile memory, and configured to write in the nonvolatile memory first data received together with an address and a first write command from an external device in response to the first write command,
wherein upon determining that a second command received from the external device along with the address and second data is a write command, the memory controller is further configured to write the second data in the nonvolatile memory based on the address in response to the second command,
wherein upon determining that a second command is a compare command including a first fused operation code, the memory controller is further configured to compare the second data with the first data previously stored at a storage space of the nonvolatile memory corresponding to the address in response to the compare command, and
wherein, after comparing the second data with the first data, the memory controller is further configured to receive a second write command including a second fused operation code related with the first fused operation code, determine whether the first data previously stored are equal to the second data in response to the first fused operation code, write the second data in the nonvolatile memory based on the address upon determining that the first data previously stored are not equal to the second data in response to the second write command, and not write the second data upon determining that the first data previously stored are equal to the second data in response to the second write command.

### Claim 13 (depends on 12)

The storage device of claim 12, wherein the memory controller comprises a hash generator configured to produce a first hash from the second data and a second hash from the first data previously stored, and wherein the memory controller is further configured to compare the first hash of the second data and the second hash of the first data previously stored to provide a comparison result and determine whether the second data is the same as the first data previously stored based upon the comparison result.

### Claim 14 (depends on 12)

The storage device of claim 12, wherein the memory controller comprises an Error Correction Code (ECC) block configured to produce a first error correction code from the second data, and wherein the memory controller is further configured to compare the first error correction code of the second data and a second error correction code of the first data previously stored to provide a comparison result and to determine whether the second data is the same as the first data previously stored based upon the comparison result.

### Claim 15

A storage device comprising:
a nonvolatile memory; and
a memory controller that controls the nonvolatile memory, the memory controller configured to
receive a first write command, an address, and first data,
write the first data in the nonvolatile memory based on the address in response to the first write command,
receive a second command, the address and second data;
upon determining that the second command is a write command, write the second data in the nonvolatile memory based on the address in response to the second command,
upon determining that the second command is a compare command including a first fused operation code,
compare the first data previously stored at a storage space of the nonvolatile memory corresponding to the address with the second data in response to the compare command,
receive a second write command including a second fused operation code associated with the first fused operation code, the second write command being received along with the address and the second data,
upon determining that the first data previously stored are not equal to the second data in response to the first fused operation code, write the second data in the nonvolatile memory based on the address in response to the second write command, and
upon determining that the first data previously stored are equal to the second data in response to the first fused operation code, not write the second data in response to the second write command.

### Claim 16 (depends on 15)

The storage device of claim 15, wherein the memory controller is further configured to determine whether the first data previously stored at the storage space of the nonvolatile memory corresponding to the address is the same as the second data by
reading the first data previously stored from the nonvolatile memory; and
comparing the read first data previously stored with the second data.

### Claim 17 (depends on 15)

The storage device of claim 15, wherein the memory controller is further configured to determine whether the first data previously stored at the storage space of the nonvolatile memory corresponding to the address is the same as the second data by
producing first hash data from the second data;
reading the first data previously stored from the nonvolatile memory;
producing second hash data from the read first data previously stored; and
comparing the first hash data and the second hash data.

### Claim 18 (depends on 15)

The storage device of claim 15, wherein the compare command and the second write command received by the memory controller comprise a flag code indicating a specific operation.

### Claim 19 (depends on 15)

The storage device of claim 15, wherein the memory controller is configured to determine whether the first data previously stored at the storage space of the nonvolatile memory corresponding to the address is the same as the second data by
producing a first error check code from the second data,
reading a second error check code of the first data previously stored from the nonvolatile memory, and
comparing the read second error check code of the first data previously stored and the produced first error check code.
