CN115086504A - Clock synchronization system and method for operating clock synchronization system - Google Patents
Clock synchronization system and method for operating clock synchronization system Download PDFInfo
- Publication number
- CN115086504A CN115086504A CN202110274896.2A CN202110274896A CN115086504A CN 115086504 A CN115086504 A CN 115086504A CN 202110274896 A CN202110274896 A CN 202110274896A CN 115086504 A CN115086504 A CN 115086504A
- Authority
- CN
- China
- Prior art keywords
- clock
- count
- circuit
- slave circuit
- signal
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/04—Synchronising
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种时钟同步系统,特别是一种能够使内部电路的操作时间同步的时钟同步系统。The present invention relates to a clock synchronization system, in particular to a clock synchronization system capable of synchronizing the operation time of internal circuits.
背景技术Background technique
在播放多媒体资料时,为了让影像中的动作与声音能够同步,音频文件和影像文件的播放通常会参考相同的时钟信号。在现有技术中,通常会利用系统级芯片(System onChip,SoC)来处理多媒体资料中的音频文件及影像文件,因此可以共用相同的时钟发生器,并接收同步的时钟发生器。When playing multimedia materials, in order to synchronize the action in the video with the sound, the playback of the audio file and the video file usually refers to the same clock signal. In the prior art, a system-on-chip (SoC) is usually used to process audio files and video files in multimedia data, so the same clock generator can be shared and synchronized clock generators can be received.
然而,随着使用者对于影像及声音的品质要求越来越高,在处理多媒体资料时,也常会使用不同的电路来分别对音频文件及影像文件做较为细致的处理。由于不同的电路会根据不同的时钟信号来操作,因此如何使两者的播放时间能够同步以确保影像与声音能够相匹配,就成为了有待解决的问题。However, as users have higher and higher requirements for the quality of video and audio, when processing multimedia data, different circuits are often used to separately process audio files and video files in a more detailed manner. Since different circuits operate according to different clock signals, how to synchronize the playback time of the two to ensure that the image and sound can be matched has become a problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明的一实施例提供一种时钟同步系统,时钟同步系统包括主控电路及从属电路。An embodiment of the present invention provides a clock synchronization system. The clock synchronization system includes a master control circuit and a slave circuit.
主控电路包括第一时钟发生器、第一输入输出接口、第一通信接口及第一处理器。第一时钟发生器产生第一时钟信号。在对时操作期间,第一处理器通过第一输入输出接口输出触发信号,同时记录第一时钟发生器的第一时钟计数,及将第一时钟计数自第一通信接口输出。The main control circuit includes a first clock generator, a first input and output interface, a first communication interface and a first processor. A first clock generator generates a first clock signal. During the time synchronization operation, the first processor outputs a trigger signal through the first input and output interface, simultaneously records the first clock count of the first clock generator, and outputs the first clock count from the first communication interface.
从属电路包括第二时钟发生器、第二输入输出接口、第二通信接口及第二处理器。第二时钟发生器产生第二时钟信号。第二输入输出接口耦接于第一输入输出接口,而第二通信接口耦接于第一通信接口。当自第二输入输出接口接收到触发信号时,第二处理器记录第二时钟发生器的第二时钟计数,及根据第一时钟计数及第二时钟计数计算第一时钟信号及第二时钟信号之间的时间差。The slave circuit includes a second clock generator, a second input-output interface, a second communication interface, and a second processor. The second clock generator generates a second clock signal. The second input-output interface is coupled to the first input-output interface, and the second communication interface is coupled to the first communication interface. When receiving the trigger signal from the second I/O interface, the second processor records the second clock count of the second clock generator, and calculates the first clock signal and the second clock signal according to the first clock count and the second clock count time difference between.
本发明的另一实施例提供一种时钟同步系统的操作方法,时钟同步系统包括主控电路及从属电路,主控电路包括第一时钟发生器,从属电路包括第二时钟发生器Another embodiment of the present invention provides a method for operating a clock synchronization system, the clock synchronization system includes a master control circuit and a slave circuit, the master control circuit includes a first clock generator, and the slave circuit includes a second clock generator
时钟同步系统的操作方法包括第一时钟发生器产生第一时钟信号,第二时钟发生器产生第二时钟信号,主控电路输出触发信号至从属电路,在发出触发信号时,主控电路同时记录第一时钟发生器的第一时钟计数,主控电路将第一时钟计数输出至从属电路,当从属电路接收到触发信号时,从属电路记录第二时钟发生器的第二时钟计数,及从属电路根据第一时钟计数及第二时钟计数计算第一时钟信号及第二时钟信号之间的时间差。The operation method of the clock synchronization system includes that a first clock generator generates a first clock signal, a second clock generator generates a second clock signal, the master control circuit outputs a trigger signal to the slave circuit, and when the trigger signal is sent, the master control circuit simultaneously records The first clock count of the first clock generator, the master control circuit outputs the first clock count to the slave circuit, when the slave circuit receives the trigger signal, the slave circuit records the second clock count of the second clock generator, and the slave circuit The time difference between the first clock signal and the second clock signal is calculated according to the first clock count and the second clock count.
附图说明Description of drawings
图1是本发明一实施例的时钟同步系统的示意图;1 is a schematic diagram of a clock synchronization system according to an embodiment of the present invention;
图2是本发明另一实施例的时钟同步系统的示意图;2 is a schematic diagram of a clock synchronization system according to another embodiment of the present invention;
图3是本发明一实施例的时钟同步系统的操作方法流程图。FIG. 3 is a flowchart of an operation method of a clock synchronization system according to an embodiment of the present invention.
具体实施方式Detailed ways
图1是本发明一实施例的时钟同步系统100的示意图。时钟同步系统100包括主控电路110及从属电路120。在有些实施例中,主控电路110可以例如是电视内部的主控芯片,而从属电路120可以是用以处理特殊影像的辅助芯片(companion chip)。举例来说,主控电路110可以处理影像文件及音频文件。然而,主控电路110只能够处理解析度为4K的影像画面,因此若使用者希望能够有更高的画质,例如希望呈现解析度为8K的影像画面时,就需要利用从属电路120来处理。然而,在此情况下,音频文件仍然会由主控电路110处理,因此两者的内部时间必须能够同步,才能够确保对应的影像及音讯内容能够同步输出。FIG. 1 is a schematic diagram of a
主控电路110可包括时钟发生器112、输入输出接口114、通信接口116及处理器118。时钟发生器112可产生时钟信号CLK1,而处理器118则可根据时钟信号CLK1来进行操作。从属电路120可包括时钟发生器122、输入输出接口124、通信接口126及处理器128。时钟发生器122可产生时钟信号CLK2,而处理器128则可根据时钟信号CLK2来进行操作。输入输出接口124可耦接于输入输出接口114,而通信接口126可耦接于通信接口116。在有些实施例中,输入输出接口可以例如但不限于是通用型输入输出(General Purpose Input/Output,GPIO),而通信接口116及126可以例如但不限于是通用串行总线接口(UniversalSerial Bus,USB)、集成电路总线(Inter-Integrated Circuit,I2C)接口或通用同步异步收发器(Universal Synchronous Asynchronous Receiver Transmitter,USART)接口。The
在有些实施例中,主控电路110及从属电路120可以执行对时操作来计算两者所使用的时钟信号CLK1及CLK2之间的时间差,而从属电路120则可以根据时间差回推主控电路110的时间,使得两者所处理的多媒体档案可以在相同的时间点播放,达到影像与声音同步的效果。In some embodiments, the
在有些实施例中,时钟发生器112可以在时钟信号CLK1的每个正边缘或每个负边缘将时钟计数递增,例如但不限于加1,来更新时钟计数(clock count)。也就是说,时钟计数CC1可以用来表示时钟信号CLK1的周期数,因此处理器118可以根据时钟计数CC1来判定内部时间。相似地,处理器128也根据时钟信号CLK2的时钟计数CC2来判断内部时间。然而,由于时钟信号CLK1及CLK2并未同步,因此处理器118的内部时间与处理器128的内部时间会有时间差。In some embodiments, the
在对时操作期间,处理器118可以通过输入输出接口114输出触发信号SIGTRG,同时记录时钟发生器112的时钟计数CC1,并且可以通过通信接口116将时钟计数CC1输出。处理器128则可以在自输入输出接口124接收到触发信号SIGTRG时,记录时钟发生器122的时钟计数CC2。在有些实施例中,处理器118可以通过下拉输入输出接口114电压的方式传送触发信号SIGTRG,因此当从属电路120感测到输入输出接口124的电压变化时,就可以立即记录当时的时钟计数CC2。也就是说,时钟计数CC1及时钟计数CC2会对应到相同或是非常接近的真实时间。During the timing operation, the
从属电路120可以根据时钟计数CC1及时钟计数CC2计算时钟信号CLK1及时钟信号CLK2之间的时间差。举例来说,当时钟计数CC1为100时,时钟计数CC2是250,此时处理器128可以将时钟计数CC2减去时钟计数CC1以计算出两者的时间差为150。如此一来,若处理器118将预计在第一播放时间播放的多媒体资料交由处理器128处理时,处理器128便可将第一播放时间加上时间差150以计算出处理器128在从属电路120中应播放该多媒体资料的第二播放时间。The
由于时钟同步系统100中的从属电路120可以根据相同真实时间下时钟计数CC1及CC2计算出两者的时间差,因此在接收到主控电路110所传来的多媒体资料时,就能够推算出该多媒体资料对应于从属电路120的第二播放时间,因此可以确保主控电路110及从属电路120能够在相同的时间播放对应的多媒体资料,达到影像及声音同步的效果。Since the
在图1中,处理器128可在接收到触发信号SIGTRG时进入中断(Interrupt)模式,并在中断模式下自时钟发生器122读取时钟计数CC2。然而,在有些实施例中,若处理器128进入中断模式所需要的时间较长,就可能导致时钟计数CC1及CC2对应到不同的真实时间,使得主控电路110与从属电路120的同步效果不佳。在此情况下,从属电路120可以利用其他的硬件电路来感测触发信号SIGTRG,以在接收到触发信号SIGTRG时能够更加即时的反应。In FIG. 1 , the processor 128 may enter an Interrupt mode upon receiving the trigger signal SIG TRG , and read the clock count CC2 from the
图2是本发明另一实施例的时钟同步系统200的示意图。时钟同步系统100及时钟同步系统200具有相似的结构,并且可根据相似的原理操作,然而在从属电路220还可包括触发处理电路229。触发处理电路229可以感测触发信号SIGTRG的信号边缘,例如正边缘或负边缘,而当触发处理电路229感测到触发信号SIGTRG的信号边缘时,触发处理电路229就可以立即选取时钟发生器122的时钟计数CC2,而处理器228则可自触发处理电路229读取时钟计数CC2。由于从属电路220可以利用触发处理电路229立即地对触发信号SIGTRG作出应对,因此可确保时钟计数CC1及CC2能够对应到非常接近的真实时间。FIG. 2 is a schematic diagram of a
图3是本发明一实施例的时钟同步系统100的操作方法300的流程图。方法300可包括步骤S310至S390。FIG. 3 is a flowchart of an
S310:时钟发生器112产生时钟信号CLK1;S310: the
S320:时钟发生器122产生时钟信号CLK2;S320: the
S330:主控电路110输出触发信号SIGTRG至从属电路120;S330: the
S332:在发出触发信号SIGTRG时,主控电路110同时记录时钟发生器112的时钟计数CC1;S332: when the trigger signal SIG TRG is sent, the
S340:主控电路110将时钟计数CC1输出至从属电路120;S340: the
S350:当从属电路120接收到触发信号SIGTRG时,从属电路120记录时钟发生器122的时钟计数CC2;S350: when the
S360:从属电路120根据时钟计数CC1及时钟计数CC2计算时钟信号CLK1及时钟信号CLK2之间的时间差Δt;S360: The
S370:主控电路110产生对应于第一播放时间的多媒体资料;S370: The
S380:主控电路110将多媒体资料传送至从属电路120;S380: the
S390:当从属电路120接收到多媒体资料时,从属电路120根据时间差及第一播放时间换算出多媒体资料对应于时钟发生器122的第二播放时间。S390: When the
通过方法300,时钟同步系统100中的从属电路120可以根据相同真实时间下时钟计数CC1及CC2计算出两者的时间差,因此在接收到主控电路110所传来的多媒体资料时,就能够推算出该多媒体资料对应于从属电路120的播放时间,因此可以确保主控电路110及从属电路120能够在相同的时间播放对应的多媒体资料,达到影像及声音同步的效果。此外,在有些实施例中,时钟同步系统200也可以通过方法300来操作。Through the
综上所述,本发明的实施例所提供的时钟同步系统及操作时钟同步系统的方法可以记录在相同或十分接近的真实时间点上,主控电路的时钟计数及从属电路的时钟计数,并计算出两者的时间差,以进行同步的操作。因此可以在主控电路及从属电路分别使用不同时钟发生器的情况下,同步地输出对应的多媒体资料,达到影像及声音能够同步的效果。To sum up, the clock synchronization system and the method for operating the clock synchronization system provided by the embodiments of the present invention can record the clock count of the master control circuit and the clock count of the slave circuit at the same or very close real time point, and Calculate the time difference between the two for synchronous operation. Therefore, when the master control circuit and the slave circuit use different clock generators respectively, the corresponding multimedia data can be output synchronously, so as to achieve the effect that the image and the sound can be synchronized.
以上所述仅为本发明的优选实施例,凡依本发明权利要求书所做的均等变化与修饰,均应属于本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.
附图标记说明:Description of reference numbers:
100、200:时钟同步系统100, 200: Clock synchronization system
110:主控电路110: main control circuit
120、220:从属电路120, 220: Slave circuit
112、122:时钟发生器112, 122: Clock generator
114、124:输入输出接口114, 124: Input and output interface
116、126:通信接口116, 126: Communication interface
118、128、228:处理器118, 128, 228: processors
229:触发处理电路229: Trigger processing circuit
CLK1、CLK2:时钟信号CLK1, CLK2: clock signal
SIGTRG:触发信号SIG TRG : trigger signal
CC1、CC2:时钟计数CC1, CC2: Clock count
300:方法300: Method
S310至S390:步骤S310 to S390: Steps
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110274896.2A CN115086504A (en) | 2021-03-15 | 2021-03-15 | Clock synchronization system and method for operating clock synchronization system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110274896.2A CN115086504A (en) | 2021-03-15 | 2021-03-15 | Clock synchronization system and method for operating clock synchronization system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115086504A true CN115086504A (en) | 2022-09-20 |
Family
ID=83240652
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110274896.2A Pending CN115086504A (en) | 2021-03-15 | 2021-03-15 | Clock synchronization system and method for operating clock synchronization system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115086504A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109977056A (en) * | 2017-12-26 | 2019-07-05 | 三星电子株式会社 | Digital processing system, master chip and digital processing method |
CN111147907A (en) * | 2019-12-26 | 2020-05-12 | 深圳市优必选科技股份有限公司 | Method, device and system for synchronously playing multiple intelligent terminals and intelligent terminal |
CN112162591A (en) * | 2020-10-30 | 2021-01-01 | 上海兆芯集成电路有限公司 | Electronic device with multiple processors and synchronization method thereof |
TWI720791B (en) * | 2020-01-20 | 2021-03-01 | 大陸商南京深視光點科技有限公司 | Global clock synchronization transmission method |
-
2021
- 2021-03-15 CN CN202110274896.2A patent/CN115086504A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109977056A (en) * | 2017-12-26 | 2019-07-05 | 三星电子株式会社 | Digital processing system, master chip and digital processing method |
CN111147907A (en) * | 2019-12-26 | 2020-05-12 | 深圳市优必选科技股份有限公司 | Method, device and system for synchronously playing multiple intelligent terminals and intelligent terminal |
TWI720791B (en) * | 2020-01-20 | 2021-03-01 | 大陸商南京深視光點科技有限公司 | Global clock synchronization transmission method |
CN112162591A (en) * | 2020-10-30 | 2021-01-01 | 上海兆芯集成电路有限公司 | Electronic device with multiple processors and synchronization method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3267437B1 (en) | Interactive peripheral device for television karaoke. | |
TW200923902A (en) | Firmware updating method and system | |
TW201631466A (en) | Image signal processor and devices including the same | |
TWI465919B (en) | Electronic device using Thunder interface, connection method thereof and base device | |
KR20180010234A (en) | Method for inserting information push into live video streaming, server and terminal | |
TW202223620A (en) | Multi-screen display control device | |
JP2013542649A (en) | Virtual video capture device | |
CN110749763A (en) | Triggering method based on I2S signal and oscilloscope | |
CN113470613A (en) | Chorus sound mixing method and device, electronic equipment and storage medium | |
CN205961300U (en) | Intelligent interactive flat plate | |
CN109429029B (en) | Video interface conversion device and operation method thereof | |
TWI748892B (en) | Clock synchronization system and method for operating a clock synchronization system | |
CN115086504A (en) | Clock synchronization system and method for operating clock synchronization system | |
CN115190260A (en) | Video transmission system | |
CN117156074B (en) | Video processing device and system with multiple circuit boards | |
US20110285878A1 (en) | Method for generating multimedia data to be displayed on display apparatus and associated multimedia player | |
CN110418079B (en) | Image signal conversion device | |
CN104331120A (en) | Integrated computer, computer system and method for automatic detection of output and input signals | |
CN107210025B (en) | Display system, display device, electronic apparatus, and image signal transmission method | |
CN113132044B (en) | Audio synchronous processing circuit and method thereof | |
JP7404133B2 (en) | Measurement system and its control method | |
JP2009130820A (en) | Information processing apparatus | |
TW202139043A (en) | Method, device, storage medium, and terminal device for generating video cover wherein the timeliness and accuracy of the video cover can be considered in the process of extracting the video cover | |
CN111901533A (en) | Acquisition method and system for time-sharing multiplexing of image data channel | |
US20250080689A1 (en) | Image data processing method and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |