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

Data bus accessing device, method and system Download PDF

Info

Publication number
TW202141288A
TW202141288A TW109114076A TW109114076A TW202141288A TW 202141288 A TW202141288 A TW 202141288A TW 109114076 A TW109114076 A TW 109114076A TW 109114076 A TW109114076 A TW 109114076A TW 202141288 A TW202141288 A TW 202141288A
Authority
TW
Taiwan
Prior art keywords
port
host
slave
data bus
master
Prior art date
Application number
TW109114076A
Other languages
Chinese (zh)
Other versions
TWI764139B (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

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

本發明涉及資料處理技術,尤其涉及一種訪問資料匯流排的裝置、方法及系統。The present invention relates to data processing technology, in particular to a device, method and system for accessing a 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) mostly uses a multi-layer AHB (Advanced High Performance Bus) bus architecture for information interaction. The AHB specification includes the AMBA (Advanced Microcontroller Bus Architecture) specification and the AHB-Lite agreement. Among them, the AMBA specification v2.0 defines the connection between the AHB multi-layers, and determines multiple masters and multiple slaves by defining the signals of the arbiter, such as the bus request (HBUSREQx) signal and the bus authorization (HGRANTx) signal Switch between. The AHB-Lite protocol does not clearly define the connection between the AHB layers 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 confluence. The row request signal and the bus authorization signal are used to determine 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, the pipeline characteristics of the AHB-Lite and AHB multilayer bus architecture may cause a single wait state to be inserted, causing delay.

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

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

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

進一步地,當多個主機埠不是同時對一個從機埠發出訪問請求時,所述仲裁器採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,其中,越先發出所述請求信號的主機埠具有越優先訪問所述從機埠的許可權。Further, when multiple host ports do not issue access requests to a slave port at the same time, the arbiter uses a first-come, first-doing method to determine the order in which the host port accesses the slave port, wherein the more the first is issued The host 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,..., to the Nth host terminal, the corresponding priority order is the first level, the second level,..., Up to the Nth level, if the Mth master port requests to access the same slave port before the M-1th master port, the arbiter determines the Mth master port on a first come, first served basis Prioritize access to the slave port until the M-th master port stops requesting the use of the data bus, and the arbiter determines the first master port, the second master port, and the second master port according to the priority order. ... until the sequence of the M-1th master port accessing the slave port, where 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 to connect a host port and a slave port, the host port has a fixed priority order for accessing the slave port, and the method includes: Receiving and 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 The request signal sent by the host port is received, and the order in which the host port accesses the slave port is determined according to a combination of fixed priority and first-come-first-served.

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

進一步地,當多個主機埠不是同時對一個從機埠發出訪問請求時,採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,越先發出所述訪問請求的主機埠具有越優先訪問所述從機埠的許可權。Further, when multiple host ports do not issue access requests to a slave port at the same time, a first-come-first-doing method is adopted to determine the order in which the host port accesses the slave port, and the host that issues the access request first The port has the 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,..., to the Nth host terminal, the corresponding priority order is the first level, the second level,..., Up to the Nth level, if the Mth master port requests access to the same slave port before the M-1th master port, the Mth master port is determined to have priority access to the M-1 From the machine port until the Kth host port stops requesting the use of the data bus, the first host port, the second host port, ..., until the M-th host port are determined according to the priority order. 1 The sequence in which the master port accesses the slave port, where 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 includes a host, a slave, and the above-mentioned device for accessing the data bus connected to the host and the slave.

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

為了能夠更清楚地理解本發明的上述目的、特徵和優點,下面結合附圖和具體實施例對本發明進行詳細描述。需要說明的是,在不衝突的情況下,本發明的實施例及實施例中的特徵可以相互組合。In order to be able to understand the above objectives, features and advantages of the present invention more clearly, 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 can be combined with each other if there is no conflict.

在下面的描述中闡述了很多具體細節以便於充分理解本發明,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。In the following description, many specific details are set forth in order to fully understand the present invention. The described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work 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 those skilled in the technical field of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments, 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 modules of an embodiment of a system for accessing a data bus proposed by 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 host 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 to the host 10. The host port 31 is used to connect to 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 host port 31 has a fixed priority order for accessing the slave port 32. In this preferred embodiment, the host port 31 with the higher priority has the higher priority to access the slave port 32, that is to say, the host port 31 with the higher priority has the right to access the data. The platoon has the more preferential use right.

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

