TWI764139B - Data bus accessing device, method and system - Google Patents

Data bus accessing device, method and system

Info

Publication number
TWI764139B
TWI764139B TW109114076A TW109114076A TWI764139B TW I764139 B TWI764139 B TW I764139B TW 109114076 A TW109114076 A TW 109114076A TW 109114076 A TW109114076 A TW 109114076A TW I764139 B TWI764139 B TW I764139B
Authority
TW
Taiwan
Prior art keywords
port
host
slave
master
data bus
Prior art date
Application number
TW109114076A
Other languages
Chinese (zh)
Other versions
TW202141288A (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 TW109114076A priority Critical patent/TWI764139B/en
Publication of TW202141288A publication Critical patent/TW202141288A/en
Application granted granted Critical
Publication of TWI764139B publication Critical patent/TWI764139B/en

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The present invention provides a data bus accessing device, method, and system. The data bus accessing device includes a plurality of host ports; a plurality of slave ports, wherein the host ports have a fixed priority order to access the slave ports; a plurality of first multiplexers and a plurality of second multiplexers configured to realize to switch between the host ports and the slave ports; a plurality of decoders configured to receive address signals sent by the host ports and decode the address signals, and generate corresponding selecting signals, the second multiplexers selects one of the corresponding slave port to connect to the master port according to the selecting signals; and a plurality of arbiters configured to receive request signals sent by the master ports, and determine the order in which the master ports accesses the slave ports according to a combination of the fixed priority order and the first-come-first-served basis.

Description

訪問資料匯流排的裝置、方法及系統 Apparatus, method and system for accessing a data bus

本發明涉及資料處理技術,尤其涉及一種訪問資料匯流排的裝置、方法及系統。 The present invention relates to data processing technology, in particular to a device, method and system for accessing data bus.

目前,SOC(System on a Chip,片上系統)大多採用多層AHB(Advanced High Performance Bus,高級高性能匯流排)匯流排架構進行資訊交互。AHB規範包括AMBA(Advanced Microcontroller Bus Architecture,高級微控制器匯流排架構)規範以及AHB-Lite協定。其中,AMBA規範v2.0定義AHB多層之間的連接,並通過定義仲裁器的信號,例如,匯流排請求(HBUSREQx)信號以及匯流排授權(HGRANTx)信號來判斷多個主機與多個從機之間的切換。AHB-Lite協議則沒有明確定義AHB多層之間連接以及定義仲裁器的信號,而是定義單一主機和多個從機的連接,並定義選通(HSEL)信號或者傳輸類型(HTRANS)信號代替匯流排請求信號以及匯流排授權信號,來判斷主機與多個從機之間的切換。 At present, SOC (System on a Chip, system on a chip) mostly adopts a multi-layer AHB (Advanced High Performance Bus, advanced high performance bus) bus structure for information exchange. AHB specification includes AMBA (Advanced Microcontroller Bus Architecture, Advanced Microcontroller Bus Architecture) specification and AHB-Lite agreement. Among them, AMBA specification v2.0 defines the connection between multiple layers of AHB, and judges multiple masters and multiple slaves by defining the signals of the arbiter, such as the bus request (HBUSREQx) signal and the bus grant (HGRANTx) signal switch between. The AHB-Lite protocol does not clearly define the connection between the multiple layers of AHB and the signal that defines the arbiter, but defines the connection between a single master and multiple slaves, and defines the strobe (HSEL) signal or the transmission type (HTRANS) signal instead of the bus The bus request signal and the bus authorization signal are used to judge the switching between the master and multiple slaves.

然而,上述兩種方式中,當從機切換至新主機時,因為AHB-Lite和AHB多層匯流排架構的管線(pipeline)特徵可能會導致插入單個等候狀態(wait state),造成延遲。 However, in the above two methods, when the slave is switched to the new master, a single wait state may be inserted due to the pipeline characteristics of the AHB-Lite and AHB multilayer bus architectures, causing delays.

有鑒於此,有必要提供一種減少從機切換過程延遲現象的訪問資料匯流排的方法、裝置及系統。 In view of this, it is necessary to provide a method, apparatus and system for accessing a data bus which reduces the delay phenomenon of the slave switching process.

本發明提供一種訪問資料匯流排的裝置,所述訪問資料匯流排的裝置包括:主機埠,用於連接主機;從機埠,用於連接從機,所述從機埠通過資料匯流排連接至所述主機埠,所述主機埠具有訪問所述從機埠的固定優先順序別;第一多工器以及第二多工器,連接至所述主機埠及所述從機埠之間,用於實現所述主機埠與所述從機埠之間的切換;解碼器,連接至所述第二多工器,用於接收所述主機埠發送的位址信號並進行解碼,生成相應的選擇信號,所述第二多工器根據所述選擇信號選擇對應的所述從機埠與所述主機埠相連;以及仲裁器,連接至所述第一多工器,用於接收所述主機埠發送的請求信號,並根據固定優先權與先到先做結合的方式確定所述主機埠訪問所述從機埠的順序。 The present invention provides a device for accessing a data bus, the device for accessing a data bus includes: a host port for connecting to a host; a slave port for connecting to a slave, and the slave port is connected to a slave through the data bus The master port, the master port has a fixed priority for accessing the slave port; the first multiplexer and the second multiplexer are connected between the master port and the slave port, using In order to realize the switch between the master port and the slave port; the decoder, connected to the second multiplexer, is used to receive the address signal sent by the master port and decode it to generate the corresponding selection signal, the second multiplexer selects the corresponding slave port to connect to the master port according to the selection signal; and an arbiter connected to the first multiplexer for receiving the master port The request signal sent, and the order in which the master port accesses the slave port is determined according to the combination of fixed priority and first come first.

進一步地,當多個主機埠同時對同一個從機埠發出訪問請求時,所述仲裁器根據所述固定優先順序別確定所述主機埠訪問所述從機埠的順序,其中,優先順序別越高的主機埠具有越優先訪問所述從機埠的許可權。 Further, when multiple host ports send access requests to the same slave port at the same time, the arbiter determines the order in which the host port accesses the slave port according to the fixed priority order, wherein the priority order is different. A higher master port has a higher priority to access the slave port.

進一步地,當多個主機埠不是同時對一個從機埠發出訪問請求時,所述仲裁器採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,其中,越先發出所述請求信號的主機埠具有越優先訪問所述從機埠的許可權。 Further, when multiple host ports do not send access requests to one slave port at the same time, the arbiter determines the order in which the host ports access the slave ports in a first-come, first-served manner, The master port of the request signal has the higher priority to access the slave port.

進一步地,當所述主機埠的數量為N,分別為第一主機埠、第二主機埠、…、直至第N主機端,對應的優先順序別依次為第1級、第2級、…、直至第N級,如果所述第M主機埠在所述第M-1主機埠之前請求訪問同一所述從機埠,則所述仲裁器根據先到先做的方式確定所述第M主機埠優先訪問所述從機埠,直至所述第M主機埠停止請求使用所述資料匯流排,所述仲裁器再根據所述優先順序別確定所述第一主機埠、所述第二主機埠、…、直至所述第M-1主機埠訪問所述從機埠的順序,其中,N、M為自然數,且M小於或等於N。 Further, when the number of the host ports is N, which are the first host port, the second host port, ..., up to the Nth host side, the corresponding priority order is the first level, the second level, ... Up to the Nth level, if the Mth host port requests access to the same slave port before the M-1th host port, the arbiter determines the Mth host port on a first-come, first-served basis The slave port is preferentially accessed until the Mth master port stops requesting to use the data bus, and the arbiter then determines the first master port, the second master port, the second master port, and the ..., until the M-1th master port accesses the slave port, wherein N and M are natural numbers, and M is less than or equal to N.

本發明同時提供一種訪問資料匯流排的方法,所述資料匯流排用於連接主機埠及從機埠,所述主機埠具有訪問所述從機埠的固定優先順序別,所述方法包括:接收所述主機埠發送的位址信號並進行解碼,生成相應的選擇信號,根據所述選擇信號選擇對應的所述從機埠與所述主機埠相連;以及接收所述主機埠發送的請求信號,並根據固定優先權與先到先做結合的方式確定所述主機埠訪問所述從機埠的順序。 The present invention also provides a method for accessing a data bus, the data bus is used for connecting a master port and a slave port, the master port has a fixed priority for accessing the slave port, and the method includes: receiving Decoding the address signal sent by the host port to generate a corresponding selection signal, and selecting the corresponding slave port to connect to the host port according to the selection signal; and receiving the request signal sent by the host port, The sequence of accessing the slave port by the master port is determined according to the combination of fixed priority and first come first.

進一步地,當多個主機埠同時對同一個從機埠發出訪問請求時,根據所述固定優先順序別確定所述主機埠訪問所述從機埠的順序,優先順序別越高的主機埠具有越優先訪問所述從機埠的許可權。 Further, when multiple host ports send access requests to the same slave port at the same time, the order in which the host port accesses the slave port is determined according to the fixed priority order, and the host port with a higher priority has a Permission to access the slave port has higher priority.

進一步地,當多個主機埠不是同時對一個從機埠發出訪問請求時,採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,越先發出所述訪問請求的主機埠具有越優先訪問所述從機埠的許可權。 Further, when multiple host ports do not send access requests to a slave port at the same time, a first-come, first-served approach is used to determine the order in which the host ports access the slave ports, and the host that sends the access request first. The port has the higher priority to access the slave port.

進一步地,當所述主機埠的數量為N,分別為第一主機埠、第二主機埠、…、直至第N主機端,對應的優先順序別依次為第1級、第2級、…、直至第N級,如果所述第M主機埠在所述第M-1主機埠之前請求訪問同一所述從機埠,則根據先到先做的方式確定所述第M主機埠優先訪問所述從機埠,直至所述第K主機埠停止請求使用所述資料匯流排,再根據所述優先順序別確定所述第一主機埠、所述第二主機埠、…、直至所述第M-1主機埠訪問所述從機埠的順序,其中,N、M為自然數,且M小於或等於N。 Further, when the number of the host ports is N, which are the first host port, the second host port, ..., up to the Nth host side, the corresponding priority order is the first level, the second level, ... Up to the Nth level, if the Mth host port requests to access the same slave port before the M-1th host port, it is determined that the Mth host port preferentially accesses the Slave ports, until the K th host port stops requesting to use the data bus, and then determine the first host port, the second host port, ..., until the M-th host port according to the priority order. 1 The order in which the master port accesses the slave port, wherein N and M are natural numbers, and M is less than or equal to N.

本發明還提供一種訪問資料匯流排的系統,所述系統包括主機、從機以及連接所述主機及從機的上述訪問資料匯流排的裝置。 The present invention also provides a system for accessing a data bus, the system comprising a master, a slave, and the above-mentioned device for accessing the data bus connected to the master and the slave.

本發明提出的訪問資料匯流排的方法、裝置及系統可避免採用單一固定優先級別的方式確定所述主機埠訪問所述從機埠順序時,優先順序別較低的主機埠因長時間等待獲取不到資料匯流排的使用權而導致的資料讀寫效率較低,也可避免單一採用先到先做的方式確定所述主機埠訪問所述從機埠順序時,優先順序別較高的主機讀寫資料的速度較慢而影響系統運行效率,因此, 本發明提出的訪問資料匯流排的方法、裝置及系統可以增加主機整體上讀寫資料的效率,實現零等待(zero wait state),減少時延。 The method, device and system for accessing a data bus provided by the present invention can avoid using a single fixed priority to determine the sequence of the master port accessing the slave port, and the host port with a lower priority will wait for a long time to acquire the slave port. The data read and write efficiency is low due to the lack of the right to use the data bus, and it can also avoid the use of a first-come-first-do method to determine the order of the host port accessing the slave port, and the host with higher priority can be avoided. The speed of reading and writing data is slow and affects the efficiency of the system. Therefore, The method, device and system for accessing a data bus proposed by the present invention can increase the overall efficiency of the host to read and write data, realize zero wait state, and reduce time delay.

100:訪問資料匯流排的系統 100: System for accessing data busses

10:主機 10: Host

20:從機 20: Slave

30:訪問資料匯流排的裝置 30: Device for accessing the data bus

31:主機埠 31: host port

32:從機埠 32: slave port

33:第一多工器 33: First Multiplexer

34:第二多工器 34: Second Multiplexer

35:解碼器 35: Decoder

36:仲裁器 36: Arbiter

圖1是本發明一實施例的訪問資料匯流排的系統的模組示意圖。 FIG. 1 is a schematic diagram of a module of a system for accessing a data bus according to an embodiment of the present invention.

圖2是本發明一實施例的訪問資料匯流排的方法的流程示意圖。 FIG. 2 is a schematic flowchart of a method for accessing a data bus according to an embodiment of the present invention.

為了能夠更清楚地理解本發明的上述目的、特徵和優點,下面結合附圖和具體實施例對本發明進行詳細描述。需要說明的是,在不衝突的情況下,本發明的實施例及實施例中的特徵可以相互組合。 In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments may be combined with each other under the condition of no conflict.

在下面的描述中闡述了很多具體細節以便於充分理解本發明,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 In the following description, many specific details are set forth in order to facilitate a full understanding of the present invention, and the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

除非另有定義,本文所使用的所有的技術和科學術語與屬於本發明的技術領域的技術人員通常理解的含義相同。本文中在本發明的說明書中所使用的術語只是為了描述具體的實施例的目的,不是旨在於限制本發明。 Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention.

請參閱圖1,圖示為本發明提出的訪問資料匯流排的系統一實施例的模組示意圖,所述訪問資料匯流排的系統100包括主機10、從機20以及訪問資料匯流排的裝置30。 Please refer to FIG. 1 , which is a schematic diagram of a module of an embodiment of a system for accessing a data bus according to the present invention. The system 100 for accessing a data bus includes a host 10 , a slave 20 , and a device 30 for accessing the data bus. .

在本實施例中,所述訪問資料匯流排的裝置30包括主機埠31、從機埠32、第一多工器33、第二多工器34、解碼器35以及仲裁器36。 In this embodiment, the device 30 for accessing the data bus includes a master port 31 , a slave port 32 , a first multiplexer 33 , a second multiplexer 34 , a decoder 35 and an arbiter 36 .

所述主機埠31用於連接所述主機10。所述主機埠31用於連接所述主機10。所述從機埠32用於連接所述從機20,所述從機埠32通過資料匯流排連接至所述主機埠31。所述主機埠31具有訪問所述從機埠32的固定優先順序別。 在本較佳實施例中,優先順序別越高的主機埠31具有越優先訪問所述從機埠32的許可權,也就是說,優先順序別越高的主機埠31具有對所述資料匯流排具有越優先的使用權。 The host port 31 is used to connect the host 10 . The host port 31 is used to connect the host 10 . The slave port 32 is used to connect the slave 20 , and the slave port 32 is connected to the master port 31 through a data bus. The master port 31 has a fixed priority for accessing the slave port 32 . In this preferred embodiment, the master port 31 with higher priority has the permission to access the slave port 32 more preferentially, that is to say, the master port 31 with higher priority has access to the data flow The row has the higher priority to use.

所述第一多工器33、所述第二多工器34為多路選擇器,連接至所述主機埠31與所述從機埠32之間,用於實現從所述主機埠31至所述從機埠32之間的切換。 The first multiplexer 33 and the second multiplexer 34 are multiplexers, which are connected between the master port 31 and the slave port 32, and are used to realize the connection from the master port 31 to the slave port 32. Switching between the slave ports 32 .

所述解碼器35連接至所述第二多工器34,用於接收所述主機埠31發送的位址信號(例如,圖1中所示HADDR0,HADDR4)並進行解碼,生成相應的選擇信號,所述第二多工器34根據所述選擇信號選擇對應的所述從機埠32與所述主機埠31相連。 The decoder 35 is connected to the second multiplexer 34 for receiving the address signal (for example, HADDR0, HADDR4 shown in FIG. 1 ) sent by the host port 31 and decoding it to generate a corresponding selection signal , the second multiplexer 34 selects the corresponding slave port 32 to connect to the master port 31 according to the selection signal.

所述仲裁器36連接至所述第一多工器33,用於接收所述主機埠31發送的請求信號HREQx,並根據固定優先權與先到先做結合的方式確定所述主機埠31訪問所述從機埠32的順序。所述請求信號HREQx表明所述主機埠31請求使用所述資料匯流排訪問從機埠32。 The arbiter 36 is connected to the first multiplexer 33 for receiving the request signal HREQx sent by the host port 31, and determines the access of the host port 31 according to a combination of fixed priority and first come first The sequence of the slave ports 32. The request signal HREQx indicates that the master port 31 requests access to the slave port 32 using the data bus.

在本實施例中,當多個主機埠31同時對同一個從機埠32發出訪問請求時,所述仲裁器36根據所述固定優先順序別確定所述主機埠31訪問所述從機埠32的順序,優先順序別越高的主機埠31具有越優先訪問所述從機埠32的許可權。 In this embodiment, when multiple master ports 31 send access requests to the same slave port 32 at the same time, the arbiter 36 respectively determines that the master port 31 accesses the slave port 32 according to the fixed priority order. , the master port 31 with a higher priority has a higher priority to access the slave port 32 .

當多個主機埠31不是同時對一個從機埠32發出訪問請求時,所述仲裁器36採用先到先做的方式確定所述主機埠31訪問所述從機埠32的順序,越先發出所述訪問請求的主機埠31具有越優先訪問所述從機埠32的許可權。 When multiple master ports 31 do not send access requests to one slave port 32 at the same time, the arbiter 36 determines the order in which the master ports 31 access the slave ports 32 in a first-come, first-served manner, and the earlier the access requests are sent out. The master port 31 of the access request has a higher priority to access the slave port 32 .

請參閱圖2,本發明同時提出一種訪問資料匯流排方法。所述方法的步驟如下:為了便於理解,在本實施例中,以主機埠31以及從機埠32均為四個為例,加以說明。所述主機埠31包括第一主機埠M0、第二主機埠M1、第二主機埠M2以及第三主機埠M3,所述主機埠31訪問所述從機埠32的優先順序別為,第一主機埠M0>第二主機埠M1>第二主機埠M2>第三主機埠M3。 Please refer to FIG. 2 , the present invention also provides a method for accessing a data bus. The steps of the method are as follows: In order to facilitate understanding, in this embodiment, the master port 31 and the slave port 32 are both four as an example for description. The host port 31 includes a first host port M0, a second host port M1, a second host port M2 and a third host port M3. The priority order of the host port 31 accessing the slave port 32 is: The host port M0 > the second host port M1 > the second host port M2 > the third host port M3.

步驟S101,設置所述仲裁器36的初始狀態,具體地,設置所述主機埠31的請求信號HREQ及傳輸類型信號HTRANS。在本實施例中,所述請求信 號初始值設置為HREQ=4'hf,表明所述主機埠31數量為四個,所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,表明沒有所述主機埠31請求訪問所述從機埠32。 Step S101 , setting the initial state of the arbiter 36 , specifically, setting the request signal HREQ and the transmission type signal HTRANS of the host port 31 . In this embodiment, the request letter The initial value of the number is set to HREQ=4'hf, indicating that the number of the host ports 31 is four, and the transmission type signal Mx_HTRANS[1] is set to IDEL, indicating that no host port 31 requests to access the slave port 32 .

步驟S102,如果所述第一主機埠M0、所述第二主機埠M1、所述第三主機埠M2以及所述第四主機埠M3同時請求訪問同一從機埠32,所述仲裁器36根據優先順序別確定所述主機埠31訪問所述從機埠32的順序,對應的所述請求信號HREQ為{!M3_HTRANS[1],!M2_HTRANS[1],!M1_HTRANS[1],M0_HTRANS[1]},表明所述第一主機埠M0優先訪問所述從機埠32,所述第二主機M1、所述第三主機M2及所述第四主機M3依次排隊等待訪問所述從機埠32。所述仲裁器36確定所述第一主機埠M0訪問所述從機埠32,直至所述第一主機埠M0停止請求使用所述資料匯流排,對應的傳輸類型信號M0_HTRANS[1]設置為IDE。所述仲裁器36依照所述優先順序級別依次確定所述第二主機埠M1、所述第三主機埠M2及所述第四主機埠M3訪問所述從機埠32,直至沒有所述主機埠31請求訪問所述從機埠32,對應的所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,返回至步驟S101。 Step S102, if the first host port M0, the second host port M1, the third host port M2 and the fourth host port M3 request to access the same slave port 32 at the same time, the arbiter 36 according to The priority order determines the order in which the host port 31 accesses the slave port 32, and the corresponding HREQ request signal is {!M3_HTRANS[1], !M2_HTRANS[1], !M1_HTRANS[1], M0_HTRANS[1] }, indicating that the first host port M0 preferentially accesses the slave port 32 , and the second host M1 , the third host M2 and the fourth host M3 queue up in sequence to access the slave port 32 . The arbiter 36 determines that the first host port M0 accesses the slave port 32 until the first host port M0 stops requesting to use the data bus, and the corresponding transfer type signal M0_HTRANS[1] is set to IDE . The arbiter 36 sequentially determines that the second host port M1, the third host port M2 and the fourth host port M3 access the slave port 32 according to the priority level, until there is no host port. 31 requests to access the slave port 32, the corresponding transmission type signal Mx_HTRANS[1] is set to IDEL, and the process returns to step S101.

步驟S103,如果所述第二主機埠M1在所述第一主機埠M0之前請求訪問同一所述從機埠32,對應的所述請求信號HREQ為{!M3_HTRANS[1],!M2_HTRANS[1],M1_HTRANS[1],!M0_HTRANS[1]},表明所述仲裁器36根據先到先做的方式確定所述第二主機埠M1優先訪問所述從機埠32,直至所述第二主機埠M1停止請求使用所述資料匯流排,對應的傳輸類型信號M1_HTRANS[1]設置為IDEL。所述仲裁器36再根據所述優先順序別確定 所述第一主機埠M0、所述第三主機埠M2及所述第四主機埠M3訪問所述從機埠32,直至沒有所述主機埠31請求訪問所述從機埠32,對應的所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,返回至步驟S101。 Step S103, if the second host port M1 requests to access the same slave port 32 before the first host port M0, the corresponding request signal HREQ is {!M3_HTRANS[1], !M2_HTRANS[1] , M1_HTRANS[1], !M0_HTRANS[1]}, indicating that the arbiter 36 determines that the second master port M1 preferentially accesses the slave port 32 on a first-come-first-served basis until the second master port M1 stops requesting to use the data bus and the corresponding transfer type signal M1_HTRANS[1] is set to IDEL. The arbiter 36 then determines according to the priority order The first host port M0, the third host port M2, and the fourth host port M3 access the slave port 32 until the host port 31 does not request access to the slave port 32. The transmission type signal Mx_HTRANS[1] is set to IDEL, and the process returns to step S101.

同樣地,步驟S104,如果所述第三主機埠M2在所述第一主機埠M0及所述第二主機埠M1之前請求訪問同一所述從機埠32,對應的所述請求信號HREQ為{!M3_HTRANS[1],M2_HTRANS[1],!M1_HTRANS[1],!M0_HTRANS[1]},表明所述仲裁器36根據先到先做的方式確定所述第三主機埠M2優先訪問所述從機埠32,直至所述第三主機埠M2停止請求使用所述資料匯流排,對應的傳輸類型信號M2_HTRANS[1]設置為IDEL。所述仲裁器36再根據所述優先順序別確定所述第一主機埠M0、所述第二主機埠M1及所述第四主機埠M3訪問所述從機埠32,直至沒有所述主機埠31請求訪問所述從機埠32,對應的所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,返回至步驟S101。 Similarly, in step S104, if the third host port M2 requests to access the same slave port 32 before the first host port M0 and the second host port M1, the corresponding request signal HREQ is { !M3_HTRANS[1], M2_HTRANS[1], !M1_HTRANS[1], !M0_HTRANS[1]}, indicating that the arbiter 36 determines that the third host port M2 preferentially accesses the slave For the port 32, until the third host port M2 stops requesting to use the data bus, the corresponding transfer type signal M2_HTRANS[1] is set to IDEL. The arbiter 36 then determines that the first host port M0, the second host port M1 and the fourth host port M3 access the slave port 32 according to the priority order, until there is no host port. 31 requests to access the slave port 32, the corresponding transmission type signal Mx_HTRANS[1] is set to IDEL, and the process returns to step S101.

步驟S105,如果所述第四主機埠M3在所述第一主機埠M0、所述第二主機埠M1及所述第三主機埠M2之前請求訪問同一所述從機埠32,對應的所述請求信號HREQ為{M3_HTRANS[1],!M2_HTRANS[1],!M1_HTRANS[1],!M0_HTRANS[1]},表明所述仲裁器36根據先到先做的方式確定所述第四主機埠M3優先訪問所述從機埠32,直至所述第四主機埠M3停止請求使用所述資料匯流排,對應的傳輸類型信號M3_HTRANS[1]設置為IDEL。所述仲裁器36再根據所述優先順序別確定 所述第一主機埠M0、所述第二主機埠M1及所述第三主機埠M2訪問所述從機埠32,直至沒有所述主機埠31請求訪問所述從機埠32,對應的所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,返回至步驟S101。 Step S105, if the fourth host port M3 requests to access the same slave port 32 before the first host port M0, the second host port M1 and the third host port M2, the corresponding The request signal HREQ is {M3_HTRANS[1], !M2_HTRANS[1], !M1_HTRANS[1], !M0_HTRANS[1]}, indicating that the arbiter 36 determines the fourth host port M3 on a first-come, first-served basis The slave port 32 is preferentially accessed until the fourth master port M3 stops requesting to use the data bus, and the corresponding transfer type signal M3_HTRANS[1] is set to IDEL. The arbiter 36 then determines according to the priority order The first host port M0, the second host port M1, and the third host port M2 access the slave port 32 until the host port 31 does not request access to the slave port 32, the corresponding The transmission type signal Mx_HTRANS[1] is set to IDEL, and the process returns to step S101.

可以理解,當所述主機埠31的數量為N時,分別為第一主機埠、第二主機埠、…、直至第N主機埠,對應的優先順序別依次為第1級、第2級、…、直至第N級,其中N為自然數。如果所述第M主機埠在所述第M-1主機埠之前請求訪問同一所述從機埠,其中,M為自然數,且小於或等於N,則所述仲裁器36根據先到先做的方式確定所述第M主機埠優先訪問所述從機埠32,直至所述第M主機埠停止請求使用所述資料匯流排,對應的傳輸類型信號MK_HTRANS[1]設置為IDEL。所述仲裁器36再根據所述優先順序別確定所述第一主機埠、所述第二主機埠、…、直至所述第M-1主機埠訪問所述從機埠32,直至沒有所述主機埠31請求訪問所述從機埠32,對應的所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,返回至步驟S101。 It can be understood that when the number of the host ports 31 is N, they are the first host port, the second host port, . ..., up to the Nth level, where N is a natural number. If the M-th master port requests access to the same slave port before the M-1-th master port, where M is a natural number and less than or equal to N, the arbiter 36 performs a first-come-first-served The method determines that the Mth host port preferentially accesses the slave port 32 until the Mth host port stops requesting to use the data bus, and the corresponding transfer type signal MK_HTRANS[1] is set to IDEL. The arbiter 36 then determines the first host port, the second host port, ..., until the M-1th host port accesses the slave port 32 according to the priority order, until there is no The master port 31 requests to access the slave port 32, the corresponding transfer type signal Mx_HTRANS[1] is set to IDEL, and the process returns to step S101.

本發明提出的訪問資料匯流排的方法、裝置30及系統100可避免採用單一固定優先級別的方式確定所述主機埠31訪問所述從機埠32順序時,優先順序別較低的主機埠31因長時間等待獲取不到資料匯流排的使用權而導致的資料讀寫效率較低,也可避免採用單一先到先做的方式確定所述主機埠31訪問所述從機埠32順序時,優先順序別較高的主機10讀寫資料的速度較慢而影響系統運行效率,本發明提出的訪問資料匯流排的方法、裝置30及系統100可以增加主機10整體上讀寫資料的效率,實現零等待(zero wait state),減少時延。 The method, device 30 and system 100 for accessing a data bus provided by the present invention can avoid using a single fixed priority to determine the order of the master port 31 accessing the slave port 32, the master port 31 with a lower priority The data read and write efficiency is low due to waiting for a long time to obtain the right to use the data bus, and it can also avoid using a single first-come-first-do method to determine the order in which the host port 31 accesses the slave port 32. The speed of reading and writing data by the host 10 with a higher priority is slower, which affects the system operation efficiency. The method, device 30 and system 100 for accessing a data bus proposed by the present invention can increase the overall efficiency of the host 10 to read and write data, and realize the Zero wait state, reducing latency.

另外,本發明提出的訪問資料匯流排的方法、裝置30及系統100採用第一多工器33及第二多工器34來實現所述主機10與從機20之問的切換,在提高讀寫資料的效率,同時,也不容易造成時序收斂的問題。 In addition, the method, device 30 and system 100 for accessing a data bus proposed by the present invention use the first multiplexer 33 and the second multiplexer 34 to realize the switching between the master 10 and the slave 20, thus improving the readability of the data bus. The efficiency of writing data, and at the same time, it is not easy to cause timing convergence problems.

以上所述僅為本發明的較佳實施例而已,並不用以限制本發明,凡在本發明的精神和原則之內所作的任何修改、等同替換和改進等,均應包含在本發明的保護範圍之內。 The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.

100:訪問資料匯流排的系統 100: System for accessing data busses

10:主機 10: Host

20:從機 20: Slave

30:訪問資料匯流排的裝置 30: Device for accessing the data bus

31:主機埠 31: host port

32:從機埠 32: slave port

33:第一多工器 33: First Multiplexer

34:第二多工器 34: Second Multiplexer

35:解碼器 35: Decoder

36:仲裁器 36: Arbiter

Claims (5)

一種訪問資料匯流排的裝置,所述訪問資料匯流排的裝置包括:主機埠,用於連接主機;從機埠,用於連接從機,所述從機埠通過資料匯流排連接至所述主機埠,所述主機埠具有訪問所述從機埠的固定優先順序別;第一多工器以及第二多工器,連接至所述主機埠及所述從機埠之間,用於實現所述主機埠與所述從機埠之間的切換;解碼器,連接至所述第二多工器,用於接收所述主機埠發送的位址信號並進行解碼,生成相應的選擇信號,所述第二多工器根據所述選擇信號選擇對應的所述從機埠與所述主機埠相連;以及仲裁器,連接至所述第一多工器,用於接收所述主機埠發送的請求信號,並根據固定優先權與先到先做結合的方式確定所述主機埠訪問所述從機埠的順序,其中當多個主機埠同時對同一個從機埠發出訪問請求時,所述仲裁器根據所述固定優先順序別確定所述主機埠訪問所述從機埠的順序,其中,優先順序別越高的主機埠具有越優先訪問所述從機埠的許可權;其中當多個主機埠不是同時對一個從機埠發出訪問請求時,所述仲裁器採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,其中,越先發出所述請求信號的主機埠具有越優先訪問所述從機埠的許可權。 A device for accessing a data bus, the device for accessing a data bus comprises: a host port for connecting to a host; a slave port for connecting to a slave, the slave port being connected to the host through the data bus a port, the master port has a fixed priority for accessing the slave port; a first multiplexer and a second multiplexer are connected between the master port and the slave port for implementing all Switching between the master port and the slave port; a decoder, connected to the second multiplexer, is used to receive and decode the address signal sent by the master port to generate a corresponding selection signal, so The second multiplexer selects the corresponding slave port to be connected to the host port according to the selection signal; and an arbiter is connected to the first multiplexer for receiving a request sent by the host port signal, and determine the order in which the master port accesses the slave port according to the combination of fixed priority and first come first. The device determines the order in which the master port accesses the slave port according to the fixed priority, wherein a master port with a higher priority has a higher priority to access the slave port; When the port does not send an access request to a slave port at the same time, the arbiter determines the order in which the master port accesses the slave port in a first-come, first-served manner, wherein the master port that sends the request signal earlier Has the higher priority to access the slave port. 如請求項1所述的訪問資料匯流排的裝置,其中當所述主機埠的數量為N,分別為第一主機埠、第二主機埠、直至第N主機端,對應的優先順序別依次為第1級、第2級、直至第N級,所述第M主機埠在所述第一主機埠、所述第二主機埠、直至所述第M-1主機埠之前請求訪問同一所述從機埠,則所述仲裁器根據先到先做的方式確定所述第M主機埠優先訪問所述從機埠,直至所述第M主機埠停止請求使用所述資料匯流排,所述仲裁器再根據所述優先順序別確定所述第一主機埠、所述第二主機埠、直至所述第M-1主機埠訪問所述從機埠的順序,其中,N、M為自然數,且M小於或等於N。 The device for accessing a data bus according to claim 1, wherein when the number of the host ports is N, they are the first host port, the second host port, and the Nth host port, respectively, and the corresponding priority order is as follows: Level 1, level 2, up to level N, the M th host port requests access to the same slave port before the first host port, the second host port, and the M-1 th host port port, the arbiter determines that the Mth master port preferentially accesses the slave port on a first-come, first-served basis, until the Mth master port stops requesting to use the data bus, the arbiter Then determine the sequence of the first host port, the second host port, and the M-1th host port accessing the slave port according to the priority order, wherein N and M are natural numbers, and M is less than or equal to N. 一種訪問資料匯流排的方法,所述資料匯流排用於連接主機埠及從機埠,所述主機埠具有訪問所述從機埠的固定優先順序別,其改良在於:所述方法包括:接收所述主機埠發送的位址信號並進行解碼,生成相應的選擇信號,根據所述選擇信號選擇對應的所述從機埠與所述主機埠相連;以及接收所述主機埠發送的請求信號,並根據固定優先權與先到先做結合的方式確定所述主機埠訪問所述從機埠的順序,其中當多個主機埠同時對同一個從機埠發出訪問請求時,根據所述固定優先順序別確定所述主機埠訪問所述從機埠的順序,優先順序別越高的主機埠具有越優先訪問所述從機埠的許可權;其中當多個主機埠不是同時對一個從機埠發出訪問請求時,採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,越先發出所述訪問請求的主機埠具有越優先訪問所述從機埠的許可權。 A method for accessing a data bus, the data bus is used for connecting a master port and a slave port, the master port has a fixed priority for accessing the slave port, the improvement is that: the method comprises: receiving Decoding the address signal sent by the host port to generate a corresponding selection signal, and selecting the corresponding slave port to connect to the host port according to the selection signal; and receiving the request signal sent by the host port, And determine the order in which the master port accesses the slave port according to the combination of fixed priority and first come first, wherein when multiple master ports send access requests to the same slave port at the same time, according to the fixed priority The order determines the order in which the host port accesses the slave port, and the host port with a higher priority has the priority to access the slave port. When the access request is issued, the order in which the host port accesses the slave port is determined in a first-come, first-served manner, and the host port that issues the access request earlier has the priority to access the slave port. 如請求項3所述的訪問資料匯流排的方法,其中當所述主機埠的數量為N,分別為第一主機埠、第二主機埠、直至第N主機端,對應的優先順序別依次為第1級、第2級、直至第N級,如果第M主機埠在所述第一主機埠、所述第二主機埠、直至所述第M-1主機埠之前請求訪問同一所述從機埠,則根據先到先做的方式確定所述第M主機埠優先訪問所述從機埠,直至所述第K主機埠停止請求使用所述資料匯流排,再根據所述優先順序別確定所述第一主機埠、所述第二主機埠、直至所述第M-1主機埠訪問所述從機埠的順序,其中,N、M為自然數,且M小於或等於N。 The method for accessing a data bus according to claim 3, wherein when the number of the host ports is N, they are the first host port, the second host port, up to the Nth host port, and the corresponding priorities are in sequence: Level 1, level 2, up to level N, if the Mth host port requests access to the same slave before the first host port, the second host port, up to the M-1th host port port, the M-th host port will be prioritized to access the slave port on a first-come-first-served basis, until the K-th host port stops requesting the use of the data bus, and then the M-th host port will be determined according to the priority order. The sequence of accessing the slave port from the first master port, the second master port, to the M-1th master port, wherein N and M are natural numbers, and M is less than or equal to N. 一種訪問資料匯流排的系統,所述系統包括主機、從機以及連接所述主機及從機的訪問資料匯流排的裝置,其改良在於:所述訪問資料匯流排的裝置為請求項1至2任意一項所述的訪問資料匯流排的裝置。 A system for accessing a data bus, the system comprising a master, a slave, and a device for accessing the data bus connecting the master and the slave, the improvement is that: the device for accessing the data bus is request items 1 to 2 Any one of the devices for accessing a data bus.
TW109114076A 2020-04-27 2020-04-27 Data bus accessing device, method and system TWI764139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109114076A TWI764139B (en) 2020-04-27 2020-04-27 Data bus accessing device, method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109114076A TWI764139B (en) 2020-04-27 2020-04-27 Data bus accessing device, method and system

Publications (2)

Publication Number Publication Date
TW202141288A TW202141288A (en) 2021-11-01
TWI764139B true TWI764139B (en) 2022-05-11

Family

ID=80783476

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109114076A TWI764139B (en) 2020-04-27 2020-04-27 Data bus accessing device, method and system

Country Status (1)

Country Link
TW (1) TWI764139B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030043790A1 (en) * 2001-09-06 2003-03-06 Philip Gutierrez Multi-master bus architecture for system -on-chip designs
US20070126474A1 (en) * 2005-12-07 2007-06-07 June Young Chang Crossbar switch architecture for multi-processor SoC platform
US20110138098A1 (en) * 2009-02-13 2011-06-09 The Regents Of The University Of Michigan Crossbar circuitry for applying an adaptive priority scheme and method of operation of such crossbar circuitry
US20130046909A1 (en) * 2009-11-18 2013-02-21 ST- Ericsson SA Method and Apparatus of Master-to-Master Transfer of Data on a Chip and System on Chip
TW201533577A (en) * 2014-02-20 2015-09-01 Samsung Electronics Co Ltd Asynchronous interface in a system on chip and a method of operating the same
TWI569146B (en) * 2014-12-27 2017-02-01 英特爾公司 A method, apparatus, system for embedded stream lanes in a high-performance interconnect

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030043790A1 (en) * 2001-09-06 2003-03-06 Philip Gutierrez Multi-master bus architecture for system -on-chip designs
US20070126474A1 (en) * 2005-12-07 2007-06-07 June Young Chang Crossbar switch architecture for multi-processor SoC platform
US20110138098A1 (en) * 2009-02-13 2011-06-09 The Regents Of The University Of Michigan Crossbar circuitry for applying an adaptive priority scheme and method of operation of such crossbar circuitry
US20130046909A1 (en) * 2009-11-18 2013-02-21 ST- Ericsson SA Method and Apparatus of Master-to-Master Transfer of Data on a Chip and System on Chip
TW201533577A (en) * 2014-02-20 2015-09-01 Samsung Electronics Co Ltd Asynchronous interface in a system on chip and a method of operating the same
TWI569146B (en) * 2014-12-27 2017-02-01 英特爾公司 A method, apparatus, system for embedded stream lanes in a high-performance interconnect

Also Published As

Publication number Publication date
TW202141288A (en) 2021-11-01

Similar Documents

Publication Publication Date Title
JP4737438B2 (en) Information processing apparatus that shares resources among multiple processing units
US7246188B2 (en) Flow control method to improve bus utilization in a system-on-a-chip integrated circuit
US7966431B2 (en) Systems for implementing SDRAM controllers, and buses adapted to include advanced high performance bus features
US9471524B2 (en) System bus transaction queue reallocation
CN105068951B (en) A kind of system-on-chip bus with non-isochronous transfers structure
KR20050082834A (en) Bus system for connect sub-system included plural masters to bus based on open core protocol
US20140281081A1 (en) Proactive quality of service in multi-matrix system bus
JP7195484B1 (en) Command Replay for Non-Volatile Dual Inline Memory Modules
US20160275028A1 (en) Semiconductor device
JPH0728758A (en) And device for dynamic time loop arbitration
US8359419B2 (en) System LSI having plural buses
US5933616A (en) Multiple bus system bus arbitration according to type of transaction requested and the availability status of the data buffer between the buses
US20230269205A1 (en) Switch for transmitting packet, network on chip having the same, and operating method thereof
TWI764139B (en) Data bus accessing device, method and system
JP4260720B2 (en) Bus control device
US7031337B2 (en) Data processing apparatus and slave interface mechanism for controlling access to a slave logic unit by a plurality of master logic units
US20210334230A1 (en) Method for accessing data bus, accessing system, and device
JP2010287058A (en) Memory system
US6839820B1 (en) Method and system for controlling data access between at least two memory arrangements
CN115762596A (en) MCU access memory digital circuit structure
JP4593220B2 (en) Memory access control method and method, and shared memory access control method and method
JP2000250852A (en) Bus arbitrating device, bus system and bus arbitrating method
JP2000132500A (en) Data transfer system
JPS6086649A (en) Microcomputer system