1. Field of the Invention
This invention relates generally to read-modify-write procedure in a data processing system and, more particularly, to a read-modify-write operation involving a bit-accessible memory unit.
2. Background of the Invention
In data processing system, the modification of a logic signal stored in a memory unit location is frequently required by an executing program. The typical technique to accomplish this operation is called the read-modify-write operation/instruction. In the read-modify-write operation/instruction, a group of data signals, such as a word, is read from a memory unit, the group of data signals including the data signal to be modified. The number of signals in a signal group read from the memory unit is determined by the processing unit. Typically, the size of the signal group transferred from between the processor unit and the memory can have a selectable length, such a byte, word, double word, etc. The data bus for transferring the data between the processor unit and the memory unit will typically be wide enough to accommodate the largest group of logic signals. After reading (retrieving) the signal group including the logic bit to be altered, the logic bit to be modified is modified by the processor by masking and arithmetic operations. The resulting signal group is then written (stored) in the location from which the signal group was read.
Because the read-modify-write operation/instruction is typically a group of three instructions, external processing requirements, such as an interrupt procedure, can disrupt the read-modify-write instruction/operation. The processing system then requires relatively complex procedures that the read-modify-write instruction is not compromised. In addition, the read-modify-write instruction results in additional traffic with respect to the logic signals transferred between the processor unit and the memory unit.
In the following discussion, when the logic signal to be stored at a predetermined memory location is a logic “1” signal, this logic signal will be referred to as a SET signal. When the logic signal to be stored in the predetermined location is a logic “0”, this signal will be referred to as a CLEAR signal.
Even though the typical exchange of data signals between the processor unit and the memory may consist of a multiplicity of logic signals, the memory unit may be bit-accessible. The present invention incorporates a bit accessible memory.
A need has therefore been felt for apparatus and an associated method having the feature of improved operation for a read-modify-write instruction in a processing system having a bit-accessible memory. It is a further feature of the apparatus and associated method to perform a read-modify-write operation in a single cycle of the processing unit. It is yet a still further feature of the apparatus and associated method to store a selected logic signal at a predetermined memory location.
The foregoing and other features are accomplished, according the present invention, by providing, in addition to the usual address and data paths between a memory unit and a processing unit, a write enable multiplexer that can enable a predetermined memory location in a bit-accessible memory. When no OFFSET signal group is provided in the address signal group, a normal storage of a data signal group into an addressed group of memory locations is implemented. The presence of a first address OFFSET signal group results in a storage of a SET (logic “1”) signal into a predetermined location, while the presence of a second OFFSET signal group in the address signal group indicates that CLEAR (logic “0”) signal is stored in the predetermined location. The predetermined location is determined by address of the signal group including the predetermined location and a mask signal group specifying the position in the signal group of the predetermined location.
Other features and advantages of the present invention will be more clearly understood upon reading of the following description and the accompanying drawings and the claims.
1. Detailed Description of the Figures
Referring to
Referring to
2. Operation of the Preferred Embodiment
In normal operation, when data is transferred between the processor unit and the memory unit, the base address of the data group or subgroup is transferred to the RAM wrapper unit. The RAM wrapper applies signals to the write enable that provide enable signals for the data group or subgroup identified by the address signals. These enable signals are selected by the control signals from the RAM wrapper unit. The actual data signal group or subgroup is applied to the data write bus, transmitted through the first port of multiplexer 19 and applied to the memory unit. The first port is selected by the control signals from the RAM wrapper unit. As will be clear, only those data signals that are to be stored (written) in the memory unit will be enabled by the write enable multiplexer and signals on other portions of the data write bus are not stored.
When the read-modify-write operation is to be performed, no data is read from the memory unit 20. Instead, the processor unit forwards an address of the memory locations that includes the predetermined memory location to be altered along with either the CLEAR_OFFSET or the SET_OFFSET. The presence of the SET_OFF in the addresses enables the second port of the data write multiplexer thereby applying logic “1”s to every addressed location in the memory unit. The presence of the CLEAR_OFFSET in the address applied to the memory unit results in the third port of multiplexer 19 being enabled and all logic “0”s being applied to the addressed memory locations. The mask that would be used by the processor unit for changing a selected bit is applied to the appropriate data write bus conductors. The presence of either of the OFFSET addresses causes the RAM wrapper unit to provide control signals enabling the second port of the write enable multiplexer. The mask is applied to the addressed memory unit locations, but the only write enable bit is applied only to the predetermined memory location. The enabled (second or third) port of the multiplexer determines whether a logic “1” or a logic “0” is to be stored at the location determined by the mask.
In this manner, the processor unit is able to change the logic bit at a predetermined location with a single processor unit memory access. The processor unit provides an OFFSET signal in the address signal group that permits the RAM wrapper unit to determine whether a normal write operation, a SET operation, or a CLEAR operation is to be performed. Having identified the operation, the ports of the multiplexer unit can be set accordingly. In a normal write operation, the logic signals on the data write bus are applied to the memory unit. In either the SET or Clear operation, the mask is applied to the write enable multiplexer and a signal enable signal for enabling the predetermined memory location is transmitted. The presence of the SET_ or CLEAR_OFFSET signal determines which port of the data write multiplexer is enabled and whether a logic “1” or a logic “0” will be stored in the predetermined location.
The invention can be generalized in several ways. The write enable multiplexer and the data write multiplexer can be controlled from signals applied directly to the multiplexers by the processor unit, thereby eliminating the involvement of this RAM wrapper unit in the generation of these control signals.
While the invention has been described with respect to the embodiments set forth above, the invention is not necessarily limited to these embodiments. Accordingly, other embodiments, variations, and improvements not described herein are not necessarily excluded from the scope of the invention, the scope of the invention being defined by the following claims.
This application claims priority under 35 USC §119(e)(1) of Provisional Application Ser. No. 60/573,537 (TI-38457PS) filed on May 21, 2004.
Number | Date | Country | |
---|---|---|---|
60573537 | May 2004 | US |