所述解碼器35連接至所述第二多工器34,用於接收所述主機埠31發送的位址信號(例如,圖1中所示HADDR0,HADDR4)並進行解碼,生成相應的選擇信號,所述第二多工器34根據所述選擇信號選擇對應的所述從機埠32與所述主機埠31相連。The decoder 35 is connected to the second multiplexer 34, and is configured to receive the address signal (for example, HADDR0, HADDR4 shown in FIG. 1) sent by the host port 31 and decode it to generate a corresponding selection signal The second multiplexer 34 selects the corresponding slave port 32 to be connected 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, and is configured to receive the request signal HREQx sent by the host port 31, and determine the access of the host port 31 according to the combination of fixed priority and first-come, first-served The sequence of the slave port 32. The request signal HREQx indicates that the host port 31 requests to use the data bus to access the slave port 32.

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

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

請參閱圖2,本發明同時提出一種訪問資料匯流排方法。所述方法的步驟如下:Please refer to FIG. 2, the present invention also proposes a method for accessing data bus. The steps of the method are as follows:

為了便於理解,在本實施例中,以主機埠31以及從機埠32均為四個為例,加以說明。所述主機埠31包括第一主機埠M0、第二主機埠M1、第二主機埠M2以及第三主機埠M3,所述主機埠31訪問所述從機埠32的優先順序別為,第一主機埠M0>第二主機埠M1>第二主機埠M2>第三主機埠M3。For ease of understanding, in this embodiment, description is made by taking four master ports 31 and slave ports 32 as an example. 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 to the slave port 32 is: Host port M0>second host port M1>second host port M2>third host port M3.

步驟S101,設置所述仲裁器36的初始狀態,具體地,設置所述主機埠31的請求信號HREQ及傳輸類型信號HTRANS。在本實施例中,所述請求信號初始值設置為HREQ=4'hf,表明所述主機埠31數量為四個,所述傳輸類型信號Mx_HTRANS[1]設置為IDEL,表明沒有所述主機埠31請求訪問所述從機埠32。Step S101, the initial state of the arbiter 36 is set, specifically, the request signal HREQ and the transmission type signal HTRANS of the host port 31 are set. In this embodiment, the initial value of the request signal is set to HREQ=4'hf, indicating that the number of host ports 31 is four, and the transmission type signal Mx_HTRANS[1] is set to IDEL, indicating that there is 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 simultaneously request access to the same slave port 32, the arbiter 36 The priority order determines the order in which the master port 31 accesses the slave port 32, and the corresponding request signal HREQ is {!M3_HTRANS[1], !M2_HTRANS[1], !M1_HTRANS[1], M0_HTRANS[1] }, which indicates 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 in turn to wait for access to the slave port 32. The arbiter 36 determines that the first master port M0 accesses the slave port 32 until the first master port M0 stops requesting the use of the data bus, and the corresponding transmission type signal M0_HTRANS[1] is set to IDE . The arbiter 36 sequentially determines the second master port M1, the third master port M2, and the fourth master port M3 to access the slave port 32 according to the priority level, until there is no master port 31 requests access to the slave port 32, and 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 master port M1 requests to access the same slave port 32 before the first master 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 according to a first-come, first-served manner, until the second master port M1 stops requesting to use the data bus, and the corresponding transmission type signal M1_HTRANS[1] is set to IDEL. The arbiter 36 then determines the first master port M0, the third master port M2, and the fourth master port M3 to access the slave port 32 according to the priority order, until there is no master port 31 requests access to the slave port 32, and the corresponding 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 master port M2 requests to access the same slave port 32 before the first master port M0 and the second master 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 machine port 32, until the third host port M2 stops requesting to use the data bus, the corresponding transmission type signal M2_HTRANS[1] is set to IDEL. The arbiter 36 then determines according to the priority order that the first master port M0, the second master port M1, and the fourth master port M3 access the slave port 32 until there is no master port 31 requests access to the slave port 32, and 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 master port M3 requests access to the same slave port 32 before the first master port M0, the second master port M1, and the third master 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 in a first-come, first-served manner Priority is given to the slave port 32 until the fourth master port M3 stops requesting the use of the data bus, and the corresponding transmission type signal M3_HTRANS[1] is set to IDEL. The arbiter 36 then determines according to the priority order that the first master port M0, the second master port M1, and the third master port M2 access the slave port 32 until there is no master port 31 requests access to the slave port 32, and the corresponding 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 respectively the first host port, the second host port, ..., up to the Nth host port, and the corresponding priority order is the first level, the second level, …, up to the Nth level, where N is a natural number. If the Mth master port requests access to the same slave port before the M-1th master port, where M is a natural number and is less than or equal to N, the arbiter 36 will do it according to first come first It is determined that the M-th master port preferentially accesses the slave port 32 until the M-th master port stops requesting the use of the data bus, and the corresponding transmission 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 such The 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.

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

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

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

100:訪問資料匯流排的系統 10:主機 20:從機 30:訪問資料匯流排的裝置 31:主機埠 32:從機埠 33:第一多工器 34:第二多工器 35:解碼器 36:仲裁器100: System to access data bus 10: Host 20: Slave 30: Access to the data bus device 31: host port 32: Slave port 33: The first multiplexer 34: second multiplexer 35: Decoder 36: Arbiter

圖1是本發明一實施例的訪問資料匯流排的系統的模組示意圖。FIG. 1 is a schematic diagram of modules 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.

none

100:訪問資料匯流排的系統100: System to access data bus

10:主機10: Host

20:從機20: Slave

30:訪問資料匯流排的裝置30: Access to the data bus device

31:主機埠31: host port

32:從機埠32: Slave port

33:第一多工器33: The first multiplexer

34:第二多工器34: second multiplexer

35:解碼器35: Decoder

36:仲裁器36: Arbiter

Claims (9)

一種訪問資料匯流排的裝置,所述訪問資料匯流排的裝置包括: 主機埠,用於連接主機; 從機埠,用於連接從機,所述從機埠通過資料匯流排連接至所述主機埠,所述主機埠具有訪問所述從機埠的固定優先順序別; 第一多工器以及第二多工器,連接至所述主機埠及所述從機埠之間,用於實現所述主機埠與所述從機埠之間的切換; 解碼器,連接至所述第二多工器,用於接收所述主機埠發送的位址信號並進行解碼,生成相應的選擇信號,所述第二多工器根據所述選擇信號選擇對應的所述從機埠與所述主機埠相連;以及 仲裁器,連接至所述第一多工器,用於接收所述主機埠發送的請求信號,並根據固定優先權與先到先做結合的方式確定所述主機埠訪問所述從機埠的順序。A device for accessing a data bus, the device for accessing a data bus includes: Host port, used to connect to the host; The slave port is used to connect to the slave, the slave port is connected to the master port through a data bus, and the master port has a fixed priority order for accessing the slave port; A first multiplexer and a second multiplexer are connected between the host port and the slave port, and are used to switch between the host port and the slave port; The decoder, connected to the second multiplexer, is used to receive and decode the address signal sent by the host port to generate a corresponding selection signal, and the second multiplexer selects the corresponding address signal according to the selection signal The slave port is connected to the host port; and The arbiter, connected to the first multiplexer, is used to receive the request signal sent by the master port, and determine the number of the master port to access the slave port according to the combination of fixed priority and first-come, first-served order. 如請求項1所述的訪問資料匯流排的裝置,其中當多個主機埠同時對同一個從機埠發出訪問請求時,所述仲裁器根據所述固定優先順序別確定所述主機埠訪問所述從機埠的順序,其中,優先順序別越高的主機埠具有越優先訪問所述從機埠的許可權。The device for accessing the data bus according to claim 1, wherein when multiple master ports simultaneously issue an access request to the same slave port, the arbiter determines the access point of the master port according to the fixed priority order. The order of the slave ports is described, wherein the host port with the higher priority has the higher priority to access the slave port. 如請求項2所述的訪問資料匯流排的裝置,其中當多個主機埠不是同時對一個從機埠發出訪問請求時,所述仲裁器採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,其中,越先發出所述請求信號的主機埠具有越優先訪問所述從機埠的許可權。The device for accessing the data bus according to claim 2, wherein when multiple host ports do not issue access requests to a slave port at the same time, the arbiter uses a first-come, first-served method to determine where the host port accesses According to the sequence of the slave ports, the host port that sends out the request signal first has the 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 the data bus as described in claim 1, wherein when the number of the host ports is N, which are the first host port, the second host port, and up to the Nth host, the corresponding priority order is as follows At level 1, level 2, up to level N, the M-th host port requests access to the same slave before the first host port, the second host port, and the M-1 host port Machine port, the arbiter determines that the M-th master port has priority access to the slave port according to a first-come-first-served manner, until the M-th master port stops requesting the use of the data bus, the arbiter Then determine the order in which the first host port, the second host port, and the M-1th host port access the slave port according to the priority order, where 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 to connect a host port and a slave port, the host port has a fixed priority order for accessing the slave port, and the improvement is that the method includes: Receiving and 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 The request signal sent by the host port is received, and the order in which the host port accesses the slave port is determined according to a combination of fixed priority and first-come-first-served. 如請求項5所述的訪問資料匯流排的方法,其中當多個主機埠同時對同一個從機埠發出訪問請求時,根據所述固定優先順序別確定所述主機埠訪問所述從機埠的順序,優先順序別越高的主機埠具有越優先訪問所述從機埠的許可權。The method for accessing the data bus according to claim 5, wherein when multiple master ports simultaneously issue access requests to the same slave port, the master port is determined to access the slave port according to the fixed priority order The higher the priority of the host port, the higher the priority to access the slave port. 如請求項6所述的訪問資料匯流排的方法,其中當多個主機埠不是同時對一個從機埠發出訪問請求時,採用先到先做的方式確定所述主機埠訪問所述從機埠的順序,越先發出所述訪問請求的主機埠具有越優先訪問所述從機埠的許可權。The method for accessing the data bus as described in claim 6, wherein when multiple host ports do not issue access requests to one slave port at the same time, a first-come, first-doing method is adopted to determine that the host port accesses the slave port In the order of, the first host port that issues the access request has the higher priority to access the slave port. 如請求項5所述的訪問資料匯流排的方法,其中當所述主機埠的數量為N,分別為第一主機埠、第二主機埠、直至第N主機端,對應的優先順序別依次為第1級、第2級、直至第N級,如果第M主機埠在所述第一主機埠、所述第二主機埠、直至所述第M-1主機埠之前請求訪問同一所述從機埠,則根據先到先做的方式確定所述第M主機埠優先訪問所述從機埠,直至所述第K主機埠停止請求使用所述資料匯流排,再根據所述優先順序別確定所述第一主機埠、所述第二主機埠、直至所述第M-1主機埠訪問所述從機埠的順序,其中,N、M為自然數,且M小於或等於N。The method for accessing the data bus according to claim 5, wherein when the number of the host ports is N, which are the first host port, the second host port, and up to the Nth host, the corresponding priority order is as follows Level 1, Level 2, up to Level N, if the M-th master port requests access to the same slave before the first master port, the second master port, and the M-1 master port Port, the M-th master port will give priority to access the slave port according to the first-come-first-served manner, until the K-th master port stops requesting the use of the data bus, and then determine all the ports according to the priority order. The sequence in which the first host port, the second host port, and the M-1th host port access the slave port, wherein N and M are natural numbers, and M is less than or equal to N. 一種訪問資料匯流排的系統,所述系統包括主機、從機以及連接所述主機及從機的訪問資料匯流排的裝置,其改良在於:所述訪問資料匯流排的裝置為請求項1至4任意一項所述的訪問資料匯流排的裝置。A system for accessing a data bus. The system includes a host, a slave, and a device for accessing the data bus connected to the host and the slave. The improvement lies in that the device for accessing the data bus is request items 1 to 4 Any one of the devices for accessing the 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 true TW202141288A (en) 2021-11-01
TWI764139B 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)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7145903B2 (en) * 2001-09-06 2006-12-05 Meshnetworks, Inc. Multi-master bus architecture for system-on-chip designs
KR100812225B1 (en) * 2005-12-07 2008-03-13 한국전자통신연구원 Crossbar switch architecture for multi-processor SoC platform
US8549207B2 (en) * 2009-02-13 2013-10-01 The Regents Of The University Of Michigan Crossbar circuitry for applying an adaptive priority scheme and method of operation of such crossbar circuitry
CN102063396A (en) * 2009-11-18 2011-05-18 意法-爱立信公司 Method and device for transmitting data between master blocks on chip and SOC (System on a Chip)
US9489009B2 (en) * 2014-02-20 2016-11-08 Samsung Electronics Co., Ltd. System on chip, bus interface and method of operating the same
US20160188519A1 (en) * 2014-12-27 2016-06-30 Intel Corporation Method, apparatus, system for embedded stream lanes in a high-performance interconnect

Also Published As

Publication number Publication date
TWI764139B (en) 2022-05-11

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
CN100472494C (en) System and method for implementing memory mediation of supporting multi-bus multi-type memory device
US9471524B2 (en) System bus transaction queue reallocation
KR100814904B1 (en) On-Chip Communication architecture
KR20050082834A (en) Bus system for connect sub-system included plural masters to bus based on open core protocol
EP0991999A1 (en) Method and apparatus for arbitrating access to a shared memory by network ports operating at different data rates
US9984014B2 (en) Semiconductor device
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
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
JPH09153009A (en) Arbitration method for hierarchical constitution bus
JP2010287058A (en) Memory system
JP4593220B2 (en) Memory access control method and method, and shared memory access control method and method
US6839820B1 (en) Method and system for controlling data access between at least two memory arrangements
JPH0895899A (en) Dma transfer controller
CN115762596A (en) MCU access memory digital circuit structure
JP2000132500A (en) Data transfer system
JP2004078998A (en) Bus control method and computer system
JP2003248653A (en) Device access circuit and device access method
WO2013063803A1 (en) Method and device supporting mixed storage of vector and scalar
JP2006331452A (en) Bus control system and computer system