WO2020172871A1 - Data processing apparatus - Google Patents

Data processing apparatus Download PDF

Info

Publication number
WO2020172871A1
WO2020172871A1 PCT/CN2019/076562 CN2019076562W WO2020172871A1 WO 2020172871 A1 WO2020172871 A1 WO 2020172871A1 CN 2019076562 W CN2019076562 W CN 2019076562W WO 2020172871 A1 WO2020172871 A1 WO 2020172871A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock signal
clock
signal
circuit
synchronization
Prior art date
Application number
PCT/CN2019/076562
Other languages
French (fr)
Chinese (zh)
Inventor
胡敏杰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2019/076562 priority Critical patent/WO2020172871A1/en
Priority to CN201980093220.4A priority patent/CN113491082B/en
Publication of WO2020172871A1 publication Critical patent/WO2020172871A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • the second clock frequency synthesis circuit is used for clock synchronization of the second clock signal by using the mother clock signal to generate a second synchronous clock signal.
  • the second clock signal is a clock signal of the second clock domain.
  • the frequency is different from that of the first clock signal and is less than the frequency of the mother clock signal.
  • the transition edge of the second synchronous clock signal when the transition occurs is aligned with the transition edge of the mother clock signal; the synchronization processing circuit is used to utilize the first
  • the synchronous clock signal controls the data writing of the buffer circuit, and synchronously uses the second synchronous clock signal to control the data reading of the buffer circuit, so as to realize the conversion of data in the first clock domain into data in the second clock domain.
  • the first clock frequency synthesis circuit includes a first control signal generating unit and a first gating unit, and the first control signal generating unit is configured to The frequency ratio relationship between a clock signal and the mother clock signal generates a first control signal, and the first gating control unit is used for fitting the mother clock signal to a first synchronous clock signal according to the first control signal.
  • the synchronization processing circuit further includes a first clock map configuration circuit and a first counter, and the first synchronization The clock signal triggers the first counter to generate a first indicator signal, the first indicator signal can instruct the buffer circuit under the control of the first synchronous clock signal to write the theoretical rate of data, the first clock map configuration circuit is used to configure the circuit according to the first indicator signal A valid read instruction signal is generated, and the valid read instruction signal is used to control the actual rate of data read by the buffer circuit under the control of the second clock signal.
  • the synchronization processing circuit is specifically configured to use the first synchronization clock signal to control the buffer when the valid write instruction signal is at a high level.
  • the circuit performs data writing, and when the valid read instruction signal is at a high level, the second synchronous clock signal is used to synchronously control the buffer circuit for data reading. Since the data writing and data reading performed by the buffer circuit are synchronous, timing closure through the back end can make the data transfer delay across clock domains fixed, avoiding the problem of uncertain delay when an asynchronous processing scheme is adopted.
  • the buffer circuit includes a synchronous FIFO or a register.
  • the first clock signal and the second clock signal are clocked by using the same mother clock signal, or after the first clock signal is clocked by using the second clock signal
  • the synchronous processing circuit can be used to convert the data in the first clock domain into the data in the second clock domain.
  • the circuit synchronization design is realized on the front end, replacing the asynchronous processing circuit in the original asynchronous processing scheme, thereby avoiding asynchronous processing With the introduction of delay uncertainty, the realization of circuit synchronization design can also avoid the design complexity and system performance risks introduced when using asynchronous processing circuits.
  • Figure 1 is a schematic diagram of the principle of a traditional asynchronous processing scheme
  • Figure 2 is a schematic diagram of the application structure of the application scheme
  • FIG. 5 is a schematic diagram of an embodiment of a first clock frequency synthesis circuit in an embodiment of the application.
  • FIG. 6 is a schematic diagram of an embodiment of a second clock frequency synthesis circuit in an embodiment of the application.
  • FIG. 7 is a schematic diagram of a circuit structure of the first or second clock frequency synthesis circuit in an embodiment of the application.
  • FIG. 9 is a schematic diagram of a valid write instruction signal and a valid read instruction signal in an embodiment of the application.
  • FIG. 12 is a schematic diagram of an embodiment of another data processing device in an embodiment of the application.
  • FIG. 14 is a schematic diagram of another embodiment of a synchronization processing circuit in an embodiment of this application.
  • Figure 2 is a schematic diagram of the application structure of the application scheme.
  • this solution uses sub-clock signals 1 to N (N is an integer greater than 1) generated by synthesizing a master clock signal through different clock frequencies as the clock signals from clock domain A to clock domain X. Realize the synchronization design of different clock domains, and then adopt the synchronization processing circuit to realize the data synchronization transition between different clock domains.
  • the process of using the mother clock signal to synchronize the first clock signal and the second clock signal is to use a mother clock signal as an input clock signal, the adjacent transition time interval of the mother clock signal is fixed, according to the mother clock signal The relationship between the frequency and the frequency of the first clock signal or the second clock signal, close part of the transition edge of the mother clock signal, so as to realize the fitting of the mother clock signal to the first synchronous clock signal or the second synchronous clock signal.
  • the synchronization processing circuit 303 includes a buffer circuit.
  • the synchronization processing circuit 303 is used to control the data writing of the buffer circuit by using the first synchronization clock signal, and synchronously use the second synchronization clock signal to control the buffer circuit.
  • Data readout is controlled, so as to realize the conversion of data in the first clock domain into data in the second clock domain, and the process of converting data in the first clock domain into data in the second clock domain is to transfer data from the first clock domain
  • the cross-clock domain data transfer process to the second clock domain uses the first synchronous clock signal and the second synchronous clock signal to synchronously perform data writing and data reading of the buffer circuit, and uses the mother clock signal at the back end to perform The timing is closed, so that the delay of data transfer across clock domains is fixed.
  • the first clock frequency synthesis circuit 301 can be divided into two modules according to functions, including a first control signal generating unit 3011 and a first gating unit 3012, as shown in FIG. 5.
  • the first control signal generating unit 3011 is specifically used for the above-mentioned process of generating the first control signal
  • the first gating control unit 3012 is specifically used for the process of fitting the first synchronous clock signal according to the first control signal.
  • the second clock frequency synthesis circuit 302 can be divided into two modules according to functions, including a second control signal generating unit 3021 and a second gating unit 3022, as shown in FIG. 6.
  • the second control signal generating unit 3021 is specifically used for the above-mentioned process of generating the second control signal
  • the second gating control unit 3022 is specifically used for the process of fitting the second synchronous clock signal according to the second control signal.
  • a clock frequency synthesis circuit includes a counter, a clock map configuration circuit, a comparator, Circuit elements such as D flip-flops and gate control circuits.
  • the mother clock signal is used as the input clock signal CLK_IN, which triggers the counter to generate a counting signal.
  • the clock map configuration circuit prestores the first synchronous clock signal or the second synchronous clock signal that needs to be generated. Parameter, the clock map configuration circuit generates the configuration signal according to the counting signal generated by the counter and the pre-stored signal parameters and the mother clock signal.
  • the first synchronous clock signal triggers the first counter 3033 to generate a first indication signal, which can instruct the buffer circuit 3031 to perform data writing theoretically under the control of the first synchronous clock signal.
  • the first clock map configuration circuit 3032 uses The effective read instruction signal is generated according to the first instruction signal, and the effective read instruction signal is used to control the actual data reading rate of the buffer circuit under the control of the second synchronous clock signal.
  • the synchronization processing circuit may further include a second clock map configuration circuit 3034 and a second counter 3035.
  • the transition of the first synchronous clock signal triggers the write operation, and the second synchronous clock signal
  • the read operation is triggered when the first transition occurs, but when the second synchronous clock signal undergoes a second transition, the first synchronous clock signal does not undergo a second transition, so there is no readable data in the buffer circuit 3031, so the first
  • the second transition of the second synchronous clock signal cannot trigger the read operation, and the function of the valid read indication signal is to prevent the partial transition edge of the second synchronous clock signal from triggering the read operation.
  • the specific implementation is that when the partial transition edge of the second synchronous clock signal that cannot trigger the read operation occurs, the valid write indication signal presents a low level, and the synchronization processing circuit 303 does not perform reading on the buffer circuit 3031.
  • the valid write instruction signal and the valid read instruction signal can be generated by the first clock map configuration circuit 3032 and the second clock map configuration circuit 3034, or can be generated by an external circuit and introduced into the buffer circuit 3031 from an external circuit for use, They are all feasible implementation methods, which are not specifically limited in this application.
  • the processing of the cross-clock domain data by the synchronous processing circuit is a synchronous sampling process, as shown in FIG. 10 as an example.
  • the input data segments D0, D1, D2, NA, D0, D1 of the first clock domain are synchronously sampled by the synchronization processing circuit and then output to the second clock domain, where NA is an empty data segment, and the input operation is synchronized with the output operation , So the output data segment also has the NA data segment, and the data delay from input to output is determined.
  • asynchronous FIFOs are usually used to process cross-clock domain data.
  • the processing process is an asynchronous sampling process, as shown in Figure 11 as an example.
  • the original clock signal of the first clock domain is the first clock signal
  • the original clock signal of the second clock domain is the second clock signal.
  • Another data processing device provided in this application can directly A clock signal with a higher frequency in the first clock signal or the second clock signal is used as the master clock signal, and an inter-frequency synchronous clock signal synchronized with it is fitted to replace the other clock signal to realize clock signals in two clock domains Synchronized design. The details are described below.
  • FIG. 12 is a schematic diagram of an embodiment of another data processing device in an embodiment of the application.
  • the clock frequency synthesis circuit 401 is used for clock synchronization of the first clock signal by using the second clock signal to generate the first synchronous clock signal.
  • the second clock signal is the clock signal of the second clock domain, which is generated at fixed time intervals Jumping clock signal
  • the first clock signal is the clock signal of the first clock domain
  • the frequency of the first clock signal is less than the frequency of the second clock signal
  • the first synchronous clock signal when the jump occurs, the jump edge and the second The transition edges of the clock signal are aligned.
  • the synchronization processing circuit 402 can use the first synchronization clock signal and the second synchronization signal to control the buffer circuit Data writing and data reading are realized, so as to realize the cross-clock domain data transfer between the first clock domain and the second clock domain.
  • the circuit synchronization design can be realized on the front end. Since the first synchronous clock signal and the second clock signal are homologous synchronous clock signals, the first synchronous clock signal is derived from the second clock signal, so the back end can use The second clock signal frequency is time-sequentially converged, so that the cross-clock domain data transfer delay from the first clock domain to the second clock domain is fixed, avoiding the delay uncertainty problem introduced by the traditional asynchronous processing scheme.
  • the clock frequency synthesis circuit 401 in this embodiment is specifically configured to generate a control signal according to the frequency proportional relationship between the first clock signal and the second clock signal, and to fit the second clock signal into the first clock signal according to the control signal. Synchronize the clock signal.
  • clock frequency synthesis circuit 401 in this embodiment is the same as that of the first clock frequency synthesis circuit 301 and the second clock frequency synthesis circuit 302 in the above-mentioned embodiment.
  • the related description of the synthesis circuit 301 and the second clock frequency synthesis circuit 302 will not be repeated here.
  • the synchronization processing circuit 402 may further include a first clock map configuration circuit 4022 and a first counter 4023.
  • the first synchronous clock signal triggers the first counter 4023 to generate a first indication signal.
  • the first indication signal can indicate the theoretical rate of data writing by the buffer circuit 4021 under the control of the first synchronous clock signal.
  • the first clock map configuration circuit 4022 uses A valid read instruction signal is generated according to the first instruction signal, and the valid read instruction signal is used to control the actual data read rate of the buffer circuit 4021 under the control of the second clock signal.
  • the second clock signal triggers the second counter 4025 to generate a second indicator signal.
  • the second indicator signal can instruct the buffer circuit 4021 to perform a theoretical data reading rate under the control of the second clock signal.
  • the second clock map configuration circuit 4024 is used for The second instruction signal generates a valid write instruction signal, and the valid write instruction signal is used to control the actual rate at which the buffer circuit 4021 performs data writing under the control of the first synchronous clock signal.
  • the functions of the effective read instruction signal and the effective write instruction signal generated in the synchronization processing circuit 402 are the same as those described in the previous description of the synchronization processing circuit 303.
  • the specific description of the effective write indication signal will not be repeated here.
  • the buffer circuit 4021 is the same as the aforementioned buffer circuit 3031.
  • the buffer circuit 4021 may be a synchronous FIFO or one or more registers, where When the data complexity of the continuous data from the first clock domain is low, one register or a register array composed of multiple registers can be used to write and read the continuous data, but when the continuous data When the data complexity is high, it is necessary to use a synchronous FIFO with a suitable depth to write and read the continuous data, which is not specifically limited in this application.

