Clock domain spanning synchronization circuit and method to ensure correct data signal order
By generating and synchronizing the current buffer signal in the clock domain span circuit, the problem of incorrect data transmission request order when transmitting data signals across the clock domain is solved, and the accuracy and consistency of data transmission are achieved.
Patent Information
- Application Number
- CN202410935500.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-28
- Filing Date
- 2024-07-12
- Publication Date
- 2025-02-14
AI Technical Summary
When transmitting data signals across clock domains, conventional clock domain spanning circuits cannot properly maintain the order of data transmission requests, resulting in data consistency and loss problems.
By generating the destination domain current buffer signal in the destination clock domain, the signal is synchronized into the source clock domain, and the source domain current buffer signal is generated based on the synchronization signal. Then, a source data transfer request signal is generated in the source clock domain based on the source domain current buffer signal, and the signal is synchronized in the destination clock domain. When the data transfer request signal does not correspond to the destination current buffer signal, the delayed data is transmitted to the subsequent data transfer cycle.
Ensure the correct order of data transmission requests, avoid data consistency and loss problems, and improve the accuracy of data transmission across the clock domain.
Smart Images

Figure CN119440171A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates generally to synchronization of data signals in a system having multiple clock domains, and more particularly to clock domain crossing circuits and methods that ensure correct data signal order when transferring data signals across clock domains. Background Art
[0002] In some electronic environments, data must be transferred between two different clock domains, which will be referred to herein as the destination clock domain and the source clock domain. Each clock domain corresponds to a collection of components or circuits driven by the same clock signal or a set of clock signals that are related to each other (e.g., a set of clock signals from the same source or root clock signal). Clock domain crossings where data signals must be transferred between the source clock domain and the destination clock domain can cause metastability, data loss, and data consistency issues.
[0003] A clock domain crossing circuit system for synchronizing data signals between a source clock domain and a destination clock domain may include a double buffer in the source clock domain to increase the bandwidth of the interface provided by the clock domain crossing circuit system. In this case, the destination clock domain must be able to determine the correct one of the double buffers to transmit data or transmit data from it to ensure data consistency and ensure that data transfer requests from the source clock domain are not missed in the destination clock domain. Although conventional clock domain crossing circuit systems include synchronization circuit systems for synchronizing data transfer requests (i.e., read and write requests) generated in the source clock domain and associated with one of the double buffers, these conventional synchronization circuits may not be able to correctly order (i.e., retain their order) data transfer requests in the destination clock domain. This can result in the use of the wrong one of the double buffers (i.e., data inconsistency) or the complete loss of data transfer requests from the source clock domain (data loss). Therefore, improved clock domain crossing circuits and methods are needed for such electronic environments. Summary of the invention
[0004] According to one embodiment of the present disclosure, a method includes generating a destination domain current buffer signal in a destination clock domain, the destination domain current buffer signal having a value indicating which of a first data buffer and a second data buffer in a source clock domain is a current buffer to be used during a current data transfer cycle. The method includes synchronizing the destination domain current buffer signal in the source clock domain to generate a synchronized destination domain current buffer signal, and generating a source domain current buffer signal based on the synchronized destination domain current buffer signal. The generated source domain current buffer signal has a value indicating the current buffer. The method also includes generating a source data transfer request signal in the source clock domain based on the source domain current buffer signal, wherein the source data transfer request signal is associated with the current buffer indicated by the source domain current buffer signal. The source data transfer request signal is synchronized in the destination clock domain to generate the destination domain data transfer request signal, and the method includes delaying the transfer of data between FIFO memories in the destination clock domain to a subsequent data transfer cycle when the current buffer associated with the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal.
[0005] According to another embodiment of the present disclosure, a clock domain crossing synchronization circuit includes a destination current buffer generator in a destination clock domain. The destination current buffer generator is configured to generate a destination domain current buffer signal, and the destination domain current buffer signal has a value indicating whether the first data buffer or the second data buffer is the current buffer to be used in the current data transfer cycle. The first synchronization circuit is configured to receive the destination current buffer signal and generate a corresponding synchronized destination current buffer signal in the source clock domain. The source current buffer generator is configured to generate a source domain current buffer signal based on the synchronized destination current buffer signal, wherein the source domain current buffer signal has a value indicating the current buffer. The source data transfer request generator is configured to receive the source domain current buffer signal and generate a source data transfer request signal in the source clock domain based on the source domain current buffer signal. The generated source data transfer request signal is associated with the current buffer indicated by the source domain current buffer signal. The second synchronization circuit is configured to receive the source data transfer request signal and generate a corresponding synchronized destination domain data transfer request signal in the destination clock domain. The destination data transfer request and delay generator in the destination clock domain is configured to receive the synchronized source data transfer request signal and the destination domain current buffer signal. The destination data transfer request and delay generator is configured to delay the transfer of data between the memory in the destination clock domain and the current buffer to a subsequent data transfer cycle when the current buffer indicated by the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal.
[0006] According to another embodiment of the present disclosure, an electronic system includes a clock domain crossing synchronization circuit, a first-in-first-out (FIFO) memory forming a memory in a destination clock domain, and a double buffer including a first data buffer and a second data buffer in a source clock domain. The source clock domain may be a secure digital (SD) clock domain, and the destination clock domain may be an advanced hardware (AHB) bus clock domain. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] For a more complete understanding of the present invention and its advantages, reference is now made to the following description taken in conjunction with the accompanying drawings, in which:
[0008] Figure 1A is a functional block diagram illustrating an example environment of an electronic system in which a clock domain crossing synchronous circuit according to embodiments of the present disclosure may be implemented.
[0009] Figure 1B is a diagram illustrating an embodiment according to the present disclosure Figure 1A A more detailed functional block diagram of the electronic system.
[0010] Figure 2 is a signal timing diagram illustrating the loss of correct order of data transfer requests that may occur in conventional clock domain crossing circuits in the electronic system of FIG. 1 .
[0011] Figure 3 is a functional block diagram of a clock domain crossing synchronization circuit according to an embodiment of the present disclosure.
[0012] Figure 4A and Figure 4B is a more detailed functional block diagram of a write clock domain crossing synchronization circuit according to an embodiment of the present disclosure.
[0013] Figure 5 is a signal timing diagram illustrating the operation of the write clock domain crossing synchronization circuit of FIG. 4 in a first example of delaying write data transfer.
[0014] Figure 6 is a signal timing diagram illustrating operation of the write clock domain crossing synchronization circuit of FIG. 4 in a second example of delaying write data transfer.
[0015] Fig. 7A and Figure 7B is a more detailed functional block diagram of a read clock domain crossing synchronization circuit according to an embodiment of the present disclosure.
[0016] Figure 8 is a flowchart illustrating a clock domain crossing synchronization method according to an embodiment of the present disclosure.
[0017] Corresponding numerals and symbols in the different figures generally refer to corresponding parts unless otherwise indicated.The figures are drawn to clearly illustrate the relevant aspects of the embodiments and are not necessarily drawn to scale. DETAILED DESCRIPTION
[0018] In the following description, one or more specific details will be explained to provide an understanding of the examples of the embodiments. The embodiments can be obtained without one or more specific details, or with other methods, components, materials, etc. In other cases, well-known structures, materials, or operations are not shown or described in detail so as not to obscure certain aspects of the embodiments.
[0019] References to "an embodiment" or "one embodiment" in the framework of this description are intended to indicate that a particular configuration, structure, or feature described in connection with the embodiment is included in at least one embodiment. Thus, phrases such as "in an embodiment" or "in one embodiment" that may appear in one or more points of this description do not necessarily refer to the same embodiment. Moreover, particular configurations, structures, or features may be combined in any suitable manner in one or more embodiments.
[0020] The references used herein are provided for convenience only and therefore do not limit the scope of protection or the scope of the embodiments.
[0021] Electronic systems can be implemented as a system on chip (SoC), which is an integrated circuit that includes all the necessary components of the system, often including, for example, components associated with different and asynchronous clock domains. Clock domain crossing occurs when data is transferred across clock domains, such as from a flip-flop driven by a source domain clock (source flip-flop) to a flip-flop driven by a destination domain clock (destination flip-flop). Depending on the relationship between the clocks, problems may arise in the data transfer between the source flip-flop and the destination flip-flop. As an example, if the transition at the output of the source flip-flop occurs very close to the valid edge of the second clock, a setup or hold violation may occur at the destination flip-flop. This can cause the output of the second flip-flop to oscillate, become unstable, and may not settle to a stable value before the next valid edge of the second clock. This situation is called metastable and is a potential problem when clock domains are crossed, while data inconsistency and data loss issues can also occur when clock domains are crossed.
[0022] Figure 1A is a functional block diagram illustrating an example environment 10 of an electronic system 100 in which clock domain crossing synchronous circuits according to embodiments of the present disclosure may be implemented. Figure 1AA specific example environment 10 of the electronic system 100 in FIG. 1 is a secure digital (SD) environment, where the source clock domain SCD is the SD clock domain and the destination clock domain DCD is the advanced hardware bus (AHB) clock domain. Secure Digital (SD) is a proprietary format for various types of memory cards used in mobile devices, and SD Input / Output (SDIO) cards are an extension of this standard and include IO functionality in addition to memory storage, as well as a built-in controller that allows them to communicate with a host device HST and provide extended functionality beyond just memory storage.
[0023] In the SDIO environment 10, the electronic system 100 may be part of an intellectual property (IP) core 12 of an SDIO slave device in an SDIO card 14, wherein the SDIO card may include multiple SDIO slave devices and wherein the IP core is a functional block of a reusable electronic circuit system. The IP core 12 of each SDIO slave device (which may be referred to as an SDIO slave device IP core 12) includes an additional electronic circuit system 16 and the electronic system 100. This additional electronic circuit system 16 (including the electronic system 100) may be formed by suitable hardware, firmware or software and a combination thereof. The additional electronic circuit system 16 included in each SDIO slave device IP core 12 processes requests received from a host device HST, such as data transfer requests (such as read and write requests). More specifically, the SDIO master controller 18 in the host device HST supplies requests, such as data transfer requests (such as read and write requests), to the SDIO slave device IP core 12 in the SDIO card 14 via the SDIO bus 20. The additional electronic circuit system 16 in the SDIO slave device IP core 12 processes the data transfer request from the host device HST and generates signals, which are supplied to control the operation of the electronic system 100 to handle the transfer of the requested data component. The signals generated by the SDIO slave device IP core 12 include a start new data transfer request signal SNDT and a data transfer current buffer signal DTCB, which will be referred to as Figure 3 -7 is described in more detail.
[0024] Figure 1B According to one embodiment of the present disclosure Figure 1A 1 is a more detailed functional block diagram of an electronic system 100. The electronic system 100 has a source clock domain SCD and a destination clock domain DCD, wherein a vertical dashed line 102 represents a boundary or crossing between the two clock domains. Figure 1A The SDIO environment 10 is an example of an environment in which the electronic system 100 includes a memory that is Figure 1B The FIFO memory 104 is located in the destination clock domain DCD and is used to transfer data to the source clock domain SCD through the double buffers WRDB, RDDB in the source clock domain.
[0025] In this environment, the use of a single FIFO memory 104 reduces the size of the clock domain crossing synchronization circuitry required for interfacing the SD and AHB clock domains. The clock domain crossing synchronization circuitry utilizes dual buffers WRDB, RDDB to transfer data between the SCD and AHB domains in an alternating or "ping-pong" manner, and in this manner the dual buffers increase the bandwidth of the data transfer interface between the two clock domains.
[0026] In operation, the host device HST ( Figure 1A ) sends a host data transfer request to the SDIO card 14 via the SDIO bus 20 in the form of a host read request and a host write request. The additional electronic circuit system 16 processes the request and generates signals, including Figure 1A SNDT, DTCB signals shown in , thereby controlling the operation of the electronic system 100 to handle the received request. More specifically, the additional electronic circuit system 16 provides a data transfer control signal DTCS to the controller 106 of the electronic system 100 in the source clock domain SCD, wherein the data transfer control signal includes a write control signal WRCS and a read control signal RDCS. The host device HST and the controller 106 operate in the source clock domain SCD.
[0027] The controller 106 includes a receiving (RX) submodule 108 for processing a write control signal WRCS generated by the additional electronic circuit system 16 in response to a write request received from the host device HST. The controller 106 also includes a transmitting (TX) submodule 110 for processing a read control signal RDCS generated by the additional electronic circuit system 16 in response to a read request received from the host device HST. A write double buffer WRDB is included in the RX submodule 108 and a read double buffer RDDB is included in the TX submodule 110. Each double buffer WRDB, RDDB includes two data buffers, designated as data buffers B0 and B1 in FIG. 1. The submodules 108, 110 in the source clock domain SCD are clocked by the source domain clock signal SCK, while the controllers 112, 114 and the FIFO memory 104 in the destination domain clock domain DCD are clocked by the destination domain clock signal DCK.
[0028] When processing a host write request, the SDIO card 14 ( Figure 1A ) receives a write request from the host device HST via the SDIO bus 20. The SDIO bus 20 ( Figure 1A ) is directly connected between the RX submodule 108 and the TX submodule 110, and the host write request includes write data WR_DATA from the host device HST. The write data WR_DATA from the host device HST is supplied to the RX submodule 108 through the SDIO bus 20, such as Figure 1BAs seen in the figure. The additional electronic circuit system 16 supplies a WRCS signal to the RX submodule 108 to indicate to the RX submodule that it will receive write data WR-DATA and will need to process the write data as part of a write request. In response to the WRCS signal, the RX submodule 108 issues an internal write request WR-REQ and write data WR-DATA from the buffer B0, B1 of the double buffer WRDB that is designated as the current buffer during a given data transfer cycle. The operation of the data buffers B0, B1 of the write double buffer WRDB and the read data buffer RDDB will be described in more detail below. The internal write request WR-REQ and the write data WR-DATA are issued in the SCD clock domain to the FIFO write controller 112 in the destination clock domain DCD (e.g., the AHB clock domain). The FIFO write controller 112 processes the internal WR-REQ request and the write data WR-DATA, and handles writing the WR-DATA data from the current buffer B0 or B1 of the write double buffer WRDB to the FIFO memory 104. The FIFO read controller 114 processes the received read data as part of a read request, as will now be described in greater detail below.
[0029] Similarly, when processing a host read request, the SDIO card 14 receives the read request from the host device HST via the SDIO bus 20. The host read request includes read data RD_DATA from the host device HST. The read data RD_DATA from the host device HST is transmitted via the SDIO bus 20 ( Figure 1A ) is supplied to the TX submodule 110, such as Figure 1B As seen in FIG. The additional electronic circuit system 16 supplies the RDCS signal to the TX submodule 110 to indicate to the TX submodule that it will receive the read data RD_DATA and will need to process the read data as part of the read request. In response to the RDCS signal, the RX submodule 110 issues an internal read request RD-REQ from the SCD clock domain to the FIFO read controller 114 in the DCD clock domain, and the FIFO read controller processes the internal RD-REQ request and accesses the read RD-DATA in the FIFO memory 104 and provides this read data to one of the buffers B0, B1 of the read double buffer RDDB in the TX submodule 110 as the current buffer. Thereafter, the TX submodule 110 provides the read data RD-DATA to be transmitted from the SDIO card 14 to the host device HST via the SDIO bus 20.
[0030] When transmitting data signals between the SD and AHB clock domains, synchronization techniques must be implemented to prevent metastability, data loss, and data consistency issues as mentioned above. Recall that in the SD environment, the SD clock domain is the source clock domain SCD, and the AHB clock domain is the destination clock domain. Therefore, both the write request WR-REQ and the read request RD-REQ from the submodules 108 and 110 in the SD clock domain must be resynchronized in the AHB clock domain to ensure correct operation. Therefore, although not explicitly shown in Figure 1, each of the RX, TX submodules 108, 110 and the FIFO write controller 112 and the FIFO read controller 114 includes a portion of the clock domain crossing synchronization circuit system for resynchronizing the signals transmitted between the SD and AHB clock domains. Additional submodules SM (such as additional submodules RX submodule 108 and TX submodule 110) can be connected to each of the FIFO write controller 112 and the FIFO read controller 114.
[0031] Figure 2 1 is a signal timing diagram illustrating the loss of the correct order of data transfer requests that may occur with conventional synchronization techniques implemented with conventional clock domain crossing circuits in the electronic system 100 of FIG1. Although not shown in FIG1, each of the write request WR-REQ and read request RD-REQ signals from the submodules 108, 110 in the SD clock domain is directed to the current buffer in the buffers B0, B1. Figure 2 The write request is illustrated by way of example. The RX submodule 108 generates a write request WR-REQ, which includes a source domain write first buffer signal SDDRB0 and a source domain write second buffer signal SDDRB1. The RX submodule 108 activates only the buffer signals WRB0, WRB1 for one of the buffers B0, B1 that is the current buffer. Figure 2 In the example of , the source domain write first buffer signal SDWRB0 is first activated at time t0, at which time buffer B0 is indicated as the current buffer in the source clock domain SCD. The source domain write second buffer signal SWDRB1 is then activated at time t1, at which time buffer B1 is indicated as the current buffer in the source clock domain SCD.
[0032] In the FIFO write controller 112, the conventional clock domain synchronization circuit system resynchronizes the SDCRB0 and SDCRB1 signals in the destination clock domain to the synchronized source domain write buffer signals SDCRB0-SYNC and SDCRB1-SYNC in the destination clock domain, but such conventional clock domain synchronization circuit system cannot guarantee the correct order of the SDCRB0 and SDCRB1 signals. Then, such conventional clock domain synchronization circuit system FIFO write controller 112 generates the destination domain write buffer signals DDWRB0 and DDWRB1 according to the synchronized source domain write buffer signals SDCRB0-SYNC and SDCRB1-SYNC or in response to the synchronized source domain write buffer signals SDCRB0-SYNC and SDCRB1-SYNC. Thereafter, the FIFO write controller 112 applies the DDWRB0 and DDWRB1 signals to the FIFO memory 104 to store the write data contained in the current buffers B0 and B1 of the write double buffer WRDB in the FIFO memory.
[0033] like Figure 2 As shown in FIG. 1 , conventional clock domain crossing circuitry in FIFO write controller 112 may not correctly maintain the order of source domain write buffer signals SDDRB0-SYNC, SDDRB1-SYNC generated in destination clock domain DCD. This in turn also results in incorrect generation of DDWRBO, DDWRB1 signals. Figure 2 A possible scenario is illustrated in which both the synchronized source domain write buffer signal SDDRB0 and the synchronized source domain write buffer signal SDDRB1-SYNC occur at the same time t2 in the destination clock domain DCD. The signals in the destination clock domain DCD are synchronized with the destination domain clock signal DCK, but since both the DDWRB0 and DDWRB1 signals occur at time t2, correct operation will not occur. The write operation associated with one of the DDWRB0 and DDWRB1 signals and the write data stored in the corresponding data buffers B0 and B1 may be lost, or the order of the write operations may be reversed.
[0034] Embodiments of the present disclosure are directed to clock domain crossing synchronization circuits and methods that ensure the correct order of signals and operations in an electronic environment (such as the environment of the electronic system 100 of FIG. 1), wherein data is transmitted between a FIFO memory 104 in a destination clock domain DCD and a current buffer in a source clock domain SCD. The current buffer is one of the data buffers B0, B1 in the double buffers WRDB, RDDB that is used to transmit data during or in the current data transmission cycle. Embodiments of the present disclosure transmit the current buffer in the destination clock domain DCD to the source clock domain SCD at the beginning of data transmission, thereby setting the current buffer in the source clock domain to be equal to the current buffer in the destination clock domain. Thereafter, when a read or write data transmission request signal is transmitted from the source clock domain SCD to the destination clock domain DCD, the synchronization circuit detects whether the transmitted data transmission request signal is associated with the current buffer in the destination clock domain. If the data transmission request signal is associated with the current buffer, then the data transmission is performed within the current data transmission cycle. When the data transfer request signal is not associated with the current buffer in the destination clock domain, the data transfer request signal for the associated data buffer B0, B1 is delayed to a subsequent data transfer cycle, and the associated data transfer is performed in this subsequent data transfer cycle.
[0035] Figure 3 is a functional block diagram of a clock domain crossing synchronization circuit 300 according to an embodiment of the present disclosure. In some embodiments of the present disclosure, portions of the synchronization circuit 300 will be included in the RX submodule 108, the TX submodule 110, the FIFO write controller 112, and the FIFO read controller 114 in the electronic system 100. The synchronization circuit 300 includes a destination current buffer generator 302 in the destination clock domain DCD. The destination current buffer generator 302 is configured to generate a destination domain current buffer signal DCB having a value indicating whether the first data buffer B0 or the second data buffer B1 of the double buffer DB in the source clock domain SCD is the current buffer to be used in the current data transfer cycle or operation. The destination current buffer generator 302 also switches or changes the level or state of the DCB signal in response to a data transfer request signal DTR applied to the FIFO memory 303 during the data transfer cycle of the synchronization circuit 300, as will be described in more detail below. The components of the synchronization circuit 300 in the destination clock domain DCD are clocked by the destination domain clock signal DCK, while the components in the source clock domain SCD are clocked by the source domain clock signal SCK. The clock signals DCK, SCK are shown as being applied only to Figure 3 The components in the synchronous circuit are selected only to simplify the diagram.
[0036] The first synchronization circuit 304 receives the destination current buffer signal DCB and generates a corresponding synchronized destination current buffer signal DCB-SYNC in the source clock domain. The DCB-SYNC signal is applied to the source current buffer generator 306, which is configured to generate a source domain current buffer signal SCB based on the synchronized destination current buffer signal DCB-SYNC. The source current buffer signal SCB has a first value indicating that the first data buffer B0 is the current buffer, and a second value indicating that the second data buffer B1 is the current buffer. The source current buffer generator 306 also receives a start new data transfer signal SNDT supplied by the additional electronic circuit system 16 included in the SDIO slave device IP core 12 of the SDIO card 14 of the electronic system 100, as described above with reference to Figure 1A As described. In response to the SNDT signal becoming valid to indicate the start of a new data transfer cycle or operation of the synchronization circuit 300, the source current buffer generator 306 sets the source current buffer signal SCB to a value corresponding to the same current buffer indicated by the synchronized destination current buffer signal SCD-SYNC. In this way, at the start of the data transfer operation, the SCB signal is set to the same current buffer indicated by the DCB signal so that the circuit systems in both clock domains DCD and SCD start with the same current buffer (either data buffer B0 or data buffer B1).
[0037] After the data transfer operation starts, the source current buffer generator 306 changes or switches the value of the source current buffer signal SCB for each data transfer cycle of the data transfer operation in response to the data transfer current buffer signal DTCB indicating that another data buffer B0, B1 should be used. Figure 1A , each of the RX submodule 108 and the TX submodule 110 uses the DTCB signal to switch between the two data buffers B0, B1. The additional electronic circuit system 16 activates the DTCB so that the corresponding submodule 108, 110 switches the current buffer B0, B1 when either the current buffer is full (i.e., all corresponding data is stored in the current buffer) or the last byte of data transmitted to the current buffer has been received or sent. The DTCB signal includes a write current buffer signal WCB and a read current buffer signal RCB, which are used by the write clock domain crossing synchronization circuit and the read clock domain crossing synchronization circuit, respectively, as will be referred to below. Figure 4A , Figure 4B and Fig. 7A , Figure 7B discussed in more detail.
[0038] The value of the SCB signal switches between the first value and the second value to alternately indicate that the first data buffer B0 or the second data buffer B1 is the current buffer. Thus, the current buffer signal SCB alternately changes in each data transfer cycle of the data transfer operation.
[0039] The source data transfer request generator 308 receives the source current buffer signal SCB and generates a source data transfer request signal SDTR in the source clock domain SCD based on the source current buffer signal. The source data transfer request signal SDTR is associated with the current buffer indicated by the source current buffer signal SCB. Figure 3 In the embodiment of the present invention, the source data transfer request signal SDTR includes a first buffer source data transfer request signal SDTR-B0 and a second buffer source data transfer request signal SDTR-B1. When the first buffer B0 is the current buffer, the source data transfer request generator 308 activates the SDTR-B0 signal, and when the second buffer B1 is the current buffer, the source data transfer request generator activates the SDTR-B1 signal. In the source clock domain SCD, only one of the source data transfer request signals SDTR-B0 and SDTR-B1 is activated at a time.
[0040] The second synchronization circuit 310 receives the source data transfer request signals SDTR-B0, SDTR-B1 and generates corresponding synchronized source data transfer request signals in the destination clock domain. Figure 3 In the example embodiment of , the synchronized source data transfer request signal includes a first buffer synchronized source data transfer request signal SDTR-B0-SYNC and a second buffer synchronized source data transfer request signal SDTR-B1-SYNC in the destination clock domain. Although only one of the source data transfer request signals SDTR-B0 and SDTR-B1 is activated at a time in the source clock domain SCD, since the synchronization circuit 310 cannot guarantee the correct order of these signals, the SDTR-B0-SYNC and SDTR-B1-SYNC signals may be activated or switched at the same time in the destination clock domain DCD.
[0041] The destination data transfer request and delay generator 312 in the destination clock domain receives the synchronized source data transfer request signals SDTR-B0-SYNC, SDTR-B1-SYNC and the destination domain current buffer signal DCB. In operation, the destination data transfer request and delay generator 312 uses the DCB signal to determine which of the synchronized source data transfer request signals SDTR-B0-SYNC, SDTR-B1-SYNC to use during the current data transfer cycle and which of these signals to delay to the subsequent data transfer cycle. When the current buffer indicated by or associated with the destination domain data transfer request signals SDTR-B0-SYNC, SDTR-B1-SYNC does not correspond to the current buffer indicated by the destination domain current buffer signal DCB, the delayed data transfer request and delay generator 312 delays the transfer of data between the FIFO memory 303 (or other types of memory in other embodiments) and one of the data buffers B0, B1 as the current buffer to the subsequent data transfer cycle. When the destination domain current buffer signal DCB has a value indicating the same current buffer associated with the activated SDTR-B0-SYNC, SDTR-B1-SYNC signals, the destination data transfer request and delay generator 312 provides the data transfer request signal DTR to the FIFO memory 303, thereby transferring data between the FIFO memory and the current buffer during the current data transfer cycle.
[0042] In operation of the synchronization circuit 300, the additional electronic circuit system 16 (see Figure 1A ) activates the start new data transfer signal SNDT applied to the source current buffer generator 306, and the data transfer operation begins. Each data transfer operation includes one or more data transfer cycles. In response to the SNDT signal becoming valid, the source current buffer generator 306 drives the source current buffer signal SCB to the same level or value as the synchronized destination current buffer signal DCB-SYNC provided by the first synchronization circuit 304 to indicate the same current buffer. The DCB-SYNC signal indicates the current value of the destination current buffer signal DCB generated by the destination current buffer generator 302, thereby indicating the current buffer in the destination clock domain. In this way, the components in the source clock domain SCD determine the current buffer to be used to start the data transfer operation.
[0043] Thereafter, the source data transfer request generator 308 activates one of the first buffer source data transfer request signal SDTR-B0 and the second buffer source data transfer request signal SDTR-B1 that corresponds to the current buffer. Assume that for the current example data operation being described, the initial current buffer is data buffer B0, so the request generator 308 activates the SDTR-B0 signal. Then, the synchronization circuit 310 resynchronizes the SDTR-B0 signal to activate the synchronized source data transfer request signal SDTR-B0-SYNC in the destination clock domain DCD. At this time, the destination data transfer request and delay generator 312 takes one of two actions depending on whether the current buffer (buffer B0 in this example) corresponds to the current buffer indicated by the destination domain current buffer signal DCB. When the DCB signal indicates that the current buffer is buffer B0, the destination data transfer request and delay generator 312 activates the data transfer signal DTR supplied to the FIFO memory 303, thereby transferring data between the current buffer B0 and the FIFO memory 303 in the current data transfer cycle. In response to the activated DTR signal, the destination current buffer generator 302 increments or switches the DCB signal to indicate that another data buffer B1 is the current buffer during the subsequent data transfer cycle. In the source clock domain SCD, the source current buffer generator 306 also responds to the SDIO slave device IP core 12 ( Figure 1A ) drives the DTCB signal to indicate that the current data buffer B0, B1 is full (ie, all corresponding data are stored in the current buffer) or the last byte of data transferred to the current buffer has been received or sent and increments or switches the SCB signal.
[0044] During the data transfer cycle, by the time the SDTR-B0 signal is applied to the destination data transfer request and delay generator 312, the value of the DCB signal may have changed state. Therefore, if the DCB signal indicates that the current buffer is buffer B1 instead of buffer B0 in this example, the destination data transfer request and delay generator 312 delays the transfer of data between the current buffer B0 and the FIFO memory 303 to a subsequent data transfer cycle. In this case, during the current data transfer cycle, data is first transferred between buffer B1 and the FIFO memory 303. Once the destination current buffer signal DCB changes state in response to the DTR signal activated for this transfer, the DCB signal will again indicate that buffer B0 is the current buffer, at which time the destination data transfer request and delay generator 312 immediately activates the DTR signal to transfer data between the FIFO memory 303 and buffer B0. In this way, data transfers between clock domains are not lost, but the transfer is only delayed to a subsequent data transfer cycle, where the current buffer associated with the transfer does not match between the source clock domain SCD and the destination clock domain DCD.
[0045] FIG. 4 is a more detailed functional block diagram of a write clock domain crossing synchronization circuit 400 according to an embodiment of the present disclosure. Figure 3 The clock domain crossing synchronization circuit 300 includes the write clock domain crossing synchronization circuit 400 of FIG. 4 and the read clock domain crossing synchronization circuit 700 shown in FIG. 7 to provide synchronization of read and write data transfer between a source clock domain SCD and a destination clock domain DCD.
[0046] 4, the write clock domain crossing synchronization circuit 400 includes a destination current buffer generator 402 to generate a destination current buffer signal DCB. The generator 402 includes a flip-flop 404 having an input terminal and an output terminal, and is clocked by the destination domain clock signal DCK. A multiplexer 406 has a first input terminal coupled to the output terminal of the flip-flop, a second input terminal receiving the output of the flip-flop through an inverter 408, and an output terminal coupled to the input terminal of the flip-flop. The control input terminal of the multiplexer 406 is coupled to receive a write request signal WR-REQ, wherein the write request signal is the above reference signal. Figure 3 The synchronization circuit 300 is discussed as a part of the data transfer request signal DTR.
[0047] In operation, each time the WR-REQ signal becomes active, the destination current buffer generator 402 switches the DCB signal to transfer data to the FIFO memory 410. The FIFO memory 410 corresponds to the FIFO memory in the destination clock domain DCD, as described above with reference to FIGS. Figure 3When the WR-REQ signal is asserted or activated, multiplexer 406 supplies the complement of the DCB signal from inverter 408 to the input of flip-flop 404 so that when the flip-flop is clocked, the complement of the current value of the DCB signal is output by the flip-flop. In this manner, generator 402 switches the DCB signal in response to the WR-REQ signal being activated. When the WR-REG signal is not active, multiplexer 408 outputs the feedback DCB signal to the input of flip-flop 404 so that the current value of the DCB signal is maintained whenever the flip-flop is clocked.
[0048] The write clock domain crossing synchronization circuit 400 also includes a first synchronization circuit 412, which includes first and second series flip-flops 414 and 416 clocked by the source domain clock signal SCK. The series flip-flops 414, 416 operate in a conventional manner to synchronize the DCB signal in the source clock domain SCD and provide a synchronized DCB signal SCB-SYNC. The source domain current buffer generator 418 includes a first multiplexer 420 having a first input terminal coupled to receive the SCB-SYNC signal and a control input terminal coupled to receive the start new data transfer signal SNDT provided by the additional electronic circuit system 16, as described above with respect to Figure 1A and Figure 3 The flip-flop 422 has an input coupled to the output of the first multiplexer 420 and has an output providing a source domain current buffer signal SCB. The second multiplexer 424 receives the SCB signal on a first input and receives the complement of the SCB signal on a second input in the form of the SCB signal applied through an inverter 426. The output of the second multiplexer 424 is coupled to the second input of the first multiplexer 420. The control input of the second multiplexer 424 is coupled to receive a write current buffer signal WCB provided by the additional electronic circuit system 16, wherein the WCB signal is the same as the above reference signal. Figure 1A and 3 One of the signals corresponding to the DTCB signal discussed.
[0049] In the operation of the source domain current buffer generator 418, at the beginning of the data transfer operation, the SDIO card 14 ( Figure 1A) asserts or activates the SNDT signal and deactivates the WCB signal. The activated SNDT signal causes the multiplexer 420 to provide the DCB-SYNC signal to the input of the flip-flop 422. The flip-flop 422 is then clocked by the SCK signal to output the SCB signal having a value corresponding to the value of the DCB-SYNC signal. After the value of the DCB-SYNC signal is clocked into the flip-flop 422 for a sufficient time, the additional electronic circuitry 16 deactivates the SNDT signal, which causes the multiplexer to provide the output of the multiplexer 424 to the input of the flip-flop 422. When the WCB signal is deactivated, the multiplexer 424 provides the SCB signal thereon, so that the current value of the SCB signal is fed back to the input of the flip-flop 422 through the multiplexers 424 and 420 to maintain the current value of the SCB signal when the flip-flop is clocked. When the WCB signal is activated, multiplexer 424 provides the complement of the SCB signal from inverter 426 at its output, and this complement is thereafter provided to the input of flip-flop 422 through multiplexer 420. In this case, when flip-flop 422 is clocked, the flip-flop switches or drives the SCB signal to a complementary state. The additional electronic circuitry 16 activates the WCB signal whenever write data has been loaded into the current buffer and is ready to be transferred to the FIFO memory 410, as will be described in more detail below.
[0050] The clock domain crossing synchronization circuit 400 also includes a source data transfer request generator 428, which generates a source data transfer request signal in the form of a first buffer source write request signal SWR-B0 and a second buffer source write request signal SWR-B1. In an embodiment of the circuit 400, each of the SWR-B0 and SWR-B1 signals can be an NRZ signal, and in this description, such an NRZ signal can be described as "becoming valid" or becoming a "valid signal". In this context, "becoming valid" or "valid signal" corresponds to a transition or edge of such an NRZ signal. The source data transfer request generator 428 includes a first trigger 430 and a second trigger 432, which generate SWR-B0 and SWR-B1 signals at their respective output ends. The source data transfer request generator 428 also includes a logic circuit system 434, which receives the WCB signal and the SCB signal and is coupled to the input ends of the triggers 430 and 432. The logic circuit system 434 is configured to provide a valid signal to the input terminal of the first flip-flop 430 in response to the WCB signal becoming valid and the SCB signal indicating that the first data buffer B0 is the current buffer. The logic circuit system 434 is also configured to provide a valid signal to the input terminal of the second flip-flop 432 in response to the WCB signal becoming valid and the SCB signal indicating that the second data buffer B1 is the current buffer. Finally, the logic circuit system 434 is also configured to provide an invalid signal on the input terminal of each of the first and second flip-flops 430, 432 in response to the first buffer source write request signal SWR-B0 and the second buffer source write request signal SWR-B1 becoming valid, respectively.
[0051] 4, logic circuitry 434 includes an inverter 436 having an input coupled to receive the SCB signal and having an output coupled to a first input of a first AND gate 438. First AND gate 438 has a second input receiving the WCB signal and has an output coupled to a first input of a multiplexer 440. The output of multiplexer 440 is applied to an input of flip-flop 430, and the output of this flip-flop is coupled to first and second inputs of the multiplexer directly and through an inverter 442, respectively. Logic circuitry 434 also includes a second AND gate 446, a multiplexer 448, and an inverter 450 coupled to flip-flop 432 in the same manner as just described with respect to components 438, 440, 442 of flip-flop 430. However, in contrast to first AND gate 438, second AND gate 446 receives the SCB signal directly on an input.
[0052] In operation, whenever the additional electronic circuit system 16 activates the WCB signal, the source data transfer request generator 428 activates one of the SWR-B0, SWR-B1 signals corresponding to the current buffer indicated by the SCB signal. As mentioned above, the WCB signal is activated in association with the write data WR-DATA being stored in the current buffer B0 or B1 and ready to be transferred to the FIFO memory 410. Initially, it is assumed that the SCB signal is high, indicating that buffer B1 is the current buffer, and the WCB signal is inactive low. The high SCB signal enables the AND gate 446, but since the WCB signal is low, this AND gate initially provides a low output to the multiplexer 448. The low output from the AND gate 446 causes the multiplexer 448 to provide the SWR-B1 signal at the output of the flip-flop 432 to the input of this flip-flop. In this case, if clocked by the source clock domain signal SCD, the flip-flop 432 maintains the current state of the SWR-B1 signal. When the WCB signal is activated (i.e., driven high in this embodiment), AND gate 446 applies a high output to multiplexer 448, which in turn couples the complement of the output of flip-flop 432 to the input of flip-flop 432, where the complement of the output of flip-flop 432 is the complement of the SWR-B1 signal output by inverter 450.
[0053] When the flip-flop 432 is thereafter clocked by the source domain clock signal SCK, the flip-flop drives the SWR-B1 signal to be valid, assuming that the SCB and WCB signals are both logic 1. Whenever the SCB and WCB signals are both logic 1, the SWR-B1 signal provided by the flip-flop 432 changes value when clocked by the SCK signal. In this manner, the SWR-B1 signal maintains its current value (logic 1 or 0) until the next switch to the current buffer B1. In the embodiment of Figure 4, the activated SWR-B1 signal is a non-return to zero (NRZ) signal. When the flip-flop 432 drives the SWR-B1 signal to be valid, this valid signal is fed back through the inverter 450 to provide the complement of the SWR-B1 signal to the corresponding input terminal of the multiplexer 448, and the multiplexer 448 in turn provides this complement to the input terminal of the flip-flop 432. Therefore, when flip-flop 432 is again clocked by the SCK signal, the select signal provided from AND gate 446 to multiplexer 448 is a logic 0, causing the flip-flop to maintain the value of the SWR-B1 signal the next time it is clocked by the SCK signal. In this manner, flip-flop 432 generates a valid NRZ signal for the SWR-B1 signal. Components 436, 438, 440, and 442 coupled to flip-flop 430 operate in the same manner so that this flip-flop generates a valid NRZ signal for the SWR-B0 signal when the SCB signal is low (indicating that the current buffer is buffer B0).
[0054] The clock domain crossing synchronization circuit 400 of FIG. 4 also includes a second synchronization circuit 452, which includes two pairs of serial flip-flops. More specifically, the synchronization circuit 452 includes first and second serial flip-flops 454, 456, which are clocked by the destination domain clock signal DCK. These serial flip-flops 414, 416 operate in a conventional manner to synchronize the SWR-B0 signal in the destination clock domain DCD and provide a synchronized first buffer source write request signal SWR-B0-SYNC. The synchronization circuit 452 also includes serial flip-flops 458, 460, which are clocked by the DCK signal and are used to synchronize the SWR-B1 signal in the destination clock domain to provide a synchronized second buffer source write request signal SWR-B1-SYNC.
[0055] In the embodiment of FIG. 4 , the clock domain crossing synchronization circuit 400 further includes a destination data transfer request and delay generator 462, which receives SWR-B0-SYNC and SWR-B1-SYNC signals from the second synchronization circuit 452. SWR-B0-SYNC and SWR-B1-SYNC are Figure 3 The destination data transfer request and delay generator 462 includes a first pulse generator 464, which includes a flip-flop 466 that receives the SWR-B0-SYNC signal on an input and has an output coupled to one input of an XOR gate 468. The second input of the XOR gate 468 is coupled to directly receive the SWR-B0-SYNC signal, and the XOR gate generates a write first buffer pulse signal WR-B0 on an output. The second pulse generator 470 includes a flip-flop 472 that receives the SWR-B1-SYNC signal on an input and has an output coupled to one input of an XOR gate 474. A second input of the XOR gate 474 is coupled to receive the SWR-B1-SYNC signal directly, and the XOR gate generates a write second buffer pulse signal WR-B0 at an output.
[0056] In operation, each pulse generator 464, 470 generates a valid pulse signal for the WR-B0, WR-B1 signal in response to the corresponding SWR-B0-SYNC, SWR-B1-SYNC signal becoming valid. For example, assume that the output of the flip-flop 466 is initially low together with the SWR-B0-SYNC signal. At this time, the XOR gate 468 drives the WR-B0 signal to an invalid low. In response to the SWR-B0-SYNC signal becoming valid high, the XOR gate 468 drives the WR-B0 signal to a valid high because the XOR gate now receives a high SWR-B0-SYNC signal and a low output signal from the flip-flop 466. When the flip-flop 466 is clocked by the DCK signal next time, the flip-flop drives its output high, causing the XOR gate 468 to then deactivate the WR-B0 signal. In this way, the pulse generator 464 generates a pulse signal for the WR-B0 signal. The operation of the pulse generator 470 is the same as the operation of generating a pulse signal for the WR-B1 signal.
[0057] The destination data transfer request and delay generator 462 also includes a first transfer request delay circuit 476 having a first input coupled to receive the destination domain current buffer signal DCB and a second input coupled to receive the write first buffer pulse signal WR-B0. The first transfer request delay circuit 476 is configured to drive the delayed write first buffer signal D-WR-B0 to be valid in response to the write first buffer pulse signal WR-B0 becoming valid and the destination domain current buffer signal DCB indicating that the second buffer B1 is the current buffer in the destination clock domain DCD. In the embodiment of FIG. 4, the first transfer request delay circuit 476 includes an AND gate 478 having a first input coupled to receive the DCB signal and a second input coupled to the output of an OR gate 479, the OR gate 479 receiving the WR-B0 signal on the first input and the D-WR-B0 signal on the second input. The output of the AND gate 478 is supplied to the input of a flip-flop 480, which generates the D-WR-B0 signal on the output.
[0058] In operation, when the WR-B0 signal or the D-WR-B0 signal is active high, the OR gate 479 enables the AND gate 478. When the AND gate 478 is enabled and the DCB signal is high (indicating that the current buffer is buffer B1) and the WR-B0 signal is valid (indicating that buffer B0 is to be written), the AND gate 478 drives its output high. When the flip-flop 480 is clocked, this high output of the AND gate 478 is latched by the flip-flop, thereby driving the D-WR-B0 signal to be active high. Thereafter, the D-WR-B0 signal will be used to write the data associated with the WR-B0 signal in a subsequent data transfer cycle, as will be described in more detail below. The OR gate 479 is used to cause the flip-flop 480 to maintain the D-WR-B0 signal high (i.e., logic 1) when it is clocked when the DCB signal is high (indicating that the current buffer is buffer B1 instead of buffer B0).
[0059] The second transfer request delay circuit 482 includes an AND gate 484, an OR gate 485, and a flip-flop 486 coupled in the same manner as the corresponding components 478, 479, 480 in the first transfer request delay circuit 476, except that the DCB signal is applied to one input of the AND gate 484 through an inverter 487. The second transfer request delay circuit 482 operates in the same manner as described for the first transfer request delay circuit 476, except in relation to buffer B1. When the DCB signal is low (indicating that the current buffer is buffer B0) and the WR-B1 signal goes high (indicating that buffer B1 is to be written), the AND gate 484 drives its output high. When the flip-flop 486 is clocked, this high output of the AND gate 484 is latched by the flip-flop, thereby driving the D-WR-B1 signal high. Thereafter, the D-WR-B1 signal will be used to write the data associated with the WR-B1 signal during a subsequent data transfer cycle, as will be described in more detail below. OR gate 485 is used to cause flip-flop 486 to maintain the D-WR-B1 signal high (ie, logic 1) when clocked when the DCB signal is low (indicating that the current buffer is buffer B0 rather than buffer B1).
[0060] The destination data transfer request and delay generator 462 also includes an output logic 488, which is coupled to the first and second pulse generators 464, 470 to receive the write first buffer pulse signal WR-B0 and the write second buffer pulse signal WR-B1. The output logic 488 is also coupled to the first and second transfer request delay circuits 476, 482 to receive the delayed write first buffer signal D-WR-B0 and the delayed write second buffer signal D-WR-B1. The output logic 488 generates the first buffer write request pulse signal WR-B0-REQ in response to either the WR-B0 or the D-WR-B0 signal becoming valid. The output logic 488 generates the second buffer write request pulse signal WR-B1-REQ in response to either the WR-B1 or the D-WR-B1 signal becoming valid. In the embodiment of Figure 4, the output logic 488 includes a first OR gate 489 for receiving the WR-B0 and D-WR-B0 signals and generating WR-B0-REQ in response to these signals. The second OR gate 490 receives the WR- B1 and D-WR- B1 signals and generates WR- B1 -REQ in response to these signals.
[0061] In the embodiment of FIG. 4 , the destination data transfer request and delay generator 462 further includes a first selection circuit in the form of a multiplexer 491. The multiplexer 491 has an input coupled to the output logic 488, or more specifically, to the output of the OR gates 489, 490, to receive the WR-B0-REQ and WR-B1-REQ signals. The control input of the multiplexer 491 receives the destination domain current buffer signal DCB. When the DCB signal is low (indicating that the first buffer B0 is the current buffer), the multiplexer 491 outputs the WR-B0-REQ signal as a write request signal WR-REQ to the FIFO memory 410 to transfer the write data from the current buffer (buffer B0) indicated by the DCB signal to the FIFO memory. When the DCB signal is high (indicating that the second buffer B1 is the current buffer), the multiplexer 491 provides the WR-B1-REQ signal as a write request signal WR-REQ to the FIFO memory 410 to transfer write data from the current buffer (buffer B1) indicated by the DCB signal to the FIFO memory.
[0062] In addition to the above operations, the destination data transfer request and delay generator 462 is also used to ensure that the desired write data transfer (i.e., WR-B0 and WR-B1) is not lost or missed. The destination data transfer request and delay generator 462 achieves this by generating a WR-REQ signal to transfer the write data to the FIFO memory 410 when the current buffer indicated by the DCB signal does not correspond to the buffer associated with the activated WR-B0 or WR-B1 signal. This is achieved by delaying the write first and second buffer signals D-WR-B0, D-WR-B1 generated by the circuit 462. When the WR-B0 signal has been generated to transfer the write data from buffer B0 to the FIFO memory 410, but the DCB signal indicates that the current buffer is buffer B1, the D-WR-B0 signal is set to valid. In this case, once the DCB signal changes to indicate that the current buffer is buffer B0, the valid D-WR-B0 signal causes the OR gate 489 to activate the WR-B0-REQ signal, which in turn is provided to the FIFO memory 410 as the WR-REQ signal through the multiplexer 491, thereby writing data from buffer B0 to the FIFO memory. Therefore, even if the current buffer indicated by the DCB signal is different from the buffer associated with the write request signal (WR-B0 or WR-B1) from the source clock domain SCD, this write request will not be lost, but will be delayed to a subsequent data transfer cycle in which the DCB signal corresponds to the current buffer associated with this write request. The operation of the destination data transfer request and delay generator 462 is similar to the operation of the D-WR-B1 and WR-B1 signals with respect to buffer B1.
[0063] Finally, the destination data transfer request and delay generator 462 includes a selection circuit 492, which is a multiplexer in the embodiment of FIG. 4. The multiplexer has a first input coupled to receive first buffer write data B0-WR-DATA from data buffer B0 and a second input coupled to receive second buffer write data B1-WR-DATA from data buffer B1. Data buffers B0 and B1 are part of a dual buffer DB in the source clock domain SCD, as described above with reference to Figure 3 In operation, when the DCB signal indicates that the first data buffer B0 is the current buffer, the multiplexer 492 supplies the write data B0-WR-DATA stored in the data buffer B0 to the FIFO memory 410. When the DCB signal indicates that the second data buffer B1 is the current buffer, the multiplexer 492 supplies the write data B1-WR-DATA stored in the data buffer B1 to the FIFO memory 410.
[0064] Finally, in the embodiment of FIG. 4 , the clock domain crossing synchronization circuit 400 further includes a data selection circuit 493, which is coupled to the data buffers B0 and B1 of the double buffer DB and is also coupled to receive the write data WR-DATA from the host HST. In response to the SCB signal, when the DCB signal indicates that the first data buffer B0 is the current buffer, the data selection circuit 493 supplies the write data WR-DATA from the host HST to the first data buffer B0 for storage. When the DCB signal indicates that the second data buffer B1 is the current buffer, the data selection circuit 493 supplies the write data WR-DATA from the host HST to the second data buffer B1 for storage.
[0065] The data selection circuit 493 includes a first AND gate 494 having a first input coupled to receive WR-DATA from the host HST, and a second input coupled to receive the SCB signal applied through an inverter 496. The second AND gate has a first input coupled to receive WR-DATA from the host HST, and a second input coupled to receive the SCB signal. When the SCB signal is low (indicating that data buffer B0 is the current buffer), the low SCB signal is applied through the inverter 492 to enable the AND gate 494, thereby providing the WR-DATA from the host HST to the first data buffer B0 for storage in the first data buffer. Conversely, when the SCB signal is high (indicating that data buffer B1 is the current buffer), the high SCB signal enables the AND gate 495, thereby providing the WR-DATA from the host HST to the second data buffer B1 for storage in the second data buffer. The write data WR-DATA includes multiple signals or bits, but is not explicitly shown in Figure 4. Thus, although only two single AND gates 494 and 495 are shown, in practice a set of such AND gates, one for each bit of WR-DATA, will be included in the data selection circuit 492. This is more clearly illustrated by the depiction of data buffers B0, B1 in FIG4, where each buffer is shown as including a plurality of flip-flops, one for each bit of WR-DATA to be stored in the buffer.
[0066] Figure 5 is a signal timing diagram illustrating the operation of the write clock domain crossing synchronization circuit 400 of Figure 4. More specifically, the signal timing diagram illustrates the operation of the destination data transfer request and delay generator 462 in delaying the write data transfer from the source clock domain SCD when the data buffers B0, B1 associated with the request do not correspond to the current buffers indicated in the destination clock domain DCD. Figure 5An example is illustrated in which the write data from the first data buffer B0 is written first, and then the write data from the data buffer B1 is written using the D-WR-B1 signal generated for this write transfer. Figure 5 Describe the operation.
[0067] At time t0, the source data transfer request generator 428 generates a first buffer source write request signal SWR-B0 associated with a write data transfer to be performed with data buffer B0 as the current buffer. At a later time t1, the source data transfer request generator 428 generates a second buffer source write request signal SWR-B1 associated with a write data transfer to be performed with data buffer B1 as the current buffer. At time t2, the corresponding signals generated in the destination clock domain DCD based on the SWR-B0 and SWR-B1 signals from the source clock domain SCD are shown. More specifically, the SWR-B0-SYNC and SWR-B1-SYNC signals from the synchronization circuit 452 and the write first and second buffer pulse signals WR-B0, WR-B1 from the destination data transfer request and delay generator 462 are shown to transition in the destination clock domain DCD. The correct order of these signals has been lost, and the transitions of all signals occur at approximately t2. Thus, although the edges or transitions of the SWR- B0 and SWR- B1 signals are separated at times t0 and t1 in the source clock domain SCD, the corresponding transitions occur substantially simultaneously in the destination clock domain at t2.
[0068] In conventional synchronous circuits, loss of proper order and occurrence of multiple transitions at time t2 can result in incorrect operation, such as loss of one of the write transfers in the form of the SWR-B0 and SWR-B1 signals issued from the source clock domain SCD. Figure 5In the example of , the write data transfer associated with the SWR-B0 signal is first processed in the destination clock domain DCD to transfer the write data from the data buffer B0 to the FIFO memory 410. This is seen in the signal timing diagram because the write first buffer pulse signal WR-B0 is asserted from time t2 to time t3. This signal is associated or corresponds to the write transfer with the first data buffer B0, and during this time the DCB signal indicates that the first data buffer B0 is the current buffer. Therefore, this write transfer associated with buffer B0 is processed first. In addition, the transition of the WR-B1 signal when the DCB signal indicates that the current buffer is the data buffer B0 results in the generation of a valid delayed write second buffer signal D-WR-B1 at time t3. Therefore, when the value of the DCB signal changes state at time t3 to indicate that the current buffer is the data buffer B1, the write transfer associated with the SWR-B1 signal is performed. Therefore, although the synchronization of the associated signals in the destination clock domain DCD is lost, the write transfer associated with the SWR-B0 and SWR-B1 signals is still performed.
[0069] Figure 6 4 in a second example of delayed write data transfer request. In addition to the DCB signal initially indicating that the current buffer is data buffer B1 instead of buffer B0, Figure 6 The example is similar to the one just given for Figure 5 1. The source data transfer request generator 428 initially generates a second buffer source write request signal SWR-B1 associated with a write data transfer to be performed with data buffer B1 at time t0, and then generates a first buffer source write request signal SWR-B0 at time t1. At time t2, corresponding signals generated in the destination clock domain DCD based on the SWR-B0 and SWR-B1 signals from the source clock domain SCD are shown, specifically the SWR-B0-SYNC and SWR-B1-SYNC signals from the synchronization circuit 452, and the write first and second buffer pulse signals WR-B0, WR-B1 from the destination data transfer request and delay generator 462. Again, these signals have lost synchronization, and the transitions of all signals occur at approximately t2.
[0070] exist Figure 6In the example of , the write data transfer associated with the SWR-B1 signal is first processed in the destination clock domain DCD to transfer the write data from the data buffer B1 to the FIFO memory 410. This is seen in the signal timing diagram because the write first buffer pulse signal WR-B1 is asserted from time t2 to time t3. This signal is associated or corresponds to the write transfer of the first data buffer B1, and during this time the DCB signal indicates that the first data buffer B1 is the current buffer. Therefore, this write transfer associated with buffer B1 is processed first. In addition, the transition of the WR-B0 signal when the DCB signal indicates that the current buffer is the data buffer B1 results in the generation of a valid delayed write second buffer signal D-WR-B0 at time t3. Therefore, when the value of the DCB signal changes state at time t3 to indicate that the current buffer is the data buffer B0, the write transfer associated with the SWR-B0 signal is performed. Therefore, Figure 5 Compared to the example of , the two write transfers associated with the SWR-B0 and SWR-B1 signals are executed again, although in reverse order. Although the associated signals in the destination clock domain DCD are out of synchronization, the two write transfers are still executed again.
[0071] FIG. 7 is a more detailed functional block diagram of a read clock domain crossing synchronization circuit 700 according to an embodiment of the present disclosure. Figure 3 The clock domain crossing synchronization circuit 300 includes the write clock domain crossing synchronization circuit 400 of FIG. 4 and the read clock domain crossing synchronization circuit 700 shown in FIG. 7 to provide synchronization of both read and write data transmission between the source clock domain SCD and the destination clock domain DCD. The read clock domain crossing synchronization circuit 700 includes components 700-795, which basically correspond to the components 400-495 in the write clock domain crossing synchronization circuit 400 of FIG. 4. Those skilled in the art will understand the operation of the synchronization circuit 700 based on the above description of the synchronization circuits 300 and 400, and therefore, for the sake of brevity, the detailed operation of the synchronization circuit 700 will not be described in detail herein.
[0072] Figure 8800 is a flow chart illustrating a clock domain crossing synchronization process 800 according to an embodiment of the present disclosure. The process 800 starts at 802 and generates a destination domain current buffer signal in the destination clock domain. The destination domain current buffer signal has a value indicating which of the first data buffer and the second data buffer in the source clock domain is the current buffer to be used during the current data transfer cycle. The method proceeds to 804 and synchronizes the destination domain current buffer signal in the source clock domain to generate a synchronized destination domain current buffer signal. From 804, the process 800 proceeds to 806 and generates a source domain current buffer signal based on the synchronized destination domain current buffer signal. The generated source domain current buffer signal has a value indicating the current buffer. The process 800 proceeds from 806 to 808 and generates a source data transfer request signal in the source clock domain based on the source domain current buffer signal. The source data transfer request signal is associated with the current buffer indicated by the source domain current buffer signal. Then, the process 800 proceeds to 810 and synchronizes the source data transfer request signal in the destination clock domain, thereby generating a destination domain data transfer request signal. From 810, process 800 proceeds to 812 and delays transfer of data between memories in the destination clock domain to a subsequent data transfer cycle when the current buffer associated with the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal.
[0073] Example embodiments of the present invention are described below. Other embodiments are also apparent from the entire specification and claims filed herein.
[0074] Example 1. A method, comprising: generating a destination domain current buffer signal in a destination clock domain, the destination domain current buffer signal having a value indicating which of a first data buffer and a second data buffer in a source clock domain is a current buffer to be used during a current data transfer cycle; synchronizing the destination domain current buffer signal in the source clock domain to generate a synchronized destination domain current buffer signal; generating a source domain current buffer signal based on the synchronized destination domain current buffer signal, the generated source domain current buffer signal having a value indicating the current buffer; generating a source data transfer request signal in the source clock domain based on the source domain current buffer signal, the source data transfer request signal being associated with a current buffer indicated by the source domain current buffer signal; synchronizing the source data transfer request signal in the destination clock domain to generate a destination domain data transfer request signal; and when the current buffer associated with the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal, delaying the transfer of data between the memory in the destination clock domain and the current buffer to a subsequent data transfer cycle.
[0075] Example 2. The method of Example 1 further includes transferring data between the memory and the current buffer indicated by the destination domain data transfer request signal when the current buffer associated with the destination domain data transfer request signal corresponds to the current buffer indicated by the destination domain current buffer signal.
[0076] Example 3. The method of one of Examples 1 or 2, further comprising changing a state of a destination domain current buffer signal to indicate the start of a next data transfer cycle.
[0077] Example 4. A method of one of Examples 1 to 3, wherein the transmission of delayed data further includes: storing a valid delayed destination domain data transmission request signal associated with one of the first data buffer and the second data buffer that is not the current buffer; and initiating the transmission of data between the memory and one of the first data buffer and the second data buffer that is not the current buffer when the destination domain current buffer signal changes state to indicate the start of a next data transmission cycle.
[0078] Example 5. The method of one of Examples 1 to 4, wherein initiating the transfer of data includes activating a memory request signal, and wherein the method further includes changing a state of a destination domain current buffer signal in response to the memory request signal becoming active.
[0079] Example 6. The method of one of Examples 1 to 5, further comprising changing a value of a source domain current buffer signal in response to generating a source domain data transfer request signal.
[0080] Example 7. The method of one of Examples 1 to 6, wherein generating a source data transfer request signal includes generating a source domain write first buffer signal and a source domain write second buffer signal, and wherein generating a destination domain data transfer request signal includes generating a destination domain write first buffer signal and a destination domain write second buffer signal.
[0081] Example 8. The method of one of Examples 1 to 7, wherein generating a source data transfer request signal includes generating a source domain read first buffer signal and a source domain read second buffer signal, and wherein generating a destination domain data transfer request signal includes generating a destination domain read first buffer signal and a destination domain read second buffer signal.
[0082] Example 9. A clock domain crossing synchronization circuit, comprising: a destination current buffer generator in a destination clock domain, the destination current buffer generator being configured to generate a destination domain current buffer signal having a value indicating whether a first data buffer or a second data buffer is a current buffer to be used in a current data transfer cycle; a first synchronization circuit being configured to receive the destination current buffer signal and generate a corresponding synchronized destination current buffer signal in a source clock domain; a source current buffer generator being configured to generate a source domain current buffer signal based on the synchronized destination current buffer signal, wherein the source domain current buffer signal has a value indicating the current buffer; a source data transfer request generator being configured to receive the source domain current buffer signal and generate a corresponding synchronized destination current buffer signal based on the source domain current buffer signal. a first synchronization circuit, configured to receive the source data transfer request signal and generate a corresponding synchronized source data transfer request signal in the destination clock domain; and a destination data transfer request and delay generator in the destination clock domain, configured to receive the synchronized source data transfer request signal and the destination domain current buffer signal, the destination data transfer request and delay generator being configured to delay the transfer of data between the memory in the destination clock domain and the current buffer to a subsequent data transfer cycle when the current buffer indicated by the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal.
[0083] Example 10. The clock domain crossing synchronous circuit of Example 9, wherein each of the first synchronous circuit and the second synchronous circuit includes a plurality of serially connected flip-flops.
[0084] Example 11. The clock domain crossing synchronization circuit of one of Examples 9 or 10, wherein the synchronized destination domain data transfer request signal includes a write first buffer signal and a write second buffer signal, and wherein the destination data transfer request and delay generator includes: a first pulse generator coupled to receive the write first buffer signal and configured to generate a write first buffer pulse signal in response to the write first buffer signal; a second pulse generator coupled to receive the write second buffer signal and configured to generate a write second buffer pulse signal in response to the write second buffer signal; a first transfer request delay circuit having a first input coupled to receive the destination domain current buffer signal and a second input coupled to receive the write first buffer pulse signal, the first transfer request delay circuit being configured to drive the delayed write first buffer signal to be valid in response to the write first buffer pulse signal becoming valid and the destination domain current buffer signal indicating that the second buffer is the current buffer in the destination clock domain; a second transfer request delay circuit having a first input coupled to receive the destination domain current buffer signal and a second input coupled to receive the write second buffer pulse signal, the second transfer request delay circuit being configured to drive the delayed write first buffer signal to be valid in response to the write second buffer pulse signal becoming valid. a delayed write second buffer signal driven to be valid when the destination domain current buffer signal indicates that the first buffer is the current buffer in the destination clock domain; and an output logic coupled to the first pulse generator and the second pulse generator to receive the write first buffer pulse signal and the write second buffer pulse signal, and coupled to the first transfer request delay circuit and the second transfer request delay circuit to receive the delayed write first buffer signal and the delayed write second buffer signal, the output logic being configured to generate the first buffer write request pulse signal in response to either the write first buffer pulse signal or the delayed write first buffer signal being valid, and to generate the second buffer write request pulse signal in response to either the write second buffer pulse signal or the delayed write second buffer signal being valid; and a selection circuit coupled to the output logic and having a control input coupled to receive the destination domain current buffer signal, the selection circuit being configured to provide the first buffer write request pulse signal to the memory when the destination domain current buffer signal indicates that the first buffer is the current buffer in the destination clock domain, and to provide the second buffer write request pulse signal to the memory when the destination domain current buffer signal indicates that the second buffer is the current buffer in the destination clock domain.
[0085] Example 12. A clock domain crossing synchronization circuit of one of Examples 9 to 11, wherein each of the first pulse generator and the second pulse generator comprises: a trigger having an output terminal and having an input terminal coupled to receive a corresponding one of a write first buffer signal or a write second buffer signal; and an XOR gate having a first input terminal coupled to receive a corresponding one of the write first buffer signal or the write second buffer signal and a second input terminal coupled to the output terminal of the trigger, the XOR gate having an output terminal configured to generate a corresponding write first buffer pulse signal or a write second buffer pulse signal.
[0086] Example 13. A clock domain crossing synchronization circuit of one of Examples 9 to 12, wherein the output logic includes: a first OR gate having a first input terminal coupled to receive a write first buffer pulse signal and a delayed write first buffer signal, and configured to generate a first buffer write request pulse signal at an output terminal; and a second OR gate having a first input terminal coupled to receive a write second buffer pulse signal and a delayed write second buffer signal, and configured to generate a second buffer write request signal at an output terminal.
[0087] Example 14. A clock domain crossing synchronization circuit of one of Examples 9 to 13, wherein the selection circuit includes a multiplexer having a first input coupled to the output of a first OR gate, a second input coupled to the output of a second OR gate, an output coupled to a memory, and a control input coupled to receive a destination domain current buffer signal.
[0088] Example 15. A clock domain crossing synchronization circuit of one of Examples 9 to 14, wherein the destination current buffer generator includes: a trigger having an input and an output; and a multiplexer having a first input coupled to the output of the trigger, a second input receiving the output of the trigger through an inverter, an output coupled to the input of the trigger, and a control input coupled to receive a data transfer request signal from a destination data transfer request and a delay generator.
[0089] Example 16. A clock domain crossing synchronization circuit of one of Examples 9 to 15, wherein the source data transfer request signal includes a first buffer source write request signal and a second buffer source write request signal, and wherein the source data transfer request generator includes: a first trigger, including an input terminal and having an output terminal configured to generate the first buffer source write request signal; a second trigger, including an input terminal and having an output terminal configured to generate the second buffer source write request signal; and a logic circuit system configured to receive a data transfer current buffer signal and a source domain current buffer signal, and coupled to the input terminals of the first trigger and the second trigger, the logic circuit system being configured to provide a valid signal to the input terminal of the first trigger in response to the data transfer current buffer signal becoming valid and the source domain current buffer signal indicating that the first data buffer is the current buffer, and to provide a valid signal to the input terminal of the second trigger in response to the data transfer current buffer signal becoming valid and the source domain current buffer signal indicating that the second data buffer is the current buffer, and the logic circuit system is also configured to provide invalid signals on the input terminals of the first trigger and the second trigger in response to the first buffer source data transfer request signal and the second buffer source data transfer request signal becoming valid, respectively.
[0090] Example 17. The clock domain crossing synchronization circuit of one of Examples 9 to 16, wherein the logic circuit system includes: an inverter having an input terminal coupled to receive a source domain current buffer signal and having an output terminal; a first AND gate having a first input terminal coupled to receive a write current buffer signal and a second input terminal coupled to the output terminal of the inverter, and having an output terminal; a first multiplexer having a select input terminal coupled to the output terminal of the first AND gate, a first input terminal coupled to the output terminal of the first flip-flop, a second input terminal, and an output terminal coupled to the input terminal of the first flip-flop; a second inverter having an output terminal coupled to the second input terminal of the first multiplexer and having an output terminal coupled to the second input terminal of the first multiplexer; a first input terminal coupled to the output terminal of the first trigger to receive the first buffer source write request signal; a second AND gate having a first input terminal coupled to receive the write current buffer signal and a second input terminal coupled to receive the source domain current buffer signal, and having an output terminal; a second multiplexer having a selection input terminal coupled to the output terminal of the second AND gate, a first input terminal coupled to the output terminal of the second trigger, a second input terminal, and an output terminal coupled to the input terminal of the second trigger; and a third inverter having an output terminal coupled to the second input terminal of the second multiplexer and an input terminal coupled to the output terminal of the second trigger to receive the second buffer source write request signal.
[0091] Example 18. A clock domain crossing synchronization circuit of one of Examples 9 to 17, wherein a source domain current buffer generator comprises: a first multiplexer having a first input terminal, a second input terminal, an output terminal coupled to receive a synchronized destination current buffer signal, and a control input terminal coupled to receive a start new data transfer signal; a trigger having an input terminal coupled to the output terminal of the first multiplexer and an output terminal on which the source domain current buffer signal is provided; a second multiplexer having a first input terminal coupled to the output terminal of the trigger, a second input terminal, an output terminal coupled to the second input terminal of the first multiplexer, and a control input terminal coupled to receive a write current buffer signal; and an inverter having an input terminal coupled to the output terminal of the trigger and an output terminal coupled to the second input terminal of the second multiplexer.
[0092] Example 19. An electronic system comprising a first-in-first-out (FIFO) memory in a destination clock domain; a dual buffer in a source clock domain, comprising a first data buffer and a second data buffer; and a clock domain crossing synchronization circuit, comprising: a destination current buffer generator in the destination clock domain, the destination current buffer generator being configured to generate a destination domain current buffer signal having a value indicating whether the first data buffer or the second data buffer is a current buffer to be used in a current data transfer cycle; a first synchronization circuit being configured to receive the destination current buffer signal and generate a synchronized destination current buffer signal in the source clock domain; a source current buffer generator in the source clock domain, the source current buffer generator being configured to generate a source domain current buffer signal based on the synchronized destination current buffer signal, wherein the source domain current buffer signal has a first value indicating the first data buffer and a second value indicating the second data buffer ; a source data transfer request generator, configured to receive a source domain current buffer signal and generate a source data transfer request signal in a source clock domain based on the source domain current buffer signal, the generated source data transfer request signal being associated with one of the first data buffer or the second data buffer corresponding to the value of the source domain current buffer signal; a second synchronization circuit, configured to receive the source data transfer request signal and generate a synchronized destination domain data transfer request signal in a destination clock domain; and a destination data transfer request and delay generator in a destination clock domain, configured to receive a synchronized source data transfer request signal and a destination domain current buffer signal, the destination data transfer request and delay generator being configured to delay the transfer of data between the memory in the destination clock domain and the current buffer to a subsequent data transfer cycle when the current buffer indicated by the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal.
[0093] Example 20. The electronic system of Example 19, wherein the source clock domain is a secure digital clock domain, and wherein the destination clock domain is a high-level hardware bus clock domain.
[0094] Although the present invention has been described with reference to illustrative embodiments, this description is not intended to be interpreted in a limiting sense. Various modifications and combinations of the illustrative embodiments and other embodiments of the present invention will be apparent to those skilled in the art after reference to this description. Therefore, the appended claims are intended to cover any such modifications or embodiments.
Claims
1. A method comprising: generating a destination domain current buffer signal in the destination clock domain, the destination domain current buffer signal having a value indicating which of the first data buffer and the second data buffer in the source clock domain is a current buffer to be used during a current data transfer cycle; synchronizing the destination domain current buffer signal in the source clock domain to generate a synchronized destination domain current buffer signal; generating a source domain current buffer signal based on the synchronized destination domain current buffer signal, the generated source domain current buffer signal having a value indicating a current buffer; generating a source data transfer request signal in a source clock domain based on a source domain current buffer signal, the source data transfer request signal being associated with a current buffer indicated by the source domain current buffer signal; synchronizing the source data transfer request signal in the destination clock domain, thereby generating a destination domain data transfer request signal; as well as When the current buffer associated with the destination domain data transfer request signal does not correspond to the current buffer indicated by the destination domain current buffer signal, the data transfer between the memory in the destination clock domain and the current buffer is delayed to a subsequent data transfer cycle.
2. The method of claim 1 further comprises transferring data between the memory and the current buffer indicated by the destination domain data transfer request signal when the current buffer associated with the destination domain data transfer request signal corresponds to the current buffer indicated by the destination domain current buffer signal.
3. The method of claim 1, further comprising changing a state of a destination domain current buffer signal to indicate the start of a next data transfer cycle.
4. The method of claim 3, wherein delaying the transmission of data further comprises: storing a valid delayed destination domain data transfer request signal associated with one of the first data buffer and the second data buffer that is not a current buffer; as well as When the destination domain current buffer signal changes state to indicate the start of a next data transfer cycle, a data transfer between the memory and one of the first data buffer and the second data buffer that is not the current buffer is initiated.
5. The method of claim 4, wherein initiating the transfer of data comprises activating a memory request signal, and wherein the method further comprises changing a state of a destination domain current buffer signal in response to the memory request signal becoming active. 6 . The method of claim 5 , further comprising changing a value of a source domain current buffer signal in response to generating a source domain data transfer request signal.
7. The method of claim 1, wherein generating a source data transfer request signal comprises generating a source domain write first buffer signal and a source domain write second buffer signal, and wherein generating a destination domain data transfer request signal comprises generating a destination domain write first buffer signal and a destination domain write second buffer signal.
8. The method of claim 1, wherein generating a source data transfer request signal comprises generating a source domain read first buffer signal and a source domain read second buffer signal, and wherein generating a destination domain data transfer request signal comprises generating a destination domain read first buffer signal and a destination domain read second buffer signal.
9. A clock domain crossing synchronization circuit, comprising: a destination current buffer generator in a destination clock domain, the destination current buffer generator configured to generate a destination domain current buffer signal having a value indicating whether the first data buffer or the second data buffer is a current buffer to be used in a current data transfer cycle; a first synchronization circuit configured to receive a destination current buffer signal and generate a corresponding synchronized destination current buffer signal in a source clock domain; a source current buffer generator configured to generate a source domain current buffer signal based on the synchronized destination current buffer signal, wherein the source domain current buffer signal has a value indicative of a current buffer; a source data transfer request generator configured to receive a source domain current buffer signal and generate a source data transfer request signal in a source clock domain based on the source domain current buffer signal, the generated source data transfer request signal being associated with a current buffer indicated by the source domain current buffer signal; a second synchronization circuit configured to receive a source data transfer request signal and generate a corresponding synchronized source data transfer request signal in a destination clock domain; as well as A destination data transfer request and delay generator in a destination clock domain is configured to receive a synchronized source data transfer request signal and a destination domain current buffer signal. The destination data transfer request and delay generator is configured to delay the transfer of data between a memory in the destination clock domain and a current buffer to a subsequent data transfer cycle when a current buffer indicated by the destination domain data transfer request signal does not correspond to a current buffer indicated by the destination domain current buffer signal.
10. The clock domain crossing synchronous circuit of claim 9, wherein each of the first synchronous circuit and the second synchronous circuit comprises a plurality of serially connected flip-flops.
11. The clock domain crossing synchronization circuit of claim 9, wherein the synchronized destination domain data transfer request signal comprises a write first buffer signal and a write second buffer signal, and wherein the destination data transfer request and delay generator comprises: a first pulse generator coupled to receive the write first buffer signal and configured to generate a write first buffer pulse signal in response to the write first buffer signal; a second pulse generator coupled to receive the write second buffer signal and configured to generate a write second buffer pulse signal in response to the write second buffer signal; a first transfer request delay circuit having a first input coupled to receive a destination domain current buffer signal and a second input coupled to receive a write first buffer pulse signal, the first transfer request delay circuit being configured to drive the delayed write first buffer signal to be active in response to the write first buffer pulse signal becoming active and the destination domain current buffer signal indicating that the second buffer is the current buffer in the destination clock domain; a second transfer request delay circuit having a first input coupled to receive a destination domain current buffer signal and a second input coupled to receive a write second buffer pulse signal, the second transfer request delay circuit being configured to drive the delayed write second buffer signal to be active in response to the write second buffer pulse signal becoming active and the destination domain current buffer signal indicating that the first buffer is the current buffer in the destination clock domain; as well as an output logic coupled to the first pulse generator and the second pulse generator to receive a write first buffer pulse signal and a write second buffer pulse signal, and coupled to the first transfer request delay circuit and the second transfer request delay circuit to receive a delayed write first buffer signal and a delayed write second buffer signal, the output logic being configured to generate a first buffer write request pulse signal in response to the write first buffer pulse signal or the delayed write first buffer signal being valid, and to generate a second buffer write request pulse signal in response to the write second buffer pulse signal or the delayed write second buffer signal being valid; as well as A selection circuit is coupled to the output logic and has a control input terminal coupled to receive a destination domain current buffer signal, the selection circuit being configured to provide a first buffer write request pulse signal to the memory when the destination domain current buffer signal indicates that the first buffer is the current buffer in the destination clock domain, and to provide a second buffer write request pulse signal to the memory when the destination domain current buffer signal indicates that the second buffer is the current buffer in the destination clock domain.
12. The clock domain crossing synchronization circuit of claim 11, wherein each of the first pulse generator and the second pulse generator comprises: a flip-flop having an output terminal and having an input terminal coupled to receive a corresponding one of a write first buffer signal or a write second buffer signal; as well as An XOR gate having a first input terminal coupled to receive a corresponding one of a write first buffer signal or a write second buffer signal and a second input terminal coupled to the output terminal of the trigger, the XOR gate having an output terminal configured to generate a corresponding write first buffer pulse signal or a write second buffer pulse signal.
13. The clock domain crossing synchronization circuit of claim 11, wherein the output logic comprises: a first OR gate having a first input coupled to receive the write first buffer pulse signal and the delayed write first buffer signal and configured to generate a first buffer write request pulse signal at an output; as well as A second OR gate has a first input terminal coupled to receive the write second buffer pulse signal and the delayed write second buffer signal and is configured to generate a second buffer write request signal at an output terminal.
14. The clock domain crossing synchronization circuit of claim 13, wherein the selection circuit comprises a multiplexer having a first input terminal coupled to the output terminal of the first OR gate, a second input terminal coupled to the output terminal of the second OR gate, an output terminal coupled to the memory, and a control input terminal coupled to receive a destination domain current buffer signal.
15. The clock domain crossing synchronization circuit of claim 9, wherein the destination current buffer generator comprises: A trigger having an input terminal and an output terminal; as well as A multiplexer has a first input terminal coupled to the output terminal of the flip-flop, a second input terminal receiving the output of the flip-flop through an inverter, an output terminal coupled to the input terminal of the flip-flop, and a control input terminal coupled to receive a data transfer request signal from a destination data transfer request and a delay generator.
16. The clock domain crossing synchronization circuit of claim 9, wherein the source data transfer request signal comprises a first buffer source write request signal and a second buffer source write request signal, and wherein the source data transfer request generator comprises: a first flip-flop including an input terminal and having an output terminal configured to generate a first buffer source write request signal; a second flip-flop including an input terminal and having an output terminal configured to generate a second buffer source write request signal; as well as A logic circuit system is configured to receive a data transfer current buffer signal and a source domain current buffer signal and is coupled to input terminals of a first trigger and a second trigger. The logic circuit system is configured to provide a valid signal to the input terminal of the first trigger in response to the data transfer current buffer signal becoming valid and the source domain current buffer signal indicating that the first data buffer is the current buffer, and to provide a valid signal to the input terminal of the second trigger in response to the data transfer current buffer signal becoming valid and the source domain current buffer signal indicating that the second data buffer is the current buffer. The logic circuit system is also configured to provide an invalid signal on the input terminals of the first trigger and the second trigger in response to the first buffer source data transfer request signal and the second buffer source data transfer request signal becoming valid, respectively.
17. The clock domain crossing synchronization circuit of claim 16, wherein the logic circuit system comprises: an inverter having an input coupled to receive the source domain current buffer signal and having an output; a first AND gate having a first input terminal coupled to receive the write current buffer signal and a second input terminal coupled to the output terminal of the inverter, and having an output terminal; a first multiplexer having a select input coupled to the output of the first AND gate, a first input coupled to the output of the first flip-flop, a second input, and an output coupled to the input of the first flip-flop; a second inverter having an output terminal coupled to the second input terminal of the first multiplexer and having an input terminal coupled to the output terminal of the first flip-flop to receive the first buffer source write request signal; a second AND gate having a first input terminal coupled to receive the write current buffer signal and a second input terminal coupled to receive the source domain current buffer signal, and having an output terminal; a second multiplexer having a select input coupled to the output of the second AND gate, a first input coupled to the output of the second flip-flop, a second input, and an output coupled to the input of the second flip-flop; as well as The third inverter has an output terminal coupled to the second input terminal of the second multiplexer and an input terminal coupled to the output terminal of the second flip-flop to receive the second buffer source write request signal.
18. The clock domain crossing synchronization circuit of claim 16, wherein the source domain current buffer generator comprises: a first multiplexer having a first input coupled to receive a synchronized destination current buffer signal, a second input, an output, and a control input coupled to receive a start new data transfer signal; a flip-flop having an input coupled to the output of the first multiplexer and an output at which a source domain current buffer signal is provided; a second multiplexer having a first input coupled to the output of the flip-flop, a second input, an output coupled to the second input of the first multiplexer, and a control input coupled to receive a write current buffer signal; as well as An inverter has an input coupled to the output of the flip-flop and an output coupled to the second input of the second multiplexer.
19. An electronic system comprising: a first-in-first-out (FIFO) memory in the destination clock domain; A double buffer in a source clock domain, comprising a first data buffer and a second data buffer; as well as Clock domain spanning synchronous circuits, including: a destination current buffer generator in a destination clock domain, the destination current buffer generator configured to generate a destination domain current buffer signal having a value indicating whether the first data buffer or the second data buffer is a current buffer to be used in a current data transfer cycle; a first synchronization circuit configured to receive a destination current buffer signal and generate a synchronized destination current buffer signal in a source clock domain; a source current buffer generator in a source clock domain, the source current buffer generator configured to generate a source domain current buffer signal based on the synchronized destination current buffer signal, wherein the source domain current buffer signal has a first value indicating a first data buffer and a second value indicating a second data buffer; a source data transfer request generator configured to receive a source domain current buffer signal and generate a source data transfer request signal in a source clock domain based on the source domain current buffer signal, the generated source data transfer request signal being associated with one of the first data buffer or the second data buffer corresponding to a value of the source domain current buffer signal; a second synchronization circuit configured to receive a source data transfer request signal and generate a synchronized destination domain data transfer request signal in a destination clock domain; and A destination data transfer request and delay generator in a destination clock domain is configured to receive a synchronized source data transfer request signal and a destination domain current buffer signal. The destination data transfer request and delay generator is configured to delay the transfer of data between a memory in the destination clock domain and a current buffer to a subsequent data transfer cycle when a current buffer indicated by the destination domain data transfer request signal does not correspond to a current buffer indicated by the destination domain current buffer signal.
20. The electronic system of claim 19, wherein the source clock domain is a secure digital clock domain, and wherein the destination clock domain is a high-level hardware bus clock domain.