Dual port memory unit

Abstract: A dual port read/write register file memory includes means for performing a read/modify write cycle of operation within a single system cycle of operation. The register file memory is constructed from one or more (RAM) addressable multibit storage arrays organized to form a dual read port, single write port RAM (10-1). Additionally, the register file includes a plurality of clocked input registers (10-3) arranged in pairs for storing command, address and data signals for two write ports. The different pairs of registers are connected as inputs to a first set of multiplexer circuits (10-5) whose outputs connect to the write control signal, address and data inputs of the single write port. The single write port of the register file memory is enabled for writing twice during each cycle. This allows data clocked into the input registers during the previous cycle to be written sequentially into the register file storage locations. By writing data into the input registers instead of the register file memory in a previous cycle, the time required for writing is reduced to a minimum.

Description: BACKGROUND OF THE INVENTION Field of Use This invention relates to computer memories and more particularly to dual port memories. Prior Art Many processing units are required to share scratch pad memories. To avoid problems of contention in the case of simultaneous requests, it has been desirable to provide dual port read and write memories. For the most part, these memories have been constructed from separate integrated circuit chips in which access is controlled through a multiplexer circuit. This arrangement has been found to permit independent reading and writing from the input read and write ports. Another approach has been to provide special storage cell arrangements which enable a storage location to be simultaneously read and written by employing read/write delay elements which avoid overwriting the contents of storage cells at an address which is currently selected to be read during the transition to a write at another address. While this may eliminate the use of redundant storage elements, it requires special memory cells and could also result in an increase in the overall memory cycle time. Another disadvantage of such prior art dual port read and dual port write memories is that they normally require a large number of components which take up a large area when implemented in LSI or VLSI technology. Examples of these types of arrangements are disclosed in the US Patents 4,610,004 and 4,623,990. Another US Patent 4,628,489 discloses a memory system in a computer system consisting of a one-port RAM provided with address multiplexers and clocking circuits whereby the smallest memory units, a RAM chip, may be addressed and accessed twice during each clock cycle. Additionally, the prior art memories require a finite period of time in which writing is to take place. Therefore, in the case of a read modify write cycle of operation, the processing unit is required to provide the data to be stable at the memory a certain period of time before writing takes place. Since the write operation cannot take place until the modify operation is completed, the result is that additional memory cycles may be required in order to carry out the entire read modify write cycle of operation. That is, the read-modify write operation typically spans three cycles of approximately the same time duration. Therefore, when the modify operation cannot be performed within the specified time, additional cycles are required. Therefore, it is an object of the present invention to provide a memory which has a dual port read and write capability which is implemented using standard memory cells. It is a further object of the present invention to provide a dual read/write memory which is accessible for reading and writing from two different ports by a plurality of sources with a minimum of complexity. SUMMARY OF THE INVENTION The above objects are achieved according to the present invention as specified in Claim 1. A preferred embodiment of the dual port read/write register file memory includes means for performing a read-modify write cycle of operation within a single CPU cycle of operation. The register file memory is constructed from one or more (RAM) addressable multibit storage locations organized to form a dual read port, single write port RAM. Additionally, the register file memory includes a plurality of clocked input registers arranged in pairs for storing command, address and data signals for two write ports. The different pairs of registers are connected as inputs to a first set of multiplexer circuits, whose outputs connect to the write control signal, address and data inputs of the single write port. The single write port to the RAM array is enabled for writing twice during each cycle. This allows data clocked into the input registers during the previous cycle to be written sequentially into the register file storage locations. By writing data into the input registers instead of the register file memory in a previous cycle, the time required for writing is reduced to a minimum. This allows the modify portion of a read-modify write cycle to be lengthened, thereby improving the performance of units or sources utilizing the register file memory. This arrangement provides improvement in performance, particularly when used in pipelined systems, such as the system disclosed in the above related patent applications. To reduce complexity, the writing is performed in a predetermined sequence which also facilitates testing. That is, in those cases where the sources connected to both pairs of clocked input registers specify the same write address, the same storage location will be written twice in a specified sequence which can be easily verified. In the preferred embodiment, the pair of registers storing write data connect as inputs to a second set of multiplexer circuits. Each of the multiplexer circuits is connected to have as a further input, a different one of the register file read ports. The output of each of the second set of multiplexer circuits is connected to a different one of a plurality of output latches. The register file memory, clocked input registers, multiplexer circuits and latches are embodied on a single, integrated circuit chip. Additionally, there are on chip comparison circuits for detecting any conflicts arising during writing. That is, if data being written from one of the clocked input data registers into a storage location, which is the same as being read from one of the read ports, the comparison circuits enable the corresponding output multiplexer circuit position for loading the data into the port output latches. This ensures that the correct data is read out from each read port at all times. The novel features which are believed to be characteristic of the invention both as to its organization and method of operation, together with further objects and advantages, will be better understood from the following description when considered in connection with the accompanying drawings. It is to be expressly understood, however, that each of the drawings is given for the purpose of illustration only and is not intended as a definition of the limits of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 shows in block diagram form, a preferred embodiment of a register file memory which incorporates the principles of the present invention. Figure 2 is a more detailed block diagram of Figure 1. Figure 3 shows the timing of the register file of the present invention. Figure 4 is a flow diagram used in describing the operation of the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENT Figure 1 shows the basic organization of a register file memory which incorporates the teachings of the present invention. As seen from Figure 1, the register file memory 10 includes a random access memory (RAM) part 10-1 and a rank or set of input clocked registers of block 10-3 for storing write command, address and data signals applied by a pair of sources to the write ports C and D of the register file memory 10. The register file memory 10 further includes a set of input multiplexer circuits of block 10-5 which connect the write port registers to the write enable, write data and write address terminals of the single write port of the RAM part 10-1. Also, included is a number of output multiplexer circuits of block 10-7, each of whose inputs connect to one of the two read ports RA and RB of RAM part 10-1 and to each of the write port data registers. The output of each multiplexer circuit connects to one of the pair of output latches of block 10-9. The file memory 10 has a write control circuit block 10-11 which connects as shown to the write enable terminal labeled WRITE PULSE and to the output of the command register multiplexer circuit 10-50. The block includes an AND gate which, in response to the sequence of write pulses, applies write pulses to the WRITE PULSE terminal as a function of the output write command signals applied by multiplexer circuit 10-50. The register file memory 10 further includes the comparison circuits of block 10-14 which are connected to compare the file memory write port C and D write address and read port RA and RB read addresses and generate control signals for selecting the source of output data to be loaded into the read port latches of block 10-9. More specifically, when there is no identical comparison, that is, the storage locations specified by the C and D port address registers 10-36 and 10-37 are not the same storage locations as are being read, then the data at the RAM part 10 read ports A and B is selected by enabling the first position 0 of the multiplexer circuits 10-70 and 10-72. However, when the storage location being written from either port C or port D is the same as the storage location being read by port A or port B, then the data being written by that port is selected by enabling either the second (1) or third (a) positions of the multiplexer circuits 10-70 and 10-72. The selection signals, generated by compare circuits 10-14 for port A, correspond to signals RDA, CA0 and CA1 and for port B, correspond to signals RDB, CB0 and CB1. The RAM part 10-1 of Figure 1 in simplified form contains 32 storage locations, each 8 bits wide. In the preferred embodiment, RAM part 10-1 contains 64 locations and is constructed from a number of 32X8 bit single write dual read memory parts. The parts are placed in parallel as shown in Figure 2 to provide the desired number of locations. The desired 32-bit width would be obtained by adding three more of 32X8 bit RAM parts. This arrangement greatly facilitates the layout and routing of signal lines when the register file memory 10 is implemented in VLSI form. Additionally, the organization makes it easy to perform byte operations on data stored in different storage locations. The remaining components of the memory 10 are also implemented with standard parts. For example, the registers of block 10-3 can be constructed from conventional D-type flip-flops while latches of block 10-9 can be constructed from standard transparent latch circuits. The memory 10 receives several timing signals which, for the purpose of the present invention, are generated in a conventional manner. As seen from Figure 2, the registers of block 10-3 are clocked in response to signal Q140 along with signal CLK applied by an input AND gate to the clock input terminals of each of the registers 10-30 through 10-37 as shown in Figure 1. Each of the multiplexers 10-50 through 10-54 receive a write selection signal WRITE SELECT whose state determines which write port to select (i.e., position 0 or 1). In the preferred embodiment, the write ports C and D are always selected in the same order which is port C then port D defined by the binary ZERO and binary ONE states respectively of signal WRITE SELECT. Figure 2 as mentioned briefly shows in greater detail, the RAM part 10-1 of Figure 1. The register file memory 10 is essentially the same, except for the duplication of the write control block 10-11 which now has an additional input for designating which half of the 64 storage locations is being addressed. Also, the number of positions contained within multiplexers 10-70 and 10-72 of block 10-7 has been increased by one to provide outputs from both RAM parts (i.e., RAM 0 and RAM 1). Except for these changes, both register file memories are the same. DESCRIPTION OF OPERATION With reference to the timing and flow diagrams of Figures 3 and 4, the operation of the preferred embodiment of the present invention of Figures 1 and 2 will now be described. Referring to Figure 3, it is seen there are several machine or CPU cycles shown. Only one cycle labeled CPU cycle is shown in its entirety. As indicated, each CPU cycle includes a read portion, a modify portion and a write portion. In the prior art, these are normally three cycles of equal length. In the present invention, each CPU cycle has a read portion, 50 nanoseconds of standard duration, an extended modify portion of approximately 88 nanoseconds, and a very short write portion of approximately 2 nanoseconds. During the read portion of the cycle, normal reading takes place. That is, the addresses are applied to read ports A and B, during the interval shown in waveform G, at which time the write select signal WRITE SELECT is a binary ZERO as indicated by waveform E. The data contents of addressed storage locations are read out and, upon being stabilized, are strobed into the latches of block 10-9 by latch strobe signal OLE as shown by waveform F. The leading edge of signal OLE coincides with the timing signal Q70 of waveform C and has a minimum duration of 5 nanoseconds. The read data is thereafter applied to the outputs of the latches and remains valid for the duration indicated in waveform H. The extended modify portion of the CPU cycle approximates 88 nanoseconds while the write portion has a duration of just two nanoseconds which corresponds to the time required to clock the command, address and data applied by the input sources into the C and D port registers of block 10-3. This allows the modify portion of the CPU cycle from the perspective of the sources to appear quite long in that writing requires only a few nanoseconds as contrasted with the normal 30 nanoseconds which would be allocated in the case of read, modify write cycles of equal duration. As indicated by waveform D, once the read portion of the cycle is over, two consecutive write pulses are provided during which two consecutive write operations are performed. As indicated by waveform E, during the first pulse when signal WRITE SELECT is a binary ZERO, the data from port C (position 0) is written into the specified storage location. During the second write pulse when signal WRITE SELECT is a binary ONE, the data from port D is written into the specified storage location. At the end of the CPU cycle, the data from the sources are clocked into the registers of ports C and D, in response to the leading edge of signal CLK of waveform A. The above operations will now be summarized with specific reference to the flow chart of Figure 4. It will be noted that prior to the start of a CPU cycle, the data representing the results generated by the sources connected to write port registers will have been already clocked into the registers of block 10-3 along with the required command and address signals. The command registers 10-30 and 10-31 each contain a single bit position which when set to a binary ONE denotes that writing is to take place. The write address registers, each contain six bit positions in which the high order or most significant bit position is used to specify which of the two byte wide RAM's (i.e., RAM 0 or RAM 1) is being addressed. That is, the content of this bit position is applied as one of the inputs to the AND gates of blocks 10-11a and 10-11b. As seen from Figure 4, during the read portion of the cycle, the normal dual read operation is allowed to take place. That is, data is read out from the RAM storage locations specified by the read addresses applied to the RA and RB read port address terminals. Thereafter, the data is read out from storage locations, applied via the multiplexer circuits of block 10-7 and strobed into the latch buffer registers of block 10-9 by strobe enable signal OLE. It is assumed that the compare circuits of block 10-14 have detected no conflict and have forced signal RDA to a binary ONE resulting in the selection of the O positions of multiplexer circuits 10-70 and 10-72. This completes the read portion of the cycle. Next, as seen from Figure 4, the extended modify portion of the cycle is started. During the first part of this portion of the cycle, the first source port C is selected to write data into RAM part 10-1 by the WRITE SELECT signal. At that time, the WRITE SELECT signal applies the data contents of C port register 10-34 to the write data input terminals of the single write ports of RAM 0 and RAM 1 of the RAM part 10-1 via multiplexer circuit 10-52. At the same time, signal WRITE SELECT also applies the write address contents of C port address register 10-36 to the write address terminals of the single write ports of RAM 0 and RAM 1 of RAM part 10-1 via multiplexer circuit 10-54. Thereafter, the data stored in the data register of port C, during the previous CPU cycle, is written into the storage location specified by the first write address in response to the first write pulse of Figure 3 applied via the AND gate of block 10-11 which is enabled by the write command signal from C port register 10-30 applied via multiplexer circuit 10-50. The first write operation is followed by a second write operation as indicated in Figure 4. That is, the second source port D is selected when signal WRITE SELECT switches to a binary ONE state. This causes the data contents of D port register 10-35 to be applied to the write data input terminals of the single write ports of RAM 0 and RAM 1 of RAM part 10-1 via multiplexer circuit 10-52. Also, at that time, signal WRITE SELECT causes multiplexer circuit 10-54 to apply the write address contents of D port address register 10-37 to the write address terminals of the single write ports of RAM 0 and RAM 1 of RAM part 10-1 via multiplexer cirucit 10-54. Also, at this time, signal WRITE SELECT causes multiplexer circuit 10-50 to apply as an output, the contents of the D port command register 10-31 as an input to the AND gate of block 10-11. In response to the second write pulse of Figure 3, the data stored in the port D data register during the previous CPU cycle is written into the specified second write address of RAM part 10-1. As seen from Figure 4, this completes the modify portion of the cycle. Next, the write portion of the CPU cycle is performed. During this portion of the cycle, the timing signals Q140 and CLK cause the data, address and command signals applied to the C and D port registers of block 10-3 to be loaded into the corresponding registers. This information is written into the RAM part 10-1 during the modify cycle of the next CPU cycle of Figure 4. This completes the CPU cycle of operation. The operation of the comparison circuits of block 10-14 will now be considered in greater detail. If, during the read portion of the CPU cycle, the comparison circuits of block 10-14 detect a conflict, the circuits operate to apply the appropriate signals to the multiplexer circuits of block 10-7 which causes the correct data to be stored in the latches of block 10-9. That is, if, for example, the source connected to read port A specifies a read address which is the same as the write address stored in port C address register 10-36, the compare circuits of block 10-14 operate to force signal CA0 to a binary ONE. This causes the multiplexer circuit 10-70 to apply the data contents of the C port data register 10-34 as an input to the latches 10-90 ensuring that the requesting source receives the most recent data which is to be written into that storage location during the same CPU cycle. In a similar fashion, the compare circuits of block 10-14 also select the data contents of the D port data register 10-35 by forcing signal CA1 to a binary ONE upon detecting the same type of conflict. The operation of the compare circuits is the same for address conflicts detected which involve read port B. From the above, it is seen how the register file memory of the present invention provides a dual port read dual port write memory capability without the attendant complexities. By constructing the register file memory from standard dual read single write port memory parts, considerable savings in space, complexity and cost are achieved. Additionally, the sequential write operations of each CPU cycle are carried out in the same predetermined sequence simplifying the design while also facilitating testing. In the preferred embodiment, no restrictions are placed on writing to the same storage location from both ports as is required in certain prior art, dual port read, dual port write memories. This can provide a quick way of verifying the operation of the register file memory. Many modifications may be made to the preferred embodiment of the present invention without departing from its teachings as set forth in the appended claims. For example, the present invention may be implemented from any standard dual port read single port write memory parts. Also, any number of parallel connected byte wide memory parts may be utilized to provide a desired word size with independent byte addressing.

