[go: up one dir, main page]

TW200523747A - An arbiter - Google Patents

An arbiter Download PDF

Info

Publication number
TW200523747A
TW200523747A TW93100611A TW93100611A TW200523747A TW 200523747 A TW200523747 A TW 200523747A TW 93100611 A TW93100611 A TW 93100611A TW 93100611 A TW93100611 A TW 93100611A TW 200523747 A TW200523747 A TW 200523747A
Authority
TW
Taiwan
Prior art keywords
bus
arbitration
master
request
priority
Prior art date
Application number
TW93100611A
Other languages
Chinese (zh)
Other versions
TWI244001B (en
Inventor
Cheng-Ya Chou
Min-Liang Sun
Original Assignee
Magima Digital Information Co Ltd
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 Magima Digital Information Co Ltd filed Critical Magima Digital Information Co Ltd
Priority to TW93100611A priority Critical patent/TWI244001B/en
Publication of TW200523747A publication Critical patent/TW200523747A/en
Application granted granted Critical
Publication of TWI244001B publication Critical patent/TWI244001B/en

Links

Landscapes

  • Bus Control (AREA)

Abstract

The present invention is related to an arbiter that can arbitrate the data traffic on the bus. The arbiter includes a forward and a reverse arbitration devices. The forward arbitration device includes a second layer arbitration mode, in which the bus requests from minor master devices will be arbitrated and a candidate minor master device will be chosen, and a first layer arbitration mode, in which the bus requests from the candidate minor master device and the major master devices will be arbitrated and a granted master device will be chosen to send data to the slave devices via the bus. The reverse arbitration device arbitrates the bus requests from major slave devices and chooses a granted slave device to send back the data to the major master device via the bus.

Description

200523747 玖、發明說明 【發明所屬之技術領域】 本發明是有關於-種仲裁器,且特別是有關於一種應用 於多裝置系統中,對各裝置發出的g流排使用請求進行快速 有效地仲裁,從而提高匯流排效率的仲裁器(Arbiter)。 【先前技術】 半導體產業的迅速發展大大推動了積體電路設計業的 發展,特別是半導體產業中,深次微米(DSM; Deep Sub-Micron)技術的出現把單晶片系統(System_〇n_chip ;200523747 发明 Description of the invention [Technical field to which the invention belongs] The present invention relates to a kind of arbiter, and in particular, to a kind of multi-device system that quickly and efficiently arbitrates the use of g-streaming requests sent by each device. Arbiter to improve the efficiency of the bus. [Previous technology] The rapid development of the semiconductor industry has greatly promoted the development of integrated circuit design industry, especially in the semiconductor industry, the emergence of deep sub-micron (DSM; Deep Sub-Micron) technology has brought single-chip systems (System_〇n_chip;

SoC)設計推到了積體電路設計的前沿。單晶片系統技術, 是把以前分散在多個不同的晶片上的多個處理器集合在同 一塊B曰片上,以形成一個功能完善、性能優越的完整系統。 由於單晶片系統的物理面積和封裝針腳相對於多晶片系統 有大幅的減少,使得整個系統的生產成本也大幅降低。而另 一方面,系統中智財模組(Intellectual pr〇perty ; ip)的重複 使用也縮短了單晶片系統的設計週期,使系統的設計成本也 .得以降低。 單晶片系統中可能包括各種處理器,如中央處理器 (CPU )、數位訊號處理器(DSP )和各種針對專門應用的 電路(ASIC )專’以及儲存單元(st〇rage unit ),甚至可能 包括各種内建處理器核心(kernel)的子系統。整個系統規模 的擴大使系統的袓雜性較之以前的多晶片系統高,因而如何 合理有效地調節系統中各個處理器或者是子系統的運行,在 200523747 整個系統設計過程中成為一個相當重要的問題。匯流 是用來達成系統中各個處理器或者子系統的相互通气, 指令傳送和㈣料,0此匯流㈣構的設計對於整個= 的合力工作有著至關重要的影響。 在匯流排系統内多個裝置之間的訊號傳送中,向 :出1求,要求進行訊號傳送的裝置稱為主:: device);而主裝置要求進行訊號傳送的目標裝 屬裝置⑽vedevice)。料多裝置的通訊,匯流排以= 用仲裁益來對多個裝置發出的匯流排使用請求作出 據各種演算法決定給予匯流排佔有權的裝置。㈣仲裁Μ 配置情況’目前匯流排架構主要分為 匯 排和集中式匯流排。其中分散式匯流排架構是=j匯f 置一個對應的仲裁器,由各個仲裁器相互競:: 決-由匯流排上哪-個裝置獲得授權而佔用匯流排 匯流:是指對於整個系統只採用-個統一的仲裁器: 仲裁讀據預設的仲裁方式,對所有匯流排σ : 匯流排使用請求集中做出判斷,確定授權使用= 置。易於理解的是,特別是集中式匯流排系;二= 流排使用效率有著決定性的作用。 、仲裁為對匯 現有技術中,一旦主裝置向 並獲得匯流排授權,在該主裝置的排使用請求. -直由該主裝置佔有匯流排,而:算完成前’將 求則得不到回應。因此,設計人員往往2=匯流排請 的優先順序別,在仲裁器主4置設置-定 中裁枯冋等條件下,優先順 200523747 序別較高的主裝置發出的匯流排使用請求能優先得到回 應。也有的設計人員提出將主裝置發出的匯流排使用請求分 成不同的優先等級,仲裁器按各個匯流排使用請求的優先等 級,來決定優先做出回應的匯流排使用請求。但是仲裁器在 做仲裁時,若是同時對各個不同等級的匯流排使用請求進行 仲裁,將使仲裁器的硬體和演算法複雜化,並可能使仲裁週 期延長。 另 方面’對於支援分離式讀運算(support split transaction of read signal)的匯流排系統,例如具有多個執 行緒(Thread)的匯流排主|置,某—主裝置的某—個執行緒 可月b龟出5貝運异,而在與其運算相對應的從屬裝置做出回應 則也允许该主裝置的其他執行緒發出訊號傳送運算(其中 當然也包括讀運算)。在這種情況下,可能有多個執行緒在 f待其讀運算的對應從屬裝置發出資料,而較早發出的讀運 异=對應從屬f置可能需要較長的資料準備時間,如果按讀 運异發出的先後次序進行資料回傳,必將影響其他執行緒的 讀運算進行。為了提高匯流排的使用效率,在設計中我們可 二允許讀數據越序回傳,即對於已準備好的讀數據,可以不 論發出讀運算請求的先後次序,優先回傳。但是這種讀數據 的越序回傳也有可能出現不同從屬裝置在同_時刻用匯流 :釋,讀數據的情形’ Μ而引起讀數據在回傳時的彼此衝 犬。廷樣反而會增加存取延遲,並使匯流排效率降低。 口本發明提出一種改良的仲裁器,既可進行正向仲裁,又 可進行反向仲裁。在正向仲❹,可以針對不同的匯流排使 200523747 用請求等級,設立不同的仲裁時機;反向仲裁中,可以對多 個從屬裝置的讀數據回傳的請求做出仲裁。 夕 【發明内容】 本發明的目的就是在提供,文良的仲裁器,用以針對 不同的®流排使用請求等、級而設立不同的仲裁時機,以提高 仲裁效率’並提高匯流排使用效率。 ° …本發明的另—目的就是在提供-種改良的仲裁器,該仲 裁為具有反向仲裁能力,在提高匯流排使用效率的前提下, 避免讀數據回傳的相互衝突。 根據本發明之上述目的,匯流排系統包排 :連的主裝置、從屬裝置和仲裁器。主裝置向仲裁器發:; 排使用請求,仲裁器經過仲裁後,對選中的匯流排使用抹 :授權,發出該匯流排使用請求的主裝置便佔有匯流排心 =從屬裝置進行資料傳送運算。主裝置發出的匯流排使用 二不同的優先等級,仲裁器在仲裁狀態機 仲裁時機。在間隔週期較短的仲裁時機,口對 具較高優先順序的匯流排使用請求進行仲裁,而忽先、 f較低的匯流排使用請求;在間隔週期較長的仲裁時機且 車乂同優先順序的匯流排使用請求和具較低優 、 排使用請求可同時由仲裁器進行仲裁。 的匯冰 根據本發明之另一目的,匯流排系統支援分離式的讀運 ::在不同的從屬裝置同時發出回傳資料運算的匯流排使用 3月求情況下’仲裁器根據—^的演算法對回傳資料運算的請 200523747 求進行仲裁。在本發明的一個實施例中,由軟體配置對各個 從m回傳資料運算的匯流排使用請求,設定不同的優先 權等級,仲裁器根據優先權等級來進行仲裁。 根據本發明的一個實施例,仲裁器對匯流排上的多個裝 、進行刀層仲裁,對回應速度要求較低的請求在較低級的仲 裁模組中進行仲裁’而對回應速度要求較高的請求和從較低 級㈣裁模組中得到的仲裁結果,則在較高級的仲裁模組中 進仃仲裁。仲裁器包括第一階段仲裁模組和第二階段仲裁模 ▲相對地’仲裁器的仲裁運算包括第一階段仲裁和第二階 段仲裁。其操作原則如下:首先將匯流排系統中的主裝置進 -步分成重要主裝置和次要主裝置,在進行第二階段仲裁 中’由仲裁H對次要主裝置發出的匯流排使用請求先進行仲 裁’然後把仲裁結果送入第一階段仲裁;而在第一階段仲裁 所要做的’則是將第二階段仲裁的仲裁結果與匯流排上的重 要主裝置發出的匯流排使用請求一起進行仲裁。 根據本發明的-個實施例’在仲裁器的第一階段仲裁模 組中還進-步設有筛檢程式㈤ter),可在筛檢程式中設置 各種不同的過濾、單邱ilterunit),以對主裝置發出的匯流排 使用請求進行過遽,經過篩檢程式的M流排使用請求才可作 為有效請求參與仲裁。如在本發明的_個實施例中,即設 有:從屬裝置忙碌狀態㈣單元’也就是說,暫時無法進行 資料傳送運算的從屬裝置會發出SBUSy訊號㈣檢程式, 而匯流排使用請求在進行仲裁前要先㈣檢程式進行判 斷’若資料傳送運算的目標從屬裝置為SBUSy訊號所對應 200523747 的k屬裝置’則該匯流排使用請求將被忽略。又如在本發明 的另一個實施例中,為達成匯流排管線(pipeline)仲裁而設 有最後請求控制過濾單元,使每個正在進行中的流脈衝 (Stream Burst)的最後一個時脈的請求被遮罩。再如在本發 明的另一個實施例中,設有配對讀寫運算過濾單元,在匯流 排處理配對的讀寫運算時,t匯流排作讀存取時,便使其處 於鎖疋狀Ub 4右有其他主I置發出配對的讀寫運算匯流 排使用請求,將被忽略。 J 但力'双的作裁時機,既提高了對 需優先回應的資料值送、宏… 貝种傳送運异的回應速度,又提高了仲裁效 率,繼而從整體上捃古 T風 >艾 徒呵了匯流排效率。 此外,本發明對古 -種反向㈣離式讀運算的匯流排系統提出了 回傳請求時,反向仲^個㈣裝置同時向匯流排發出資料 流排堵塞的情形,因 制可以避免由於資料衝突而造成匯 率。 另一方面提高了匯流排的使用效 【實施方式】 ‘請參照第1圖,1洛-士 統。該匯流排系統至少3不本务明一個實施例的匯流排系 排ιοί相連的主梦罢匕括匯流排101,以及分別與匯流 衣罝Α 1〇2、士姑η 主裝置D1 05、從屬穿 #置81〇3、主裝置(:1〇4、 置C108和從屬襞置1〇6、從屬裝置B 107、從屬裝 與匯流排上各裝置^ 09。匯流排上設有仲裁器110分別 置相連,用以對連接在匯流排上的各裝置所 200523747 提出的匯流排使用請求做出仲裁。 在具有多個主裝置草元的匯流排系統裏,可以將系統 中的幾個主裝置單元配置成一個匯流排上的主裝置(master device) ’而這幾個主裝置單元可分別稱為該匯流排上的主 裝置的一個執行緒(thread)。採用多執行緒的匯流排系统可 提前在一個匯流排上的主裝置内部進行仲裁,因而可提高匯 流排上仲裁器的使用效率。 在本實施例中,主裝置A具有3個執行緒,匯流排主 裝置B具有2個執行緒,其中每一執行緒可以是⑽、㈣、SoC) design is pushed to the forefront of integrated circuit design. The single-chip system technology is to integrate multiple processors that were previously scattered on multiple different chips on the same B chip to form a complete system with complete functions and superior performance. Because the physical area and package pins of the single-chip system are greatly reduced compared to the multi-chip system, the production cost of the entire system is also greatly reduced. On the other hand, the reuse of Intellectual module (IP) in the system also shortens the design cycle of the single-chip system and reduces the design cost of the system. A single-chip system may include various processors, such as a central processing unit (CPU), a digital signal processor (DSP), and various application-specific circuits (ASICs), as well as a storage unit (storage unit), and may even include Various subsystems with built-in processor cores. The expansion of the entire system scale makes the system more complex than previous multi-chip systems. Therefore, how to reasonably and efficiently adjust the operation of each processor or subsystem in the system has become a very important part in the entire system design process in 200523747. problem. Convergence is used to achieve mutual communication, instruction transmission and data transmission among the various processors or subsystems in the system. The design of this confluence structure has a crucial impact on the overall work of the =. In the signal transmission between multiple devices in the bus system, a request is made to: and the device requesting the signal transmission is referred to as the main device: device); and the target device that the main device requests the signal transmission is (vedevice). For multi-device communication, the bus is used to use arbitration benefits to make requests for the use of buses issued by multiple devices. Devices that give the bus ownership are determined by various algorithms. ㈣Arbitration M configuration situation ’The current bus architecture is mainly divided into buses and centralized buses. The decentralized bus architecture is to set a corresponding arbiter, and each arbiter competes with each other ::-Decide by which device on the bus is authorized to occupy the bus. The bus is used only for the entire system. Adopt a unified arbiter: the arbitration method preset by the arbitration readings, and make a centralized judgment on all bus use requests σ: determine the authorized use = set. It is easy to understand, especially the centralized bus system; two = the efficiency of the use of the bus has a decisive role. 2. Arbitration is for the current sinking technology. Once the master device obtains and obtains the bus authorization, the master device requests the use of the bus.-The bus is occupied by the master device, and it will not be obtained before the calculation is completed. Respond. Therefore, designers often 2 = the priority order of the bus request. Under the conditions such as the main arbiter 4 setting-determined cutting, etc., priority is given to the bus use request issued by the master device with a higher order of 200523747. Get a response. Some designers have proposed to divide the bus use requests sent by the master device into different priority levels, and the arbiter decides the bus use requests that respond first according to the priority level of each bus use request. However, if the arbiter arbitrates the requests for the use of buses of different levels at the same time, it will complicate the hardware and algorithms of the arbiter and may extend the arbitration period. On the other hand, for a bus system that supports split transaction of read signals, such as a bus master with multiple threads, a certain thread of a master device can be used. b Turtle out five different operations, and responding to the slave device corresponding to its operation also allows other threads of the master device to send signal transmission operations (of course, including read operations). In this case, there may be multiple threads sending data at the corresponding slave device whose read operation is f, and the read operation difference issued earlier = the corresponding slave f setting may require a longer data preparation time. The data sent back in the order sent by the luck will definitely affect the read operation of other threads. In order to improve the use efficiency of the bus, in the design we can allow the read data to be sent out of order, that is, for the prepared read data, regardless of the order in which read operation requests are issued, priority is given to the return. However, this out-of-order return of read data may also cause different slave devices to use confluence: release, read data at the same time, and cause the read data to collide with each other during the return. Instead, it will increase access latency and reduce bus efficiency. The present invention proposes an improved arbiter that can perform both forward and reverse arbitration. In the forward direction, you can use 200523747 to set different arbitration timings for different buses using request levels. In reverse arbitration, you can arbitrate requests for read data return from multiple slave devices. [Summary of the Invention] The purpose of the present invention is to provide Wenliang's arbiter for setting different arbitration timings for different ® bus usage requests, etc., to improve arbitration efficiency 'and improve bus usage efficiency. °… The other purpose of the present invention is to provide an improved arbiter, which has the ability to reverse arbitrate, and to avoid the conflict of read data return on the premise of improving the efficiency of using the bus. According to the above object of the present invention, the bus system includes a connected master device, a slave device, and an arbiter. The master device sends to the arbiter :; the row use request. After the arbiter has arbitrated, it wipes the selected bus use: authorization, the master device that issued the bus use request will occupy the bus center = slave device to perform data transfer operations . The bus issued by the master device uses two different priority levels, and the arbiter is in the arbitration state machine to arbitrate the timing. At the arbitration timing with a short interval, the port arbitrates the bus use request with a higher priority, while arbitrating the bus use request with a lower f priority. At the arbitration timing with a long interval, the car has the same priority. Sequential bus usage requests and lower-priority, row usage requests can be arbitrated by the arbiter at the same time. According to another object of the present invention, the bus system supports separate reading operations: when different slave devices simultaneously send back data for calculations, the bus uses the calculation of the 'arbiter based on-^ calculation in the case of March The method of operation of the returned data shall be arbitrated in 200523747. In one embodiment of the present invention, the software configures the use request of the bus for each data returned from m, sets different priority levels, and the arbiter performs arbitration according to the priority levels. According to an embodiment of the present invention, the arbiter arbitrates multiple devices on the bus and performs knife-level arbitration, and requests with lower response speed are arbitrated in lower-level arbitration modules. High requests and arbitration results obtained from lower-level arbitration modules are arbitrated in higher-level arbitration modules. The arbiter includes the first-stage arbitration module and the second-stage arbitration module. ▲ Relatively, the arbiter's arbitration operation includes the first-stage arbitration and the second-stage arbitration. The operating principle is as follows: first, the main device in the bus system is further divided into important main devices and secondary main devices. In the second stage of arbitration, 'the arbitration H requests the use of the bus from the secondary main device first. "Arbitration" and then send the arbitration result to the first stage arbitration; and what the first stage arbitration needs to do is to conduct the arbitration result of the second stage arbitration with the bus use request issued by the important master device on the bus arbitration. According to one embodiment of the present invention, a screening program (terter) is further provided in the first stage arbitration module of the arbiter, and various filtering and single unit units can be set in the screening program. The bus use request sent by the main device has been checked, and the M bus use request that passed the screening program can be used as a valid request to participate in arbitration. For example, in the embodiment of the present invention, it is provided that the slave device is in a busy state unit. That is, the slave device that is temporarily unable to perform data transmission operations will issue a SBUSy signal check program, and the bus use request is in progress. Before arbitration, check the program to determine 'If the target slave device of the data transfer operation is the k-subordinate device of 200523747 corresponding to the SBUSy signal', the bus use request will be ignored. For another example, in another embodiment of the present invention, a final request control filtering unit is provided for achieving pipeline arbitration, so that the request of the last clock of each ongoing stream burst (Stream Burst) is requested. Masked. For another example, in another embodiment of the present invention, a paired read-write operation filtering unit is provided. When the bus handles the paired read-write operation, the t-bus is placed in a locked state when it is used for read access. On the right, other master I devices issue paired read and write operation bus usage requests and will be ignored. The timing of J Danli's double arbitration has not only improved the response speed to the data values, macros, etc. that need to be responded to, but also improved the arbitration efficiency. In vain bus efficiency. In addition, in the present invention, when a return request is made for a bus system of the ancient reverse type read operation, the reverse device simultaneously sends a data stream blockage to the bus at the same time. Exchange rates caused by data conflicts. On the other hand, the use efficiency of the busbar is improved. [Embodiment] ‘Please refer to FIG. 1, 1 Luo-Shitong. The busbar system includes at least three busbars connected to the busbar system of one embodiment of the present invention, including the busbar 101, and the busbar 101, the master unit D105, and the slaves, respectively. Wear #set 81〇3, master device (: 104, C108 and slave device 106, slave device B 107, slave device and each device on the bus ^ 09. Arbiters 110 are provided on the bus respectively The device is connected to arbitrate the bus use request made by each device connected to the bus 200523747. In a bus system with multiple master devices, several master device units in the system can be used. It is configured as a master device on a bus, and these several master device units can be respectively called a thread of the master device on the bus. A multi-threaded bus system can be advanced The arbitration is performed inside the master device on one bus, so the use efficiency of the arbiter on the bus can be improved. In this embodiment, the master device A has 3 threads, and the bus master device B has 2 threads. Each thread Can be ⑽, ㈣,