Abstract

Provided in the present application is a data processing apparatus. The data processing apparatus comprises a first clock frequency synthesis circuit, a second clock frequency synthesis circuit, and a synchronization processing circuit, wherein the first clock frequency synthesis circuit and the second clock frequency synthesis circuit are respectively used for carrying out clock synchronization on clock signals of a first clock domain and a second clock domain by means of a parent clock signal, and generating a first synchronous clock signal and a second synchronous clock signal; and the synchronization processing circuit uses the first synchronous clock signal to control data writing of a buffer circuit, and uses the second synchronous clock signal to synchronously control data read-out of the buffer circuit, so as to realize fixing of delay of data transfer crossing clock domains. Further provided in the present application is a data processing apparatus, wherein the data processing apparatus uses a second clock signal to carry out clock synchronization on a first clock signal, thereby using the synchronization processing circuit to carry out data transfer crossing clock domains, and fixing of delay of transmission crossing the clock domains can also be realized.

Description

一种数据处理装置A data processing device 技术领域Technical field
本申请涉及数据处理领域,具体涉及一种数据处理装置。This application relates to the field of data processing, in particular to a data processing device.
背景技术Background technique
随着现代集成电路芯片的设计规模不断扩大,在一个集成系统中通常存在多个时钟,以驱动不同的模块,其带来的问题就是如何设计不同时钟域之间的接口电路,以实现数据从一个时钟域过渡到另外一个时钟域。With the continuous expansion of the design scale of modern integrated circuit chips, there are usually multiple clocks in an integrated system to drive different modules. The problem it brings is how to design interface circuits between different clock domains to achieve data slave One clock domain transitions to another clock domain.
在目前的解决方案中,异步处理方案是解决该问题的通用技术手段,异步处理方案通常是通过异步先进先出存储器(first input first output,FIFO)来实现,如图1所示。在进行跨时钟域数据传递时,第一时钟域的数据对于接收该数据的第二时钟域而言是一个异步信号。在异步处理方案中,第一时钟域的数据需要先输入到异步FIFO中,该过程称为写操作,然后从异步FIFO中将该数据输出到第二时钟域中,该过程称为读操作。读写操作分别由两个时钟域的时钟信号CLK A和CLK B的跳变沿触发,由于两个时钟信号的相位关系是不确定的,所以当写操作被第一时钟域的时钟跳变沿触发时,即当异步信号到达跳变沿时,第二时钟域的时钟的跳变沿与异步信号的跳变沿的相对关系是不确定的,这导致的结果就是读写操作之间带来的数据传递的延时不确定。在无线通信领域的部分应用场景中,例如大规模多输入多输出系统(massive multiple input multiple output,MMM)和大带宽通信,对异步处理方案引入的不定延时非常敏感,不定延时会带来较大的分析难度。In the current solutions, the asynchronous processing solution is a general technical means to solve this problem, and the asynchronous processing solution is usually implemented through asynchronous first input first output (FIFO), as shown in Figure 1. When transferring data across clock domains, the data in the first clock domain is an asynchronous signal to the second clock domain that receives the data. In the asynchronous processing scheme, the data of the first clock domain needs to be input to the asynchronous FIFO first, this process is called a write operation, and then the data is output from the asynchronous FIFO to the second clock domain, this process is called a read operation. Read and write operations are triggered by the transition edges of the clock signals CLK A and CLK B of the two clock domains. Since the phase relationship between the two clock signals is uncertain, when the write operation is triggered by the clock transition edge of the first clock domain When triggered, that is, when the asynchronous signal reaches the transition edge, the relative relationship between the transition edge of the clock in the second clock domain and the transition edge of the asynchronous signal is uncertain. The delay of data transfer is uncertain. In some application scenarios in the wireless communication field, such as large-scale multiple input multiple output (MMM) and large-bandwidth communications, they are very sensitive to the indefinite delay introduced by the asynchronous processing scheme, which will bring about Greater difficulty in analysis.
由此可见,如何解决进行跨时钟域数据传递时,采用异步处理方案引入的不定延时是需要解决的问题。It can be seen that how to solve the indefinite delay introduced by the asynchronous processing scheme when transferring data across clock domains is a problem that needs to be solved.
发明内容Summary of the invention
本申请实施例提供了一种数据处理装置,可应用于两个时钟域之间的跨时钟域数据交互,并且可以使跨时钟域数据传递延时固定,以避免不确定时延带来的不利影响。The embodiment of the present application provides a data processing device, which can be applied to cross-clock domain data interaction between two clock domains, and can fix the cross-clock domain data transfer delay to avoid the disadvantages caused by uncertain delay influences.
本申请实施例第一方面提供一种数据处理装置,包括:第一时钟频率合成电路、第二时钟频率合成电路和同步处理电路,该同步处理电路包括缓存电路。该第一时钟频率合成电路用于利用母时钟信号对第一时钟信号进行时钟同步,以产生第一同步时钟信号,该母时钟信号为按照固定时间间隔发生跳变的时钟信号,该第一时钟信号为第一时钟域的时钟信号,该第一时钟信号的频率小于母时钟信号的频率,该第一同步时钟信号在发生跳变时的跳变沿与母时钟信号的跳变沿对齐。该第二时钟频率合成电路用于利用母时钟信号对第二时钟信号进行时钟同步,以产生第二同步时钟信号,该第二时钟信号为第二时钟域的时钟信号,该第二时钟信号的频率与第一时钟信号不同,且小于母时钟信号的频率,该第二同步时钟信号在发生跳变时的跳变沿与母时钟信号的跳变沿对齐;该同步处理电路用于利用第一同步时钟信号对缓存电路的数据写入进行控制,并同步地利用第二同步时钟信号对缓存电路的数据读出进行控制,从而实现将第一时钟域的数据转换为第二时钟域的数据。A first aspect of the embodiments of the present application provides a data processing device, including: a first clock frequency synthesis circuit, a second clock frequency synthesis circuit, and a synchronization processing circuit, and the synchronization processing circuit includes a buffer circuit. The first clock frequency synthesizing circuit is used to clock the first clock signal by using a mother clock signal to generate a first synchronous clock signal, the mother clock signal is a clock signal that jumps according to a fixed time interval, the first clock The signal is a clock signal of the first clock domain, the frequency of the first clock signal is less than the frequency of the mother clock signal, and the transition edge of the first synchronous clock signal when a transition occurs is aligned with the transition edge of the mother clock signal. The second clock frequency synthesis circuit is used for clock synchronization of the second clock signal by using the mother clock signal to generate a second synchronous clock signal. The second clock signal is a clock signal of the second clock domain. The frequency is different from that of the first clock signal and is less than the frequency of the mother clock signal. The transition edge of the second synchronous clock signal when the transition occurs is aligned with the transition edge of the mother clock signal; the synchronization processing circuit is used to utilize the first The synchronous clock signal controls the data writing of the buffer circuit, and synchronously uses the second synchronous clock signal to control the data reading of the buffer circuit, so as to realize the conversion of data in the first clock domain into data in the second clock domain.
由上述第一方面可知,通过对第一时钟信号和第二时钟信号进行时钟同步,产生第一 同步时钟信号和第二同步时钟信号,同步处理电路可以利用该第一同步时钟信号和第二同步时钟信号实现第一时钟域和第二时钟域之间的跨时钟域数据传递,避免使用异步处理电路进行跨时钟域数据传递引入的延时不确定问题。It can be seen from the above-mentioned first aspect that the first synchronous clock signal and the second synchronous clock signal are generated by clock synchronization between the first clock signal and the second clock signal, and the synchronous processing circuit can use the first synchronous clock signal and the second synchronous clock signal. The clock signal realizes the cross-clock domain data transfer between the first clock domain and the second clock domain, and avoids the delay uncertainty caused by the asynchronous processing circuit for cross-clock domain data transfer.
可选的,结合上述第一方面,在第一种可能的实现方式中,第一时钟频率合成电路包括第一控制信号生成单元和第一门控单元,第一控制信号生成单元用于根据第一时钟信号与母时钟信号的频率比例关系生成第一控制信号,第一门控单元用于根据该第一控制信号将母时钟信号拟合成第一同步时钟信号。Optionally, in combination with the above first aspect, in a first possible implementation manner, the first clock frequency synthesis circuit includes a first control signal generating unit and a first gating unit, and the first control signal generating unit is configured to The frequency ratio relationship between a clock signal and the mother clock signal generates a first control signal, and the first gating control unit is used for fitting the mother clock signal to a first synchronous clock signal according to the first control signal.
可选的,结合上述第一方面,在第二种可能的实现方式中,第二时钟频率合成电路包括第二控制信号生成单元和第二门控单元,第二控制信号生成单元用于根据第二时钟信号与母时钟信号的频率比例关系生成第二控制信号,第二门控单元用于根据该第二控制信号将母时钟信号拟合成第二同步时钟信号。Optionally, in combination with the above first aspect, in a second possible implementation manner, the second clock frequency synthesis circuit includes a second control signal generating unit and a second gating unit, and the second control signal generating unit is used to The frequency ratio relationship between the second clock signal and the mother clock signal generates a second control signal, and the second gating control unit is used for fitting the mother clock signal into a second synchronous clock signal according to the second control signal.
可选的,结合上述第一方面、第一方面第一种或第二种可能的实现方式,在第三种可能的实现方式中,同步处理电路还包括第一时钟图谱配置电路和第一计数器,第一同步时钟信号触发第一计数器生成第一指示信号,该第一指示信号可以指示缓存电路在第一同步时钟信号控制下进行数据写入的理论速率,第一时钟图谱配置电路用于根据第一指示信号生成有效读指示信号,该有效读指示信号用于控制缓存电路在第二同步时钟信号控制下进行数据读出的实际速率。Optionally, in combination with the first aspect, the first or the second possible implementation manner of the first aspect, in a third possible implementation manner, the synchronization processing circuit further includes a first clock map configuration circuit and a first counter , The first synchronous clock signal triggers the first counter to generate a first indicator signal, the first indicator signal can instruct the buffer circuit to write data under the control of the first synchronous clock signal theoretical rate, the first clock map configuration circuit is used to The first instruction signal generates a valid read instruction signal, and the valid read instruction signal is used to control the actual rate of data read by the buffer circuit under the control of the second synchronous clock signal.
可选的,结合上述第一方面第三种可能的实现方式,在第四种可能的实现方式中,同步处理电路还包括第二时钟图谱配置电路和第二计数器,第二同步时钟信号触发第二计数器生成第二指示信号,该第二指示信号可以指示缓存电路在第二同步时钟信号控制下进行数据读出的理论速率,第二时钟图谱配置电路用于根据第二指示信号生成有效写指示信号,该有效写指示信号用于控制缓存电路在第一同步时钟信号控制下进行数据写入的实际速率。Optionally, in combination with the third possible implementation manner of the first aspect described above, in the fourth possible implementation manner, the synchronization processing circuit further includes a second clock map configuration circuit and a second counter, and the second synchronization clock signal triggers the second The second counter generates a second instruction signal, which can instruct the buffer circuit to perform a theoretical data read rate under the control of the second synchronous clock signal, and the second clock map configuration circuit is used to generate a valid write instruction according to the second instruction signal The effective write instruction signal is used to control the actual rate of data writing by the buffer circuit under the control of the first synchronous clock signal.
上述有效读指示信号和有效写指示信号的作用是使得缓存电路进行数据写入和数据读出的实际速率相匹配,避免读写速率不匹配时造成数据错误的情况。The function of the above valid read instruction signal and valid write instruction signal is to match the actual rate of data writing and data reading performed by the buffer circuit to avoid data errors caused by mismatching of read and write rates.
可选的,结合上述第一方面第三种可能的实现方式,在第五种可能的实现方式中,同步处理电路具体用于在有效写指示信号为高电平时利用第一同步时钟信号控制缓存电路进行数据写入,并在有效读指示信号为高电平时,同步地利用第二同步时钟信号控制缓存电路进行数据读出。由于缓存电路进行的数据写入和数据读出是同步的,所以通过后端进行时序收敛,可以使得跨时钟域数据传递延时固定,避免了采用异步处理方案时,延时不确定的问题。Optionally, in combination with the third possible implementation manner of the first aspect described above, in the fifth possible implementation manner, the synchronization processing circuit is specifically configured to use the first synchronization clock signal to control the buffer when the valid write instruction signal is at a high level. The circuit performs data writing, and when the valid read instruction signal is at a high level, the second synchronous clock signal is used to synchronously control the buffer circuit for data reading. Since the data writing and data reading performed by the buffer circuit are synchronous, timing closure through the back end can make the data transfer delay across clock domains fixed, avoiding the problem of uncertain delay when an asynchronous processing scheme is adopted.
可选的,结合上述第一方面、第一方面第一种至第五种任意一种可能的实现方式,在第六种可能的实现方式中,缓存电路包括同步FIFO或寄存器。Optionally, in combination with the foregoing first aspect and any one of the first to fifth possible implementation manners of the first aspect, in the sixth possible implementation manner, the buffer circuit includes a synchronous FIFO or a register.
本申请实施例第二方面提供一种数据处理装置,包括:时钟频率合成电路和同步处理电路,该同步处理电路包括缓存电路。该时钟频率合成电路用于利用第二时钟信号对第一时钟信号进行时钟同步,以产生第一同步时钟信号,该第二时钟信号为第二时钟域的,且按照固定时间间隔发生跳变的时钟信号,该第一时钟信号为第一时钟域的时钟信号,第一 时钟信号的频率小于第二时钟信号的频率,第一同步时钟信号在发生跳变时的跳变沿与第二时钟信号的跳变沿对齐;同步处理电路用于第一同步时钟信号对缓存电路的数据写入进行控制,并同步地利用第二时钟信号对缓存电路的数据读出进行控制,从而实现将第一时钟域的数据转换为第二时钟域的数据。A second aspect of the embodiments of the present application provides a data processing device, including a clock frequency synthesis circuit and a synchronization processing circuit, and the synchronization processing circuit includes a buffer circuit. The clock frequency synthesis circuit is used for clock synchronization of the first clock signal by using the second clock signal to generate a first synchronous clock signal. The second clock signal is in the second clock domain and hops at fixed time intervals. A clock signal, the first clock signal is a clock signal of the first clock domain, the frequency of the first clock signal is less than the frequency of the second clock signal, the transition edge of the first synchronous clock signal and the second clock signal when the transition occurs Alignment of the transition edge; the synchronization processing circuit is used for the first synchronization clock signal to control the data writing of the buffer circuit, and synchronously use the second clock signal to control the data readout of the buffer circuit, so as to realize the first clock The data of the domain is converted into the data of the second clock domain.
由上述第二方面可知,本方案与上述第一方面的方案原理是相同,在本方案中,第二时钟信号作为母时钟信号对第一时钟信号进行时钟同步,产生第一同步时钟信号,所以无需对第二时钟信号进行时钟同步,同步处理电路可以利用该第一同步时钟信号和第二时钟信号实现第一时钟域和第二时钟域之间的跨时钟域数据传递,避免使用异步处理电路进行跨时钟域数据传递引入的延时不确定问题。It can be seen from the above second aspect that the principle of this solution is the same as that of the above first aspect. In this solution, the second clock signal is used as the mother clock signal to clock the first clock signal to generate the first synchronous clock signal, so There is no need to synchronize the second clock signal. The synchronous processing circuit can use the first synchronous clock signal and the second clock signal to realize cross-clock domain data transfer between the first clock domain and the second clock domain, avoiding the use of asynchronous processing circuits The delay uncertainty caused by data transfer across clock domains.
可选的,结合上述第二方面,在第一种可能的实现方式中,时钟频率合成电路包括控制信号生成单元和门控单元,控制信号生成单元用于根据第一时钟信号与第二时钟信号的频率比例关系生成控制信号,门控单元用于根据该控制信号将第二时钟信号拟合成第一同步时钟信号。Optionally, in combination with the second aspect described above, in a first possible implementation manner, the clock frequency synthesis circuit includes a control signal generation unit and a gating unit, and the control signal generation unit is configured to respond to the first clock signal and the second clock signal. A control signal is generated according to the frequency proportional relationship of, and the gating control unit is used to synthesize the second clock signal into the first synchronous clock signal according to the control signal.
可选的,结合上述第二方面或第二方面第一种可能的实现方式,在第二种可能的实现方式中,同步处理电路还包括第一时钟图谱配置电路和第一计数器,第一同步时钟信号触发第一计数器生成第一指示信号,该第一指示信号可以指示缓存电路在第一同步时钟信号控制下进行数据写入的理论速率,第一时钟图谱配置电路用于根据第一指示信号生成有效读指示信号,该有效读指示信号用于控制缓存电路在第二时钟信号控制下进行数据读出的实际速率。Optionally, in combination with the second aspect or the first possible implementation manner of the second aspect, in the second possible implementation manner, the synchronization processing circuit further includes a first clock map configuration circuit and a first counter, and the first synchronization The clock signal triggers the first counter to generate a first indicator signal, the first indicator signal can instruct the buffer circuit under the control of the first synchronous clock signal to write the theoretical rate of data, the first clock map configuration circuit is used to configure the circuit according to the first indicator signal A valid read instruction signal is generated, and the valid read instruction signal is used to control the actual rate of data read by the buffer circuit under the control of the second clock signal.
可选的,结合上述第二方面第二种可能的实现方式,在第三种可能的实现方式中,同步处理电路还包括第二时钟图谱配置电路和第二计数器,第二时钟信号触发第二计数器生成第二指示信号,该第二指示信号可以指示缓存电路在第二同步时钟信号控制下进行数据读出的理论速率,第二时钟图谱配置电路用于根据第二指示信号生成有效写指示信号,该有效写指示信号用于控制缓存电路在第一同步时钟信号控制下进行数据写入的实际速率。有效读指示信号和有效写指示信号的作用是使得缓存电路进行数据写入和数据读出的实际速率相匹配,避免读写速率不匹配时造成数据错误的情况。Optionally, in combination with the second possible implementation manner of the second aspect described above, in a third possible implementation manner, the synchronization processing circuit further includes a second clock map configuration circuit and a second counter, and the second clock signal triggers the second The counter generates a second instruction signal, which can instruct the buffer circuit to perform a theoretical data read rate under the control of the second synchronous clock signal, and the second clock map configuration circuit is used to generate a valid write instruction signal according to the second instruction signal The effective write instruction signal is used to control the actual rate of data writing by the buffer circuit under the control of the first synchronous clock signal. The function of the effective read instruction signal and the effective write instruction signal is to match the actual rate of data writing and data reading performed by the buffer circuit, so as to avoid data errors when the read and write rates do not match.
可选的,结合上述第二方面第二种可能的实现方式,在第四种可能的实现方式中,同步处理电路具体用于在有效写指示信号为高电平时利用第一同步时钟信号控制缓存电路进行数据写入,并在有效读指示信号为高电平时,同步地利用第二同步时钟信号控制缓存电路进行数据读出。由于缓存电路进行的数据写入和数据读出是同步的,所以通过后端进行时序收敛,可以使得跨时钟域数据传递延时固定,避免了采用异步处理方案时,延时不确定的问题。Optionally, in combination with the second possible implementation manner of the second aspect described above, in the fourth possible implementation manner, the synchronization processing circuit is specifically configured to use the first synchronization clock signal to control the buffer when the valid write instruction signal is at a high level. The circuit performs data writing, and when the valid read instruction signal is at a high level, the second synchronous clock signal is used to synchronously control the buffer circuit for data reading. Since the data writing and data reading performed by the buffer circuit are synchronous, timing closure through the back end can make the data transfer delay across clock domains fixed, avoiding the problem of uncertain delay when an asynchronous processing scheme is adopted.
可选的,结合上述第二方面、第二方面第一种至第四种任意一种可能的实现方式,在第六种可能的实现方式中,缓存电路包括同步FIFO或寄存器。Optionally, in combination with the foregoing second aspect and any one of the first to fourth possible implementation manners of the second aspect, in the sixth possible implementation manner, the buffer circuit includes a synchronous FIFO or a register.
本申请实施例提供的两种技术方案中,通过利用相同的母时钟信号对第一时钟信号和第二时钟信号进行时钟同步,或者通过利用第二时钟信号对第一时钟信号进行时钟同步后,可以使用同步处理电路来将第一时钟域的数据转换为第二时钟域的数据,在前端上实现了 电路同步化设计,取代了原有的异步处理方案中的异步处理电路,从而避免异步处理引入的延时不确定问题,实现电路同步化设计还可以避免采用异步处理电路时引入的设计复杂度以及系统性能风险。In the two technical solutions provided by the embodiments of the present application, the first clock signal and the second clock signal are clocked by using the same mother clock signal, or after the first clock signal is clocked by using the second clock signal, The synchronous processing circuit can be used to convert the data in the first clock domain into the data in the second clock domain. The circuit synchronization design is realized on the front end, replacing the asynchronous processing circuit in the original asynchronous processing scheme, thereby avoiding asynchronous processing With the introduction of delay uncertainty, the realization of circuit synchronization design can also avoid the design complexity and system performance risks introduced when using asynchronous processing circuits.
附图说明Description of the drawings
图1为传统异步处理方案的原理示意图;Figure 1 is a schematic diagram of the principle of a traditional asynchronous processing scheme;
图2为本申请方案应用架构示意图;Figure 2 is a schematic diagram of the application structure of the application scheme;
图3为本申请实施例中一种数据处理装置的一个实施例示意图;3 is a schematic diagram of an embodiment of a data processing device in an embodiment of the application;
图4为母时钟信号、第一同步时钟信号和第二同步时钟信号的示意图;4 is a schematic diagram of a mother clock signal, a first synchronous clock signal, and a second synchronous clock signal;
图5为本申请实施例中第一时钟频率合成电路一个实施例示意图;5 is a schematic diagram of an embodiment of a first clock frequency synthesis circuit in an embodiment of the application;
图6为本申请实施例中第二时钟频率合成电路一个实施例示意图;6 is a schematic diagram of an embodiment of a second clock frequency synthesis circuit in an embodiment of the application;
图7为本申请实施例中第一或第二时钟频率合成电路的一种电路结构示意图;7 is a schematic diagram of a circuit structure of the first or second clock frequency synthesis circuit in an embodiment of the application;
图8为本申请实施例中同步处理电路一个实施例示意图;FIG. 8 is a schematic diagram of an embodiment of a synchronization processing circuit in an embodiment of the application;
图9为本申请实施例中有效写指示信号和有效读指示信号的示意图;FIG. 9 is a schematic diagram of a valid write instruction signal and a valid read instruction signal in an embodiment of the application;
图10为本申请方案的同步采样过程示意图;Figure 10 is a schematic diagram of the synchronous sampling process of the solution of the application;
图11为传统异步处理方案的异步采样过程示意图;Figure 11 is a schematic diagram of the asynchronous sampling process of the traditional asynchronous processing scheme;
图12为本申请实施例中另一种数据处理装置的一个实施例示意图;FIG. 12 is a schematic diagram of an embodiment of another data processing device in an embodiment of the application;
图13为本申请实施例中时钟频率合成电路一个实施例示意图;FIG. 13 is a schematic diagram of an embodiment of a clock frequency synthesis circuit in an embodiment of the application;
图14为本申请实施例中同步处理电路另一实施例示意图。FIG. 14 is a schematic diagram of another embodiment of a synchronization processing circuit in an embodiment of this application.
具体实施方式detailed description
本申请实施例提供一种数据处理装置,可应用于两个时钟域之间的数据传递,可以避免采用异步处理方案引入的延时不确定问题,适用于对不定延时敏感的无线通信的部分解决方案中,避免不定延时在这些场景中带来的不利影响。The embodiment of the application provides a data processing device, which can be applied to data transfer between two clock domains, can avoid the delay uncertainty problem introduced by the asynchronous processing scheme, and is suitable for the part of wireless communication that is sensitive to indefinite delay In the solution, avoid the adverse effects of uncertain delay in these scenarios.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of this application.
本申请实施例可应用于两个异频的时钟域之间的跨时钟域数据传递场景。为了便于理解,可以将作为数据发送方的时钟域看作第一时钟域,作为数据接收方的时钟域看作第二时钟域。应理解的,一个时钟域既可以作为数据发送方,也可以作为数据接收方,因此第一时钟域和第二时钟域分别只是对作为数据发送方和数据接收方的两个时钟域的代称。The embodiments of the present application can be applied to a cross-clock domain data transfer scenario between two clock domains with different frequencies. For ease of understanding, the clock domain as the data sender can be regarded as the first clock domain, and the clock domain as the data receiver can be regarded as the second clock domain. It should be understood that one clock domain can be used as a data sender and a data receiver. Therefore, the first clock domain and the second clock domain are only representative of the two clock domains as the data sender and the data receiver, respectively.
图2为本申请方案应用架构示意图。Figure 2 is a schematic diagram of the application structure of the application scheme.
如图2所示,本方案通过采用一个母时钟信号经过不同的时钟频率合成后生成的子时钟信号1~N(N为大于1的整数)作为时钟域A到时钟域X的时钟信号,从而实现不同时钟域的同步化设计,进而采用同步处理电路来实现不同时钟域之间的数据同步过渡。As shown in Figure 2, this solution uses sub-clock signals 1 to N (N is an integer greater than 1) generated by synthesizing a master clock signal through different clock frequencies as the clock signals from clock domain A to clock domain X. Realize the synchronization design of different clock domains, and then adopt the synchronization processing circuit to realize the data synchronization transition between different clock domains.
图3为本申请实施例中数据处理装置一个实施例示意图。Figure 3 is a schematic diagram of an embodiment of a data processing device in an embodiment of the application.
如图3所示,本申请实施例中数据处理装置30可以包括第一时钟频率合成电路301: 第二时钟频率合成电路302和同步处理电路303;As shown in FIG. 3, the data processing device 30 in the embodiment of the present application may include a first clock frequency synthesis circuit 301: a second clock frequency synthesis circuit 302 and a synchronization processing circuit 303;
第一时钟频率合成电路301,用于利用母时钟信号对第一时钟信号进行时钟同步,以产生第一同步时钟信号,该第一时钟信号为第一时钟域的时钟信号,该第一时钟信号的频率小于母时钟信号的频率,该第一同步时钟信号在发生跳变时的跳变沿与母时钟信号的跳变沿对齐;The first clock frequency synthesis circuit 301 is used for clock synchronization of the first clock signal by using the mother clock signal to generate a first synchronous clock signal, the first clock signal is a clock signal of the first clock domain, and the first clock signal The frequency of is less than the frequency of the mother clock signal, and the transition edge of the first synchronous clock signal when the transition occurs is aligned with the transition edge of the mother clock signal;
第二时钟频率合成电路302,用于利用上述母时钟信号对第二时钟信号进行时钟同步,以产生第二同步时钟信号,该第二时钟信号为第二时钟域的时钟信号,该第二时钟信号的频率与第一时钟信号的频率不同,且小于母时钟信号的频率,第二同步时钟信号在发生跳变时的跳变沿与母时钟信号的跳变沿对齐;The second clock frequency synthesizing circuit 302 is used for clock synchronization of the second clock signal by using the above-mentioned mother clock signal to generate a second synchronous clock signal. The second clock signal is a clock signal of the second clock domain. The frequency of the signal is different from the frequency of the first clock signal and is smaller than the frequency of the mother clock signal, and the transition edge of the second synchronous clock signal when the transition occurs is aligned with the transition edge of the mother clock signal;
利用母时钟信号对第一时钟信号和第二时钟信号进行时钟同步的过程为以一个母时钟信号作为一个输入时钟信号,该母时钟信号的相邻跳变时间间隔是固定的,按照母时钟信号的频率和第一时钟信号或第二时钟信号的频率比例关系,关闭母时钟信号的部分跳变沿,从而实现母时钟信号到第一同步时钟信号或第二同步时钟信号的拟合,经母时钟信号拟合而成的第一同步时钟信号和第二同步时钟信号的相邻跳变时间间隔不固定,但是第一同步时钟信号和第二同步时钟信号每次发生跳变时,其跳变沿和母时钟信号的跳变沿是对齐的,所以该第一同步时钟信号和第二同步时钟信号可视为同步时钟信号。以图4所示为例,母时钟信号为按照固定时间间隔发生跳变的时钟信号,假设母时钟信号频率为A,第一同步时钟信号频率为0.8A,第二同步时钟信号频率为0.6A,母时钟信号、第一同步时钟信号和第二同步时钟信号的频率比例为5:4:3,所以可以将5个母时钟信号的时钟周期作为一个轮训周期,按照相应的比例,在每个轮训周期内关闭母时钟信号的部分跳变沿,从而实现利用母时钟信号对第一时钟信号和第二时钟信号进行时钟同步,产生第一同步时钟信号和第二同步时钟信号。图4中展示的是在一个轮训周期内的时钟信号示意图,在后续的每个轮训周期内,第一同步时钟信号和第二同步时钟信号与母时钟信号的跳变沿对齐方式与图4所示相同,所以后端可以按照母时钟频率收敛该两个时钟信号的时序接口,从而实现不同频率时钟信号的同步化设计,从而可以使用同步处理电路代替传统异步处理方案中的异步处理电路以实现跨时钟域的数据传递;The process of using the mother clock signal to synchronize the first clock signal and the second clock signal is to use a mother clock signal as an input clock signal, the adjacent transition time interval of the mother clock signal is fixed, according to the mother clock signal The relationship between the frequency and the frequency of the first clock signal or the second clock signal, close part of the transition edge of the mother clock signal, so as to realize the fitting of the mother clock signal to the first synchronous clock signal or the second synchronous clock signal. The adjacent transition time interval of the first synchronous clock signal and the second synchronous clock signal formed by the fitting of the clock signal is not fixed, but each time the first synchronous clock signal and the second synchronous clock signal jump, their transition The edge is aligned with the transition edge of the mother clock signal, so the first synchronous clock signal and the second synchronous clock signal can be regarded as synchronous clock signals. Taking Figure 4 as an example, the mother clock signal is a clock signal that jumps at fixed time intervals. Assuming that the frequency of the mother clock signal is A, the frequency of the first synchronous clock signal is 0.8A, and the frequency of the second synchronous clock signal is 0.6A. , The frequency ratio of the mother clock signal, the first synchronous clock signal and the second synchronous clock signal is 5:4:3, so the clock cycles of the 5 mother clock signals can be regarded as a training cycle, according to the corresponding ratio, in each Part of the transition edges of the mother clock signal are turned off during the training cycle, so as to realize the clock synchronization of the first clock signal and the second clock signal using the mother clock signal to generate the first synchronous clock signal and the second synchronous clock signal. Figure 4 shows a schematic diagram of the clock signal in one training cycle. In each subsequent training cycle, the alignment of the transition edges of the first synchronous clock signal and the second synchronous clock signal with the mother clock signal is the same as that shown in Figure 4. Shows the same, so the backend can converge the timing interface of the two clock signals according to the mother clock frequency, so as to realize the synchronization design of different frequency clock signals, so that the synchronous processing circuit can be used to replace the asynchronous processing circuit in the traditional asynchronous processing scheme. Data transfer across clock domains;
同步处理电路303中包括缓存电路,同步处理电路303用于利用第一同步时钟信号对所述缓存电路的数据写入进行控制,并同步地利用所述第二同步时钟信号对所述缓存电路的数据读出进行控制,从而实现将第一时钟域的数据转换为第二时钟域的数据,将第一时钟域的数据转换为第二时钟域的数据的这个过程就是将数据从第一时钟域传递到第二时钟域的跨时钟域数据传递过程,利用第一同步时钟信号和第二同步时钟信号同步地进行缓存电路的数据写入和数据读出,并且通过在后端采用母时钟信号进行时序收敛,从而使得跨时钟域数据传递的延时固定。The synchronization processing circuit 303 includes a buffer circuit. The synchronization processing circuit 303 is used to control the data writing of the buffer circuit by using the first synchronization clock signal, and synchronously use the second synchronization clock signal to control the buffer circuit. Data readout is controlled, so as to realize the conversion of data in the first clock domain into data in the second clock domain, and the process of converting data in the first clock domain into data in the second clock domain is to transfer data from the first clock domain The cross-clock domain data transfer process to the second clock domain uses the first synchronous clock signal and the second synchronous clock signal to synchronously perform data writing and data reading of the buffer circuit, and uses the mother clock signal at the back end to perform The timing is closed, so that the delay of data transfer across clock domains is fixed.
在本实施例中,通过利用母时钟信号对第一时钟信号和第二时钟信号进行时钟同步,产生第一同步时钟信号和第二同步时钟信号后,同步处理电路303可根据该第一同步时钟信号和第二同步时钟信号来控制跨时钟域的连续数据在缓存电路中的数据写入和数据读出过程,从而以延时固定的方式实现第一时钟域的数据转换为第二时钟域的数据。In this embodiment, by using the mother clock signal to synchronize the first clock signal and the second clock signal, after generating the first synchronous clock signal and the second synchronous clock signal, the synchronization processing circuit 303 can perform clock synchronization according to the first synchronous clock signal. Signal and the second synchronous clock signal to control the data writing and data reading process of the continuous data across the clock domain in the buffer circuit, so as to realize the data conversion of the first clock domain into the second clock domain with a fixed delay data.
通过以上设计方案,可以在前端上实现电路同步化设计,由于第一同步时钟信号与第二同步时钟信号为同源同步时钟信号,它们均来源于同一个母时钟信号,所以后端可以采用母时钟信号频率做时序收敛,使得从第一时钟域传递到第二时钟域的跨时钟域数据传递延时固定,避免传统异步处理方案引入的延时不确定问题。Through the above design scheme, the circuit synchronization design can be realized on the front end. Since the first synchronous clock signal and the second synchronous clock signal are homologous synchronous clock signals, they are all derived from the same mother clock signal, so the back end can adopt the mother clock signal. The timing of the clock signal frequency is converged, so that the cross-clock domain data transmission delay from the first clock domain to the second clock domain is fixed, and the delay uncertainty problem introduced by the traditional asynchronous processing scheme is avoided.
进一步的,在前端上实现电路同步化设计,可以避免采用异步电路设计时带来的设计复杂度和系统性能风险,还可以避免异步FIFO在实际应用中功耗较高的问题。Furthermore, the realization of circuit synchronization design on the front end can avoid the design complexity and system performance risks brought by asynchronous circuit design, and can also avoid the problem of high power consumption of asynchronous FIFO in practical applications.
可选的,第一时钟频率合成电路301具体用于根据第一时钟信号与母时钟信号的频率比例关系生成第一控制信号,并根据第一控制信号将母时钟信号拟合成第一同步时钟信号。Optionally, the first clock frequency synthesis circuit 301 is specifically configured to generate the first control signal according to the frequency ratio relationship between the first clock signal and the mother clock signal, and to fit the mother clock signal into the first synchronous clock according to the first control signal signal.
上述第一控制信号可以视为一张轮询表,其可以按照相应的轮训周期控制关闭母时钟信号的部分时钟跳变沿,从而实现母时钟信号到第一同步时钟信号的拟合过程。由于第一同步时钟信号是由母时钟信号拟合而成,所以第一同步时钟信号发生跳变时的跳变沿和母时钟信号的跳变沿对齐。The above-mentioned first control signal can be regarded as a polling table, which can control to turn off part of the clock transition edge of the mother clock signal according to the corresponding polling period, so as to realize the fitting process from the mother clock signal to the first synchronous clock signal. Since the first synchronous clock signal is fitted by the mother clock signal, the jumping edge when the first synchronous clock signal jumps is aligned with the jumping edge of the mother clock signal.
第一时钟频率合成电路301按照功能可以分为两个模块,包括第一控制信号生成单元3011和第一门控单元3012,如图5所示。第一控制信号生成单元3011具体用于上述生成第一控制信号的过程,第一门控单元3012具体用于根据第一控制信号拟合第一同步时钟信号的过程。The first clock frequency synthesis circuit 301 can be divided into two modules according to functions, including a first control signal generating unit 3011 and a first gating unit 3012, as shown in FIG. 5. The first control signal generating unit 3011 is specifically used for the above-mentioned process of generating the first control signal, and the first gating control unit 3012 is specifically used for the process of fitting the first synchronous clock signal according to the first control signal.
与第一时钟频率合成电路301类似,第二时钟频率合成电路302具体用于根据第二时钟信号与母时钟信号的频率比例关系生成第二控制信号,并根据该第二控制信号将母时钟信号拟合成第二同步时钟信号。Similar to the first clock frequency synthesis circuit 301, the second clock frequency synthesis circuit 302 is specifically configured to generate a second control signal according to the frequency proportional relationship between the second clock signal and the mother clock signal, and to convert the mother clock signal according to the second control signal Fit the second synchronous clock signal.
第二时钟频率合成电路302按照功能可以分为两个模块,包括第二控制信号生成单元3021和第二门控单元3022,如图6所示。第二控制信号生成单元3021具体用于上述生成第二控制信号的过程,第二门控单元3022具体用于根据第二控制信号拟合第二同步时钟信号的过程。The second clock frequency synthesis circuit 302 can be divided into two modules according to functions, including a second control signal generating unit 3021 and a second gating unit 3022, as shown in FIG. 6. The second control signal generating unit 3021 is specifically used for the above-mentioned process of generating the second control signal, and the second gating control unit 3022 is specifically used for the process of fitting the second synchronous clock signal according to the second control signal.
上述第二控制信号可以视为另外一张轮询表,其可以按照与第一控制信号相同的轮训周期控制关闭母时钟信号的部分时钟跳变沿,从而实现母时钟信号到第二同步时钟信号的拟合过程。由于第二同步时钟信号是由母时钟信号拟合而成,所以第二同步时钟信号发生跳变时的跳变沿和母时钟信号的跳变沿对齐。The above-mentioned second control signal can be regarded as another polling table, which can control to turn off part of the clock transition edge of the mother clock signal according to the same polling cycle as the first control signal, thereby realizing the mother clock signal to the second synchronous clock signal The fitting process. Since the second synchronous clock signal is fitted by the mother clock signal, the transition edge when the second synchronous clock signal jumps is aligned with the transition edge of the mother clock signal.
第一时钟频率合成电路301和第二时钟频率合成电路302的具体电路结构是相同的,以图7所示电路为例,在一个时钟频率合成电路中包括计数器、时钟图谱配置电路、比较器、D触发器和门控电路等电路元件,母时钟信号作为输入的时钟信号CLK_IN,触发计数器生成计数信号,时钟图谱配置电路中预存有需要生成的第一同步时钟信号或第二同步时钟信号的信号参数,时钟图谱配置电路根据计数器产生的计数信号和预存的信号参数以及母时钟信号生成配置信号,比较器将配置信号和一个外部接入的Gating使能信号进行比较得到比较信号,同时母时钟信号作为D触发器的CP端脉冲信号,触发D触发器根据输入的比较信号产生一个相应的控制信号,该控制信号输入到门控电路的使能端EN,母时钟信号输入到门控电路的输入端IN,门控电路便可以根据该控制信号和母时钟信号进行运算,在输出端OUT输出进行时钟同步得到时钟信号CLK_OUT。The specific circuit structures of the first clock frequency synthesis circuit 301 and the second clock frequency synthesis circuit 302 are the same. Taking the circuit shown in FIG. 7 as an example, a clock frequency synthesis circuit includes a counter, a clock map configuration circuit, a comparator, Circuit elements such as D flip-flops and gate control circuits. The mother clock signal is used as the input clock signal CLK_IN, which triggers the counter to generate a counting signal. The clock map configuration circuit prestores the first synchronous clock signal or the second synchronous clock signal that needs to be generated. Parameter, the clock map configuration circuit generates the configuration signal according to the counting signal generated by the counter and the pre-stored signal parameters and the mother clock signal. The comparator compares the configuration signal with an externally connected Gating enable signal to obtain the comparison signal, and the mother clock signal at the same time As the CP terminal pulse signal of the D flip-flop, trigger the D flip-flop to generate a corresponding control signal according to the input comparison signal. The control signal is input to the enable terminal EN of the gate control circuit, and the mother clock signal is input to the input of the gate control circuit At the terminal IN, the gate control circuit can perform operations based on the control signal and the mother clock signal, and perform clock synchronization at the output terminal OUT to obtain the clock signal CLK_OUT.
计数器、时钟图谱配置电路、比较器、D触发器组成的电路对应于第一控制信号生成单元3011或第二控制信号生成单元3021,门控电路对应于第一门控单元3012或第二门控单元3022。A circuit composed of a counter, a clock map configuration circuit, a comparator, and a D flip-flop corresponds to the first control signal generating unit 3011 or the second control signal generating unit 3021, and the gating circuit corresponds to the first gating unit 3012 or the second gating Unit 3022.
可选的,如图8所示,同步处理电路303还可以包括第一时钟图谱配置电路3032和第一计数器3033。Optionally, as shown in FIG. 8, the synchronization processing circuit 303 may further include a first clock map configuration circuit 3032 and a first counter 3033.
第一同步时钟信号触发第一计数器3033生成第一指示信号,该第一指示信号可以指示缓存电路3031在第一同步时钟信号控制下进行数据写入的理论速率,第一时钟图谱配置电路3032用于根据第一指示信号生成有效读指示信号,该有效读指示信号用于控制缓存电路在第二同步时钟信号控制下进行数据读出的实际速率。The first synchronous clock signal triggers the first counter 3033 to generate a first indication signal, which can instruct the buffer circuit 3031 to perform data writing theoretically under the control of the first synchronous clock signal. The first clock map configuration circuit 3032 uses The effective read instruction signal is generated according to the first instruction signal, and the effective read instruction signal is used to control the actual data reading rate of the buffer circuit under the control of the second synchronous clock signal.
可选的,参阅图8,同步处理电路还可以包括第二时钟图谱配置电路3034和第二计数器3035。Optionally, referring to FIG. 8, the synchronization processing circuit may further include a second clock map configuration circuit 3034 and a second counter 3035.
第二同步时钟信号触发第二计数3035生成第二指示信号,该第二指示信号可以指示缓存电路3031在第二同步时钟信号控制下进行数据读出的理论速率,第二时钟图谱配置电路3034用于根据第二指示信号生成有效写指示信号,该有效写指示信号用于控制缓存电路在第一同步时钟信号控制下进行数据写入的实际速率。The second synchronous clock signal triggers the second count 3035 to generate a second indicator signal, which can instruct the buffer circuit 3031 to perform a theoretical data reading rate under the control of the second synchronous clock signal. The second clock map configuration circuit 3034 uses The effective write instruction signal is generated according to the second instruction signal, and the effective write instruction signal is used to control the actual rate of data writing by the buffer circuit under the control of the first synchronous clock signal.
同步处理电路303利用第一同步时钟信号控制缓存电路3031进行数据写入的过程简称为写操作,同步处理电路303利用第二同步时钟信号控制缓存电路3031进行数据读出的过程简称为读操作,写操作的最大速率是由第一同步时钟信号的频率决定的,读操作的最大速率是由第二同步时钟信号的频率决定的,由于第一同步时钟信号和第二同步时钟信号的频率是不相等的,所以读操作和写操作的最大速率也是不相等的,这种情况可能带来的问题是当读操作速率比写操作大时,容易产生读空的情况,即缓存电路3031中没有可以继续读取的有效数据;当读操作速率比写操作小时,容易产生写满的情况,即缓存电路3031缓存的有效数据的量已经达到饱和的状态。如果在读空的情况下继续进行读操作,或者在写满的情况下继续进行写操作,会导致数据发生错误。The process in which the synchronization processing circuit 303 uses the first synchronization clock signal to control the buffer circuit 3031 to write data is referred to as a write operation, and the process in which the synchronization processing circuit 303 uses the second synchronization clock signal to control the buffer circuit 3031 to read data is referred to as a read operation. The maximum rate of the write operation is determined by the frequency of the first synchronous clock signal, and the maximum rate of the read operation is determined by the frequency of the second synchronous clock signal. Because the frequencies of the first synchronous clock signal and the second synchronous clock signal are different Equal, so the maximum rate of read operation and write operation is not equal, this situation may bring about the problem is that when the read operation rate is greater than the write operation, it is easy to produce a situation of read empty, that is, there is nothing in the buffer circuit 3031. Valid data that continues to be read; when the read operation rate is lower than the write operation, it is likely to be full, that is, the amount of valid data buffered by the buffer circuit 3031 has reached a saturated state. If the read operation is continued when the read is empty, or the write operation is continued when the write is full, data errors will occur.
上述有效读指示信号和有效写指示信号的作用是使得写操作和读操作的实际速率相匹配,从而避免数据发生错误。为便于理解,下面进行举例说明。The function of the above valid read instruction signal and valid write instruction signal is to match the actual rate of the write operation and the read operation, thereby avoiding data errors. For ease of understanding, an example is given below.
假设第一同步时钟信号的频率为100MHz,第二同步时钟信号的频率为200MHz,第一同步时钟信号和第二同步时钟信号为频率为300MHz的母时钟信号进行时钟同步得到的,第二同步时钟信号的频率为第一同步时钟信号的两倍。当第一同步时钟信号发生一次跳变,等待下一次跳变时,第二同步时钟信号会发生两次跳变,第一同步时钟信号发生的跳变触发写操作,并在第二同步时钟信号发生第一次跳变时触发读操作,但是第二同步时钟信号发生第二次跳变时,第一同步时钟信号没有发生第二次跳变,因此缓存电路3031中没有可读数据,因此第二同步时钟信号发生的第二次跳变不可以触发读操作,有效读指示信号的作用就是使得第二同步时钟信号的部分跳变沿无法触发读操作。如图9所示,其具体实现方式为在不可以触发读操作的第二同步时钟信号部分跳变沿发生时,有效写指示信号呈现低电平,同步处理电路303对缓存电路3031不执行读操作;在可以触发读操作的第二同步时钟信号部分跳变沿发生时,有效读指示信号呈现高电平,同步处理电路303可以对缓存电 路3031执行读操作。应理解,有效读指示信号的呈现高电平或低电平的作用可以互换,本申请不做具体限定。Assuming that the frequency of the first synchronous clock signal is 100MHz and the frequency of the second synchronous clock signal is 200MHz, the first synchronous clock signal and the second synchronous clock signal are obtained by clock synchronization of a master clock signal with a frequency of 300MHz, and the second synchronous clock The frequency of the signal is twice that of the first synchronous clock signal. When the first synchronous clock signal undergoes a transition and waits for the next transition, the second synchronous clock signal will undergo two transitions. The transition of the first synchronous clock signal triggers the write operation, and the second synchronous clock signal The read operation is triggered when the first transition occurs, but when the second synchronous clock signal undergoes a second transition, the first synchronous clock signal does not undergo a second transition, so there is no readable data in the buffer circuit 3031, so the first The second transition of the second synchronous clock signal cannot trigger the read operation, and the function of the valid read indication signal is to prevent the partial transition edge of the second synchronous clock signal from triggering the read operation. As shown in FIG. 9, the specific implementation is that when the partial transition edge of the second synchronous clock signal that cannot trigger the read operation occurs, the valid write indication signal presents a low level, and the synchronization processing circuit 303 does not perform reading on the buffer circuit 3031. Operation; when a partial transition edge of the second synchronous clock signal that can trigger a read operation occurs, the valid read indication signal presents a high level, and the synchronization processing circuit 303 can perform a read operation on the buffer circuit 3031. It should be understood that the functions of the effective read indication signal showing a high level or a low level can be interchanged, and this application does not specifically limit it.
在第一同步时钟信号的频率为200MHz,第二同步时钟信号的频率为100MHz时,情况则相反,在这种情况中,需要一个有效写指示信号,其作用就是使得第一同步时钟信号的部分跳变沿无法触发写操作。在一种具体的实施例中,其具体实现方式为在不可以触发写操作的第一同步时钟信号部分跳变沿发生时,有效写指示信号呈现低电平,以指示缓存电路3031不可以进行数据写入;在可以触发写操作的第一同步时钟信号部分跳变沿发生时,呈现高电平,以指示第一同步时钟信号发生有效跳变,同步处理电路303可以对缓存电路3031执行写操作。When the frequency of the first synchronous clock signal is 200MHz and the frequency of the second synchronous clock signal is 100MHz, the situation is reversed. In this case, a valid write instruction signal is required, and its function is to make part of the first synchronous clock signal The edge cannot trigger a write operation. In a specific embodiment, the specific implementation is that when a partial transition edge of the first synchronous clock signal that cannot trigger a write operation occurs, the valid write indication signal presents a low level to indicate that the cache circuit 3031 cannot perform Data writing; when a transition edge of the first synchronous clock signal that can trigger a write operation occurs, it presents a high level to indicate that the first synchronous clock signal has a valid transition, and the synchronous processing circuit 303 can write to the buffer circuit 3031 operating.
可选的,有效写指示信号和有效读指示信号可以通过第一时钟图谱配置电路3032和第二时钟图谱配置电路3034产生,也可以通过外部电路产生并从外部电路中引入缓存电路3031中使用,其均为可行的实现方式,本申请对此不做具体限定。Optionally, the valid write instruction signal and the valid read instruction signal can be generated by the first clock map configuration circuit 3032 and the second clock map configuration circuit 3034, or can be generated by an external circuit and introduced into the buffer circuit 3031 from an external circuit for use, They are all feasible implementation methods, which are not specifically limited in this application.
可选的,在一种具体的实施例中,缓存电路3031中可以包括同步FIFO,也可以包括一个或多个寄存器,其中,当缓存电路3031需要进行处理的跨时钟域数据的数据复杂程度较低时,可以使用一个寄存器或多个寄存器组成的寄存器阵列就可以实现对该跨时钟域数据的数据写入和数据读出处理,但是当该跨时钟域数据的数据复杂程度高时,需要使用具有合适深度的同步FIFO来对该数据进行写入和读出处理,本申请对此不做具体限定。Optionally, in a specific embodiment, the buffer circuit 3031 may include a synchronous FIFO, or may include one or more registers, wherein, when the buffer circuit 3031 needs to process the cross-clock domain data, the data complexity is relatively high. When it is low, one register or a register array composed of multiple registers can be used to realize the data writing and data reading processing of the cross-clock domain data, but when the data complexity of the cross-clock domain data is high, you need to use A synchronous FIFO with a suitable depth is used to write and read the data, which is not specifically limited in this application.
在本实施例中,同步处理电路对跨时钟域数据的处理是一个同步采样的过程,以图10所示为例子。In this embodiment, the processing of the cross-clock domain data by the synchronous processing circuit is a synchronous sampling process, as shown in FIG. 10 as an example.
第一时钟域输入的数据段D0、D1、D2、NA、D0、D1经过同步处理电路同步采样后,输出到第二时钟域,其中NA为空数据段,该输入的操作和输出的操作同步,所以输出的数据段中也有NA数据段,输入到输出的数据延时确定。The input data segments D0, D1, D2, NA, D0, D1 of the first clock domain are synchronously sampled by the synchronization processing circuit and then output to the second clock domain, where NA is an empty data segment, and the input operation is synchronized with the output operation , So the output data segment also has the NA data segment, and the data delay from input to output is determined.
在传统异步处理方案中,通常采用异步FIFO对跨时钟域数据进行处理,该处理过程为一个异步采样过程,以图11所示为例。In traditional asynchronous processing schemes, asynchronous FIFOs are usually used to process cross-clock domain data. The processing process is an asynchronous sampling process, as shown in Figure 11 as an example.
第一时钟域输入的数据段D0、D1、D2、NA、D3经过异步FIFO异步采样后,输出到第二时钟域,该输入的操作和输出的操作异步,输出操作不会输出输入操作中输入的NA数据段,输入到输出的数据延时不确定。The input data segments D0, D1, D2, NA, D3 of the first clock domain are asynchronously sampled by the asynchronous FIFO and then output to the second clock domain. The input operation and output operation are asynchronous, and the output operation will not output the input in the input operation For the NA data segment, the data delay from input to output is uncertain.
综上所述,本申请实施例提供的数据处理装置应用于两个异频时钟域之间的跨时钟域数据传递场景时,在传统的异步处理方案中,通常采用以异步FIFO为代表的异步处理电路来实现两个异频时钟域之间的跨时钟域数据传递,由于这两个异频时钟域的时钟信号是异步时钟信号,其相位关系是不确定的,只能采用异步处理电路来进行跨时钟域数据交互,所以该方案引入的延时为不确定的。本申请实施例未采用异步处理电路来进行跨时钟域数据传递,而是对两个时钟域的时钟进行时钟同步,从而可以使用同步处理电路来实现两个时钟域之间的跨时钟域数据交互,在前端上实现了电路同步化设计,后端采用母时钟信号频率进行时序收敛,从而使得本申请方案引入的跨时钟域数据传递延时确定,避免了在一些对不定时延敏感的应用场景中不定时延带来的不利影响。To sum up, when the data processing device provided in the embodiments of the present application is applied to a cross-clock domain data transfer scenario between two different frequency clock domains, in the traditional asynchronous processing scheme, the asynchronous FIFO represented by asynchronous The processing circuit is used to realize the cross-clock-domain data transfer between the two different-frequency clock domains. Since the clock signals of the two different-frequency clock domains are asynchronous clock signals, their phase relationship is uncertain, and only asynchronous processing circuits can be used. For data interaction across clock domains, the delay introduced by this solution is uncertain. The embodiment of the application does not use an asynchronous processing circuit to transfer data across clock domains, but synchronizes the clocks of the two clock domains, so that the synchronous processing circuit can be used to implement cross-clock domain data interaction between the two clock domains. , The circuit synchronization design is realized on the front end, and the back end adopts the mother clock signal frequency for timing convergence, so that the cross-clock domain data transmission delay introduced by the solution of this application is determined, avoiding some application scenarios that are sensitive to untimed delay The adverse effects of irregular delays.
在一种具体的实施例中,第一时钟域原本的时钟信号为第一时钟信号,第二时钟域原 本的时钟信号为第二时钟信号,本申请提供的另一种数据处理装置可以直接第一时钟信号或第二时钟信号中频率较高的一个时钟信号作为母时钟信号,拟合出一个与之同步的异频同步时钟信号以替换另一个时钟信号,以实现两个时钟域的时钟信号同步化设计。下面进行详细说明。In a specific embodiment, the original clock signal of the first clock domain is the first clock signal, and the original clock signal of the second clock domain is the second clock signal. Another data processing device provided in this application can directly A clock signal with a higher frequency in the first clock signal or the second clock signal is used as the master clock signal, and an inter-frequency synchronous clock signal synchronized with it is fitted to replace the other clock signal to realize clock signals in two clock domains Synchronized design. The details are described below.
图12为本申请实施例中另一种数据处理装置的一个实施例示意图。FIG. 12 is a schematic diagram of an embodiment of another data processing device in an embodiment of the application.
如图12所示,本申请实施例中数据处理装置40可以包括:时钟频率合成电路401和同步处理电路402;As shown in FIG. 12, the data processing device 40 in the embodiment of the present application may include: a clock frequency synthesis circuit 401 and a synchronization processing circuit 402;
时钟频率合成电路401,用于利用第二时钟信号对第一时钟信号进行时钟同步,以产生第一同步时钟信号,第二时钟信号为第二时钟域的时钟信号,其为按照固定时间间隔发生跳变的时钟信号,第一时钟信号为第一时钟域的时钟信号,第一时钟信号的频率小于第二时钟信号的频率,第一同步时钟信号在发生跳变时的跳变沿与第二时钟信号的跳变沿对齐。The clock frequency synthesis circuit 401 is used for clock synchronization of the first clock signal by using the second clock signal to generate the first synchronous clock signal. The second clock signal is the clock signal of the second clock domain, which is generated at fixed time intervals Jumping clock signal, the first clock signal is the clock signal of the first clock domain, the frequency of the first clock signal is less than the frequency of the second clock signal, the first synchronous clock signal when the jump occurs, the jump edge and the second The transition edges of the clock signal are aligned.
在本实施例中,第二时钟信号为频率大于第一时钟信号的时钟信号,第二时钟信号是第二时钟域的真实时钟信号,第二时钟信号发生跳变的时间间隔是固定的,其相当于上述实施例中所描述的母时钟信号,所以可以利用第二时钟信号对第一时钟信号进行时钟同步,而无需采用其他母时钟信号对第一时钟信号和第二时钟信号均进行时钟同步,降低了设计难度,也节约了电路元件。本实施例的实现原理与图3所示实施例是相似的,第一同步时钟信号和第二时钟信号的关系也可以参考图4中所描述的,此处不再赘述。由于第一同步时钟信号在发生跳变时与第二时钟信号的跳变沿是对齐的,且第二时钟信号为第一同步时钟信号的母时钟信号,所以后端可以按照第二时钟信号的频率收敛该两个时钟信号的时序接口,进而实现不同频率时钟信号的同步化设计,从而可以使用同步处理电路代替传统异步处理方案中的异步处理电路以实现跨时钟域的数据传递;In this embodiment, the second clock signal is a clock signal with a frequency greater than that of the first clock signal, the second clock signal is a real clock signal in the second clock domain, and the time interval during which the second clock signal transitions is fixed. It is equivalent to the master clock signal described in the above embodiment, so the second clock signal can be used to synchronize the first clock signal without using other master clock signals to synchronize the first clock signal and the second clock signal. , It reduces the design difficulty and saves circuit components. The implementation principle of this embodiment is similar to the embodiment shown in FIG. 3, and the relationship between the first synchronous clock signal and the second clock signal can also be referred to that described in FIG. Since the first synchronous clock signal is aligned with the transition edge of the second clock signal when the transition occurs, and the second clock signal is the mother clock signal of the first synchronous clock signal, the back end can follow the second clock signal The frequency converges the timing interface of the two clock signals, and then realizes the synchronization design of different frequency clock signals, so that synchronous processing circuits can be used to replace asynchronous processing circuits in traditional asynchronous processing schemes to realize data transfer across clock domains;
同步处理电路402中包括缓存电路,同步处理电路402用于第一同步时钟信号对缓存电路的数据写入进行控制,并同步地利用第二时钟信号对缓存电路的数据读出进行控制,从而实现将第一时钟域的数据转换为第二时钟域的数据。The synchronization processing circuit 402 includes a buffer circuit. The synchronization processing circuit 402 is used for the first synchronization clock signal to control the data writing of the buffer circuit, and to synchronously use the second clock signal to control the data reading of the buffer circuit, thereby achieving Convert the data of the first clock domain into the data of the second clock domain.
在本实施例中,通过利用第二时钟信号对第一时钟信号进行时钟同步,产生第一同步时钟后,同步处理电路402可利用该第一同步时钟信号和第二同钟信号来控制缓存电路的数据写入和数据读出,从而实现第一时钟域和第二时钟域之间的跨时钟域数据传递。In this embodiment, by using the second clock signal to synchronize the first clock signal, after the first synchronization clock is generated, the synchronization processing circuit 402 can use the first synchronization clock signal and the second synchronization signal to control the buffer circuit Data writing and data reading are realized, so as to realize the cross-clock domain data transfer between the first clock domain and the second clock domain.
通过以上设计方案,可以在前端上实现电路同步化设计,由于第一同步时钟信号与第二时钟信号为同源同步时钟信号,第一同步时钟信号来源于第二时钟信号,所以后端可以采用第二时钟信号频率做时序收敛,使得从第一时钟域传递到第二时钟域的跨时钟域数据传递延时固定,避免传统异步处理方案引入的延时不确定问题。Through the above design scheme, the circuit synchronization design can be realized on the front end. Since the first synchronous clock signal and the second clock signal are homologous synchronous clock signals, the first synchronous clock signal is derived from the second clock signal, so the back end can use The second clock signal frequency is time-sequentially converged, so that the cross-clock domain data transfer delay from the first clock domain to the second clock domain is fixed, avoiding the delay uncertainty problem introduced by the traditional asynchronous processing scheme.
可选的,本实施例中的时钟频率合成电路401具体用于根据第一时钟信号与第二时钟信号的频率比例关系生成控制信号,并根据该控制信号将第二时钟信号拟合成第一同步时钟信号。Optionally, the clock frequency synthesis circuit 401 in this embodiment is specifically configured to generate a control signal according to the frequency proportional relationship between the first clock signal and the second clock signal, and to fit the second clock signal into the first clock signal according to the control signal. Synchronize the clock signal.
时钟频率合成电路401按照功能可以分为两个模块,包括控制信号生成单元4011和门控单元4012,如图13所示。控制信号生成单元4011具体用于上述生成控制信号的过程, 门控单元4012具体用于根据控制信号拟合第一同步时钟信号的过程。The clock frequency synthesis circuit 401 can be divided into two modules according to functions, including a control signal generation unit 4011 and a gate control unit 4012, as shown in FIG. 13. The control signal generating unit 4011 is specifically used for the above process of generating the control signal, and the gating unit 4012 is specifically used for the process of fitting the first synchronous clock signal according to the control signal.
应理解,本实施例中的时钟频率合成电路401的实现方式与上述实施例中第一时钟频率合成电路301和第二时钟频率合成电路302是相同的,具体可以参考上文中对第一时钟频率合成电路301和第二时钟频率合成电路302的相关描述,具体此处不再赘述。It should be understood that the implementation of the clock frequency synthesis circuit 401 in this embodiment is the same as that of the first clock frequency synthesis circuit 301 and the second clock frequency synthesis circuit 302 in the above-mentioned embodiment. The related description of the synthesis circuit 301 and the second clock frequency synthesis circuit 302 will not be repeated here.
可选的,如图14所示,同步处理电路402还可以包括第一时钟图谱配置电路4022和第一计数器4023。Optionally, as shown in FIG. 14, the synchronization processing circuit 402 may further include a first clock map configuration circuit 4022 and a first counter 4023.
第一同步时钟信号触发第一计数器4023生成第一指示信号,该第一指示信号可以指示缓存电路4021在第一同步时钟信号控制下进行数据写入的理论速率,第一时钟图谱配置电路4022用于根据第一指示信号生成有效读指示信号,该有效读指示信号用于控制缓存电路4021在第二时钟信号控制下进行数据读出的实际速率。The first synchronous clock signal triggers the first counter 4023 to generate a first indication signal. The first indication signal can indicate the theoretical rate of data writing by the buffer circuit 4021 under the control of the first synchronous clock signal. The first clock map configuration circuit 4022 uses A valid read instruction signal is generated according to the first instruction signal, and the valid read instruction signal is used to control the actual data read rate of the buffer circuit 4021 under the control of the second clock signal.
可选的,同步处理电路402还可以包括第二时钟图谱配置电路4024和第二计数器4025。Optionally, the synchronization processing circuit 402 may further include a second clock map configuration circuit 4024 and a second counter 4025.
第二时钟信号触发第二计数器4025生成第二指示信号,该第二指示信号可以指示缓存电路4021在第二时钟信号控制下进行数据读出的理论速率,第二时钟图谱配置电路4024用于根据第二指示信号生成有效写指示信号,该有效写指示信号用于控制缓存电路4021在第一同步时钟信号控制下进行数据写入的实际速率。The second clock signal triggers the second counter 4025 to generate a second indicator signal. The second indicator signal can instruct the buffer circuit 4021 to perform a theoretical data reading rate under the control of the second clock signal. The second clock map configuration circuit 4024 is used for The second instruction signal generates a valid write instruction signal, and the valid write instruction signal is used to control the actual rate at which the buffer circuit 4021 performs data writing under the control of the first synchronous clock signal.
同步处理电路402中产生的有效读指示信号和有效写指示信号的作用与前文对同步处理电路303的描述中的是相同的,具体可以参考前文对同步处理电路303的描述中对有效读指示信号和有效写指示信号的具体描述,此处不再赘述。The functions of the effective read instruction signal and the effective write instruction signal generated in the synchronization processing circuit 402 are the same as those described in the previous description of the synchronization processing circuit 303. For details, please refer to the previous description of the synchronization processing circuit 303 for the effective read instruction signal And the specific description of the effective write indication signal, will not be repeated here.
可选的,缓存电路4021与上述缓存电路3031是相同的,如上文所述,在一种具体的实施例中,缓存电路4021可以是同步FIFO,也可以是一个或多个寄存器,其中,其中,当来自第一时钟域的连续数据的数据复杂程度较低时,可以使用一个寄存器或多个寄存器组成的寄存器阵列就可以实现对该连续数据的写入和读出处理,但是当该连续数据的数据复杂程度高时,需要使用具有合适深度的同步FIFO来对该连续数据进行写入和读出处理,本申请对此不做具体限定。Optionally, the buffer circuit 4021 is the same as the aforementioned buffer circuit 3031. As described above, in a specific embodiment, the buffer circuit 4021 may be a synchronous FIFO or one or more registers, where When the data complexity of the continuous data from the first clock domain is low, one register or a register array composed of multiple registers can be used to write and read the continuous data, but when the continuous data When the data complexity is high, it is necessary to use a synchronous FIFO with a suitable depth to write and read the continuous data, which is not specifically limited in this application.
综上所述,本实施例中的数据处理装置40与上述实施例中的数据处理装置30的主要区别在于,数据处理装置40中直接采用频率较高的第二时钟信号作为母时钟信号,所以不需要对第二时钟信号进行时钟同步,而只需要利用第二时钟信号对第一时钟信号进行时钟同步,产生第一同步时钟信号,就可以实现第一时钟域和第二时钟域的时钟信号同步,从而可以通过同步处理电路代替传统异步处理方案中的异步处理电路来实现第一时钟域和第二时钟域之间的跨时钟域数据交互,在前端上实现了电路同步化设计,第一同步时钟信号为来源于第二时钟信号的时钟信号,所以第一同步时钟信号和第二时钟信号为同源同步时钟信号,其相位关系是确定的,后端可以采用第二时钟信号频率进行时序收敛,从而使得本申请方案引入的跨时钟域数据传递延时确定,避免了在一些对不定时延敏感的应用场景中不定时延带来的不利影响。In summary, the main difference between the data processing device 40 in this embodiment and the data processing device 30 in the foregoing embodiment is that the data processing device 40 directly uses the second clock signal with a higher frequency as the mother clock signal, so There is no need to synchronize the second clock signal, but only need to use the second clock signal to synchronize the first clock signal to generate the first synchronized clock signal to realize the clock signals of the first clock domain and the second clock domain Synchronization, so that the asynchronous processing circuit in the traditional asynchronous processing scheme can be replaced by the synchronous processing circuit to realize the cross-clock domain data exchange between the first clock domain and the second clock domain, and realize the circuit synchronization design on the front end. The synchronous clock signal is a clock signal derived from the second clock signal, so the first synchronous clock signal and the second clock signal are homologous synchronous clock signals, and their phase relationship is determined. The back end can use the second clock signal frequency for timing Convergence, so that the cross-clock domain data transfer delay introduced by the solution of the present application is determined, avoiding the adverse effects caused by the irregular delay in some application scenarios that are sensitive to the irregular delay.
应理解,作为一个实施例,当第一时钟信号的频率大于第二时钟信号时,也可以采用第一时钟信号作为母时钟信号,对第二时钟信号进行时钟同步,产生第二同步时钟信号,该第二同步时钟信号与第一时钟信号为同步时钟信号,该方案同样可以实现第一时钟域和 第二时钟域的时钟信号同步化设计,该方案的实现原理与上述实施例是相似的,具体此处不再赘述。It should be understood that, as an embodiment, when the frequency of the first clock signal is greater than that of the second clock signal, the first clock signal may also be used as the mother clock signal to perform clock synchronization on the second clock signal to generate the second synchronous clock signal, The second synchronous clock signal and the first clock signal are synchronous clock signals. This solution can also realize the clock signal synchronization design of the first clock domain and the second clock domain. The realization principle of this solution is similar to the foregoing embodiment. The details are not repeated here.
以上对本申请实施例所提供的两种数据处理装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The two data processing devices provided in the embodiments of the application are described in detail above. Specific examples are used in this article to illustrate the principles and implementations of the application. The descriptions of the above embodiments are only used to help understand the methods of the application. And its core ideas; at the same time, for those of ordinary skill in the art, according to the ideas of this application, there will be changes in the specific implementation and the scope of application. In summary, the content of this specification should not be construed as a reference to this application limits.

