Compare-and-swap transaction
First Claim
1. An apparatus comprising:
- a master device to issue a transactions specifying a target address and comprising a data field for transporting at least one operand value, wherein the master device is configured to issue a compare-and-swap transaction for which said at least one operand value comprises a compare data value and a swap data value; and
a processing unit responsive to the compare-and-swap transaction to select whether to write the swap data value to a storage location corresponding to the target address in dependence on whether the compare data value matches a target data value read from the storage location, an offset portion of the target address indicating the position of the target data value within the storage location;
wherein when issuing the compare-and-swap transaction, the master device is configured to pack the compare data value into a first region of said data field selected in dependence on said offset portion of the target address and having a position within said data field corresponding to the position of the target data value within the storage location.
1 Assignment
0 Petitions
Accused Products
Abstract
A compare and swap transaction can be issued by a master device to request a processing unit to select whether to write a swap data value to a storage location corresponding to a target address in dependence on whether a compare data value matches a target data value read from the storage location. The compare and swap data values are transported within a data field of the compare and swap transaction. The compare data value is packed into a first region of the data field in dependence of an offset portion of the target address and having a position within the data field corresponding to the position of the target data value within the storage location. This reduces latency and circuitry required at the processing unit for handling the compare and swap transaction.
6 Citations
17 Claims
-
1. An apparatus comprising:
-
a master device to issue a transactions specifying a target address and comprising a data field for transporting at least one operand value, wherein the master device is configured to issue a compare-and-swap transaction for which said at least one operand value comprises a compare data value and a swap data value; and a processing unit responsive to the compare-and-swap transaction to select whether to write the swap data value to a storage location corresponding to the target address in dependence on whether the compare data value matches a target data value read from the storage location, an offset portion of the target address indicating the position of the target data value within the storage location; wherein when issuing the compare-and-swap transaction, the master device is configured to pack the compare data value into a first region of said data field selected in dependence on said offset portion of the target address and having a position within said data field corresponding to the position of the target data value within the storage location. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A master device comprising:
-
transaction issuing circuitry to issue a transactions specifying a target address and comprising a data field for transporting at least one operand value; wherein the transaction issuing circuitry is configured to issue a compare-and-swap transaction for which said at least one operand value comprises a compare data value and a swap data value, the compare-and-swap transaction for controlling a processing unit to select whether to write the swap data value to a storage location corresponding to the target address in dependence on whether the compare data value matches a target data value read from the storage location, an offset portion of the target address indicating the position of the target data value within the storage location; wherein when issuing the compare-and-swap transaction, the transaction issuing circuitry is configured to pack the compare data value into a first region of said data field selected in dependence on said offset portion of the target address and having a position within said data field corresponding to the position of the target data value within the storage location.
-
-
16. A processing unit comprising:
-
transaction receiving circuitry to receive a transactions specifying a target address and comprising a data field for transporting at least one operand value, wherein the transaction receiving circuitry is configured to receive a compare-and-swap transaction for which said at least one operand value comprises a compare data value and a swap data value; data access circuitry responsive to the compare-and-swap transaction to read a storage location corresponding to the target address, an offset portion of the target address indicating the position of a target data value within the storage location; and processing circuitry responsive to the compare-and-swap transaction to select whether the data access circuitry is to write the swap data value to said storage location in dependence on whether the compare data value matches the target data value; wherein the processing circuitry is configured to locate the compare data value within a first region of said data field selected in dependence on said offset portion of the target address and having a position within said data field corresponding to the position of the target data value within the storage location.
-
-
17. A data processing method comprising:
-
issuing a compare-and-swap transaction specifying a target address and comprising a data field for transporting a compare data value and a swap data value; and in response to the compare-and-swap transaction, selecting whether to write the swap data value to a storage location corresponding to the target address in dependence on whether the compare data value matches a target data value read from the storage location, an offset portion of the target address indicating the position of the target data value within the storage location; wherein in the compare-and-swap transaction, the compare data value is packed into a first region of said data field selected in dependence on said offset portion of the target address and having a position within said data field corresponding to the position of the target data value within the storage location.
-
Specification