ASJC或者是子系統等。主裝置。和主裝置d則不包含多個 執行緒’它們分別可以是CPU、Dsp、ASIC 系統等中的一種。 八 本實施例還將主裝晉公#击热> # 刀成重要主裝置和次要主裝置。主 裝置A和主裝置b為重要ASJC or subsystem. The main unit. And the host device d does not include multiple threads', which may be one of a CPU, a Dsp, an ASIC system, and the like. 8. This embodiment also installs Jingong # 击 热 ># into an important main device and a secondary main device. Main device A and main device b are important

、 受王裝置,而主裝置C和主裝置D 為*^ 要主裝 W。^一 -05· rTn ' _ 5 ’可以把對匯流排回應速度要求較 高的主裝置設為重要主梦罢 展置’如需進行即時處理的裝置等, 而把對回應速度要灰X B > ^ 要衣不疋太-的裝置設為次要主裝置。從屬 裝置可以是同步動能陥她 機存 憶體(SDRAM)或直接記 IE體存取(DMA)等。, Receiver device, and main device C and main device D are * ^ to be installed W. ^ One-05 · rTn '_ 5' You can set a master device with a high requirement on the response speed of the bus as an important master dream. 'For devices that require real-time processing, etc., the response speed must be grayed XB > ^ Devices that are not too clever are set as secondary primary devices. The slave device can be synchronous kinetic energy (SDRAM) or direct memory access (DMA).

仲裁器對主奘® AArbiter vs. Master® A