Claims: A read/write memory unit (10) comprising: a random access memory (RAM) (10-1) having a plurality of addressable storage locations, said RAM having a single write port including write data, write address and write enable input terminals; a multiplexer being connected to said write data, write address and write enable terminals of said RAM for applying data, addresses and commands to corresponding ones of said RAM terminals; timing means (A-H, Fig. 3) for generating timing signals during each cycle of operation and being coupled to said RAM; characterized by: an input register set (10-3) for storing said data, addresses and commands received from a pair of ports, connected to said multiplexer (10-5) for receiving said data, addresses and commands; said timing means applying a bistate write select signal (WRITE SELECT) to said multiplexer, and a write control signal (WRITE) having first and second sequential write pulses to said RAM write enable terminal; said RAM being enabled by said first write pulse to write said data of one of said registers (10-34) into the one of said locations specified by the corresponding address (10-36) in response to the corresponding command (10-30) applied by said multiplexer (10-5) when said bistate write select signal is in one state thereof; and said RAM being enabled by said second write pulse to write said data of the other one of said registers (10-35) into the one of said locations specified by the corresponding address (10-37) in response to the corresponding command (10-31) applied by said multiplexer (10-5) when said bistate write select signal is in the other state thereof; wherein said cycle of operation includes three successively occurring portions: (i) a first portion during which data is read from said RAM (10-1); (ii) an extended second portion during which data held by said registers (10-34, 10-35) is written into said RAM (10-1); and (iii) a third portion during which data supplied by said ports is entered into said registers (10-34, 10-35), said first and second sequential write pulses occurring during said second portion. The memory unit of claim 1, further characterized by comprising an AND gate (10-11) having a pair of input terminals and an output terminal, one of said input terminals connected to said multiplexer for receiving said commands, the other one of said input terminals connected to said timing means to receive said write control signal, and said output terminal being connected to said write enable input terminal, said AND gate successively applying said first and second write pulses of said write control signal as a function of said commands applied by said multiplexer in response to said write select signal during each cycle of operation. The memory unit of claim 1, further characterized by comprising: said RAM having a pair of read ports for accessing data from said RAM storage locations in response to read addresses applied to said RAM; output latches (10-9) for temporarily storing said data read from said RAM locations; a data multiplexer (10-7) connected between said latches and said RAM for receiving data from said read ports, and connected to said register set (10-3) for receiving write data; and comparison circuits (10-14) having input terminals (WAC, WAD, CWC, DWC) connected to said register set for receiving said write addresses and commands and connected for receiving said read addresses (RA, RB), and said comparison circuits having output terminals (RDA, RDB, CA0, CA1, CB0, CB1) connected to said data multiplexer, said comparison circuits upon detecting identity between any one of said read addresses and said write addresses generating signals on said set of output terminals for causing said data multiplexer to transfer said write data to said latches in lieu of said data from said read ports for ensuring that the most recent data is provided by said memory unit in response to each read port access. The memory unit of claim 3, wherein said comparison circuits generate a signal for each detected identity between said read and write addresses as follows: when CWA = RA and CWC = 1; or DWA = RA and DWC = 1; or CWA = RB and CWC = 1; or DWA = RB and DWC = 1 in which CWA, DWA and CWC, DWC, respectively, correspond to said write addresses and commands stored in said register set and RA and RB correspond to said read addresses. The memory unit of claim 1, wherein said addresses applied by said multiplexer when said write select signal is in said one and said other states may specify the same storage location for enabling different data to be written into said same storage location during each cycle of operation to facilitate memory testing. The memory unit of claim 1, wherein said write select signal during each cycle of operation repeats a same sequence of states causing said multiplexer always to select said write data, write addresses and commands in the same order. The memory unit of claim 1, wherein said timing signals include a clock signal occurring during said shortened write portion of each cycle of operation, said timing means applying said clock signal to said register set for storing said write data, write address and commands for writing said write data into said RAM during the next cycle of operation. The memory unit of claim 1, wherein said RAM includes a plurality of byte-wide RAM ports, each port having a predetermined number of storage locations, said ports being arranged in parallel to provide a desired number of locations with a desired bit width. The memory unit of claim 1, further characterized by comprising: said RAM having a pair of read ports for accessing data from said RAM storage locations in response to read addresses applied to said RAM; output latches (10-9) for temporarily storing said data read from said RAM locations; a data multiplexer (10-7) connected between said latches and said RAM; and wherein said timing signals further include output latch enable pulses (OLE), said timing means applying said output latch enable pulses to said latches during the read portion of each cycle of operation for temporarily storing the data received from said data multiplexer.

Inventors: CUSHING DAVID E, KHARILEH ROMEO, MIU MING-TZER, SHEN JIAN-KUO, CUSHING, DAVID E., KHARILEH, ROMEO, MIU, MING-TZER, SHEN, JIAN-KUO
Applicants: BULL HN INFORMATION SYST, BULL HN INFORMATION SYSTEMS INC.
Application year: 1989
Main classification: G11C8
IPC codes: G06F12, G11C8, G11C11