Storage device determining whether data is all one or all zero based on state value and operating method of the storage device
A storage device may include a memory and a controller. The memory may include a plurality of memory units. The controller may transmit a read command for a target memory unit among the plurality of memory units to the memory, read a state value from the memory after transmitting the read command to the memory, and determine that all bits of data stored in the target memory unit are 1 when the state value is a first value, and determine that all bits of the data stored in the target memory unit are 0 when the state value is a second value.
1 . A storage device comprising:
a memory including a plurality of memory units; and
a controller configured to:
transmit, in response to a command from a requestor, a set state command to the memory for accessing a target memory unit among the plurality of memory units of the memory, the set state command including an option value indicating that the memory is to set a state value according to data stored in the target memory unit,
read the state value from the memory by transmitting a state read command after the set state command, and
determine, based on the state value, values of the data stored in the target memory unit by:
in response to the state value being a first value, determining that all bits of the data stored in the target memory unit are 1 and not to send a data output command to the memory,
in response to the state value being a second value, determining that all bits of the data stored in the target memory unit are 0 and not to send the data output command to the memory,
in response to the state value being neither the first value nor the second value, sending the data output command requesting output of the data stored in the target memory unit to the memory and receiving the data stored in the target memory unit from the memory, and
transmit the determined value of the data stored in the target memory unit to the requestor,
wherein the memory is configured to set the state value to the first value when a number of bits having a value of 1 among bits of the data stored in the target memory unit is equal to or greater than a first threshold, and
wherein the first threshold is less than a total number of bits of data stored in the target memory unit.
2 . The storage device according to claim 1 ,
wherein the memory is configured to set the state value to the second value when a number of bits having a value of 0 among bits of the data stored in the target memory unit is equal to or greater than a second threshold, and
wherein the second threshold is less than a total number of bits of data stored in the target memory unit.
3 . The storage device according to claim 1 ,
wherein the memory is configured to output the data stored in the target memory unit to the controller when the state value is set to a third value.
4 . The storage device according to claim 3 ,
wherein the controller is configured not to decode the data stored in the target memory unit when the state value is set to the first value or the second value, and
wherein the controller is configured to decode the data stored in the target memory unit when the state value is set to the third value.
5 . The storage device according to claim 1 ,
wherein the controller is configured to determine whether to skip the data output command based on the state value.
6 . A method for operating a storage device, comprising:
transmitting, in response to receiving a command from a requestor, a set state command to a memory for accessing a target memory unit among a plurality of memory units included in the memory, the set state command including an option value indicating that the memory is to set a state value according to data stored in the target memory unit;
reading the state value from the memory by transmitting a state read command after the set state command; and
determining values of the data stored in the target memory unit by:
determining that all bits of data stored in the target memory unit are 1 in response to the state value being a first value,
determining that all bits of the data stored in the target memory unit are 0 in response to the state value being a second value,
in response to the state value being neither the first value nor the second value, sending a data output command requesting output of the data stored in the target memory unit to the memory and receiving the data stored in the target memory unit from the memory, and
transmitting the determined values of the data stored in the target memory unit to the requestor,
wherein the method further comprises:
setting, by the memory, the state value to the first value when a number of bits of 1 among the bits of the data stored in the target memory unit is equal to or greater than a first threshold,
wherein the first threshold is less than the total number of bits of the data stored in the target memory unit.
7 . The method according to claim 6 , further comprising:
setting, by the memory, the state value to the second value when a number of bits of 0 among the bits of the data stored in the target memory unit is equal to or greater than a second threshold,
wherein the second threshold is less than the total number of bits of data stored in the target memory unit.
8 . The method according to claim 6 ,
wherein determining the values of the data stored in the target memory unit comprises:
not outputting the data stored in the target memory unit from the memory when the state value is set to the first value or the second value, and
outputting the data stored in the target memory unit from the memory when the state value is set to a third value.
9 . The method according to claim 6 ,
wherein determining the values of the data stored in the target memory unit comprises:
not decoding the data stored in the target memory unit when the state value is set to the first value or the second value, and
decoding the data stored in the target memory unit when the state value is set to a third value.
10 . The method according to claim 6 ,
wherein the determining whether to send the data output command include determining whether to skip the data output command based on the state value.
11 . A controller circuit comprising:
an interface configured to communicate with a memory device, the memory device including a plurality of memory units,
wherein the controller circuit is configured to:
transmit, in response to receiving a command from a requestor, a set state command to the memory device for accessing a target memory unit among the plurality of memory units, the set state command includes an option value indicating that the memory device is to set a state value according to data stored in the target memory unit,
read the state value from the memory device by transmitting a state read command after the set state command, and
determine, based on the state value, values of the data stored in the target memory unit by:
in response to the state value being a first value, determining that all bits of the data stored in the target memory unit are 1 and not to send a data output command to the memory device,
in response to the state value being a second value, determining that all bits of the data stored in the target memory unit are 0 and not to send the data output command to the memory device,
in response to the state value being neither the first value nor the second value, sending the data output command requesting output of the data stored in the target memory unit to the memory and receiving the data stored in the target memory unit from the memory device, and
transmit the determined values of the data stored in the target memory unit to the requestor,
wherein the state value is set to the first value when a number of bits having a value of 1 among bits of the data stored in the target memory unit is equal to or greater than a first threshold, and
wherein the first threshold is less than a total number of bits of the data stored in the target memory unit.