、 、主裝置B、主裝置C和主裝置D 电出的匯流排使用請求 把Θ靡的士姑 U出回應時,將通過AMNum訊號線 把口應的主裝置號碼送仏 的说味八α, 、、"對應的主裝置。對主裝置進行編碼 的代號分別對應如下·· Τ 主步詈Γ .. 為主裝置A,1為主裝置Β,2為 土衣罝I,3為主梦罟n " 。此外,主裝置A和主裝置B分別 12 200523747 配有一條執行緒識別訊號線MthreadID。當主裝置A或主裝 置B中的某個執行緒發出匯流排使用請求得到仲裁器回應 時,仲裁器通過AMNum訊號線把回應的主裝置號碼送給對 應的主裝置,並同時通過MThreadID訊號線把相對應的執 行緒號碼傳送給該主裝置中相對應的執行緒。 主裝置與從屬裝置都分別設有各類訊號線與仲裁器相 連,用來傳送資料傳送運算中的各類控制訊號,如MDstnum 訊號為主裝置送給仲裁器以請求從屬裝置的號碼。在本實施 例中,4個從屬裝置的編碼代號分別對應如下·· 0為從屬裝 置A,1為從屬裝置B,2為從孱裝置C,3為從屬裝置D。 主裝置發出的匯流排使用請求分成不同的級別,本實施 例中,每一主裝置有一 MReq匯流排請求訊號線與仲裁器相 連,該訊號線傳送的MReq訊號可用來表示匯流排使用請求 的級別。通過MReq匯流排請求訊號線發出的MReq匯流排 使用請求訊號分成REQ、CREQ和LREQ三類,其解碼如下 表所示。 表1 MReq 訊號 說明 0 0 IDLE 無請求 0 1 REQ 一般讀寫請求 10 LREQ 一般和MCmd配合。如果MCmd為0,是要求 LOCK的讀運算; 如果MCmd為1,是解除LOCK的寫運算。 200523747 11 CREQ 強制性讀寫請求,具有比REQ更高的優先順 序。 其中MCmd為讀寫運算請求,低為讀,高為寫。 MReq匯流排使用請求訊號中,creq和LREQ比REQ 優先順序要高,因此,如果主裝置發出的MReq為CREQ或 LREQ ’車父之REQ往往能更快速地獲得回應。其中,[REQ 的請求是一種配對的讀寫運算請求,它請求的是一個讀寫運 算的配對運算,由於該讀寫運算需要連續進行,而不能插入 肇 其他的運算,因此將其設為一種優先順序別較高的請求。 MReq可以在每一次資料傳送時由編寫程式等方式靈 活設定,因此,主裝置發出的匯流排使用請求的優先權等級 可以按實際需求而決定。在其他實施例中,MReq的匯流排 使用凊求訊號可以按需要設定一定的等級,其編碼也可隨之 改變,本技術領域人員對此應易於理解和實現。 在本實施例中,主裝置和從屬裝置之間還採用了 一種流 脈衝(Stream Burst)形式的資料傳送方式。這種資料傳送方 鲁 式可一次性地傳送大量資料,每次流脈衝傳送的資料中可包 括多個單一資料(Single)和多個脈衝資料(Burst)。同一個 流脈衝中的單一資料或一個完整的位址連續的脈衝資料可 稱為一個分段脈衝,而分段脈衝之間的位址可以不連續,在 本實施例中,一個流脈衝中的不同分段脈衝還可發送給不同 的目標從屬裝置。在本發明的實施例中,還可要求分段脈衝 的長度是2的整數次冪,且位址對齊。 14 200523747 相對於流脈衝形式的資料傳送,每一主裝置或主裝置中 的每一執行緒設有傳送狀態MLast訊號線,該訊號線中傳 送的虹邮訊號指出了該主裝置或主裝置中的該執行緒要 求料的資料傳送運算的狀態。本實施例中為流脈衝資料傳 达運异定義了四種狀態’包括CONT,SAME,DIFF和LAST 四類訊號’如表2中所示分別對其進行了編碼。 _ 表2 MLast[l:〇] 訊號 說明 0 0 CONT 二個分段脈衝沒有結束。 0 1 LAST 個流脈衝的結束。 10 SAME 表示一個分段脈衝的結束,預告下一個分 段脈衝和本分段脈衝存取同樣的從屬裝 置,且存取請求的等級相同(即都為req 或 CREQ) 〇 11 diff 〜 '' ---—--— _ 表示一個分段脈衝的結束,預告下一個分 段脈衝和本分段脈衝存取不同的從屬裝 置’或者存取請求的等級不同。 在貝料傳送運算中,以CC)NT訊號來表示—個分段脈 曰連3运中’ ^ C〇NT訊號所對應的資料傳送位址還 :整並不需要重新做仲裁。而―訊號則表示-個 就需要仲裁器重新要進行f料傳送運算, 更新對所有的匯流排使用請求做仲裁。 15 200523747 SAME和DIFF訊號均表示一個分段脈衝已經傳送& 成’而-個流脈衝尚未結束。其不同之處主要在於,二ζ 訊號是用來預告下-個分段脈衝和本分段脈衝存取 從屬裝置,只是位址和本分段脈衝可能不連續,並且下一個 分段脈衝和本分段脈衝存取請求的等級相同,即都為 或CREQ等。聊訊號則是用來預告下一個分段脈衝和本 分段脈衝存取W的從屬裝置,或者是下—個分段脈衝和本 分段脈衝存取請求的等級不相同。 ”同樣地,MLast的編碼也可根據實際需要的資料傳送運 箅狀態的種類做調整。 瞎排上的裝置要求使用匯流排進行資料傳送運算 :的上出广排使用請求給仲裁器,由仲裁器按照預 二:二 優先進行的請求。本發明的仲裁器可進 的令裁I括正向仲裁和反向仲裁 對主裝置發出的匯流排 =裁4 從Μ _ w h A運仃仲裁,反向仲裁是指對 =:;運算中,因需要回傳資㈣出的匯流排使用 ^ nil 2 〇!,J ^ ^ ^ ^ ^ 組,正向仲裁的各訊; 給相應的主裝置和從屬^解碼益206解碼後,送 碼器208解$後^ / °裁的各訊號經過反向解 二階段仲=2:广:應:主從屬裝置和主裝置。正向第 求進行仲裁,再將仲裁1以入/置發出的匯流排使用請 裁、、、。果达入第一階段仲裁模組202;第 16 200523747 - P皆段仲裁模、组202則把重 求和第二階段的仲裁社果如川出的匯流排使用請 也可省略第二階段果—起進行仲裁。在其他實施例中, 模裁模組不進行仲裁處理,即第二階段仲裁 == 時,正向仲裁的第二階段可開始進行新 r=?仲裁演算法可以是熟悉相關技術人員所知 曉的各種演算法。為簡單起見,在本實施例中,正向第二階 役仲裁权組是採用固定優先權演算法(fixed priority 如ithm)進行仲裁,即對每—個次要主裝置設定一個確 疋的優先權等級’在同—時間有兩個或兩個以上的次要主裝 置提出請求時’則選中優先順序職高的主裝置進人第—階 段。如第3圖所示’主裝置c和主裝置D為次要主裝置, -it先權等級分別設定& i級和2級。主裝置c的訊號包 括MReq3 ’ MLaSt3和MDStnum3,分別指出請求的級別、 資料傳送狀態和目標從屬裝置的號碼,同樣地,主裝置d 的Λ號包括MReq4,MLast4和MDstnum4。當主裝置c和 主裝置D同時提出匯流排使用請求時,根據優先權等級, 仲裁器將優先選中主裝置C提出的匯流排使用請求。在主 裂置C的匯流排使用請求響應結束後的時序裏,仲裁器將 對主裝置D此時的匯流排使用請求做出回應。第二階段仲 裁模組發出的仲裁訊號包括A2Req,A2Last、A2Dstnum 和A2Mnum等,分別指示匯流排使用請求級別、資料傳送 狀態、目標從屬裝置號碼和回應的主裝置號碼。這些仲裁訊 號作為仲裁結果,送入第一階段仲裁模組參與仲裁。在本實 17 200523747 把例尹’假定在第一階段仲士 ^ ., 裁杈、、且仲裁挎,無其他匯流排使 用凊求參與仲裁,或第二階段 ^ ^裁模、、且运出的仲裁結果被優 先k中’則由正向解碼器發出伸 / 知出仲裁釩唬,包括圖中所示的匯 排授權訊號AGrant和授權主梦晉 炫罹王式置訊號AMNum等,來先 後響應主裝置C和主奘s n^Ar- + 正向仲裁的第-階段首先要求所有需要參與仲裁的請 裁☆ _的4檢程式(filter)。篩檢程式會按照過滤條 彳备前無法執行的請求遮罩下來。而通過篩檢程式可繼續 參與仲裁的請求則稱為有效請求。本實施例中,篩檢程式主 要包括三個過濾單元。 罝和主4置D的匯流排使用請求。 第個疋k屬裝置忙碌狀態(SBusy)過濾單元,當匯 流^使用請求所存取的從屬裝置不處於忙碌狀態時,才可通 ,1檢私式,例如在本實施例中,所存取的從屬裝置的接收 緩衝器要能接收主裝置發出的命令。對於這個㈣條件,本 實施二中每一個從屬裝置都配置一個接收緩衝器,用來接收 t裁器I出的接收指令和相關資料。這裏所說的接收緩衝器 y以疋先進先出暫存器(FIF0)。當從屬裝置緩衝器的剩餘 _ 可用空間接近零,即緩衝器的剩餘空間只能支援一個脈衝資 料的長度或者疋一個脈衝資料加丨個資料長度的長度時,由 孩從屬裝置發出從屬裝置忙碌狀態訊號SBusy訊號給仲裁 器’ SBusy訊號中指出該從屬裝置的號碼。 第二個為配對讀寫請求控制(LREQ )過濾單元,是針 對本實例中的LREQ類型的匯流排使用請求的。對於一個 LREQ請求的讀存取,只當匯流排不處於鎖定狀態時才會予 18 200523747 以響應。匯流排如果處於鎖定狀態,就要把這個lreq請求 的讀存取遮罩掉。在此,匯流排處於鎖定狀態,就意味著先 前有其他的主裝置或其他執行緒已經發出了一個lreq請 求,並且該請求正在執行讀運算。這樣就可以防止有新的 LREQ請求獲得匯流排授權進行讀存取運算,而使先前的 LREQ運算發生錯誤。 第一個過;慮單元是最後請求控制過濾單元,可用來保證 匯流排系統能夠連續處理多個匯流排使用請求,而達到管線 (pipelineH中裁的效果。對於每個正在傳送中的流脈衝的最 後一個時脈的請求,仲裁器需要判斷該流脈衝的資料傳送狀 悲汛唬ALast訊號以確定下一個仲裁狀態,因此仲裁器要對 該流脈衝最後一個時脈的請求進行遮罩。 本發明的其他實施例中還可在篩檢程式中設置其他的 過濾單元。 睛參照第4圖,仲裁器的篩檢程式4〇6設置了三個控制 埠’分別連接著從屬裝置忙碌狀態訊號線4〇2、匯流排鎖定 控制線403和最後請求控制訊號線4〇4。篩檢程式的輸入端 疋來自主裝置的匯流排使用請求4〇丨,篩檢程式的輸出端輸 出的是經過篩檢程式但未被遮罩掉的請求,稱為有效請求 4〇5 ’仲裁器將採用仲裁演算法對有效請求進行仲裁。 第5-7圖分別是篩檢程式中三個過濾單元工作的示範 性時序圖。在SBusy過濾單元,仲裁器先將從各個從屬裝 置迗到SBusy控制端的SBusy訊號鎖定後,篩檢程式再結 合當前的SBusy訊號和MDstnum訊號進行遮罩運算(mask 200523747 operation),其中MDstnum訊號指出了該請求所要存取的從 屬裝置號碼。若MDstnum訊號所指示的從屬裝置號碼與 SBuSy作用的從屬裝置相同,就表示該請求所存取的從屬裝 置當前無法接收命令’此時筛檢程式就遮罩該請求。請參照 第5圖,MReqO訊號為主裝置A發出的匯流排使用請求訊 號,MDstnum訊號指明該請求所要存取的從屬裝置, MVReqO訊號為經過篩檢程式後輸出的有效請求訊號。 SBusyO訊號在鎖定後的下一個時脈生效,使MReqO對從屬 裝置A (對應的MDstnum訊號為0)存取的最後一個時脈 的運算被遮罩(即MVReqO為IDLE);而在對從屬裝置B (對應的MDstnum訊號為1 )的存取期間,篩檢程式未出 現生效的SBusyl訊號,因此對從屬裝置B的存取未受遮罩。 在匯流排鎖定控制過濾單元,是在匯流排鎖定控制端施 加一 ALock訊號,若匯流排處於鎖定狀態,則ALock訊號 為高,並與輸入端的MReq訊號做遮罩運算,如果匯流排在 鎖定狀態而MReq訊號顯示為LREQ,則篩檢程式將遮罩該 請求。在第6圖所示的實施例中,MReqO和MCmdO為主裝 置A發出的匯流排請求訊號;AReq和ACmd為仲裁器發 出的回應訊號,分別表示獲權請求的級別和讀寫狀況, AGrant為仲裁器的授權訊號;MVReqO為輸出端送出的主 裝置A的有效請求。在AGrant訊號為高期間,當AReq為 LREQ類型,且ACmd為低(表示為讀請求)時,匯流排鎖 定控制端的ALock訊號為高;而ACmd為高(表示為寫請 求)時,匯流排鎖定控制端訊號為低。在ALock訊號為高 20 200523747 時,匯流排處於鎖定狀態,此時仲裁器將不對其他的LREQ 的讀運算進行仲裁。圖中MReqO的第一個LREQ請求為讀 運算,而ALock訊號在這個LREQ請求的第一個時脈内為 高,因此從MVReqO反映出來這個時脈内的LREQ就被遮 罩掉了。 對於最後請求控制過濾單元,本發明的一個實施例中對 於每個正在傳送中的流脈衝的最後一個時脈的請求,仲裁器 會結合AGrant、AMNum和ALast訊號一起進行判斷,當 AGrant訊號有效,而AMNum所指的是當前佔有匯流排進 行流脈衝傳送的主裝置,且ALast指明該主裝置的請求已進 行到最後一個時脈的請求,仲裁器就把這個流脈衝最後一個 時脈的請求遮罩掉。請參照第7圖所示,MReqO訊號為主 裝置A發出的匯流排使用請求訊號,ALast訊號表示仲裁 器對該匯流排請求訊號解碼後發出的資料傳送狀態,從 AMNum訊號時序可以看出當前正在佔有匯流排的為主裝置 A。圖中,MVReqO訊號的時序顯示出對應於ALast訊號的 最後一個時脈的請求被遮罩了。 正向仲裁的第一階段並不是在任何時間都可進行新的 仲裁,而只是在滿足一定條件而允許仲裁的時候才能進行仲 裁。一般情況下,第一階段可以進行仲裁的首要條件是當前 仲裁器處於閒置狀態。本實施例中,仲裁器提供了 Ai*b_state 訊號,當該訊號為IDLE時,表示仲裁器當前處於閒置狀態, 即當前無正在進行中的仲裁運算。 第一階段的分級仲裁,在本實施例中,包括了 REQ仲 21 200523747 裁時機和CREQ仲裁時機。對應於這兩個仲裁時機,分別 設有AREQ—arb和ACREQ_arb仲裁時機控制訊號。 在本實施例中,採用的資料傳送方式為流脈衝形式,且 規定MLast訊號來代表主裝置給仲裁器的分段脈衝資料傳 送狀態碼。其中MLast訊號有三種值用來表示當前分段脈 衝已經結束:LAST表示一個完整的流脈衝已經結束;SAME 表示一個流脈衝尚未結束,當前分段脈衝已經結束,而下一 個分段脈衝存取的從屬裝置與當前分段脈衝相同;DIFF表 示一個流脈衝尚未結束,當前分段脈衝已經結束,而下一個 分段脈衝存取的從屬裝置與當前分段脈衝不相同。仲裁狀態 機中,在出現這三種分段脈衝結束碼時,才可能進入仲裁狀 態。在本實施例中,一個流脈衝過程只能被CREQ級別的 其他請求中斷,而REQ級別的其他請求是不能中斷一個流 脈衝的。在出現LAST訊號時,AREQ_arb訊號與ACREQ_arb 訊號同時有效;在出現SAME或DIFF訊號時,只有 ACREQ—arb訊號有效。 請參照第8圖,圖中以仲裁時機時序對此做了說明。在 主裝置發出的MLast訊號經仲裁器仲裁後,仲裁器的正向 解碼器會發出ALast訊號,對應於MLast訊號共有四類值, 即CONT、SAME、DIFF和LAST,可用來輔助判斷下一個 時脈仲裁器的仲裁狀態,以加快匯流排管線處理。圖中, ALast訊號有三個範例,分別為LAST、SAME和DIFF。LAST 訊號表示一個流脈衝結束,AREQ_arb和ACREQ_arb兩個 訊號同時有效;SAME和DIFF均只表示一個分段脈衝已經 22 200523747 結束,而流脈衝未結束,只有ACREQ_arb訊號有效。 ACREQ—arb訊號有效在流脈衝結束和流脈衝中的分段 脈衝結束時均出現,而AREQ_arb訊號有效僅在流脈衝結束 時出現,顯然,ACREQ—arb訊號有效比AREQ—arb訊號有 效出現得更為頻繁,換言之,CREQ仲裁時機的時間間隔比 REQ仲裁時機的時間間隔要短。 請參考第9圖與表3,本實施例的仲裁狀態機共包括三 個狀態:IDLE、ARBLEVEL1 和 ARBLEVEL2。ARBLEVEL1 和ARBLEVEL2分別為前文所述的REQ仲裁時機和CREQ 仲裁時機。以下說明請配合參照表3。 表3 條件1 沒有一個有效請求是CREQ或LREQ,至少有 1個有效請求是REQ 條件2 在AREQ_arb有效時,且沒有一個有效請求是 REQ、CREQ 或 LREQ 條件3 至少有1個有效請求是CREQ或LREQ 條件4 在ACREQ_arb有效時,且沒有一個有效請求 是 REQ、CREQ 或 LREQ 條件5 在ACREQ—arb有效且AREQ_arb無效時,至 少有1個有效請求是CREQ或LREQ,且記 AEnterST2 為 1 條件6 在ACREQ—arb有效時,且沒有一個有效請求 是 CREQ 或 LREQ,以及 AEnterST2 為 1,同 200523747 時把AEnterST2歸零 從第9圖的仲裁狀態機可以看到,仲裁器並不是在任何 時刻都進行仲裁的,只有在ARBLEVEL1和ARBLEVEL2 兩個狀態下才進行仲裁。當Arb jtate訊號為IDLE,並且滿 足條件1,即只有REQ級別的有效請求而沒有CREQ或 LREQ級別的有效請求,同時AREQ—arb訊號有效時,仲裁 器進入ARBLEVEL1仲裁狀態。在ARBLEVEL1仲裁狀態 下,仲裁器可以對主裝置發出的REQ、CREQ和LREQ級別 的匯流排使用請求進行仲裁。當Arb_state訊號為IDLE,並 且滿足條件3,即只要有CREQ或LREQ級別的有效請求, 而無論是否有 REQ級別的有效請求,並且同時有 ACREQ—arb訊號有效,貝|J仲裁器進入ARBLEVEL2仲裁狀 態。在ARBLEVEL 2仲裁狀態下,仲裁器只對主裝置發出 的CREQ或LREQ級別的匯流排使用請求進行仲裁,而REQ 級別的匯流排使用請求不參與仲裁。 從第9圖也可以看到,仲裁狀態機中ARBLEVEL1和 ARBLEVEL2兩個狀態在一定的條件也可以相互轉換。因 此,在本實施例中,引入了 AEnterST2訊號,用來記錄被 中斷的仲裁狀態。當仲裁器正在ARBLEVEL1狀態下仲裁 時,由於出現較高級別的有效請求,如CREQ或LREQ請求, 需要轉換仲裁狀態到ARBLEVEL2狀態下,記AEnterST2 訊號為1。這樣,在、AEnterST2訊號為1的情況下,就進入 ARBLEVEL2狀態直到當ARBLEVEL2狀態下的仲裁運算完 24 200523747 成後,此時若只有REQ級別的有效請求而沒有其他CREQ 或LREQ級別的有效請求,仲裁器將不進行重新仲裁,而是 返回到原先的仲裁狀態,並在返回的同時將AEnterST2訊 號歸零。在轉換仲裁狀態進行仲裁時,需要保留仲裁器的内 部狀態(internal state),要保留的訊號量暫時放在緩衝器 (Buffer)中,要保留的訊號量主要有仲裁器送給主裝置以回 應主裝置的號碼AMNum和仲裁器送給從屬裝置以回應從 屬裝置的號碼ASNum等。在從IDLE狀態直接轉換到 ARBLEVEL2狀態下時,當仲裁器完成ARBLEVEL2狀態下 的仲裁任務後,仲裁器將重新對全部的有效請求進行仲裁。 仲裁器進行仲裁過程中,在ACREQ_arb訊號有效時, 若仲裁器是從ARBLEVEL1狀態下直接轉換到ARBLEVEL2 狀態下,為防止有效的匯流排使用請求要存取的對應從屬裝 置超載,本實施例中再次以從屬裝置忙碌狀態訊號SBixsy 訊號作為判斷依據,來判斷從屬裝置當前的狀況。如果從屬 裝置的接收緩衝器當前無法接收時,該從屬裝置即發出 SBusy訊號,仲裁器將SBusy訊號鎖定後,與匯流排使用請 求中表示目標從屬裝置號碼的訊號MDstnum進行遮罩運 算,若二者所對應的從屬裝置一致時,該匯流排使用請求將 被遮罩掉。 在ARBLEVEL1狀態下,仲裁器採用一般演算法,公平 地對各個主裝置發出的各類匯流排使用請求進行仲裁,從中 選出一個請求,並對發出該請求的主裝置傳送授權訊號,主 裝置接到授權訊號後開始資料傳送。在ARBLEVEL2狀態 25 200523747 將採用-般演算法對優先順序別為CREQ和 LREQ的請求進行㈣,從t cREQ和 求,並對發出該請求的主m冑CREQ或LREQ請 I置傳迗授權訊號, 權訊號㈣始詩傳料算 彳置接到杈When the bus used by the main device B, main device C, and main device D responds to the request of Θ, the taxi driver U will send the corresponding main device number through the AMNum signal line. ,,, &Quot; The corresponding master device. The codes that encode the master device correspond to the following: T master step 詈 Γ .. Master device A, 1 is the master device B, 2 is the robe I, 3 is the master nightmare ". In addition, the main device A and the main device B are respectively equipped with a thread identification signal line MthreadID. When a thread in the main device A or the main device B sends a bus use request to get a response from the arbiter, the arbiter sends the responded main device number to the corresponding main device through the AMNum signal line, and simultaneously passes the MThreadID signal line The corresponding thread number is transmitted to the corresponding thread in the host device. Both the master device and the slave device are provided with various types of signal lines connected to the arbiter, which are used to transmit various control signals in the data transmission operation. For example, the MDstnum signal is the number sent from the master device to the arbiter to request the slave device. In this embodiment, the coding codes of the four slave devices correspond to the following: 0 is a slave device A, 1 is a slave device B, 2 is a slave device C, and 3 is a slave device D. The bus use request sent by the master device is divided into different levels. In this embodiment, each master device has a MReq bus request signal line connected to the arbiter. The MReq signal transmitted by this signal line can be used to indicate the level of the bus use request. . The MReq bus sent through the MReq bus request signal line is divided into three types of REQ, CREQ and LREQ using the request signal, and its decoding is shown in the following table. Table 1 MReq signal description 0 0 IDLE no request 0 1 REQ general read and write request 10 LREQ generally cooperates with MCmd. If MCmd is 0, it is a read operation that requires LOCK; if MCmd is 1, it is a write operation that cancels LOCK. 200523747 11 CREQ Mandatory read and write requests with a higher priority than REQ. MCmd is a read and write operation request, low is read, and high is write. In the MReq bus use request signal, creq and LREQ have higher priority than REQ. Therefore, if the MReq sent by the master device is CREQ or LREQ, the driver ’s REQ often gets a response more quickly. Among them, the [REQ request is a paired read and write operation request. It requests a paired read and write operation. Because the read and write operation needs to be performed continuously and cannot be inserted into other operations, it is set to a Requests with a higher priority. MReq can be flexibly set by programming and other methods at each data transmission. Therefore, the priority level of the bus use request issued by the master device can be determined according to actual needs. In other embodiments, the MReq bus request signal can be set to a certain level as required, and its coding can be changed accordingly. Those skilled in the art should easily understand and implement this. In this embodiment, a data transmission method in the form of a stream burst (Stream Burst) is also used between the master device and the slave device. This data transmission method can transmit a large amount of data at once, and the data transmitted by each stream pulse can include multiple single data (Single) and multiple pulse data (Burst). A single piece of data in the same stream pulse or a complete pulse with continuous address can be called a segmented pulse, and the addresses between the segmented pulses can be discontinuous. In this embodiment, the Different segmented pulses can also be sent to different target slaves. In the embodiment of the present invention, it is also required that the length of the segmented pulse is an integer power of two and the addresses are aligned. 14 200523747 Relative to data transmission in the form of stream pulses, each master device or each thread in the master device is provided with a transmission status MLast signal line, and the rainbow post signal transmitted in the signal line indicates the master device or the master device. The thread requested the status of the data transfer operation. In this embodiment, four states are defined for the transmission and delivery of stream pulse data, including four types of signals: CONT, SAME, DIFF, and LAST. As shown in Table 2, they are encoded separately. _ Table 2 MLast [l: 〇] Signal Description 0 0 CONT The two segment pulses are not over. 0 1 End of LAST stream pulse. 10 SAME indicates the end of a segmented pulse. It is foreseen that the next segmented pulse accesses the same slave device as this segmented pulse, and the access request has the same level (that is, all are req or CREQ). 〇11 diff ~ ''- ------ _ indicates the end of a segmented pulse. It is forewarned that the next segmented pulse and this segmented pulse access different slave devices' or have different levels of access requests. In the shell material transmission operation, it is represented by CC) NT signal—a segmented pulse, which means that the data transmission address corresponding to the 3 NTC signal is also: there is no need to re-arbitrate. The “signal” indicates that a arbiter is required to perform the f data transfer operation again, and updates all bus use requests to arbitrate. 15 200523747 Both the SAME and DIFF signals indicate that a segmented pulse has been transmitted & The main difference is that the two zeta signals are used to predict the next segmented pulse and this segmented pulse access slave device, but the address and this segmented pulse may not be continuous, and the next segmented pulse and this Segmented pulse access requests have the same level, that is, all are CREQ and so on. The chat signal is used to predict the next sub-pulse and the slave device of this sub-pulse access W, or the next sub-pulse and the level of this sub-pulse access request are different. Similarly, the encoding of MLast can also be adjusted according to the type of data transmission operation status that is actually required. The device on the blind row requires the bus to perform data transfer operations: the upper row and the upper row use requests to the arbiter, and the arbiter The request made by the arbiter according to the pre-two: two priority. The order that the arbiter of the present invention can make includes the forward and reverse arbitration of the bus sent to the master device = ruling 4 from M_wh A to run the arbitration, To arbitration refers to the use of ^ nil 2 0 !, J ^ ^ ^ ^ ^ group in the calculation of = :; for the return of the funds needed to return funds; to the corresponding master device and slaves ^ Decoding benefit 206 After decoding, the encoder 208 decodes the signals ^ / ° After the signals are cut in the reverse phase two stages = 2: Wide: Should: Master-slave device and master device. Forward arbitration, and then The arbitration 1 issued by the arbitration bus will be used for arbitration,…, and the arbitration module will be entered into the first stage arbitration module 202; 16th 200523747-P are all arbitration modules, and the group 202 will be re-summed with the second stage The arbitration agency may use the bus from Chuan Chuan to omit the second stage of the arbitration. In his embodiment, the arbitration module does not perform arbitration processing, that is, when the second stage of arbitration ==, the second stage of forward arbitration can start a new r =? The arbitration algorithm can be familiar with various types known to relevant technical personnel. Algorithm. For simplicity, in this embodiment, the forward second-stage service arbitration group uses a fixed priority algorithm (such as itith) for arbitration, that is, one for each secondary master device. The exact priority level 'when there are two or more secondary masters requesting at the same time', then the master of the priority vocational high school is selected to enter the first stage. As shown in Figure 3 ' The main device c and the main device D are secondary main devices, and the -it priority level is set to & i and level 2. The signals of the main device c include MReq3 'MLaSt3 and MDStnum3, which indicate the requested level, data transmission status, and The number of the target slave device. Similarly, the Λ number of the master device d includes MReq4, MLast4, and MDstnum4. When the master device c and the master device D simultaneously request the use of the bus, according to the priority level, the arbiter will select the master device first. The bus use request made by Device C. In the time sequence after the response to the bus use request of the main split C, the arbiter will respond to the bus use request of the main device D at this time. The second stage arbitration module The arbitration signals sent include A2Req, A2Last, A2Dstnum, and A2Mnum, etc., which instruct the bus to use the request level, data transmission status, target slave device number, and responding master device number. These arbitration signals are sent to the first stage of arbitration as the result of arbitration The module participates in arbitration. In this case, 17 200523747 assumes that Yin Yin's assumption is that in the first stage Zhongshi ^., And the arbitration is carried out, and no other bus is used to request participation in arbitration, or the second stage ^ ^ cutting model , And the arbitration result shipped out is given priority k, then the forward decoder sends out / knows the arbitration vanadium, including the bus authorization signal AGrant shown in the picture and the authorized main dream Jinxuan Wangwang type signal AMNum, etc. came to respond to the main device C and the main 奘 sn ^ Ar- + the first stage of forward arbitration first required all arbitrators who need to participate in the arbitration ☆ _ 4 inspection procedures (filter). The screening program will be masked according to the request that the filter bar can't perform before the preparation. A request to continue participating in arbitration through a screening program is called a valid request. In this embodiment, the screening program mainly includes three filtering units.罝 and the main 4 set D bus use request. The first 疋 k belongs to the device busy state (SBusy) filtering unit, which can be communicated only when the slave device accessed by the confluence ^ use request is not in a busy state, and it is a private check type. For example, in this embodiment, the accessed The receive buffer of the slave device must be able to receive commands from the master device. For this condition, each slave device in the second embodiment is configured with a receive buffer, which is used to receive the receive instruction and related data from the t-cutter I. The receive buffer y mentioned here is a first-in-first-out register (FIF0). When the remaining _ free space of the slave device buffer is close to zero, that is, the remaining space of the buffer can only support the length of one pulse data or the length of one pulse data plus one data length, the slave device sends the slave device busy status Signal SBusy signal to the arbiter 'SBusy signal indicates the number of the slave device. The second is a paired read and write request control (LREQ) filtering unit, which is directed to the LREQ type bus use request in this example. For a LREQ request for read access, it will respond only when the bus is not locked. If the bus is locked, the read access of this lreq request must be masked. Here, the bus is locked, which means that another master or other thread has previously issued a lreq request, and the request is performing a read operation. This can prevent a new LREQ request from obtaining a bus authorization for read access operations, and cause errors in previous LREQ operations. The first unit is the last request control filtering unit, which can be used to ensure that the bus system can continuously process multiple bus use requests to achieve the effect of pipeline (pipelineH. For each stream pulse being transmitted For the request of the last clock, the arbiter needs to determine the data transmission status of the stream pulse and the ALast signal to determine the next arbitration state, so the arbiter needs to mask the request of the last clock of the stream pulse. In other embodiments of the present invention, other filtering units can be provided in the screening program. Referring to FIG. 4, the screening program 406 of the arbiter has three control ports, which are respectively connected to the slave device busy status signal line 4 〇2, the bus lock control line 403 and the last request control signal line 404. The input terminal of the screening program 疋 The bus use request 4 from the main device, the output of the screening program is screened Requests that are programmed but not masked are called valid requests 405. The arbiter will use arbitration algorithms to arbitrate valid requests. Figures 5-7 are screening Exemplary timing diagram of the operation of the three filtering units in the formula. In the SBusy filtering unit, the arbiter first locks the SBusy signal from each slave device to the SBusy control end, and the screening program combines the current SBusy signal and MDstnum signal to block Mask operation (mask 200523747 operation), in which the MDstnum signal indicates the number of the slave device to be accessed by the request. If the number of the slave device indicated by the MDstnum signal is the same as the slave device in which SBuSy functions, it means that the slave device accessed by the request The command cannot be received at this time. At this time, the screening program masks the request. Refer to Figure 5. The MReqO signal is the bus use request signal sent by the master device A. The MDstnum signal indicates the slave device to be accessed by the request. The MVReqO signal It is a valid request signal output after passing through the screening program. The SBusyO signal takes effect on the next clock after locking, so that the operation of the last clock accessed by MReqO to slave device A (the corresponding MDstnum signal is 0) is masked (Ie MVReqO is IDLE); and during the access to slave device B (the corresponding MDstnum signal is 1), the screening process No valid SBusyl signal appears, so access to the slave device B is not masked. In the bus lock control filter unit, an ALock signal is applied to the bus lock control terminal. If the bus is locked, the ALock signal Is high, and performs masking operation with the MReq signal at the input. If the bus is locked and the MReq signal is displayed as LREQ, the screening program will mask the request. In the embodiment shown in Figure 6, MReqO and MCmdO is the bus request signal sent by device A; AReq and ACmd are the response signals sent by the arbiter, which indicate the level of authorization request and read and write status, AGrant is the authorized signal of the arbiter; MVReqO is the main signal sent by the output end A valid request for device A. During the period when the AGrant signal is high, when the AReq is LREQ and ACmd is low (represented as a read request), the ALock signal of the bus lock control terminal is high; and when ACmd is high (represented as a write request), the bus is locked The control signal is low. When the ALock signal is high 20 200523747, the bus is locked. At this time, the arbiter will not arbitrate other LREQ read operations. In the figure, the first LREQ request of MReqO is a read operation, and the ALock signal is high in the first clock of this LREQ request, so the MREqO reflects that the LREQ in this clock is masked. For the last request control filtering unit, in an embodiment of the present invention, for the request of the last clock of each stream pulse being transmitted, the arbiter will determine the AGrant, AMNum and ALast signals together. When the AGrant signal is valid, And AMNum refers to the master device that currently owns the bus and transmits the stream pulse, and ALast indicates that the request from the master device has reached the request of the last clock, and the arbiter covers the request of the last clock of this stream pulse. Cover it off. Please refer to Figure 7. The MReqO signal is the bus use request signal sent by the main device A. The ALast signal indicates the data transmission status after the arbiter decodes the bus request signal. From the timing of the AMNum signal, it can be seen that the current The main device A that occupies the bus. In the figure, the timing of the MVReqO signal shows that the request corresponding to the last clock of the ALast signal is masked. The first stage of forward arbitration is not that new arbitration can be conducted at any time, but only when certain conditions are met to allow arbitration. In general, the first condition for arbitration in the first stage is that the current arbiter is idle. In this embodiment, the arbiter provides an Ai * b_state signal. When the signal is IDLE, it indicates that the arbiter is currently in an idle state, that is, no arbitration operation is currently in progress. The hierarchical arbitration in the first stage, in this embodiment, includes the timing of REQ Zhong 21 200523747 arbitration and CREQ arbitration. Corresponding to these two arbitration timings, there are AREQ_arb and ACREQ_arb arbitration timing control signals. In this embodiment, the data transmission method used is a stream pulse format, and the MLast signal is specified to represent the segmented pulse data transmission status code of the master device to the arbiter. The MLast signal has three values to indicate that the current segmentation pulse has ended: LAST indicates that a complete stream pulse has ended; SAME indicates that a stream pulse has not ended, the current segmentation pulse has ended, and the next segmentation pulse access The slave device is the same as the current segment pulse; DIFF means that a stream pulse has not ended, the current segment pulse has ended, and the slave device accessed by the next segment pulse is not the same as the current segment pulse. In the arbitration state machine, it is possible to enter the arbitration state when these three segmented pulse end codes appear. In this embodiment, a stream pulse process can only be interrupted by other requests at the CREQ level, and other requests at the REQ level cannot interrupt a stream pulse. When the LAST signal appears, the AREQ_arb signal and the ACREQ_arb signal are valid at the same time; when the SAME or DIFF signal appears, only the ACREQ_arb signal is valid. Please refer to Figure 8 which illustrates this with arbitration timing. After the MLast signal sent by the master device is arbitrated by the arbiter, the forward decoder of the arbiter will issue the ALast signal. There are four types of values corresponding to the MLast signal, namely CONT, SAME, DIFF and LAST, which can be used to help determine the next time. Pulse arbiter arbitration state to speed up bus pipeline processing. In the figure, there are three examples of ALast signals: LAST, SAME, and DIFF. The LAST signal indicates the end of a stream pulse, and the two signals AREQ_arb and ACREQ_arb are valid at the same time; SAME and DIFF only indicate that a segment pulse has ended 22 200523747, and the stream pulse is not ended, only the ACREQ_arb signal is valid. The ACREQ-arb signal is valid at both the end of the stream pulse and the end of the segment pulse in the stream pulse, while the AREQ_arb signal is valid only at the end of the stream pulse. Obviously, the ACREQ-arb signal is more effective than the AREQ-arb signal. For frequent, in other words, the time interval of the CREQ arbitration opportunity is shorter than the time interval of the REQ arbitration opportunity. Please refer to Figure 9 and Table 3. The arbitration state machine in this embodiment includes three states: IDLE, ARBLEVEL1, and ARBLEVEL2. ARBLEVEL1 and ARBLEVEL2 are the REQ arbitration timing and CREQ arbitration timing described above, respectively. Please refer to Table 3 for the following descriptions. Table 3 Condition 1 None of the valid requests are CREQ or LREQ, at least 1 valid request is REQ condition 2 When AREQ_arb is valid, and none of the valid requests are REQ, CREQ or LREQ condition 3 At least 1 valid request is CREQ or LREQ condition 4 when ACREQ_arb is valid, and none of the valid requests are REQ, CREQ, or LREQ condition 5 When ACREQ_arb is valid and AREQ_arb is invalid, at least 1 valid request is CREQ or LREQ, and AEnterST2 is 1 and condition 6 is When ACREQ_arb is valid, and no valid request is CREQ or LREQ, and AEnterST2 is 1, same as 200523747, AEnterST2 is reset to zero. As can be seen from the arbitration state machine in Figure 9, the arbiter does not arbitrate at any time Yes, arbitration is performed only in the two states of ARBLEVEL1 and ARBLEVEL2. When the Arb jtate signal is IDLE and satisfies condition 1, that is, only valid requests at the REQ level and no valid requests at the CREQ or LREQ level, and the AREQ-arb signal is valid, the arbiter enters the ARBLEVEL1 arbitration state. In the ARBLEVEL1 arbitration state, the arbiter can arbitrate the REQ, CREQ, and LREQ-level bus usage requests issued by the master device. When the Arb_state signal is IDLE and condition 3 is satisfied, that is, as long as there is a valid request at the CREQ or LREQ level, regardless of whether there is a valid request at the REQ level and at the same time an ACREQ-arb signal is valid, the Bayer J arbiter enters the ARBLEVEL2 arbitration state . In the ARBLEVEL 2 arbitration state, the arbiter only arbitrates the CREQ or LREQ-level bus use requests issued by the master device, while the REQ-level bus use requests do not participate in arbitration. It can also be seen from Figure 9 that the two states of ARBLEVEL1 and ARBLEVEL2 in the arbitration state machine can also switch to each other under certain conditions. Therefore, in this embodiment, the AEnterST2 signal is introduced to record the interrupted arbitration status. When the arbiter is arbitrating in the ARBLEVEL1 state, due to a higher-level valid request, such as a CREQ or LREQ request, it is necessary to switch the arbitration state to the ARBLEVEL2 state, and record the AEnterST2 signal as 1. In this way, when the AEnterST2 signal is 1, it enters the ARBLEVEL2 state until the arbitration operation in the ARBLEVEL2 state is completed. 24 200523747 At this time, if there is only a valid request at the REQ level and no other valid request at the CREQ or LREQ level, The arbiter will not re-arbitrate, but will return to the original arbitration state and return the AEnterST2 signal to zero at the same time. When changing the arbitration state for arbitration, the internal state of the arbiter needs to be retained. The amount of signal to be retained is temporarily placed in the buffer. The amount of signal to be retained is mainly sent by the arbiter to the master device in response. The number of the master device AMNum and the arbiter are sent to the slave device in response to the number of the slave device ASNum and so on. When directly transitioning from the IDLE state to the ARBLEVEL2 state, when the arbiter completes the arbitration task in the ARBLEVEL2 state, the arbiter will arbitrate all valid requests again. During the arbiter's arbitration process, when the ACREQ_arb signal is valid, if the arbiter is directly switched from the state of ARBLEVEL1 to the state of ARBLEVEL2, in order to prevent overload of the corresponding slave device to be accessed by the valid bus use request, this embodiment is again Use the SBixsy signal of the busy status signal of the slave device as the judgment basis to determine the current status of the slave device. If the receiving buffer of the slave device is currently unable to receive, the slave device will send an SBusy signal. After the arbiter locks the SBusy signal, it performs mask calculation with the signal MDstnum indicating the target slave device number in the bus use request. When the corresponding slave devices are consistent, the bus use request will be masked. In the ARBLEVEL1 state, the arbiter uses general algorithms to arbitrate various types of bus use requests sent by each master device, selects a request from it, and transmits an authorization signal to the master device that issued the request. The master device receives Data transmission starts after the signal is authorized. In the ARBLEVEL2 state 25 200523747, a general algorithm will be used to perform requests with priorities CREQ and LREQ, and from t cREQ and summation, and request the main m 胄 CREQ or LREQ to send an authorization signal, The right signal is transmitted to the beginning of the poem.

锔K,丨的a主卡收1如 仕ARBLEVEL2狀態下,REQ主 K, 丨 a master card receives 1 in ARBLEVEL2 state, REQ

級別的Μ求將被忽略掉。這襄的一 V 演算法(Round Robin)^ :&他,指單迴圈仲裁 演算法,在此不再㈣為本技術領域人員公知的仲裁 =圖所㈣仲裁器還包括—個反向仲裁模組2〇7。本 歹' 主裝置A和主裝置B都具有多執行緒,當有一 執订緒獲得授權使用匯流排時,仲裁器會發出主裝置 和該執行緒的號碼。一個執行绪的心七、 ’b馬 轨灯,,者的请求未被執行完成時,例 如其續取的資料所在的從屬裝置還未準備好時,同—主 中的其他執行緒可以發出請求,因此可能會有幾個不同執 緒所請求的讀數據,從各自對應的不同從屬裝置同時 情形。在其他實施例中,也可能出現幾個不同主裝置噴长| 讀數據,從各自所在的不同從屬裝置同時回傳的情形。仲的 器的反向仲裁模組在這種情形下,可以對各個.不同"從屬壯裁 回傳讀數據的匯流排使用請求進行仲裁。類似正1衣置 呵啊^裁, 裁器對從屬裝置發出的反向請求進行反向仲裁後,仲裁^合 提供有效的授權訊號ARGrant訊號,授權選中的 、丁的攸屬裝詈 佔有匯流排進行資料回傳運算。ARGrant訊號為各從屬 所共用,在高準位狀態時為有效。 、置 本實施例將從屬裝置也分成重要從屬裝置和★ 4大要從屬 裝置,如從屬裝置A、從屬裝置B為重要從屬裝 、直’而從 26 200523747Level M requests will be ignored. This one's V Robin algorithm (Round Robin) ^: & he refers to a single-loop arbitration algorithm, which is no longer an arbitration known to those skilled in the art = the arbiter also includes a reverse Arbitration module 207. Both the main device A and the main device B have multiple threads. When a thread is authorized to use the bus, the arbiter will issue the main device and the number of the thread. The thread of a thread, 'b rail lights, when the request of the person is not completed, such as when the slave device of the data to be retrieved is not ready, other threads in the same master can issue a request Therefore, there may be several read data requested by different threads at the same time from their corresponding different slave devices. In other embodiments, there may also be a situation where several different master devices spray the length | read data, and return data from different slave devices where they are located at the same time. In this case, the reverse arbitration module of the server can arbitrate each of the "different" slave slaves to read back the data using the bus. It ’s similar to the first one. After the cutter performs reverse arbitration on the reverse request sent by the slave device, the arbitration will provide a valid authorization signal ARGrant signal to authorize the selected and small members to possess the confluence. Row for data return operations. The ARGrant signal is shared by all slaves and is valid in the high level state. In this embodiment, the slave device is also divided into important slave devices and ★ 4 major slave devices, such as slave device A and slave device B are important slave devices. Straight from 26 200523747

屬裝置c和從屬裝置D 進行反向資料傳送時屬裝置。在次要從屬裝置 置時,採用的資料傳送【,目標是次㈣ 間的資料傳送速率低。例如 2和重要從屬裝置之 間的貝枓傳运速率為1個資料/時脈,次要從屬穿置… 向資料傳送時或是反向資料傳逆目^"人要4心丁反 M ^ ^ ^ ^ , 、專、目軚疋次要主裝置時,其資 Μ得送速率為1個資料主 的W…時在速率是1個資料/2時脈 的反向資料傳送期間,仲銬莠 中裁進仃仲裁,因此仲裁器的反 向仲裁也有仲裁時機。 請參照第1G圖,圖中示範性地對反向仲裁的仲裁時機 進^說明。圖巾ARSNum訊號表示進行反向資料傳送的從 屬襄置,ARGrant訊號表示仲裁器對反向f料傳送的從屬裝 置和對應主裝置發出回應,ARMNum訊號表示反向資料傳 送的目彳π主政置,仲裁時機訊號ARArb一forbid為低時,表 不允許對反向傳送的從屬裝置的有效請求做出仲裁。從第 Μ圖中可以看出,從屬裝置A為重要從屬裝置,主裝置B 為重要主裝置,在從屬裝置A向主裝置B進行反向資料傳 送時’ ARArb—forbid訊號為低,可進行仲裁;從屬裝置B 向主裝置D進行反向資料傳送期間,由於主裝置d為次要 主裝置,ARArb一forbid訊號將變高,不可進行仲裁;從屬 裝置C和從屬裝置D均為次要從屬裝置,二者與任何主裝 置進行資料傳送時,ARArb一forbid訊號都會變高,不可進 行仲裁。 本實施例中,反向請求也分成不同等級,包括SREQ級 27 200523747 別的反向請求和CSREQ級別的反向請求,其中⑽叫級 別的反向請求優先順序高於SREQ級別的反向請求。在仲裁 器對反向請求進行仲裁時’首先⑽csreq級別的反向請 求。同-級別的反向請求則按發出反向請求的從屬裝置的固 定優先順序來決定。例如,可將從屬裝置A、從屬裝置B、The slave device c and the slave device D are slave devices for reverse data transmission. When the secondary slave device is set, the data transfer used is [, the target is a low data transfer rate between the secondary devices. For example, the transmission rate of Beckham between 2 and important slave devices is 1 data / clock. The secondary slave wears it ... When transmitting to the data or reverse the data transmission. ^ ^ ^ ^, When the master device is a secondary master device, its data rate is 1 W for the data master. During the reverse data transfer rate of 1 data / 2 clock, the secondary The arbitrator was arbitrated, so the reverse arbitration of the arbiter also has the opportunity for arbitration. Please refer to Figure 1G, which illustrates the arbitration timing of reverse arbitration by way of example. The picture ARSNum signal indicates the slave device for reverse data transmission, the ARGrant signal indicates that the arbiter responds to the slave device and the corresponding master device for the reverse data transmission, and the ARMNum signal indicates the target of the reverse data transmission. When the arbitration signal ARArb_forbid is low, the table does not allow arbitration of a valid request from a slave device transmitted in the reverse direction. It can be seen from the figure M that the slave device A is an important slave device, and the master device B is an important master device. When the slave device A transmits reverse data to the master device B, the ARArb-forbid signal is low and arbitration can be conducted ; During the reverse data transfer from slave B to master D, since master d is the secondary master, the ARArb_forbid signal will become high and arbitration cannot be performed; slave C and slave D are both secondary slaves When the two are transmitting data with any host device, the ARArb-forbid signal will become high and arbitration cannot be conducted. In this embodiment, the reverse request is also divided into different levels, including SREQ level 27 200523747 other reverse requests and CSREQ level reverse requests, wherein the reverse request of the howling level has a higher priority than the reverse request of the SREQ level. When the arbiter arbitrates a reverse request ', first a reverse request at the csreq level. Same-level reverse requests are determined according to the fixed priority of the slave device that issued the reverse request. For example, slave device A, slave device B,

從屬裝置C和從屬裝置D的固定優先順序由高到低設定, 這樣,若從屬裝置A、從屬裝置B、從屬裝置c和從屬裝遭 D同k &出反U ’且均有效,則仲裁器將優先回應從肩 裝置A的反向哨求,而若只有從屬裝置b和從屬裝置。广 時發出反向請求且均為有效請求時,仲㈣將優先回應從肩 裝置B的反向請求。在其他實施例中,也可採用—般演省 法對反向請求進行仲裁,其變化同樣應該屬於本發明。1 雖然本發明已以-實施例揭露如上,然其並非用以 :發明,任何熟習此技藝者,在不脫離本發明之精神 ^ ’當可作各種之更動與關,因此本發明之保護範圍 後附之申請專利範圍所界定者為準。The fixed priorities of slave device C and slave device D are set from high to low. In this way, if slave device A, slave device B, slave device c, and slave device D are the same as k & The device will preferentially respond to the reverse whistle from the shoulder device A, if there is only the slave device b and the slave device. When a wide-time reverse request is issued and it is a valid request, Zhong Ye will give priority to responding to the reverse request from the shoulder device B. In other embodiments, the reverse request method can also be used to arbitrate the reverse request, and the changes should also belong to the present invention. 1 Although the present invention has been disclosed as above with the embodiment, it is not used to: invent, anyone skilled in this art will not depart from the spirit of the present invention ^ 'It can be modified and related, so the scope of protection of the present invention The appended application patents shall prevail.

【圖式簡單說明】 以下附圖為對本發明實施例的辅助說明 士本毛明實施例的闡述,是為進—步揭露本發明的 ’但並不限制本發明,圖中相同符號代表 : 件或步驟,其中·· W甲相肩 第1圖繪示本發明一實施例的匯流排系統結構圖; 第2圖繪示本發明一實施例的仲裁器結構示意圖·’ 28 200523747 第3圖繪示本發明一實施例之第二階段仲裁的一時序 圖; 第4圖繪示本發明一實施例之篩檢程式工作原理圖; 第5圖繪示本發明一實施例之篩檢程式的從屬裝置忙 碌狀態過渡單元之時序圖; 第6圖繪示本發明一實施例之篩檢程式的匯流排鎖定 控制過濾單元之時序圖; 第7圖繪示本發明一實施例之篩檢程式的最後請求控 制過濾單元之時序圖; 第8圖繪示本發明一實施例之正向仲裁時機時序圖; 第9圖繪示本發明一實施例的仲裁狀態機工作原理 圖,以及 第1〇圖繪示本發明一實施例的反向仲裁時機時序圖。 【元件代表符號簡單說明】 1 〇 1 :匯流排 1〇2 :主裝置a 103 :主裝置B 104 :主裝置c 105 :主裝置D 106 :從屬裝置a 107 :從屬裝置B 108 :從屬裝置c 1〇9 :從屬裝置d 11 〇 :仲裁器 201 ··正向第二階段仲裁模組 202 :正向第一階段仲裁模組 203 :篩檢程式 2〇4 :仲裁狀態機 205 :緩衝器 206 :正向解碼器 29 200523747 207:反向仲裁模組 208··反向解碼器 401 :匯流排使用請求訊號 402 :從屬裝置忙碌狀態訊號 403:匯流排鎖定訊號 404·•最後請求控制訊號 405 :有效請求 406 :筛檢程式[Brief description of the drawings] The following drawings are a supplementary explanation of the embodiments of the present invention, and the embodiments of the present invention are intended to further disclose the present invention, but do not limit the present invention. The same symbols in the figures represent: Or steps, where: ························································································································ A timing diagram of the second stage arbitration according to an embodiment of the present invention; FIG. 4 shows the working principle of the screening program according to an embodiment of the present invention; FIG. 5 shows the slaves of the screening program according to an embodiment of the present invention Timing chart of the busy state transition unit of the device; FIG. 6 illustrates the timing chart of the bus lock control filter unit of the screening program according to an embodiment of the present invention; FIG. 7 illustrates the end of the screening program of an embodiment of the present invention Timing diagram of the request control filtering unit; FIG. 8 is a timing diagram of the forward arbitration timing according to an embodiment of the present invention; FIG. 9 is a working principle diagram of the arbitration state machine according to an embodiment of the present invention; Show this hair Timing diagram of reverse arbitration timing of an embodiment. [Simple description of component representative symbols] 1 〇1: Busbar 102: Master device a 103: Master device B 104: Master device c 105: Master device D 106: Slave device a 107: Slave device B 108: Slave device c 109: Slave device d 11 〇: Arbiter 201 · Forward second stage arbitration module 202: Forward first stage arbitration module 203: Screening program 204: Arbitration state machine 205: Buffer 206 : Forward decoder 29 200523747 207: Reverse arbitration module 208 ·· Reverse decoder 401: Bus use request signal 402: Slave device busy status signal 403: Bus lock signal 404 ·· Last requested control signal 405: Valid Request 406: Screening Procedure

3030

Claims (1)

200523747 拾、申請專利範圍 1. 檀仲裁器(Arbiter),供伸哉 庵、* “ μ ^ 伸裁一匯流排之資料傳送逯 异,該匯k排連接複數個第—主 王裝置、複數個第二主裝置、 複數個第一從屬裝置以及趨Iμ蚀 „ 蜀衣直以及稷數個第二從屬裝置,苴中該此 一主裝置之優先權高於該些第— 乐一主裝置之優先權,且該些笙 一從屬裝置之優先權高於該4b第― —乐一從屬裝置之優先權,該伸 裁器至少包含: T200523747 Scope of patent application 1. Arbiter, for the transfer of data of a bus, * "μ ^ stretches a bus, the bus k is connected to a plurality of No.-the master device, a plurality of No. Two master devices, a plurality of first slave devices, and a trend towards Iμ „Shu Yi straight and a number of second slave devices, the priority of this one master device is higher than the priority of the first-Leyi master device And the priority of the Sheng-I slaves is higher than the priority of the 4b --- Le Yi slaves, the stretcher includes at least: T 一正向仲裁裝置,至少包含: 第-階段仲裁模組,對該些第二主裝置發出的 至少一匯流排使用請求進行判斷,選擇一候選第二主 裝置;以及A forward arbitration device includes at least: a first-stage arbitration module that judges at least one bus use request issued by these second master devices and selects a candidate second master device; and 一第一階段仲裁模組,對該候選第二主裝置以及 X —第主裝置發出的至少一匯流排使用請求進行判 斷▲‘擇授權主裝置,其中該授權主裝置被允許經 由4匯流排對該f第一從屬I置以及該些第二從屬裝 置進行資料傳送運算;以及 ^ 反向仲裁裝置,對該些第一從屬裝置發出的至少一匯 机排使用巧求進行判斷,選擇出—授權從屬裝置,其中該授 權從屬裝置被允許經由該匯流排對該些第— 向資料傳送運算。 凡I如申請專利範圍第1項所述之仲裁器,其中該第一階 裁模、且包含至少一篩檢程式(filter),以篩選該候選第二 31 200523747 主裂置與該些第一主裝置發出的至少一匯流排使用請求。 3 ·如申請專利範圍第2項所述之仲裁器,其中該篩檢程 式為一從屬裝置忙碌狀態過濾單元,用以忽略該些匯流排使 用叫求中之^料傳送運鼻之目標為處於忙碌狀態之該些從 屬裝置者。 4·如申請專利範圍第2項所述之仲裁器,其中該篩檢程 式為一請求控制過濾單元,當該匯流排處於一鎖定狀態時,· 该請求控制過濾單元會忽略其他該些主裝置發出的該些匯 流排使用請求。 5. 如申請專利範圍第4項所述之仲裁器,其中該些匯流 排使用請求為配對讀寫運算匯流排使用請求。 6. ^申請專利範圍帛2項所述之仲裁器,其中該筛檢程 式為一最後請求控制過濾單元,當以—流脈衝進行資料傳送 籲 運算時,該最後請求控制過遽單元遮罩該流脈衝(3如啦 Burst)之最後一個時脈的請求,以達成一匯流排管線 (pipeline)仲裁。 7. 如申請專利範圍第1項所述之仲裁器,其中該第二階 段仲裁模組係採用固定優先權演算》(bed algorithm)來選擇該候選第二主裝置。 32 200523747 8·如申请專利範圍第i項所述之仲裁器,其中該第一階 段仲裁模組係採用單迴圈仲裁演算法(R〇und R〇bin)來選擇 該授權主裝置。 9·如申請專利範圍第丨項所述之仲裁器,其中該反向仲 裁裝置係採用固定優先權演算法(fixe(i pri〇rity alg0rithm) 來選擇該授權從屬裝置。 10.—種仲裁器,供仲裁一匯流排之資料傳送運算,該 匯流排連接複數個主裝置以及複數個從屬裝置,該仲裁器至 少包含: 一正向仲裁裝置,對該些主裝置發出的至少一匯流排使 用請求進行判斷,選擇一授權主裝置,其中該授權主裝置被 允許經由該匯流排對該些從屬裝置進行資料傳送運算;以及 一反向仲裁裝置,對該些從屬裝置發出的至少一匯流排 使用請求進行判斷,選擇出一授權從屬裝置,其中該授權從 屬裝置被允許經由該匯流排對該些主裝置進行反向資料傳 送運算。 11·如申請專利範圍第10項所述之仲裁器,其中該正向 仲裁裝置係採用單迴圈仲裁演算法(Round Robin)來選擇 該授權主裝置。 33 200523747 裝置 如申請專利範圍第 仲裁裝置係採用固定優先 algorithm)來選擇該授權從屬 13.-種仲裁方法,在—仲裁時間中 料傳送運算,該匯流排連接複數個主裝置^排之資 ”中該仲裁_為一閒置狀態、一長間隔 及一短間隔週期時間,該仲裁方法至少包含: 乂 當該仲裁時間處於該間置狀態,且該些主装置 匯流排使用請求僅為-低優_序匯流排㈣㈣時, 裁時間切換為該長間隔週期時間; 當該仲裁時間處於該閒置狀態,且該些主裝置所發出之 匯流排使用請求包含該低優先順序匯流排使用請求以及一 高優先順序匯流排使用請㈣,該仲裁時間切換為該短間隔 週期時間; 當仲裁時間處於該長間隔週期時間或該短間隔週期時 間,且該些主裝置所發出之匯流排使用請求不包含該低優先 順序匯流排使用晴求以及該高優先順序匯流排使用請求 時,該仲裁時間切換為該閒置狀態; 當该仲裁時間處於該長間隔週期時間,且該些主裝置所 發出之匯流排使用請求為該高優先順序匯流排使用請求 時,該仲裁時間切換為該短間隔週期時間;以及 當該仲裁時間處於該短間隔週期時間,且該些主裝置所 發出之匯流排使用請求僅為該低優先順序匯流排使用請求 34 200523747 間隔週期時間 時,該仲裁時間切換為該長 之仲裁方法,其中該低 般讀寫匯流排使用請求。 14·如申請專利範圍第〗 半i3項所述 優先順序匯流排使用請求為_ _ 15·如申請專利範圍第u 項所述之仲裁方法,I φ 4 優先順序匯流排使用請求為一 八中up ^ 1¾ ^ ^ ^ ffl ^ -¾ 要求鎖疋匯流排讀寫配對ϋ π匯々丨L排使用碩求或一強制性 項冩匯流排使用請求。A first-stage arbitration module to determine the candidate second master device and at least one bus use request issued by the X-th master device ▲ 'Select an authorized master device, wherein the authorized master device is allowed to pass through the 4 bus pairs The f first slave device I and the second slave devices perform data transfer operations; and ^ reverse arbitration device, judges at least one sink row issued by the first slave devices, and selects-authorization Slave device, where the authorized slave device is allowed to perform the first-to-data transfer operation via the bus. Where I is the arbiter described in item 1 of the scope of patent application, wherein the first-order cutting mode includes at least one filter to filter the candidate second 31 200523747 main split and the first At least one bus use request issued by the master device. 3 · The arbiter described in item 2 of the scope of the patent application, wherein the screening program is a slave device busy state filtering unit, which is used to ignore the buses. Those slaves who are busy. 4. The arbiter described in item 2 of the scope of patent application, wherein the screening program is a request control filter unit, and when the bus is in a locked state, the request control filter unit ignores other main devices These bus usage requests were issued. 5. The arbiter described in item 4 of the scope of patent application, wherein the bus use requests are paired read-write operation bus use requests. 6. ^ The arbiter described in item 2 of the patent application scope, wherein the screening program is a last-request control filter unit, and when data transfer calls are performed with a stream pulse, the last-request control-over unit masks the The last clock request of the streaming pulse (3 such as Burst) to achieve a bus pipeline arbitration. 7. The arbiter described in item 1 of the scope of patent application, wherein the second stage arbitration module uses a fixed priority algorithm (bed algorithm) to select the candidate second master device. 32 200523747 8. The arbiter described in item i of the scope of patent application, wherein the first-stage arbitration module uses a single-loop arbitration algorithm (Roundundbin) to select the authorized master device. 9. The arbiter described in item 丨 of the patent application scope, wherein the reverse arbitration device uses a fixed priority algorithm (fixe (i pri〇rity alg0rithm) to select the authorized slave device. 10. An arbiter For arbitrating a data transfer operation of a bus, the bus is connected to a plurality of master devices and a plurality of slave devices, the arbiter at least includes: a forward arbitration device, at least one bus use request issued to the master devices Make a judgment and select an authorized master device, wherein the authorized master device is allowed to perform data transfer operations on the slave devices via the bus; and a reverse arbitration device, at least one bus use request issued by the slave devices Make a judgment and select an authorized slave device, wherein the authorized slave device is allowed to perform reverse data transfer operations on the master devices via the bus. 11. The arbiter according to item 10 of the scope of patent application, wherein The forward arbitration device uses a round-robin arbitration algorithm (Round Robin) to select the authorized master device. 33 200523747 The arbitration device of Zhiru's patent application scope uses a fixed-priority algorithm to select the authorized slave. 13. A kind of arbitration method, in-arbitration time in the material transfer operation, the bus is connected to a plurality of master devices. Arbitration_ is an idle state, a long interval, and a short interval cycle time. The arbitration method includes at least: 乂 When the arbitration time is in the interposed state, and the requests for the use of the buses of the master devices are only-low-optimal-sequence When the bus is busy, the cutting time is switched to the long interval cycle time; when the arbitration time is in the idle state, and the bus use request issued by the master devices includes the low priority bus use request and a high priority Please use the bus, the arbitration time is switched to the short interval cycle time; when the arbitration time is at the long interval cycle time or the short interval cycle time, and the bus use request issued by the master devices does not include the low priority When the sequential bus use request and the high priority bus use request are requested, the arbitration time is switched to the idle time. State; when the arbitration time is in the long interval cycle time and the bus use request sent by the master devices is the high priority bus use request, the arbitration time is switched to the short interval cycle time; and when the When the arbitration time is in the short interval cycle time, and the bus use request issued by the master devices is only the low priority bus use request 34 200523747 the interval cycle time, the arbitration time is switched to the long arbitration method, where This low-level read / write bus use request. 14. • The priority bus use request as described in item i3 and item i3 of the patent application scope is _ _ 15 · The arbitration method as described in item u of the application application scope, I φ 4 The priority order of the bus use request is up ^ 1¾ ^ ^ ^ ^ ffl ^ -¾ Requires the lock bus read-write pairing ϋ 々 々 丨 L row use master request or a mandatory item 冩 bus use request. 1 6. —種反向仲裁方法, 、 在複數個第一從屬裝置回傳1 料至複數個第一主裝置時仲教一 7裁匯流排之資料傳送運算,言 匯流排連接一仲裁器、該此箆一 只二弟一主裝置、複數個第二主| 置、該些第-從屬裝置以及複數個第二從屬裝置,其中制 第-主裝置之優先權高於該些第二主裝置之優先權,且該也 第-從屬裝置之優先權高於該些第二從屬裝置之優先權,驾 反向仲裁方法至少包括:16. A method of reverse arbitration. When a plurality of first slave devices return 1 data to the plurality of first master devices, Zhongjiao 7 cuts the data transfer operation of the bus. The bus is connected to an arbiter, There should be a second brother and a master device, a plurality of second master devices, the first-slave devices, and a plurality of second slave devices, among which the first master device has priority over the second master devices. Priority, and the priority of the first-slave device is higher than the priority of the second slaves, the reverse arbitration method includes at least: 4些第一從屬裝置發出至少一匯流排使用請求,· 該些第一從屬裝置所發出之匯流排使用請求包含一低 優先順序匯流排使用請求以及一高優先順序匯流排使用請 求時選擇發出該高優先順序匯流排使用請求之從屬裝置為 授權從屬裝置’其中該授權從屬裝置被允許經由該匯流排 對該些第一主裝置進行反向資料傳送運算;以及 該些第一從屬裝置所發出之匯流排使用請求僅為該低 優先順序匯流排使用請求時,授權發出該低優先順序匯流排 35 200523747 使用請求之從屬裝置經由該匯流排對該些第—主 反向資料傳送運算。 表置進行 17·如申請專利範圍第16項所述之反向仲 1戢万法,其中 該低優先順序匯流排使用請求為一反向一般接音 用請求。 -寫匯流排使 ’其中 ®流排 18·如申請專利範圍第16項所述之反向仲裁方、去The four slave devices issue at least one bus use request. The bus use requests issued by the first slave devices include a low priority bus use request and a high priority bus use request. The slave device of the high-priority bus use request is an authorized slave device, wherein the authorized slave device is allowed to perform reverse data transfer operations on the first master devices via the bus; and the slave device issued by the first slave devices When the bus use request is only the low-priority bus use request, the slave device authorized to issue the low-priority bus 35 200523747 uses the slave device to perform the first-to-reverse data transfer operation through the bus. Placement process 17. The reverse method described in item 16 of the scope of patent application, wherein the low priority bus use request is a reverse general answer request. -Writing the busbar ‘of the ® busbar 18 · The reverse arbitrator, as described in item 16 of the scope of patent application, 該高優先順序匯流排使用請求為一強制性反向讀寫 使用請求。 36The high priority bus usage request is a mandatory reverse read and write usage request. 36
TW93100611A 2004-01-09 2004-01-09 An arbiter and the method thereof TWI244001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW93100611A TWI244001B (en) 2004-01-09 2004-01-09 An arbiter and the method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW93100611A TWI244001B (en) 2004-01-09 2004-01-09 An arbiter and the method thereof

Publications (2)

Publication Number Publication Date
TW200523747A true TW200523747A (en) 2005-07-16
TWI244001B TWI244001B (en) 2005-11-21

Family

ID=37154665

Family Applications (1)

Application Number Title Priority Date Filing Date
TW93100611A TWI244001B (en) 2004-01-09 2004-01-09 An arbiter and the method thereof

Country Status (1)

Country Link
TW (1) TWI244001B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535634A (en) * 2020-04-19 2021-10-22 新唐科技股份有限公司 Electronic device and method for bandwidth distribution

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI385528B (en) * 2008-12-22 2013-02-11 Univ Ishou Arbitration device for system bus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535634A (en) * 2020-04-19 2021-10-22 新唐科技股份有限公司 Electronic device and method for bandwidth distribution
CN113535634B (en) * 2020-04-19 2023-05-23 新唐科技股份有限公司 Electronic device and method for bandwidth allocation

Also Published As

Publication number Publication date
TWI244001B (en) 2005-11-21

Similar Documents

Publication Publication Date Title
US7145903B2 (en) Multi-master bus architecture for system-on-chip designs
US20020161978A1 (en) Multi-service system-on-chip including on-chip memory with multiple access path
EP0737924A2 (en) Bus arbritation and data transfer
US20050289268A1 (en) Internal bus system
US7539806B2 (en) Arbitrator and its arbitration method
JPH0696015A (en) Computer system and method for bus control synchronization and adjustment
US20050060455A1 (en) Arbiter having programmable arbitration points for undefined length burst accesses and method
JPH08339346A (en) Bus arbiter
EP1811393B1 (en) Method and system for data transfer
JP2015530679A (en) Method and apparatus using high efficiency atomic operations
US6275890B1 (en) Low latency data path in a cross-bar switch providing dynamically prioritized bus arbitration
US5894562A (en) Method and apparatus for controlling bus arbitration in a data processing system
US6823410B2 (en) Split transaction bus system
JP2002123484A (en) Immediate permission bus arbiter for bus system
TW200400438A (en) Bus arbiter for integrated circuit systems
US6571306B1 (en) Bus request mechanism for bus master which is parked on a shared bus
TW200523747A (en) An arbiter
JP2007058716A (en) Data transfer bus system
CN1326058C (en) Data transfer control device
JP4097847B2 (en) Bus bridge arbitration method
KR100605867B1 (en) Bus Arbitrator and Bus Arbitration Method with Dynamic Priority Adjustment
JPS6160162A (en) Bus arbitration system
US7117281B1 (en) Circuit, system, and method for data transfer control for enhancing data bus utilization
TWI249680B (en) A multi-device system and the method thereof
JPH022445A (en) Multiplex bus system

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees