Abstract:
Embodiments of the invention are directed to systems and method for providing predictable timing for read operations in a multiport memory device. Accordingly, an embodiment is directed to a multiport memory system, comprising a single port memory core synchronized to a first clock, multiple access ports synchronized to at least a second clock, and a multiplexer logic coupled to the core memory and the plurality of access ports. The multiplexer logic arbitrates access to the memory core between multiple access ports. Each access ports includes an uncertainty detect logic that measures data path latency, and an uncertainty adjust logic that operates to selectively add data path delay to increase the measured path latency to a predictable value.

Description:
RELATED APPLICATIONS 
     The present application is related to and claims priority from and herein incorporates by reference the U.S. provisional patent application Ser. No. 60/445,872, entitled “Dual-port memory using a single port memory for multiple clock domain”, by inventor, Raza S. BABAR, filed on Feb. 7, 2003, and U.S. provisional patent application Ser. No. 60/437,303, entitled “A logic for implementing a dual clock domain read access with predictable timing for bi-directional I/Os”, by the same inventor, filed on Dec. 31, 2002. 
     FIELD OF INVENTION 
     The present disclosure generally relates to computer memory systems. 
     BACKGROUND ART 
     Random Access Memory cells or RAM cells have become increasingly popular due in part to the attractive costs of these devices. Many such conventional RAM cells are ordinarily only addressable from a single port. In such a memory apparatus, the input of an address causes a single select line or a coincidence of two select lines, such as a row select line and a column select line, to cause the addressed cell to be selected. Upon selection of a cell, data may then be sensed from or written into the selected storage cell on one or two bit sense lines. Alternatively, in some RAM cells, a single selection line causes the particular cell to be selected, and other selection circuitry activated by the same address causes the bit-sense lines to be selected. However, there are never any options for reading and writing at the same time. The same selection lines and the same bit sense lines are always utilized to access and write or read the content of a particular location. Consequently, a single port RAM memory device cannot be simultaneously addressed and accessed from separate sources. 
     Certain applications require higher memory access speeds. Examples of such high speed applications may be graphic related memory systems such as those used in a computer display systems, data transfer and buffering devices used in high speed communication systems, and memory systems used in conjunction with arithmetic logic units. For such applications, multiport random access memory devices have been developed to provide increased accessibility to the memory contents of the random access memory unit and more flexibility for inter-processor communications. One example of a multi-port memory device is a dual-port RAM cell accessible simultaneously by two independent entities. In digital integrated circuits (ICs), this implies a dual-port memory cell that can be accessed at the same time through two different ports. Each port utilizes independent sets of addresses and control lines to access the memory array. 
       FIG. 1  shows a block diagram of an implementation of a conventional dual-ported memory system  100 . As shown in  FIG. 1 , this implementation of a dual ported memory cell supports multiple clock domains. A true dual port memory system provides simultaneous access to any location in the memory, wherein either port can be used to read or write data into and out of any memory location at the same time. Additionally, some dual port memory systems include the ability to run each port on an independent clock domain, enabling the processing of large amounts of data very efficiently and quickly. Independent clock domains also enable communication between multiple processors and solves the rate-mismatch problem caused by processors operating at different speeds. 
     Although the conventional dual port memory system  100  of  FIG. 1  provides for an effective solution for operations requiring high memory access speeds, it may result in a large circuit design and relatively high development costs. For the same density, a dual port memory is approximately twice the size of a single port memory. Additionally, for each new generation of fabrication process technology, a new dual port cell must be designed and tested, leading to additional development expenses. 
       FIG. 2  shows a block diagram of a second conventional implementation of a dual ported memory device  200 . As shown in  FIG. 2 , a single ported memory  202  is used for data that is communicated across clock boundaries. In this system, data crosses the clock domain boundary  204  through a first in first out (FIFO) memory  206 . The data is synchronized to the second clock domain  208  through this FIFO  206 . This method of data transfer is used for sequential data processing and is unidirectional. As shown in  FIG. 2 , the address for the data is generated in the second clock domain and does not cross the clock boundary  204 . The memory system  200  is more size efficient than the dual port memory system  100  of  FIG. 1 . However, the memory system of  FIG. 2  is most suitable for unidirectional and sequential data flow only. The dual port memory system  200  is not well adapted to handling bi-directional input and output access to the memory device. Furthermore, whenever a system runs on or is synchronized to more than one clock, a degree of uncertainty is inherent in the system. 
     SUMMARY OF THE INVENTION 
     Therefore, systems and methods are desired that provide predictable timing for bi-directional access in multi-clock domain memory devices providing high data transfer rates required of the traditional multiport RAMs, without the disadvantages of large circuits size, high development cost, and other limitations inherent in memory systems such the ones shown in  FIGS. 1 and 2 . 
     Accordingly, embodiments of the invention are directed to a system and method for providing predictable timing for read operation from a multiport memory device operating over multiple clock domains. An embodiment of the system of the present invention is directed to a multiport memory system comprising a single port memory core synchronized to a first clock, a first multiplexer logic coupled to the core memory and a plurality of access ports, where the multiplexer logic operates as an arbitrator between the plurality of access ports attempting to access the core memory. 
     Each access ports includes an uncertainty detect logic that measures data path latency, and an uncertainty adjust logic that operates to selectively add data path delay to increase the measured path latency to a predictable value. 
     An embodiment of a method according to the present invention provides predictable timing for read access in a dual clock domain, bi-directional input/output (I/O) device. The method comprises generating a tag, sending the generated tag through a data path crossing a clock domain, determining clock path latency based on a data path travel time of the generated tag, and adding at least one pipeline stage to the data path to increase the path latency up to a predictable time. 
     In one embodiment, the present invention consists of two main blocks, the uncertainty detect logic and the uncertainty adjust logic. The uncertainty detect logic sends a tag information to the other clock domain. It then waits until it receives the tag back. Based on the number of clock cycles it takes the tag to go through the FIFO paths in the two directions, it adjusts the pipelining stages. 
     The logic detect can be a counter, which counts the number of cycles the tag takes through the FIFO. It then provides that information to the select logic. The select logic then selects the multiplexer for the appropriate pipeline delays. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of the present invention, and together with the description, serve to explain the principles of the invention. Unless noted, the drawings referred to this description should be understood as not being drawn to scale. 
         FIG. 1  shows a block diagram of an implementation of a conventional dual-ported memory system. 
         FIG. 2  shows a block diagram of a second conventional implementation of a dual ported memory device. 
         FIG. 3  shows a timing diagram of one embodiment of a multiport memory where FIFOs are used for synchronization of clock cycle, according to one embodiment of the present invention. 
         FIG. 3A  shows an example of an access port using a data_valid pin, according to one embodiment of the present invention. 
         FIG. 4  shows a block diagram of a dual port memory system, according to another embodiment of the present invention. 
         FIG. 5  shows a detailed block diagram of a port synchronization logic sub-system according to an embodiment of the present invention. 
         FIG. 6  shows an implementation of the port synchronization logic architecture according to an embodiment of the present invention. 
         FIG. 7  shows the uncertainty adjust logic and the uncertainty detect logic, according to an embodiment of the present invention. 
         FIG. 8  is a flow chart of a process of implementing predictable read access timing according to an embodiment of the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention provides new systems and methods for bi-directional inputs and outputs (I/Os) access to the content of multiport memory devices operating over multi clock domains by providing predictable timing for device access. 
     In a typical dual port memory operation, after sending a read request, there is a predictable time (number of clock cycles) after which the data is guaranteed to arrive. However, when the signals cross the clock boundaries for synchronization, clock cycle uncertainty is introduced. This clock cycle uncertainty results in an unpredictable time after which the data can be guaranteed. Over time, the clock signals move with respect to each other. This movement of the clock cycles can cause the potential proximity of the two clock signal edges. As a result, the read or write control signals may not be processed in the current clock cycle, and data read from the memory core may not be available over the current clock cycle. 
       FIG. 3  shows a timing diagram of one embodiment of a multiport memory where FIFOs are used for synchronization of clock cycle, according to one embodiment of the present invention. In order to provide access to a port from a single clock domain core, the port, the data and the control signals have to be synchronized from the port clock logic to the core clock logic. In one embodiment of the present invention, this synchronization can be achieved through FIFOs. As previously discussed, when the signals cross the clock boundaries for synchronization, it introduces clock cycle uncertainty. In one embodiment, FIFO&#39;s may be used for synchronization of signals crossing clock domains. As shown in the timing diagram of  FIG. 3 , the memory core logic may operate on the empty (EFB). In a read operation, when the EFB flag is asserted, the core logic detects that there is a request for a read. The assertion of this flag can be in the same clock cycle as shown in the timing waveform, or in the next cycle if the separation of the read clock from the write clock is less than t SKEW1 , parameter. t SKEW1 , is the minimum time between a rising write clock (RCLK) edge and a rising read clock (WCLK) edge to guarantee that EFB or (EF) will be asserted during the clock cycle. If the time between the rising edge of WCLK and the rising edge of RCLK is less than t SKEW1 , then EFB may not change state until the next RCLK rising edge. 
     In one embodiment of the present invention, the solution to the unpredictable read access timing issue may be based on the use of a data_valid pin.  FIG. 3A  shows an example of an access port using a data_valid pin, according to one embodiment of the present invention. Accordingly, in a read operation, the response to a read request (read data) is accompanied with an additional pin providing a data_valid signal that gives an indication of whether or not the data to be read from the memory is valid and/or available on the current clock cycle. 
     Although the use of a data_valid signal may resolve some of the problems due to clock uncertainty, it requires an additional pin to indicate the availability of the data. The additional pin results in a dual port memory device having a pin structure different from that of a conventional dual port memory device. 
       FIG. 4  shows a block diagram of the dual port memory system, according to another embodiment of the present invention. As shown in  FIG. 4 , a single port memory device  400  operating over multiple clock domains is used to allow random access, bi-directional data flow in and out of a memory device. The new dual port memory system  400  includes access port  1  and access port  2 , used in communicating with a single memory core  402  through a port multiplexer (MUX) logic  404 . Access to the core memory  402  through each of the access ports  1  and  2  is via port sync logic (or sub-systems)  406  and  408  respectively. The new dual port memory system  400  is further described in the related US provisional patent application serial number 60,445,872, entitled “Dual-port memory using a single port memory for multiple clock domain”, by inventor, Raza S. BABAR, filed on Feb. 5, 2003, and incorporated herein by reference. 
     As shown in  FIG. 4 , in one embodiment of the present invention, the memory core  402  is a single port memory core. The port multiplexer logic block  404  controls the access to the memory core  402 . The port multiplexer logic block  404  acts as a time division multiplexer (TDM) and for data and addresses coming from each of the access ports  406  and  408 . In one embodiment of the present invention, the bandwidth between the port multiplexing logic block  404  and the memory core  402  is at least the twice the larger bandwidth between access ports  406  or  408  and the multiplexer  404 . The port multiplex logic  404  may arbitrate access to the memory core  402  among the multiple access ports  406 ,  408 , etc. 
     The operation of the port sync logic  406  and port sync logic  408  are transparent to any outside devices. The dual port memory device  400  implemented according to an embodiment of the present invention allows concurrent writes on each port, concurrent reads on each port and simultaneous read and write operation on each port in multiple clock domains. 
       FIG. 5  shows a detailed block diagram of a port synchronization logic sub-system  406  and  408  according to an embodiment of the present invention. In one embodiment of the present invention, the port synchronization logic sub-system  500  includes a read data and control First In First Out (FIFO)  502 , a write data and control FIFO  504  and a port address FIFO  506 . Data from the memory core  402  ( FIG. 4 ) flows through the port MUX logic  404  ( FIG. 4 ) and through the read data control FIFO  502  during a read operation. Similarly, data to be written to the memory core  402  flows from the write data control FIFO  504 , through the port MUX logic  404  to the memory core  402 . Each read operation has a corresponding address that is provided to the memory core  402 , through the port MUX logic  404 . The address FIFO  506  is for the write or read address. 
     In operation, the FIFOs are used to synchronize the signals crossing a clock boundary. For example, in the case of a write operation, data, address, and the write control signal are written from an access port synchronized to a first clock, into the write data and control FIFO  504 . Thus, the incoming data and control signals are synchronized to the port sync logic&#39;s clock. The write data and control signal are then synchronized to the core memory&#39;s  402  clock through the write data and control FIFO  504 . 
     In one embodiment, each FIFO may be implemented using a memory. In an alternative embodiment, the FIFO function may be implemented using synchronizing registers. It should be apparent to one skilled in the art that alternative implementations of the present invention may use other means of synchronizing the signals crossing a clock boundary. 
     The read or write operations are performed and the outgoing data and control signals are passed to the read FIFO  502 . In a read operation, the incoming read control signal is first synchronized from the port clock cycle to the core using the write data and control FIFO  504 . Next, the read control signal is processed with respect to the core memory  402  clock. Once the read access operation is performed, the outgoing data and control signals are passed to the read FIFO  502  and synchronized to the port clock domain using the read FIFO  502 . 
     In one embodiment, if the port uses the same clock as the core, the FIFOs can then be bypassed. This ability to by-pass the FIFOs allows for reduced latency for that particular port. 
     The operation of the port sync logic  406  and port sync logic  408  may be transparent to any outside devices. Therefore, the dual port memory device  400  implemented according to an embodiment of the present invention operates to allow concurrent writes on each port, concurrent reads on each port and simultaneous read and write operation from each port in multiple clock domains. However, in the exemplary embodiment of the present invention presented herein above, when a read, write, control or address signal crosses a clock boundary, uncertainty is introduced into the system. Whenever a system runs on or is synchronized to more than one clock, a degree of uncertainty is inherent in the system. The clock uncertainty is introduced when the two clocks are very close to each other. As a result, signals may not be registered or evaluated in time, causing a delay in the response by at least one clock cycle. Thus, whenever a signal crosses the clock boundaries, some uncertainty may be introduced due to the possibility that a clock cycle may be lost because of the potential close proximity of the signal to the clock edges. 
     In a conventional dual port memory operation, after sending a read request, there is a predictable time (number of clock cycles) after which the data is guaranteed to arrive. In certain embodiment of the present invention, for example, the write clock which the write the request is based on may be slightly behind the read clock (e.g. see  FIG. 3 ). In that case, processing of the read request may be delayed because of the closeness of the two clock edges. However, when signals cross clock boundaries and in the presence of clock cycle uncertainty, the time after which the data is guaranteed to be available is unpredictable. 
     As previously mentioned, a data_valid pin may be added to indicate whether the data is valid or not in the current clock cycle. However, in order to maintain the traditional dual port memory device design, a new solution to overcome read access clock uncertainty in a multiport memory device operating over multiple clock domains is desired. 
       FIG. 6  shows an implementation of the port sync logic architecture according to one embodiment of the present invention. As shown in  FIG. 6  and similarly to the embodiment of  FIG. 5 , the port synchronization logic  600  includes a read data and control FIFO  602 , a write data and control FIFO  604 , and an address FIFO  606 . Additionally, the port synchronization logic  600  includes an uncertainty detect logic  610  and an uncertainty adjust logic  608 . In one embodiment of the present invention, the data read from the core memory  402  ( FIG. 4 ) passes through the read data and control FIFO  602 , as well as the uncertainty adjust logic  608  before being available at the port. To an outside device, the operations of the uncertainty adjust logic  608  and uncertainty detect logic  610  are transparent. 
       FIG. 7  shows the uncertainty adjust logic and the uncertainty detect logic, according to an embodiment of the present invention. As shown in  FIG. 7 , in one embodiment of the present invention, the uncertainty adjust logic sub-system  702  comprises a multiplexer (MUX)  704 , and at least a first pipeline stage  706 . In alternative embodiments, additional pipeline stages such as pipeline stage- 2   708  are included as part of the uncertainty adjust logic sub-system  702 . 
     According to an embodiment of the present invention, the uncertainty detect logic  710  includes a path counter  712  and a select logic block  714 . In an alternative embodiment, a tag or control character generator may be used to generate a tag, control character or other types of unique identifier that is distinguishable from data. 
     In operation, the uncertainty detect logic  710  generates and sends a tag information across the multiple clock domains. In one embodiment, a tag or an otherwise recognizable character is generated by the path counter  712  or a control or tag generator and transmitted over the data path crossing the multiple clock domains. By measuring the travel time of the generated tag over the data path using the path counter  712  (also referred to as the counter), the path latency may be periodically calculated. In another embodiment, the measurement of the path latency may done in a continuous way by sending the tag along with each request and measuring its corresponding travel time. Thus, the path latency is calculated by sending the generated tag through the write data and control FIFO  604  ( FIG. 6 ), across to the other clock domain (the core memory clock domain), and receiving back the generated tag through the read data and control FIFO  602  ( FIG. 6 ). The path counter  712  determines the path latency by counting or measuring the travel time of the generated tag through the path, in terms of numbers of clock cycles. In an alternative embodiment, if the core clock is the same as the port clocks, the travel path for the generated tag bypasses the write data and control FIFO  604  and the read data and control FIFO  602 . 
     The path latency results calculated by the path counter  712  is input to the select logic  714 . The select logic  714  in turn controls the MUX  704 . The MUX  704  controls the number of pipeline stages in the output path. Thus, the MUX  704  operates to adjust or select the appropriate pipeline stage to introduce the necessary added delay required for providing a predictable data access or read time. Based on the calculation of the path latency by the uncertainty detect logic  710 , the uncertainty adjust logic  702  adjusts the path latency by adding pipelining stages that lengthen the travel time of the tag through the path and introduce additional delay in the travel path for the signal. For example, if the maximum path latency is 5 clock cycles and the generated tag travels the path in 4 clock cycles, the uncertainty adjust logic  702  adds 1 pipelining stage to the total path length in order to provide a 5 cycle latency. If the path latency is 5 cycles, no additional delay is introduced in the path. 
     Therefore, the uncertainty detect logic counts and compares the number of cycles or path latency and accordingly it adjusts the select logic by introducing appropriate amount of delay in the system which is performed by controlling multiplexer  704 . 
     It should be apparent to one skilled in the art that alternative implementations of the present invention may combine the uncertainty detect logic and the uncertainty adjust logic into a single unit. Additionally, the functionalities of the path counter  712 , the select logic  714 , the MUX  704 , etc, may be implemented by alternative devices with equivalent functionality. For example, each of the pipeline stages  708  or  706  may be implemented using a latch, a register or a memory. In one embodiment, the select logic  714  may be implemented using a comparator. 
       FIG. 8  is a flow chart of a process of implementing predictable read access timing according to one embodiment of the present invention. As shown in  FIG. 8 , in operation  802  a tag or otherwise identifiable character is generated. In operation  804 , the generated tag is sent through the path the data requested data travels in response to a read request. The path includes crossing the clock boundary and going through the read data and control FIFO  602  ( FIG. 6 ) and write data and control FIFO  604 . 
     In operation  806 , the path latency is calculated in terms of number of clock cycles by counting the number of clock cycles it took for the generated tag to travel through the data path. 
     In operation  808 , based on the measured path latency, additional delay is introduced into the data path if needed by selecting additional pipeline stages to be added to the path of the data. The added delay time provides a predictable read time. If the separation between the rising clock edges of the two clocks (WCLK and RCLK, see  FIG. 3 ) is greater than a minimum (t SKEW1 , see  FIG. 3 ) in both directions, it insures that additional clock cycle latency does not occur in either direction. Thus, the tag will return to the port logic in the minimum number of cycles. In case the separation between either of the two clocks edges is less than a minimum (t SKEW1 ), there may be additional clock cycle latency that may have to be introduced. In the case where the clock edge separation is less than the minimum (t SKEW1 ) in both directions, there may be additional latency in both directions. However, if the t SKEW1  parameter is much smaller than the port clock period, the additional latency may occur in only one direction. In this case, introduction of additional latency through a second pipeline stage  708  (see  FIG. 7 ). 
     It would be apparent to one skilled in the art that the systems and methods disclosed in the present invention are equally applicable to multiport memory devices operating over multiple clock domains. 
     The teachings of the various embodiments of the present invention provide predictable timing for bidirectional I/Os from a multiport memory device. The foregoing descriptions of specific embodiments of the present invention have been presented for purposes of illustration and description. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed, and many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the Claims appended hereto and their equivalents.