Claims (13)

  1. 一种数据处理装置,其特征在于,包括:第一时钟频率合成电路,用于利用母时钟信号对第一时钟信号进行时钟同步,以产生第一同步时钟信号,所述第一时钟信号的频率小于所述母时钟信号的频率,所述第一同步时钟信号在发生跳变时的跳变沿与所述母时钟信号的跳变沿对齐;A data processing device, characterized by comprising: a first clock frequency synthesis circuit, used for clock synchronization of the first clock signal using a mother clock signal to generate a first synchronous clock signal, the frequency of the first clock signal Less than the frequency of the mother clock signal, the transition edge of the first synchronous clock signal when a transition occurs is aligned with the transition edge of the mother clock signal;
    第二时钟频率合成电路,用于利用所述母时钟信号对第二时钟信号进行时钟同步,以产生第二同步时钟信号,所述第二时钟信号的频率与所述第一时钟信号的频率不同,且小于所述母时钟信号的频率,所述第二同步时钟信号在发生跳变时的跳变沿与所述母时钟信号的跳变沿对齐;The second clock frequency synthesis circuit is used for clock synchronization of a second clock signal by using the mother clock signal to generate a second synchronous clock signal, the frequency of the second clock signal is different from the frequency of the first clock signal , And less than the frequency of the mother clock signal, the transition edge of the second synchronous clock signal when a transition occurs is aligned with the transition edge of the mother clock signal;
    同步处理电路,包括缓存电路,所述同步处理电路用于利用所述第一同步时钟信号对所述缓存电路的数据写入进行控制,并同步地利用所述第二同步时钟信号对所述缓存电路的数据读出进行控制。The synchronization processing circuit includes a buffer circuit, the synchronization processing circuit is configured to use the first synchronization clock signal to control the data writing of the buffer circuit, and to synchronize the use of the second synchronization clock signal to the buffer The data readout of the circuit is controlled.
  2. 根据权利要求1所述的数据处理装置,其特征在于,所述第一时钟频率合成电路具体用于根据所述第一时钟信号与所述母时钟信号的频率比例关系生成第一控制信号,并根据所述第一控制信号将所述母时钟信号拟合成所述第一同步时钟信号。The data processing device according to claim 1, wherein the first clock frequency synthesis circuit is specifically configured to generate a first control signal according to a frequency proportional relationship between the first clock signal and the mother clock signal, and Fit the mother clock signal to the first synchronous clock signal according to the first control signal.
  3. 根据权利要求1所述的数据处理装置,其特征在于,所述第二时钟频率合成电路具体用于根据所述第二时钟信号与所述母时钟信号的频率比例关系生成第二控制信号,并根据所述第二控制信号将所述母时钟信号拟合成所述第二同步时钟信号。The data processing device according to claim 1, wherein the second clock frequency synthesis circuit is specifically configured to generate a second control signal according to a frequency proportional relationship between the second clock signal and the mother clock signal, and Fitting the mother clock signal to the second synchronous clock signal according to the second control signal.
  4. 根据权利要求1-3任一所述的数据处理装置,其特征在于,所述同步处理电路还包括第一时钟图谱配置电路和第一计数器,所述第一同步时钟信号触发所述第一计数器生成第一指示信号,所述第一时钟图谱配置电路用于根据所述第一指示信号生成有效读指示信号。The data processing device according to any one of claims 1 to 3, wherein the synchronization processing circuit further comprises a first clock map configuration circuit and a first counter, and the first synchronization clock signal triggers the first counter A first indication signal is generated, and the first clock map configuration circuit is configured to generate a valid read indication signal according to the first indication signal.
  5. 根据权利要求4所述的数据处理装置,其特征在于,所述同步处理电路还包括第二时钟图谱配置电路和第二计数器,所述第二同步时钟信号触发所述第二计数器生成第二指示信号,所述第二时钟图谱配置电路用于根据所述第二指示信号生成有效写指示信号。The data processing device according to claim 4, wherein the synchronization processing circuit further comprises a second clock map configuration circuit and a second counter, and the second synchronization clock signal triggers the second counter to generate a second instruction Signal, the second clock map configuration circuit is used to generate a valid write instruction signal according to the second instruction signal.
  6. 根据权利要求5所述的数据处理装置,其特征在于,所述同步处理电路具体用于在所述有效写指示信号为高电平时利用所述第一同步时钟信号控制所述缓存电路进行所述数据写入,并在所述有效读指示信号为高电平时,同步地利用所述第二同步时钟信号控制所述缓存电路进行所述数据读出。The data processing device according to claim 5, wherein the synchronization processing circuit is specifically configured to use the first synchronization clock signal to control the buffer circuit to perform the buffer circuit when the valid write instruction signal is at a high level. Data is written, and when the valid read instruction signal is at a high level, the second synchronous clock signal is used to synchronously control the buffer circuit to read the data.
  7. 根据权利要求1-6任一所述的数据处理装置,其特征在于,所述缓存电路包括同步先进先出存储器FIFO或寄存器。The data processing device according to any one of claims 1-6, wherein the buffer circuit comprises a synchronous first-in-first-out memory FIFO or register.
  8. 一种数据处理装置,其特征在于,包括:时钟频率合成电路,用于利用第二时钟信号对第一时钟信号进行时钟同步,以产生第一同步时钟信号,所述第一时钟信号的频率小于所述第二时钟信号的频率,所述第一同步时钟信号在发生跳变时的跳变沿与所述第二时钟信号的跳变沿对齐;A data processing device, characterized by comprising: a clock frequency synthesizing circuit for clock synchronization of a first clock signal using a second clock signal to generate a first synchronous clock signal, the frequency of the first clock signal is less than The frequency of the second clock signal, the transition edge of the first synchronous clock signal when a transition occurs is aligned with the transition edge of the second clock signal;
    同步处理电路,包括缓存电路,所述同步处理电路用于所述第一同步时钟信号对所述缓存电路的数据写入进行控制,并同步地利用所述第二时钟信号对所述缓存电路的数据读 出进行控制。The synchronization processing circuit includes a buffer circuit, the synchronization processing circuit is used for the first synchronization clock signal to control the data writing of the buffer circuit, and to synchronously use the second clock signal to control the buffer circuit Data readout is controlled.
  9. 根据权利要求8所述的数据处理装置,其特征在于,时钟频率合成电路具体用于根据所述第一时钟信号与所述第二时钟信号的频率比例关系生成控制信号,并根据所述控制信号将所述第二时钟信号拟合成所述第一同步时钟信号。8. The data processing device according to claim 8, wherein the clock frequency synthesis circuit is specifically configured to generate a control signal according to the frequency proportional relationship between the first clock signal and the second clock signal, and according to the control signal Fitting the second clock signal to the first synchronous clock signal.
  10. 根据权利要求8或9所述的数据处理装置,其特征在于,所述同步处理电路还包括第一时钟图谱配置电路和第一计数器,所述第一同步时钟信号触发所述第一计数器生成第一指示信号,所述第一时钟图谱配置电路用于根据所述第一指示信号生成有效读指示信号。The data processing device according to claim 8 or 9, wherein the synchronization processing circuit further comprises a first clock map configuration circuit and a first counter, and the first synchronization clock signal triggers the first counter to generate a An indication signal, and the first clock map configuration circuit is used to generate a valid read indication signal according to the first indication signal.
  11. 根据权利要求10所述的数据处理装置,其特征在于,所述同步处理电路还包括第二时钟图谱配置电路和第二计数器,所述第二时钟信号触发所述第二计数器生成第二指示信号,所述第二时钟图谱配置电路用于根据所述第二指示信号生成有效写指示信号。The data processing device according to claim 10, wherein the synchronization processing circuit further comprises a second clock map configuration circuit and a second counter, and the second clock signal triggers the second counter to generate a second indication signal The second clock map configuration circuit is used to generate a valid write instruction signal according to the second instruction signal.
  12. 根据权利要求11所述的数据处理装置,其特征在于,所述同步处理电路具体用于在所述有效写指示信号为高电平时利用所述第一同步时钟信号控制所述缓存电路进行所述数据写入,并在所述有效读指示信号为高电平时,同步地利用所述第二时钟信号控制所述缓存电路进行所述数据读出。The data processing device according to claim 11, wherein the synchronization processing circuit is specifically configured to use the first synchronization clock signal to control the buffer circuit to perform the processing when the valid write instruction signal is at a high level. Data is written, and when the valid read instruction signal is at a high level, the second clock signal is synchronously used to control the buffer circuit to perform the data read.
  13. 根据权利要求8-12任一所述的数据处理装置,其特征在于,所述缓存电路包括同步FIFO或寄存器。The data processing device according to any one of claims 8-12, wherein the buffer circuit comprises a synchronous FIFO or a register.
