This invention relates to the field of integrated circuits. More particularly, this invention relates to improving the write through performance for random access memory and large block random access memory.
The most critical timing path inside of RAMs and LBRAMs (latch based memories, flip flop arrays, and register arrays), all of which are generally referred to as a “memory” or “memory circuit” herein, is the path from the write clock to the dataout in the so-called write-through mode. In that mode, the address to which data is written inside the memory is also read out at the same time. This path is usually the slowest path through the memory, and so the operation is extremely slow.
Thus, as mentioned above, the WRITE THROUGH mode is the most timing-critical mode for the memory.
Prior art designs have attempted to resolve this problem by adding external logic to avoid a write-through and handle the situation in some other manner. However, the disadvantages of these existing solutions are the logic overhead that they require. In addition, these solutions need to add registers to the design, in order to make the external bypass occur in the correct clock-cycle.
What is needed, therefore, is a memory design that overcomes problems such as those described above, at least in part.
The above and other needs are met by a method of performing a write-through operation with a memory circuit having a write enable line, a write address line, a data in line, a read address line, a data out line, a bit array, a comparator, and a mux. A write address is received on the write address line, a read address is received on the read address line, data is received on the data in line. The comparator determines as a first condition whether the write address is identical to the read address, and determines as a second condition whether the write enable line is enabled. When both the first condition and the second condition are met, the comparator signals the mux to directly output the data receiving on the data in line on the data out line without writing the data to the bit array.
In this manner, the memory circuit checks to determine whether a write-through operation is called for. If it is, then the mux sends the data on the data in line directly to the data out line, instead of retrieving data from the bit array of the memory, such as through the read decoder, which would take much longer.
According to another aspect of the invention there is described a memory circuit with a write enable line for receiving a write enable signal, a write address line for receiving a write address, a data in line for receiving data into the memory circuit, a read address line for receiving a read address within the memory circuit, a data out line for outputting data from the memory circuit, a bit array for storing data within the memory circuit, and a data out line for outputting data from the memory circuit. A mux receives data from both the bit array and the data in line, and selectively provides as output on the data out line (a) data received directly from the data in line, and (b) data stored at the read address within the bit array of the memory circuit. A comparator determines as a first condition whether the write address is identical to the read address, and determines as a second condition whether the write enable line is enabled. When both the first condition and the second condition are met, the comparator signals the mux to provide as output on the data out line the data received directly from the data in line.
Further advantages of the invention are apparent by reference to the detailed description when considered in conjunction with the figures, which are not to scale so as to more clearly show the details, wherein like reference numbers indicate like elements throughout the several views, and wherein:
With reference now to
This enhanced memory structure is created by adding a few gates inside the RAM/LBRAM. However, no additional registers are required. This design, as indicated above, speeds up the write-through mode. A comparator is used to compare the read and write address, which determines when a write-through operation is occurring. If the read and write addresses are identical and the write-enable line is active, then the DataIn is muxed directly to the DataOut line of the memory, which greatly increases the speed of the memory in the write-through operation, with a minimal additional gate overhead.
The foregoing description of preferred embodiments for this invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Obvious modifications or variations are possible in light of the above teachings. The embodiments are chosen and described in an effort to provide the best illustrations of the principles of the invention and its practical application, and to thereby enable one of ordinary skill in the art to utilize the invention in various embodiments and with various modifications as are suited to the particular use contemplated. All such modifications and variations are within the scope of the invention as determined by the appended claims when interpreted in accordance with the breadth to which they are fairly, legally, and equitably entitled.