[go: up one dir, main page]

TWI765642B - Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits - Google Patents

Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits Download PDF

Info

Publication number
TWI765642B
TWI765642B TW110112425A TW110112425A TWI765642B TW I765642 B TWI765642 B TW I765642B TW 110112425 A TW110112425 A TW 110112425A TW 110112425 A TW110112425 A TW 110112425A TW I765642 B TWI765642 B TW I765642B
Authority
TW
Taiwan
Prior art keywords
chip
computer
spi
spi communication
slave
Prior art date
Application number
TW110112425A
Other languages
Chinese (zh)
Other versions
TW202240408A (en
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 TW110112425A priority Critical patent/TWI765642B/en
Application granted granted Critical
Publication of TWI765642B publication Critical patent/TWI765642B/en
Publication of TW202240408A publication Critical patent/TW202240408A/en

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Semiconductor Integrated Circuits (AREA)

Abstract

本發明主要揭示一種級聯晶片電路之跨晶片SPI通信方法,用於使一上位機晶片與一下位機主晶片進行一第一SPI通信,或與級聯該下位機主晶片的一下位機從晶片進行一第二SPI通信,稱之為跨晶片SPI通信。依據本發明之方法,在該上位機晶片透過一第一SPI通信線路傳送一跨晶片通信啟用命令至該下位機主晶片後,該下位機主晶片將該第一SPI通信線路耦接至一第二SPI通信線路,使該上位機晶片能夠藉由SPI通信對該下位機從晶片進行寫入操作或讀取操作。另外,本發明藉由在下位機主晶片內設置鎖存電路以提升所述讀取操作的速度。The invention mainly discloses a cross-chip SPI communication method for cascading chip circuits, which is used for a first SPI communication between a host computer chip and a subordinate computer main chip, or with a subordinate computer slave cascading the subordinate computer main chip. The chip performs a second SPI communication, which is called cross-chip SPI communication. According to the method of the present invention, after the upper computer chip transmits a cross-chip communication enable command to the lower computer main chip through a first SPI communication line, the lower computer main chip couples the first SPI communication line to a first SPI communication line. Two SPI communication lines enable the upper computer chip to perform write operation or read operation on the lower computer slave chip through SPI communication. In addition, the present invention improves the speed of the read operation by arranging the latch circuit in the main chip of the lower computer.

Description

級聯晶片電路之跨晶片SPI通信方法、電路裝置及資訊處理裝置Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits

本發明係關於晶片讀/寫控制之技術領域,尤指一種級聯晶片電路之跨晶片SPI通信方法,用於使一上位機晶片能夠跨越一下位機主晶片而對與該下位機主晶片級聯的一下位機從晶片進行讀/寫操作。 The present invention relates to the technical field of chip read/write control, and more particularly to a cross-chip SPI communication method for cascading chip circuits, which is used to enable a host chip to cross the host chip of a host computer to communicate with the host chip of the host computer at the level of the host chip of the host computer. The connected subordinate computer performs read/write operations from the wafer.

圖1顯示習知的一上位機晶片與一下位機晶片的方塊圖。應知道,上位機晶片1a是指發出控制命令的電路晶片,例如:CPU或應用處理器(Application Processor,AP)。相反地,下位機晶片2a則為依據上位機晶片1a之控制命令而進行一特定工作的電路晶片,例如:顯示驅動晶片、觸控晶片等。如圖1所示,上位機晶片1a具有一第一SPI單元11a,且下位機晶片2a具有一第二SPI單元21a,其係依SPI匯流排協定與該第一SPI單元11a耦接,從而接收傳送自該第一SPI單元11a的一SPI信號。 FIG. 1 shows a block diagram of a conventional upper computer chip and a lower computer chip. It should be known that the host computer chip 1a refers to a circuit chip that issues a control command, such as a CPU or an application processor (Application Processor, AP). On the contrary, the lower computer chip 2a is a circuit chip that performs a specific work according to the control command of the upper computer chip 1a, such as a display driving chip, a touch control chip, and the like. As shown in FIG. 1, the upper computer chip 1a has a first SPI unit 11a, and the lower computer chip 2a has a second SPI unit 21a, which is coupled to the first SPI unit 11a according to the SPI bus protocol, so as to receive An SPI signal transmitted from the first SPI unit 11a.

實務經驗顯示,在一些應用中,單顆下位機晶片2a無法高效能地完成所述特定工作。舉例而言,該下位機晶片2a為一觸控晶片,且單顆觸控晶片難以高效能地完成對於大尺寸觸控面板的觸控檢測工作。在此情況下,包括一下位機主晶片(Master chip)與一下位機從晶片(Slave chip)的一級聯晶片電路被設計出來從而用於完成對於大尺寸觸控面板的觸控檢測工作。 Practical experience shows that, in some applications, a single subordinate computer chip 2a cannot efficiently complete the specific work. For example, the lower computer chip 2a is a touch chip, and it is difficult for a single touch chip to efficiently complete the touch detection for a large-sized touch panel. In this case, a cascaded chip circuit including a master chip and a slave chip of a lower computer is designed to complete the touch detection work for a large-sized touch panel.

圖2顯示習知的一上位機晶片、一下位機主晶片與一下位機從晶片的方塊圖。如圖2所示,一上位機晶片1b以其一第一SPI單元11b耦接一下位機主晶片2b的一第二SPI單元21b,且該下位機主晶片2b以其一第三SPI單元22b耦接一下位機從晶片3b的一第四SPI單元31b。習知技術通常採取如下二步驟使該上位機晶片1b完成對於該下位機從晶片3b的一寫入操作:(1a)該上位機晶片1b依SPI通信協定傳送一第一SPI信號至該下位機主晶片2b,使該下位機主晶片2b將該第一SPI信號所包含的一MOSI信號 之數據儲存在一儲存單元20b內;以及(2a)該下位機主晶片2b讀取儲存在該儲存單元20b之中的數據,接著以其第三SPI單元22b將該數據以一第二SPI信號的形式傳送至該下位機從晶片3b的第四SPI單元31b。 FIG. 2 shows a block diagram of a conventional upper computer chip, a lower computer master chip, and a lower computer slave chip. As shown in FIG. 2 , a first SPI unit 11b of a host computer chip 1b is coupled to a second SPI unit 21b of the host computer chip 2b, and the host computer chip 2b is coupled with a third SPI unit 22b of the host computer chip 2b A fourth SPI unit 31b of the slave chip 3b is coupled to it. The prior art usually adopts the following two steps to make the host computer chip 1b complete a write operation to the slave chip 3b of the slave computer: (1a) the host computer chip 1b transmits a first SPI signal to the slave computer according to the SPI communication protocol The main chip 2b makes the lower computer main chip 2b contain a MOSI signal contained in the first SPI signal The data stored in a storage unit 20b; and (2a) the lower host chip 2b reads the data stored in the storage unit 20b, and then uses the third SPI unit 22b to send the data to a second SPI signal The form is transmitted to the fourth SPI unit 31b of the slave chip 3b of the lower computer.

如前所述,欲寫入數據至該下位機從晶片3b,上位機晶片1b須先將數據寫入該下位機主晶片2b,接著再由該下位機主晶片2b將數據寫入該下位機從晶片3b。因此,可以輕地得知,習知技術用於使該上位機晶片1b完成對於該下位機從晶片3b之寫入操作的SPI通信方法存在耗時長以及操作麻煩此二個主要缺陷。必須知道的是,下位機主晶片2b必須具有相關程序碼,其才能夠透過SPI通信向下位機從晶片3b寫入數據。換句話說,開發人員必須完成專用程序碼之設計,並將設計完成的專用程序碼寫入下位機主晶片2b,以使下位機主晶片2b能夠透過SPI通信將數據寫入下位機從晶片3b。 As mentioned above, in order to write data to the slave chip 3b of the lower computer, the chip 1b of the upper computer must first write the data to the master chip 2b of the lower computer, and then the master chip 2b of the lower computer writes the data to the lower computer from wafer 3b. Therefore, it can be easily learned that the conventional SPI communication method for enabling the upper computer chip 1b to complete the write operation to the lower computer slave chip 3b has two major drawbacks: time-consuming and troublesome operation. It must be known that the master chip 2b of the lower-level computer must have the relevant program code, so that it can write data to the slave chip 3b of the lower-level computer through SPI communication. In other words, the developer must complete the design of the dedicated program code, and write the designed dedicated program code into the lower-level computer master chip 2b, so that the lower-level computer master chip 2b can write data into the lower-level computer slave chip 3b through SPI communication .

更進一步地說明,習知技術通常採取如下四步驟使該上位機晶片1b完成對於該下位機從晶片3b的一讀取操作:(1b)該上位機晶片1b傳送一第一讀取請求給該下位機主晶片2b;(2b)該下位機主晶片2b傳送一第二讀取請求至該下位機從晶片3b;(3b)該下位機主晶片2b依SPI通信協定傳送一第一讀取操作信號(包含CS信號與CLK信號)至該下位機從晶片3b,使該下位機從晶片3b依SPI通信協定上傳一第一MISO信號至該下位機從晶片3b;以及(4b)在該下位機主晶片2b將該MISO信號之數據儲存在其儲存單元20b內之後,該上位機晶片1b依SPI通信協定傳送一第二讀取操作信號至該下位機主晶片2b,使該下位機主晶片2b依SPI通信協定上傳第二MISO信號至該上位機晶片1b。 To further illustrate, the conventional technology usually adopts the following four steps to make the upper computer chip 1b complete a read operation for the lower computer slave chip 3b: (1b) The upper computer chip 1b sends a first read request to the The master chip 2b of the lower computer; (2b) The master chip 2b of the lower computer transmits a second read request to the slave chip 3b of the lower computer; (3b) The master chip 2b of the lower computer transmits a first read operation according to the SPI communication protocol signal (including CS signal and CLK signal) to the slave chip 3b, so that the slave chip 3b uploads a first MISO signal to the slave chip 3b according to the SPI communication protocol; and (4b) on the slave chip 3b After the master chip 2b stores the data of the MISO signal in its storage unit 20b, the host chip 1b transmits a second read operation signal to the slave master chip 2b according to the SPI communication protocol, so that the slave master chip 2b Upload the second MISO signal to the host computer chip 1b according to the SPI communication protocol.

如前所述,欲自該下位機從晶片3b讀出數據,上位機晶片1b須先令該下位機主晶片2b自該下位機從晶片3b讀出數據,接著再繼續地自該下位機主晶片2b讀出數據。因此,習知技術用於使該上位機晶片1b完成對於該 下位機從晶片3b之讀取操作的SPI通信方法同樣存在耗時長以及操作麻煩此二個主要缺陷。 As mentioned above, in order to read data from the slave chip 3b from the lower computer, the upper computer chip 1b must first make the master chip 2b of the lower computer read data from the slave chip 3b from the lower computer, and then continue to read the data from the lower computer master chip 2b. The wafer 2b reads out data. Therefore, the prior art is used to make the host computer chip 1b complete the The SPI communication method of the read operation of the lower computer from the chip 3b also has two main defects, which are time-consuming and troublesome to operate.

由上述說明可知,本領域亟需一種新穎的跨晶片SPI通信方法。 It can be seen from the above description that there is an urgent need in the art for a novel cross-chip SPI communication method.

本發明之主要目的在於提供一種級聯晶片電路之跨晶片SPI通信方法,用於使一上位機晶片與一下位機主晶片進行一第一SPI通信,或與級聯該下位機主晶片的一下位機從晶片進行一第二SPI通信,稱之為跨晶片SPI通信。依據本發明之方法,在該上位機晶片透過一第一SPI通信線路傳送一跨晶片通信啟用命令至該下位機主晶片後,該下位機主晶片將該第一SPI通信線路耦接至一第二SPI通信線路,使該上位機晶片能夠對該下位機從晶片進行跨晶片的SPI寫入操作或跨晶片的SPI讀取操作。另外,本發明亦藉由在下位機主晶片內設置鎖存電路以提升所述跨晶片的SPI讀取操作的速度。 The main purpose of the present invention is to provide a cross-chip SPI communication method for cascading chip circuits, which is used for a first SPI communication between an upper computer chip and a lower computer main chip, or a second SPI communication method for cascading the lower computer main chip. The bit computer performs a second SPI communication from the chip, which is called cross-chip SPI communication. According to the method of the present invention, after the upper computer chip transmits a cross-chip communication enable command to the lower computer main chip through a first SPI communication line, the lower computer main chip couples the first SPI communication line to a first SPI communication line. Two SPI communication lines, so that the upper computer chip can perform a cross-chip SPI write operation or a cross-chip SPI read operation on the slave chip of the lower computer. In addition, the present invention also improves the speed of the cross-chip SPI read operation by arranging a latch circuit in the host chip of the lower computer.

為達成上述目的,本發明提出所述級聯晶片電路之跨晶片SPI通信方法的一實施例,包括以下步驟:一上位機晶片透過一第一SPI通信線路傳送一跨晶片通信啟用命令至一下位機主晶片;該下位機主晶片依據該跨晶片通信啟用命令執行一第一切換操作以將該第一SPI通信線路與一第二SPI通信線路電氣連接,從而使該上位機晶片能夠透過該第一SPI通信線路和該第二SPI通信線路所連接而成之一SPI通信線路直接和一下位機從晶片進行一SPI通信;以及該上位機晶片執行一次或多次跨晶片SPI通信,從而跨過該下位機主晶片而與該下位機從晶片進行所述SPI通信,實現對於該下位機從晶片的一寫入操作或一讀取操作。 In order to achieve the above object, the present invention proposes an embodiment of the cross-chip SPI communication method of the cascaded chip circuit, which includes the following steps: a host computer chip transmits a cross-chip communication enable command to a subordinate computer through a first SPI communication line a host chip; the lower host chip executes a first switching operation according to the inter-chip communication enabling command to electrically connect the first SPI communication line with a second SPI communication line, so that the host chip can pass through the first SPI communication line An SPI communication line connected by an SPI communication line and the second SPI communication line directly performs an SPI communication with the subordinate computer slave chip; and the upper computer chip performs one or more cross-chip SPI communication, thereby crossing the The master chip of the lower computer performs the SPI communication with the slave chip of the lower computer, so as to realize a write operation or a read operation for the slave chip of the lower computer.

在一實施例中,本發明之所述級聯晶片電路之跨晶片SPI通信方法更包括以下步驟:該上位機晶片透過該第一SPI通信線路傳送一跨晶片通信停止命令至該下位機主晶片;以及 該下位機主晶片依據該跨晶片通信停止命令執行一第二切換操作以將該第一SPI通信線路與該第二SPI通信線路斷開。 In one embodiment, the cross-chip SPI communication method of the cascaded chip circuit of the present invention further includes the following step: the host computer chip transmits a cross-chip communication stop command to the lower-level computer main chip through the first SPI communication line ;as well as The slave host chip performs a second switching operation according to the inter-chip communication stop command to disconnect the first SPI communication line from the second SPI communication line.

在一實施例中,該上位機晶片具有一第一SPI單元,且該下位機主晶片具有利用該第一SPI通信線路和該第一SPI單元進行一SPI通信的一第二SPI單元。 In one embodiment, the upper computer chip has a first SPI unit, and the lower computer main chip has a second SPI unit that uses the first SPI communication line and the first SPI unit to perform an SPI communication.

在一實施例中,該下位機主晶片進一步具有一第三SPI單元以及一切換單元,且該下位機從晶片具有利用該第二SPI通信線路和該切換單元進行所述SPI通信的一第四SPI單元。 In one embodiment, the slave chip of the slave computer further has a third SPI unit and a switching unit, and the slave chip of the slave computer has a fourth SPI communication line and the switching unit to perform the SPI communication. SPI unit.

在一實施例中,該切換單元依據一切換信號之控制執行所述第一切換操作或所述第二切換操作。 In one embodiment, the switching unit performs the first switching operation or the second switching operation according to the control of a switching signal.

在一實施例中,該下位機主晶片具有一鎖存電路用以鎖存該下位機從晶片所發送之資料進行一鎖存處理,從而以一水管式的資料傳遞方式滿足該上位機晶片對於該下位機從晶片之所述讀取操作之時序規格。 In an embodiment, the host chip of the lower computer has a latch circuit for latching the data sent by the slave chip of the lower computer to perform a latching process, so as to satisfy the requirements of the upper computer chip for the data transmission by a water pipe. The timing specification of the read operation of the slave chip by the slave.

在一實施例中,該上位機晶片在進行所述讀取操作時會捨棄所讀取之第一位元組的資料。 In one embodiment, the host computer chip discards the data of the read first tuple when the read operation is performed.

在一實施例中,當該上位機晶片在進行所述讀取操作時,該下位機從晶片會在該第一位元組的對應期間內提前開始傳送資料。 In one embodiment, when the upper computer chip is performing the read operation, the lower computer slave chip will start to transmit data in advance within the corresponding period of the first tuple.

在可行的實施例中,所述下位機主晶片和所述下位機從晶片皆為選自於由顯示驅動晶片、觸控晶片、指紋辨識晶片、影像處理晶片、和信號處理晶片所組成群組之中的一種集成電路晶片。 In a feasible embodiment, the host chip of the lower computer and the slave chip of the lower computer are both selected from the group consisting of a display driver chip, a touch control chip, a fingerprint recognition chip, an image processing chip, and a signal processing chip One of the integrated circuit chips.

並且,本發明同時提供一種電路裝置,其包括如前述之上位機晶片、耦接該上位機晶片的一級聯晶片電路、以及耦接該級聯晶片電路的一功能單元,且該級聯晶片電路包括如前述之下位機主晶片及下位機從晶片,從而能夠執行如前述之級聯晶片電路之跨晶片SPI通信方法。 In addition, the present invention also provides a circuit device, which includes the above-mentioned host computer chip, a cascaded chip circuit coupled to the host computer chip, and a functional unit coupled to the cascaded chip circuit, and the cascaded chip circuit The above-mentioned subordinate computer master chip and the subordinate computer slave chip are included, so that the above-mentioned inter-chip SPI communication method of cascading chip circuits can be performed.

在可行的實施例中,該功能單元可為顯示面板、觸控面板、光感測器陣列、影像感測器陣列、壓力感測單元、溫度感測單元、或電壓感測單元。 In a feasible embodiment, the functional unit may be a display panel, a touch panel, a photo sensor array, an image sensor array, a pressure sensing unit, a temperature sensing unit, or a voltage sensing unit.

進一步地,本發明同時提供一種資訊處理裝置,其具有如前述之 電路裝置。 Further, the present invention also provides an information processing device, which has the above-mentioned circuit device.

在可行的實施例中,該資訊處理裝置可為智慧型手機、智慧手錶、智慧手環、平板電腦、筆記型電腦、一體式電腦、門禁裝置、桌上型電腦、或工業電腦。 In a feasible embodiment, the information processing device may be a smart phone, a smart watch, a smart bracelet, a tablet computer, a notebook computer, an all-in-one computer, an access control device, a desktop computer, or an industrial computer.

1a:上位機晶片 1a: host computer chip

11a:第一SPI單元 11a: First SPI unit

2a:下位機晶片 2a: Lower computer chip

21a:第二SPI單元 21a: Second SPI unit

1b:上位機晶片 1b: host computer chip

11b:第一SPI單元 11b: First SPI unit

2b:下位機主晶片 2b: Lower computer main chip

20b:儲存單元 20b: storage unit

21b:第二SPI單元 21b: Second SPI unit

22b:第三SPI單元 22b: Third SPI unit

3b:下位機從晶片 3b: The slave chip of the lower computer

31b:第四SPI單元 31b: Fourth SPI unit

1:上位機晶片 1: host computer chip

11:上位機晶片 11: Host computer chip

111:第一SPI單元 111: The first SPI unit

12:下位機主晶片 12: Lower computer main chip

120:切換單元 120: Switch unit

121:第二SPI單元 121: Second SPI unit

122:第三SPI單元 122: The third SPI unit

13:下位機從晶片 13: The slave chip of the lower computer

131:第四SPI單元 131: Fourth SPI unit

w1:第一SPI通信線路 w1: The first SPI communication line

w2:第二SPI通信線路 w2: Second SPI communication line

S1:一上位機晶片透過一第一SPI通信線路傳送一跨晶片通信啟用命令至一下位機主晶片 S1: An upper computer chip transmits a cross-chip communication enable command to the lower computer main chip through a first SPI communication line

S2:該下位機主晶片依據該跨晶片通信啟用命令執行一第一切換操作以將該第一SPI通信線路與一第二SPI通信線路電氣連接,從而使該上位機晶片能夠透過該第一SPI通信線路和該第二SPI通信線路所連接而成之一SPI通信線路直接和一下位機從晶片進行一SPI通信 S2: The host chip of the lower computer performs a first switching operation according to the cross-chip communication enable command to electrically connect the first SPI communication line with a second SPI communication line, so that the host chip can pass through the first SPI One of the SPI communication lines connected by the communication line and the second SPI communication line directly conducts an SPI communication with the subordinate computer slave chip

S3:該上位機晶片執行一次或多次跨晶片SPI通信,從而跨過該下位機主晶片而與該下位機從晶片進行所述SPI通信,實現對於該下位機從晶片的一寫入操作或一讀取操作 S3: The upper computer chip performs one or more cross-chip SPI communications, so as to cross the lower computer master chip and carry out the SPI communication with the lower computer slave chip, so as to realize a write operation for the lower computer slave chip or a read operation

S4:該上位機晶片透過該第一SPI通信線路傳送一跨晶片通信停止命令至該下位機主晶片 S4: The upper computer chip transmits a cross-chip communication stop command to the lower computer main chip through the first SPI communication line

S4:該下位機主晶片依據該跨晶片通信停止命令執行一第二切換操作以將該第一SPI通信線路與該第二SPI通信線路斷開 S4: The slave host chip performs a second switching operation according to the inter-chip communication stop command to disconnect the first SPI communication line from the second SPI communication line

圖1為習知的一上位機晶片與一下位機晶片的方塊圖;圖2為習知的一上位機晶片、一下位機主晶片與一下位機從晶片的方塊圖;圖3為應用本發明之一種級聯晶片電路之跨晶片SPI通信方法的一電路裝置的方塊圖;圖4為本發明之一種級聯晶片電路之跨晶片SPI通信方法的流程圖;圖5為一上位機晶片所送出的SPI信號、由一下位機主晶片所接收的SPI信號、以及由一下位機從晶片所接收的SPI信號之工作時序圖;以及圖6為該上位機晶片實現對於該下位機從晶片之第二讀取操作的工作時序圖。 FIG. 1 is a block diagram of a conventional upper computer chip and a lower computer chip; FIG. 2 is a block diagram of a conventional upper computer chip, a lower computer master chip and a lower computer slave chip; FIG. 3 is an application of this A block diagram of a circuit device of a cross-chip SPI communication method of a cascaded chip circuit of the invention; FIG. 4 is a flow chart of a cross-chip SPI communication method of a cascaded chip circuit of the present invention; FIG. 5 is a host computer chip. The SPI signal sent out, the SPI signal received by the master chip of the lower computer, and the working timing diagram of the SPI signal received by the slave chip of the lower computer; The working timing diagram of the second read operation.

為使 貴審查委員能進一步瞭解本發明之結構、特徵、目的、與其優點,茲附以圖式及較佳具體實施例之詳細說明如後。 In order to enable your examiners to further understand the structure, features, objectives, and advantages of the present invention, drawings and detailed descriptions of preferred embodiments are attached as follows.

圖3顯示應用本發明之一種級聯晶片電路之跨晶片SPI通信方法的一電路裝置的方塊圖。如圖3所示,該電路裝置1包含於一電子裝置之中,且包括:一上位機晶片11、耦接該上位機晶片11的一級聯晶片電路、以及耦接該級聯晶片電路的一功能單元。其中,該級聯晶片電路包括一下位機主晶片12以及一下位機從晶片13。值得說明的是,前述之電子裝置可為智慧型手機、智慧手錶、智慧手環、平板電腦、筆記型電腦、一體式電腦、門禁裝置、桌上型電腦、或工業電腦。並且,依據不同的應用需求,該功能單元可以是顯示面板、觸控面板、光感測器陣列、影像感測器陣列、壓力感測單元、溫度感測單元、或電壓感測單元。對應地,所述下位機主晶片12和所述下位機從晶片13則為顯示驅動晶片、觸控晶片、指紋辨識晶片、影像處理晶片、或信號處理晶 片。 FIG. 3 shows a block diagram of a circuit arrangement applying a cross-chip SPI communication method for cascading chip circuits according to the present invention. As shown in FIG. 3 , the circuit device 1 is included in an electronic device, and includes: a host computer chip 11 , a cascading chip circuit coupled to the host computer chip 11 , and a cascading chip circuit coupled to the cascading chip circuit functional unit. The cascaded chip circuit includes a master chip 12 of a lower-level computer and a slave chip 13 of a lower-level computer. It should be noted that the aforementioned electronic device may be a smart phone, a smart watch, a smart bracelet, a tablet computer, a notebook computer, an all-in-one computer, an access control device, a desktop computer, or an industrial computer. Moreover, according to different application requirements, the functional unit may be a display panel, a touch panel, a photo sensor array, an image sensor array, a pressure sensing unit, a temperature sensing unit, or a voltage sensing unit. Correspondingly, the lower computer master chip 12 and the lower computer slave chip 13 are display driver chips, touch control chips, fingerprint recognition chips, image processing chips, or signal processing chips. piece.

圖4顯示本發明之一種級聯晶片電路之跨晶片SPI通信方法的流程圖。本發明之一種級聯晶片電路之跨晶片SPI通信方法用於使該上位機晶片11與該下位機主晶片12進行一第一SPI通信,或與級聯該下位機主晶片12的下位機從晶片13進行一第二SPI通信,稱之為跨晶片SPI通信。如圖3與圖4所示,方法流程係首先執行步驟S1:一上位機晶片1透過一第一SPI通信線路w1傳送一跨晶片通信啟用命令至一下位機主晶片12。接著,執行步驟S2:該下位機主晶片12依據該跨晶片通信啟用命令執行一第一切換操作以將該第一SPI通信線路w1與一第二SPI通信線路w2電氣連接,從而使該上位機晶片1能夠透過該第一SPI通信線路w1和該第二SPI通信線路w2所連接而成之一SPI通信線路直接和一下位機從晶片13進行一SPI通信。 FIG. 4 shows a flow chart of a cross-chip SPI communication method for cascading chip circuits according to the present invention. A cross-chip SPI communication method for cascading chip circuits of the present invention is used to enable the upper computer chip 11 to perform a first SPI communication with the lower computer master chip 12, or to communicate with the lower computer slave that cascades the lower computer master chip 12. The chip 13 performs a second SPI communication, which is called cross-chip SPI communication. As shown in FIG. 3 and FIG. 4 , the method flow first executes step S1 : a host computer chip 1 transmits a cross-chip communication enable command to the host computer chip 12 through a first SPI communication line w1 . Next, step S2 is performed: the host chip 12 of the lower computer performs a first switching operation according to the cross-chip communication enable command to electrically connect the first SPI communication line w1 with a second SPI communication line w2, so that the upper computer The chip 1 can directly perform an SPI communication with the subordinate computer slave chip 13 through an SPI communication line formed by connecting the first SPI communication line w1 and the second SPI communication line w2.

依據圖3可知,該上位機晶片11具有一第一SPI單元111,且該下位機主晶片12具有利用該第一SPI通信線路w1和該第一SPI單元111進行所述第一SPI通信的一第二SPI單元21。同時,圖3還繪示該下位機主晶片12進一步具有一第三SPI單元122以及耦接一切換信號、該第一SPI通信線路w1與該第三SPI單元122的一切換單元120,且該下位機從晶片13具有利用該第二SPI通信線路w2和該切換單元120進行SPI通信的一第四SPI單元131。依此設計,在接收所述跨晶片通信啟用命令之後,該下位機主晶片12的該切換單元120即依據一切換信號之控制而實現一第一切換操作,使該第一SPI通信線路w1透過該切換單元120與該第二SPI單元121電氣連接。在此情況下,該上位機晶片11之第一SPI單元111係透過該第一SPI通信線路w1和該下位機主晶片12的第二SPI單元121進行SPI通信,且該下位機主晶片12的第三SPI單元122透過該切換單元120與該第二SPI通信線路w2和該下位機從晶片13的第四SPI單元131進行SPI通信。 According to FIG. 3 , the host computer chip 11 has a first SPI unit 111 , and the lower computer host chip 12 has a first SPI communication circuit w1 and the first SPI unit 111 to perform the first SPI communication. The second SPI unit 21 . Meanwhile, FIG. 3 also shows that the host chip 12 of the lower computer further has a third SPI unit 122 and a switching unit 120 coupled to a switching signal, the first SPI communication line w1 and the third SPI unit 122, and the The slave chip 13 of the lower computer has a fourth SPI unit 131 that uses the second SPI communication line w2 and the switching unit 120 to perform SPI communication. According to this design, after receiving the cross-chip communication enable command, the switch unit 120 of the slave host chip 12 implements a first switch operation according to the control of a switch signal, so that the first SPI communication line w1 passes through The switching unit 120 is electrically connected to the second SPI unit 121 . In this case, the first SPI unit 111 of the host chip 11 performs SPI communication with the second SPI unit 121 of the host chip 12 through the first SPI communication line w1, and the The third SPI unit 122 performs SPI communication with the second SPI communication line w2 and the fourth SPI unit 131 of the slave chip 13 of the lower computer through the switching unit 120 .

換句話說,該上位機晶片11的第一SPI單元111即經由該第一SPI通信線路w1、該下位機主晶片12以及該第二SPI通信線路w2而電氣連接與該下位機從晶片13的第四SPI單元111。在此情況下,該上位機晶片11的第 一SPI單元111可以與該下位機主晶片12的第二SPI單元121進行一第一SPI通信,亦可與該下位機從晶片13的第四SPI單元131進行一第二SPI通信,稱之為跨晶片SPI通信。利用該第一SPI通信,該上位機晶片11可對該下位機主晶片12進行一第一寫入操作或一第一讀取操作。並且,利用該第二SPI通信,該上位機晶片11可對該下位機從晶片13進行一第二寫入操作或一第二讀取操作。 In other words, the first SPI unit 111 of the upper computer chip 11 is electrically connected to the lower computer slave chip 13 via the first SPI communication circuit w1, the lower computer master chip 12 and the second SPI communication circuit w2 Fourth SPI unit 111 . In this case, the first An SPI unit 111 can perform a first SPI communication with the second SPI unit 121 of the slave chip 12 of the lower computer, and can also perform a second SPI communication with the fourth SPI unit 131 of the slave chip 13 of the lower computer, which is called as Cross-die SPI communication. Using the first SPI communication, the upper computer chip 11 can perform a first writing operation or a first reading operation on the lower computer main chip 12 . And, using the second SPI communication, the host computer chip 11 can perform a second write operation or a second read operation on the lower computer slave chip 13 .

如圖4所示,方法流程接著執行步驟S3:該上位機晶片11執行一次或多次跨晶片SPI通信,從而跨過該下位機主晶片12而與該下位機從晶片13進行所述SPI通信,實現對於該下位機從晶片13的一寫入操作或一讀取操作。圖5顯示由上位機晶片所送出的SPI信號、由下位機主晶片所接收的SPI信號、以及由下位機從晶片所接收的SPI信號之工作時序圖。進行所述第二寫入操作時(即,上位機晶片11跨晶片地對下位機從晶片13進行讀取操作),如圖5所示,該上位機晶片11所發送的SPI信號包括一CS信號、一CLK信號以及一MOSI信號。應可理解,透過所述第一SPI通信,該SPI信號係由下位機主晶片12的第一SPI單元121所接收。並且,透過所述第二SPI通信,該SPI信號係透過該切換單元120與該第二SPI通信線路w2而被傳送至下位機從晶片13的第四SPI單元131。值得注意的是,圖5繪示出由下位機主晶片12所接收的SPI信號出現了一第一時間td1的信號傳輸延遲,且由下位機從晶片13所接收的SPI信號出現了一第二時間td2的信號傳輸延遲。 As shown in FIG. 4 , the method flow then executes step S3: the host computer chip 11 performs one or more cross-chip SPI communications, so as to cross the lower computer master chip 12 and perform the SPI communication with the lower computer slave chip 13 , to implement a write operation or a read operation for the slave wafer 13 of the lower computer. FIG. 5 shows the working timing diagram of the SPI signal sent by the upper computer chip, the SPI signal received by the master chip of the lower computer, and the SPI signal received by the slave chip of the lower computer. When the second write operation is performed (that is, the upper computer chip 11 performs a read operation on the lower computer slave chip 13 across the wafer), as shown in FIG. 5 , the SPI signal sent by the upper computer chip 11 includes a CS signal, a CLK signal and a MOSI signal. It should be understood that through the first SPI communication, the SPI signal is received by the first SPI unit 121 of the host chip 12 of the lower-level computer. And, through the second SPI communication, the SPI signal is transmitted to the fourth SPI unit 131 of the slave chip 13 of the lower-level computer through the switching unit 120 and the second SPI communication line w2. It is worth noting that FIG. 5 shows that the SPI signal received by the host chip 12 of the slave computer has a signal transmission delay of a first time td1, and the SPI signal received by the slave computer from the chip 13 has a second time Signal propagation delay at time td2.

然而,值得說明的是,即使下位機主晶片12所接收的SPI信號和下位機從晶片13所接收的SPI信號分別出現了不同時間長度的信號傳輸延遲,但因為由下位機主晶片12所接收的SPI信號具有相同的時間長度的信號傳輸延遲,故而不影響下位機主晶片12自MOSI信號中讀出數據(bit0~bit7)的正確性。同樣地,由下位機從晶片13所接收的SPI信號亦具有相同的時間長度的信號傳輸延遲,故也不影響下位機從晶片13自MOSI信號中讀出數據(bit0~bit7)的正確性。 However, it is worth noting that even if the SPI signal received by the subordinate computer main chip 12 and the SPI signal received by the subordinate computer slave chip 13 have signal transmission delays of different lengths of time, the signal transmission delay of the SPI signal received by the subordinate computer main chip 12 cannot The SPI signal of the SPI signal has a signal transmission delay of the same time length, so it does not affect the correctness of the data (bit0~bit7) read out from the MOSI signal by the main chip 12 of the lower computer. Similarly, the SPI signal received by the lower computer from the chip 13 also has a signal transmission delay of the same time length, so it does not affect the correctness of the data (bit0~bit7) read by the lower computer from the MOSI signal from the chip 13.

圖6顯示由上位機晶片11實現對於下位機從晶片13之第二讀取 操作的第一實施例之工作時序圖。如圖6所示,對於上位機晶片11而言,CS和CLK指的是上位機晶片11傳送給下位機主晶片12的晶片選擇信號與時鐘信號。並且,對於下位機主晶片12而言,CS和CLK指的是下位機主晶片12接收自該上位機晶片11的晶片選擇信號與時鐘信號。再者,對於下位機從晶片12而言,CS和CLK指的是下位機從晶片13接收自該下位機主晶片12的晶片選擇信號與時鐘信號,亦即,該上位機晶片11經由該第一SPI通信線路w1、該下位機主晶片12與該第二SPI通信線路w2將所述晶片選擇信號和所述時鐘信號傳送給該下位機從晶片13。 FIG. 6 shows that the second reading from the wafer 13 for the lower machine is realized by the wafer 11 of the upper machine. A working sequence diagram of the first embodiment of the operation. As shown in FIG. 6 , for the upper computer chip 11 , CS and CLK refer to the chip selection signal and the clock signal transmitted by the upper computer chip 11 to the lower computer main chip 12 . In addition, for the lower computer main chip 12 , CS and CLK refer to the chip selection signal and the clock signal received from the upper computer chip 11 by the lower computer main chip 12 . Furthermore, for the slave chip 12 of the lower computer, CS and CLK refer to the chip selection signal and clock signal received by the slave chip 13 of the lower computer from the master chip 12 of the lower computer, that is, the upper computer chip 11 passes through the An SPI communication line w1 , the subordinate computer master chip 12 and the second SPI communication line w2 transmit the chip selection signal and the clock signal to the subordinate computer slave chip 13 .

同樣地,在圖6中可以看到由下位機主晶片12所接收的時鐘信號CLK出現了第一時間td1的信號傳輸延遲,且由下位機從晶片13所接收的時鐘信號CLK出現了第二時間td2的信號傳輸延遲。 Similarly, in FIG. 6, it can be seen that the clock signal CLK received by the subordinate computer main chip 12 has a signal transmission delay of the first time td1, and the clock signal CLK received by the subordinate computer from the chip 13 has a second time. Signal propagation delay at time td2.

執行所述第二讀取操作時(即,該上位機晶片11跨晶片地對該下位機從晶片13進行資料讀取),該上位機晶片11傳送一晶片選擇信號CS與一時鐘信號CLK至該下位機主晶片12,從而透過該下位機主晶片12跨晶片地將該晶片選擇信號CS與該時鐘信號CLK傳送至該下位機從晶片13。接著,該下位機從晶片13依據該時鐘信號CLK而送出一MISO信號至該下位機主晶片12,使耦接該下位機主晶片12的該上位機晶片11跨晶片地接收該MISO信號。 When performing the second read operation (ie, the host computer chip 11 reads data from the slave chip 13 across the chip), the host computer chip 11 transmits a chip selection signal CS and a clock signal CLK to The subordinate computer master chip 12 transmits the chip selection signal CS and the clock signal CLK to the subordinate computer slave chip 13 across the wafers through the subordinate computer master chip 12 . Next, the slave chip 13 sends a MISO signal to the master chip 12 of the slave computer according to the clock signal CLK, so that the master chip 11 coupled to the master chip 12 of the slave computer 12 receives the MISO signal across the chip.

由圖6可發現,由下位機主晶片12所接收的MISO信號出現了第三時間td3的信號傳輸延遲,且由該上位機晶片11所接收的MISO信號出現了第四時間td4的信號傳輸延遲。換句話說,進行第二讀取操作時,必須將第一時間td1、第二時間td2、第三時間td3、以及第四時間td4的信號傳輸延遲納入考慮,以保證上位機晶片11讀取MISO信號的資料位元之正確性。因此,依據本發明之設計,上位機晶片11跨越向下位機主晶片12向下位機從晶片13進行讀取操作時(即,前述之第二讀取操作)必須要求:(1)該下位機從晶片13在該第一位元組的對應期間內提前開始傳送資料;(2)該下位機主晶片12鎖存該下位機從晶片13所傳送之資料,從而以一水管式(Pipeline)的資料傳遞方式滿足該上位機晶片11對該下位機從晶片13之一讀取操作之時序規格;以及(3)該上 位機晶片1在進行該讀取操作時捨棄所讀取之第一位元組的資料。 It can be found from FIG. 6 that the MISO signal received by the host chip 12 of the lower computer has a signal transmission delay of the third time td3, and the MISO signal received by the upper computer chip 11 has a signal transmission delay of the fourth time td4. . In other words, when performing the second read operation, the signal transmission delays of the first time td1, the second time td2, the third time td3, and the fourth time td4 must be taken into consideration to ensure that the host computer chip 11 reads the MISO The correctness of the data bits of the signal. Therefore, according to the design of the present invention, when the host chip 11 crosses over to the host chip 12 of the host computer and performs the read operation to the slave chip 13 of the host computer (ie, the aforementioned second read operation), it must require: (1) the host computer The slave chip 13 starts to transmit data in advance within the corresponding period of the first tuple; (2) the slave chip 12 latches the data sent from the slave chip 13 by the slave chip 13 , so as to transmit the data in a pipeline type (Pipeline) The data transfer method satisfies the timing specification of the upper computer chip 11 for a read operation of the lower computer slave chip 13; and (3) the upper computer The bit-machine chip 1 discards the data of the read first tuple when performing the read operation.

以常用的SPI模式0為例,該下位機從晶片13以時鐘信號CLK的下降沿(falling edge)為觸發而發送MISO信號(MISO)至該下位機主晶片12,使該上位機晶片11可以經由該第一SPI通信線路w1與該下位機主晶片12而跨晶片地接收該MISO信號。如圖6所示,接收該MISO信號時,該上位機晶片11的第一SPI單元111在以時鐘信號CLK的上升沿(rising edge)為觸發而對該MISO信號進行數據採樣。 Taking the commonly used SPI mode 0 as an example, the slave chip 13 of the slave computer is triggered by the falling edge of the clock signal CLK and sends a MISO signal (MISO) to the master chip 12 of the slave computer, so that the host chip 11 can The MISO signal is received across the chip through the first SPI communication line w1 and the subordinate host chip 12 . As shown in FIG. 6 , when receiving the MISO signal, the first SPI unit 111 of the host computer chip 11 is triggered by the rising edge of the clock signal CLK to sample the MISO signal.

在一示範性實施例中,如圖6所示,該下位機從晶片13提前半個時鐘信號週期(即,在該第一位元組的對應期間內)送出一MISO信號至該下位機主晶片12。在接收該MISO信號的過程中,該下位機主晶片12以其內部的一鎖存電路(如:D正反器電路)對該MISO信號進行一鎖存處理,接著以一水管式(Pipeline)的資料傳遞方式滿足該上位機晶片11對該下位機從晶片13之一讀取操作之時序規格,從而使與該下位機主晶片12耦接的該上位機晶片11在下一個時鐘信號週期跨晶片地接收該MISO信號。以常用的SPI模式0為例,下位機從晶片13以時鐘信號CLK的上降沿(riging edge)為觸發而發送MISO信號(MISO)至該下位機主晶片12,接著,如圖8所示,該下位機主晶片12的第二SPI單元121在以時鐘信號CLK的上升沿為觸發對該MISO信號進行鎖存處理,使該上位機晶片11的第一SPI單元111在下一個時鐘信號週期接收該MISO信號。接收該MISO信號時,該上位機晶片11的第一SPI單元111在以時鐘信號CLK的上升沿為觸發而對該MISO信號進行數據採樣。 In an exemplary embodiment, as shown in FIG. 6 , the subordinate computer sends a MISO signal to the subordinate computer host in advance of the chip 13 by half a clock signal period (ie, within the corresponding period of the first tuple). wafer 12 . In the process of receiving the MISO signal, the host chip 12 of the lower computer performs a latching process on the MISO signal with its internal latch circuit (eg, a D flip-flop circuit), and then uses a pipeline (Pipeline) The data transfer method satisfies the timing specification of the read operation of the host chip 11 to one of the slave chips 13, so that the host chip 11 coupled to the host chip 12 of the host chip 12 crosses the chip in the next clock signal cycle receive the MISO signal. Taking the commonly used SPI mode 0 as an example, the slave chip 13 of the slave computer sends a MISO signal (MISO) to the master chip 12 of the slave computer with the rising edge of the clock signal CLK as a trigger. Then, as shown in FIG. 8 , the second SPI unit 121 of the host chip 12 of the lower computer performs latch processing on the MISO signal triggered by the rising edge of the clock signal CLK, so that the first SPI unit 111 of the host chip 11 receives the next clock signal cycle the MISO signal. When receiving the MISO signal, the first SPI unit 111 of the host computer chip 11 performs data sampling on the MISO signal with the rising edge of the clock signal CLK as a trigger.

舉例而言,對於上位機晶片11來說,下位機從晶片13提前了1.5個時鐘信號週期(TCLK/2+鎖存處理)發送MISO信號。因此,為了保證上位機晶片11能夠自MISO信號中正確地讀出數據,必須令下位機從晶片13所發送的MISO信號之第一個位元組(byte)為虛位元組(Dummy byte),或稱無效位元組。故而,進行第二讀取操作時必須要求:(1)該下位機從晶片13在該第一位元組的對應期間內提前開始傳送資料。如此設計,如圖8所示,下位機從晶片13會在所述虛位元組的第7個CLK上升沿開始發送第一個有效位元組的一最 高有效位元(即,bit7),後續接著發送第一個有效位元組的剩餘7個位元。接收MISO信號時,如圖8所示,下位機主晶片12利用D正反器(即,鎖存電路)在第一個位元組的第8個CLK上升沿開始對該MISO信號進行鎖存處理,後續接著發出MISO信號給上位機晶片11。最終,接收MISO信號時,該上位機晶片11在第二個位元組的第1個CLK上升沿開始採樣第一個有效位元組的最高有效位元(即,bit7),後續接著採樣第一個有效位元組的剩餘7個位元。 For example, for the upper computer chip 11, the lower computer sends the MISO signal from the chip 13 in advance of 1.5 clock signal cycles (TCLK/2+ latch processing). Therefore, in order to ensure that the upper computer chip 11 can correctly read data from the MISO signal, the first byte of the MISO signal sent by the lower computer from the chip 13 must be a dummy byte. , or invalid bytes. Therefore, when performing the second read operation, it must be required that: (1) the slave chip 13 starts to transmit data in advance within the corresponding period of the first tuple. With this design, as shown in FIG. 8, the slave chip 13 of the slave computer will start to send a last valid byte of the first valid byte at the seventh CLK rising edge of the dummy byte. The most significant bit (ie, bit7) is followed by the remaining 7 bits of the first significant byte. When receiving the MISO signal, as shown in FIG. 8 , the host chip 12 of the lower-level computer uses the D flip-flop (ie, the latch circuit) to start latching the MISO signal at the 8th CLK rising edge of the first byte group processing, and then sending a MISO signal to the host computer chip 11 . Finally, when receiving the MISO signal, the host computer chip 11 starts to sample the most significant bit (ie, bit7) of the first valid byte at the first CLK rising edge of the second byte, and then samples the first The remaining 7 bits of a valid byte.

依此設計,第二讀取操作可以支持高SPI通信速率。進一步地,如圖3與圖4所示,方法流程還包括步驟S4:該上位機晶片1透過該第一SPI通信線路w1傳送一跨晶片通信停止命令至該下位機主晶片12。最終,方法流程係執行步驟S5:該下位機主晶片12依據該跨晶片通信停止命令執行一第二切換操作以將該第一SPI通信線路w1與該第二SPI通信線路w2斷開。 With this design, the second read operation can support high SPI communication rates. Further, as shown in FIG. 3 and FIG. 4 , the method flow further includes step S4 : the upper computer chip 1 transmits a cross-chip communication stop command to the lower computer main chip 12 through the first SPI communication line w1 . Finally, the method flow is to execute step S5 : the subordinate host chip 12 performs a second switching operation according to the inter-chip communication stop command to disconnect the first SPI communication line w1 from the second SPI communication line w2 .

換句話說,步驟S1、步驟S2和步驟S3用以使該上位機晶片11與級聯該下位機主晶片12的下位機從晶片13進行所述第二SPI通信,即跨晶片寫入操作或讀取操作。另一方面,步驟S4和步驟S5則停止所述跨晶片讀/寫操作,僅使該上位機晶片11與下位機主晶片12進行所述第一SPI通信以對下位機主晶片12進行寫入操作或讀取操作。更詳細地說明,透過跨晶片通信啟用命令達成該上位機晶片11與下位機主晶片12之一握手切換,可以決定該上位機晶片11何時執行跨晶片通信,避免造成晶片間的信號傳/收衝突。 In other words, step S1, step S2 and step S3 are used to make the upper computer chip 11 and the lower computer slave chip 13 cascaded with the lower computer master chip 12 to perform the second SPI communication, that is, cross-chip write operation or read operation. On the other hand, steps S4 and S5 stop the cross-chip read/write operation, and only make the upper computer chip 11 and the lower computer main chip 12 perform the first SPI communication to write to the lower computer main chip 12 operation or read operation. In more detail, through the cross-chip communication enable command to achieve a handshake switch between the upper computer chip 11 and one of the lower computer main chips 12, it can be determined when the upper computer chip 11 performs cross-chip communication, so as to avoid signal transmission/reception between chips. conflict.

模擬數據 Simulation data

為了證實本發明之級聯晶片電路之跨晶片SPI通信方法具有易於實現以及傳輸數據耗時短等優點,係分別利用習知技術之SPI通信方法以及本發明之級聯晶片電路之跨晶片SPI通信方法以SPI速率20MHz對一下位機從晶片13進行128k byte(即,8bits)的數據讀/寫操作。相關數據整理於下表(1)和表(2)之中。 In order to prove that the cross-chip SPI communication method of the cascaded chip circuit of the present invention has the advantages of being easy to implement and time-consuming to transmit data, etc., the SPI communication method of the prior art and the cross-chip SPI communication method of the cascaded chip circuit of the present invention are respectively used. A data read/write operation of 128k bytes (ie, 8 bits) is performed on the slave chip 13 of the lower computer at the SPI rate of 20MHz. The relevant data are organized in Tables (1) and (2) below.

Figure 110112425-A0305-02-0011-1
Figure 110112425-A0305-02-0011-1
Figure 110112425-A0305-02-0012-2
Figure 110112425-A0305-02-0012-2

Figure 110112425-A0305-02-0012-3
Figure 110112425-A0305-02-0012-3

如此,上述已完整且清楚地說明本發明之一種級聯晶片電路之跨晶片SPI通信方法;並且,經由上述可得知本發明具有下列優點: In this way, the above has completely and clearly explained a cross-chip SPI communication method for cascading chip circuits of the present invention; and, from the above, it can be known that the present invention has the following advantages:

(1)本發明揭示一種級聯晶片電路之跨晶片SPI通信方法,用於使一上位機晶片與一下位機主晶片進行一第一SPI通信,或與級聯該下位機主晶片的一下位機從晶片進行一第二SPI通信,稱之為跨晶片SPI通信。依據本發明之方法,在該上位機晶片透過一第一SPI通信線路傳送一跨晶片通信啟用命 令至該下位機主晶片後,該下位機主晶片將該第一SPI通信線路耦接至一第二SPI通信線路,使該上位機晶片可透過該下位機主晶片與該下位機從晶片進行所述跨晶片SPI通信,從而能夠對該下位機從晶片進行跨晶片的SPI寫入操作或跨晶片的SPI讀取操作。另外,本發明亦藉由在下位機主晶片內設置鎖存電路以提供一水管式的資料緩衝機制,從而使所述跨晶片的SPI讀取操作的速度能夠相容於該上位機晶片的讀取操作時序。 (1) The present invention discloses a cross-chip SPI communication method for cascading chip circuits, which is used for a first SPI communication between an upper computer chip and a lower computer main chip, or with a subordinate computer that cascades the lower computer main chip. The machine performs a second SPI communication from the chip, which is called cross-chip SPI communication. According to the method of the present invention, the host computer chip transmits a cross-chip communication enable command through a first SPI communication line. After being sent to the lower-level computer master chip, the lower-level computer master chip couples the first SPI communication line to a second SPI communication line, so that the upper-level computer chip can communicate with the lower-level computer slave chip through the lower-level computer master chip The cross-chip SPI communication enables the slave chip to perform a cross-chip SPI write operation or a cross-chip SPI read operation. In addition, the present invention also provides a water-pipe data buffer mechanism by arranging a latch circuit in the host chip of the lower computer, so that the speed of the cross-chip SPI reading operation can be compatible with the reading of the upper computer chip Take the operation timing.

必須加以強調的是,前述本案所揭示者乃為較佳實施例,舉凡局部之變更或修飾而源於本案之技術思想而為熟習該項技藝之人所易於推知者,俱不脫本案之專利權範疇。 It must be emphasized that the above-mentioned disclosure in this case is a preferred embodiment, and any partial changes or modifications originating from the technical ideas of this case and easily inferred by those who are familiar with the art are within the scope of the patent of this case. category of rights.

綜上所陳,本案無論目的、手段與功效,皆顯示其迥異於習知技術,且其首先發明合於實用,確實符合發明之專利要件,懇請 貴審查委員明察,並早日賜予專利俾嘉惠社會,是為至禱。 To sum up, regardless of the purpose, means and effect of this case, it shows that it is completely different from the conventional technology, and its first invention is suitable for practical use, and indeed meets the patent requirements of the invention. Society is to pray for the best.

1:上位機晶片 1: host computer chip

11:上位機晶片 11: Host computer chip

111:第一SPI單元 111: The first SPI unit

12:下位機主晶片 12: Lower computer main chip

120:切換單元 120: Switch unit

121:第二SPI單元 121: Second SPI unit

122:第三SPI單元 122: The third SPI unit

13:下位機從晶片 13: The slave chip of the lower computer

131:第四SPI單元 131: Fourth SPI unit

w1:第一SPI通信線路 w1: The first SPI communication line

w2:第二SPI通信線路 w2: Second SPI communication line

Claims (10)

一種級聯晶片電路之跨晶片SPI通信方法,包括以下步驟:一上位機晶片透過一第一SPI通信線路傳送一跨晶片通信啟用命令至一下位機主晶片;該下位機主晶片依據該跨晶片通信啟用命令執行一第一切換操作以將該第一SPI通信線路與一第二SPI通信線路電氣連接,從而使該上位機晶片能夠透過該第一SPI通信線路和該第二SPI通信線路所連接而成之一SPI通信線路直接和一下位機從晶片進行一SPI通信;以及該上位機晶片執行一次或多次跨晶片SPI通信,從而跨過該下位機主晶片而與該下位機從晶片進行所述SPI通信,實現對於該下位機從晶片的一寫入操作或一讀取操作。 A cross-chip SPI communication method for cascading chip circuits, comprising the following steps: a host computer chip transmits a cross-chip communication enabling command to a subordinate computer main chip through a first SPI communication line; the subordinate computer main chip is based on the cross chip. The communication enabling command executes a first switching operation to electrically connect the first SPI communication line with a second SPI communication line, so that the host computer chip can be connected through the first SPI communication line and the second SPI communication line One of the SPI communication lines formed directly conducts an SPI communication with the subordinate computer slave chip; and the host computer chip performs one or more cross-chip SPI communication, so as to cross the subordinate computer master chip and communicate with the subordinate computer slave chip. The SPI communication implements a write operation or a read operation for the slave chip of the lower computer. 如請求項1所述之級聯晶片電路之跨晶片SPI通信方法,其進一步包括以下步驟:該上位機晶片透過該第一SPI通信線路傳送一跨晶片通信停止命令至該下位機主晶片;以及該下位機主晶片依據該跨晶片通信停止命令執行一第二切換操作以將該第一SPI通信線路與該第二SPI通信線路斷開。 The cross-chip SPI communication method for cascading chip circuits as claimed in claim 1, further comprising the following steps: the upper computer chip transmits a cross-chip communication stop command to the lower computer main chip through the first SPI communication line; and The slave host chip performs a second switching operation according to the inter-chip communication stop command to disconnect the first SPI communication line from the second SPI communication line. 如請求項1所述之級聯晶片電路之跨晶片SPI通信方法,其中,該上位機晶片具有一第一SPI單元,且該下位機主晶片具有利用該第一SPI通信線路和該第一SPI單元進行一SPI通信的一第二SPI單元。 The cross-chip SPI communication method for cascading chip circuits according to claim 1, wherein the upper computer chip has a first SPI unit, and the lower computer main chip has a communication line using the first SPI and the first SPI The unit performs a SPI communication with a second SPI unit. 如請求項3所述之級聯晶片電路之跨晶片SPI通信方法,其中,該下位機主晶片進一步具有一第三SPI單元以及一切換單元,且該下位機從晶片具有利用該第二SPI通信線路和該切換單元進行所述SPI通信的一第四SPI單元。 The cross-chip SPI communication method for cascading chip circuits as claimed in claim 3, wherein the subordinate computer master chip further has a third SPI unit and a switching unit, and the subordinate computer slave chip has communication using the second SPI A fourth SPI unit that performs the SPI communication with the switching unit. 如請求項4所述之級聯晶片電路之跨晶片SPI通信方法,其中,該切換單元依據一切換信號之控制執行所述第一切換操作或所述第二切換操作。 The cross-chip SPI communication method for cascaded chip circuits according to claim 4, wherein the switching unit performs the first switching operation or the second switching operation according to the control of a switching signal. 如請求項4所述之級聯晶片電路之跨晶片SPI通信方法,其中,該下位機主晶片具有一鎖存電路用以對該下位機從晶片所發送之資料進行一鎖存處理,從而以一水管式的資料傳遞方式滿足該上位機晶片對於該下位機從晶片之所述讀取操作之時序規格。 The cross-chip SPI communication method of cascaded chip circuits as claimed in claim 4, wherein the subordinate computer master chip has a latch circuit for performing a latching process on the data sent by the subordinate computer slave chip, so as to use A water-pipe data transmission method satisfies the timing specification of the read operation of the slave chip of the host computer to the slave chip of the slave computer. 如請求項6所述之級聯晶片電路之跨晶片SPI通信方法,其中,該上位機晶片在進行所述讀取操作時會捨棄所讀取之第一位元組的資料。 The cross-chip SPI communication method for cascaded chip circuits as claimed in claim 6, wherein the host computer chip discards the data of the read first tuple when performing the read operation. 如請求項7所述之級聯晶片電路之跨晶片SPI通信方法,其中,當該上位機晶片在進行所述讀取操作時,該下位機從晶片會在該第一位元組的對應期間內提前開始傳送資料。 The cross-chip SPI communication method for cascaded chip circuits according to claim 7, wherein when the upper computer chip is performing the read operation, the lower computer slave chip will be in the corresponding period of the first tuple Start sending data in advance. 一種電路裝置,其包括如請求項1所述之上位機晶片、耦接該上位機晶片的一級聯晶片電路、以及耦接該級聯晶片電路的一功能單元,且該級聯晶片電路包括如請求項1所述之下位機主晶片及下位機從晶片,從而能夠執行如請求項1至8中任一項所述之級聯晶片電路之跨晶片SPI通信方法。 A circuit device, which includes a host computer chip as described in claim 1, a cascaded chip circuit coupled to the host computer chip, and a functional unit coupled to the cascaded chip circuit, and the cascaded chip circuit includes such as The master chip of the lower computer and the slave chip of the lower computer according to claim 1 can execute the cross-chip SPI communication method of cascaded chip circuits as described in any one of claim 1 to 8. 一種資訊處理裝置,其具有如請求項9所述之電路裝置,且該資訊處理裝置為選自於由智慧型手機、智慧手錶、智慧手環、平板電腦、筆記型電腦、一體式電腦、門禁裝置、桌上型電腦、和工業電腦所組成群組之中的一種電子裝置。An information processing device, which has the circuit device as claimed in claim 9, and the information processing device is selected from a smart phone, a smart watch, a smart bracelet, a tablet computer, a notebook computer, an all-in-one computer, an access control An electronic device in the group consisting of devices, desktop computers, and industrial computers.
TW110112425A 2021-04-06 2021-04-06 Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits TWI765642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110112425A TWI765642B (en) 2021-04-06 2021-04-06 Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110112425A TWI765642B (en) 2021-04-06 2021-04-06 Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits

Publications (2)

Publication Number Publication Date
TWI765642B true TWI765642B (en) 2022-05-21
TW202240408A TW202240408A (en) 2022-10-16

Family

ID=82594413

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110112425A TWI765642B (en) 2021-04-06 2021-04-06 Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits

Country Status (1)

Country Link
TW (1) TWI765642B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9516100B2 (en) * 2014-02-05 2016-12-06 Travis T. Wilson Method and system for executing third-party agent code in a data processing system
CN109885433A (en) * 2018-12-29 2019-06-14 芯海科技(深圳)股份有限公司 A kind of method of quick test SPI communication module
CN110147338A (en) * 2019-05-06 2019-08-20 电子科技大学 The method with host computer communication speed is improved based on muti-piece USB interface chip
CN112306942A (en) * 2020-11-04 2021-02-02 杭州米福科技有限公司 Bioelectrical signal acquisition method based on serial peripheral interface transmission protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9516100B2 (en) * 2014-02-05 2016-12-06 Travis T. Wilson Method and system for executing third-party agent code in a data processing system
CN109885433A (en) * 2018-12-29 2019-06-14 芯海科技(深圳)股份有限公司 A kind of method of quick test SPI communication module
CN110147338A (en) * 2019-05-06 2019-08-20 电子科技大学 The method with host computer communication speed is improved based on muti-piece USB interface chip
CN112306942A (en) * 2020-11-04 2021-02-02 杭州米福科技有限公司 Bioelectrical signal acquisition method based on serial peripheral interface transmission protocol

Also Published As

Publication number Publication date
TW202240408A (en) 2022-10-16

Similar Documents

Publication Publication Date Title
CN111008170B (en) System chip, bus interface connection circuit and bus interface connection method thereof
Mankar et al. Review of I2C protocol
CN108091355B (en) Data inverter circuit
CN114443529A (en) Direct memory access architecture, system, method, electronic device and medium
CN108304334B (en) Application processors and integrated circuits including interrupt controllers
US10318179B1 (en) Host device to embedded multi-media card device communication
CN110399321A (en) Storage system and method of operation
CN100492334C (en) Serial Peripheral Interface Device
US7047343B2 (en) System and method for communication of keyboard and touchpad inputs as HID packets embedded on a SMBus
CN116561036B (en) Data access control methods, devices, equipment and storage media
TWI765642B (en) Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits
CN101344875B (en) An APB Bus Bridge for System-on-Chip Integrated SoC
CN115718707A (en) Data transmission method and device, computer equipment and storage medium
CN112214945B (en) An AXI bus isolation protection structure and its protection method
TWI718858B (en) Data storage device and non-volatile memory control method
TWI758156B (en) Broadcast SPI communication method, circuit device and information processing device
WO2012124431A1 (en) Semiconductor device
CN112256331A (en) Virtual machine instruction analysis acceleration method and device and computer storage medium
CN118445225A (en) Storage device, method of operating the same, and host storage system including the storage device
TWI810876B (en) Method and computer program product and apparatus for data access in response to host discard commands
CN113270134B (en) Semiconductor device
CN202870809U (en) Bus system
TWI767234B (en) Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device
TW533378B (en) Control method for synchronously simulating multiple PC peripheral equipment
Malviya et al. Mini Interconnect IC Protocol and Camera Command Set Controller for Camera Communication in Mobile Phones