PCT/CN2019/076562 2019-02-28 2019-02-28 Data processing apparatus WO2020172871A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/076562 WO2020172871A1 (en) 2019-02-28 2019-02-28 Data processing apparatus
CN201980093220.4A CN113491082B (en) 2019-02-28 2019-02-28 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/076562 WO2020172871A1 (en) 2019-02-28 2019-02-28 Data processing apparatus

Publications (1)

Publication Number Publication Date
WO2020172871A1 true WO2020172871A1 (en) 2020-09-03

Family

ID=72238230

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/076562 WO2020172871A1 (en) 2019-02-28 2019-02-28 Data processing apparatus

Country Status (2)

Country Link
CN (1) CN113491082B (en)
WO (1) WO2020172871A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698363A (en) * 2020-12-29 2021-04-23 成都国星通信有限公司 High-precision data acquisition method and acquisition circuit for Beidou anti-interference antenna
US11532338B1 (en) 2021-04-06 2022-12-20 Habana Labs Ltd. Mediating between asynchronous clock domains while preventing false indications of FIFO occupancy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658546A (en) * 2004-02-18 2005-08-24 华为技术有限公司 Method for implemention of master-spare clock phase alignment in communication equipment
WO2007143935A1 (en) * 2006-06-12 2007-12-21 Huawei Technologies Co., Ltd. A network clock synchronization apparatus, system and method
CN101478308A (en) * 2009-01-13 2009-07-08 北京时代民芯科技有限公司 Configurable frequency synthesizer circuit based on time-delay lock loop
CN102843164A (en) * 2012-08-27 2012-12-26 中国科学院国家授时中心 Transmission time sequence control method of ultra-wide band indoor positioning system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1276028A1 (en) * 2001-07-09 2003-01-15 Telefonaktiebolaget L M Ericsson (Publ) Status indication detection device and method
US7352836B1 (en) * 2001-08-22 2008-04-01 Nortel Networks Limited System and method of cross-clock domain rate matching
US7248661B1 (en) * 2003-08-26 2007-07-24 Analog Devices, Inc. Data transfer between phase independent clock domains

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658546A (en) * 2004-02-18 2005-08-24 华为技术有限公司 Method for implemention of master-spare clock phase alignment in communication equipment
WO2007143935A1 (en) * 2006-06-12 2007-12-21 Huawei Technologies Co., Ltd. A network clock synchronization apparatus, system and method
CN101478308A (en) * 2009-01-13 2009-07-08 北京时代民芯科技有限公司 Configurable frequency synthesizer circuit based on time-delay lock loop
CN102843164A (en) * 2012-08-27 2012-12-26 中国科学院国家授时中心 Transmission time sequence control method of ultra-wide band indoor positioning system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698363A (en) * 2020-12-29 2021-04-23 成都国星通信有限公司 High-precision data acquisition method and acquisition circuit for Beidou anti-interference antenna
CN112698363B (en) * 2020-12-29 2024-04-16 成都国星通信有限公司 High-precision data acquisition method and acquisition circuit for Beidou anti-interference antenna
US11532338B1 (en) 2021-04-06 2022-12-20 Habana Labs Ltd. Mediating between asynchronous clock domains while preventing false indications of FIFO occupancy

Also Published As

Publication number Publication date
CN113491082B (en) 2022-11-18
CN113491082A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
US7925803B2 (en) Method and systems for mesochronous communications in multiple clock domains and corresponding computer program product
TWI410791B (en) Apparatus and method for transmitting and receiving data bits
US4935942A (en) Data sampling architecture
EP0798630A1 (en) A synchronizer, method and system for transferring data
US7583106B2 (en) Clock circuitry
US4405898A (en) Pseudo synchronous clocking
US11061432B2 (en) Data handoff between two clock domains sharing a fundamental beat
US7352836B1 (en) System and method of cross-clock domain rate matching
CN109032498B (en) Waveform quantization synchronization method of multi-FPGA multi-channel acquisition system
CN104484011A (en) Distributive control and double-clock asynchronous sending and receiving module and FIFO (First In First Out) device
WO2020172871A1 (en) Data processing apparatus
CN109800192B (en) Electronic equipment, FPGA chip and interface circuit thereof
US20040243869A1 (en) Synchronous data transfer across clock domains
US6172540B1 (en) Apparatus for fast logic transfer of data across asynchronous clock domains
JP2006522378A (en) Pipeline synchronization device
US20030141908A1 (en) Clock ratio dsta synchronizer
WO2023142444A1 (en) Divide-by-two latch buffer circuit for deterministic fieldbus network data forwarding, and application thereof
US7280628B1 (en) Data capture for a source synchronous interface
US20210111861A1 (en) Deskewing method for a physical layer interface on a multi-chip module
US20020178392A1 (en) Method and apparatus for generating a second signal having a clock based on a second clock from a first signal having a first clock
JPH0865173A (en) Parallel to serial conversion circuit
JP2022505662A (en) Asynchronous ASIC
US10742216B1 (en) Clock domain crossing for an interface between logic circuits
Ning et al. Design of a GALS Wrapper for Network on Chip
KR100429867B1 (en) Output buffer for double data rate semiconductor device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19917205

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19917205

Country of ref document: EP

Kind code of ref document: A1