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 PDFInfo
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 171
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000010365 information processing Effects 0.000 title claims description 5
- 230000005540 biological transmission Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 10
- 230000008054 signal transmission Effects 0.000 description 10
- 235000012431 wafers Nutrition 0.000 description 9
- 238000012545 processing Methods 0.000 description 7
- 230000000630 rising effect Effects 0.000 description 7
- 238000013461 design Methods 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 3
- 230000001934 delay Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
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通信方法,用於使一上位機晶片能夠跨越一下位機主晶片而對與該下位機主晶片級聯的一下位機從晶片進行讀/寫操作。 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
實務經驗顯示,在一些應用中,單顆下位機晶片2a無法高效能地完成所述特定工作。舉例而言,該下位機晶片2a為一觸控晶片,且單顆觸控晶片難以高效能地完成對於大尺寸觸控面板的觸控檢測工作。在此情況下,包括一下位機主晶片(Master chip)與一下位機從晶片(Slave chip)的一級聯晶片電路被設計出來從而用於完成對於大尺寸觸控面板的觸控檢測工作。
Practical experience shows that, in some applications, a single
圖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
如前所述,欲寫入數據至該下位機從晶片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
更進一步地說明,習知技術通常採取如下四步驟使該上位機晶片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
如前所述,欲自該下位機從晶片3b讀出數據,上位機晶片1b須先令該下位機主晶片2b自該下位機從晶片3b讀出數據,接著再繼續地自該下位機主晶片2b讀出數據。因此,習知技術用於使該上位機晶片1b完成對於該
下位機從晶片3b之讀取操作的SPI通信方法同樣存在耗時長以及操作麻煩此二個主要缺陷。
As mentioned above, in order to read data from the
由上述說明可知,本領域亟需一種新穎的跨晶片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
圖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
依據圖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
換句話說,該上位機晶片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
如圖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
然而,值得說明的是,即使下位機主晶片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
圖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
同樣地,在圖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
執行所述第二讀取操作時(即,該上位機晶片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
由圖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
以常用的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
在一示範性實施例中,如圖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
舉例而言,對於上位機晶片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
依此設計,第二讀取操作可以支持高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
換句話說,步驟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
模擬數據 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
如此,上述已完整且清楚地說明本發明之一種級聯晶片電路之跨晶片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)
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)
| 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 |
-
2021
- 2021-04-06 TW TW110112425A patent/TWI765642B/en active
Patent Citations (4)
| 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 |