TWI829470B - Media access control circuit and packet management method - Google Patents
Media access control circuit and packet management method Download PDFInfo
- Publication number
- TWI829470B TWI829470B TW111147871A TW111147871A TWI829470B TW I829470 B TWI829470 B TW I829470B TW 111147871 A TW111147871 A TW 111147871A TW 111147871 A TW111147871 A TW 111147871A TW I829470 B TWI829470 B TW I829470B
- Authority
- TW
- Taiwan
- Prior art keywords
- value
- circuit
- packet
- access control
- media access
- Prior art date
Links
- 238000007726 management method Methods 0.000 title claims abstract description 13
- 238000000034 method Methods 0.000 claims description 19
- 230000005540 biological transmission Effects 0.000 claims description 15
- 238000010586 diagram Methods 0.000 description 6
- 101100283411 Arabidopsis thaliana GMII gene Proteins 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本發明是關於網路,尤其是關於媒體存取控制(media access control,MAC)與封包管理方法。 The present invention relates to networks, and in particular to media access control (MAC) and packet management methods.
圖1顯示習知的電子裝置。主要電路110透過媒體存取控制電路120、物理層電路130及變壓器140從網路150(例如,乙太網路)接收封包或是發送封包到網路150。然而,在某些狀況下(例如,設備故障或遭受攻擊),電子裝置可能收到大量的封包,導致主要電路110的負載增加,進而造成使用者體驗下降,或甚至造成電子裝置故障。
Figure 1 shows a conventional electronic device. The
鑑於先前技術之不足,本發明之一目的在於提供一種媒體存取控制電路與封包管理方法,以改善先前技術的不足。 In view of the deficiencies of the prior art, one objective of the present invention is to provide a media access control circuit and a packet management method to improve the deficiencies of the prior art.
本發明之一實施例提供一種媒體存取控制電路。媒體存取控制電路耦接一物理層電路,包含一儲存電路、一接收電路、一檢查電路以及一保護電路。儲存電路用來儲存一第一數值及一第二數值。接收電路用來從該物理層電路接收一封包。檢查電路用來檢查該封包。保護電路耦接該儲存電路,用 來執行以下步驟:根據一時脈更新該第一數值;以及,當該第一數值與一基準值之絕對差值小於該第二數值時,捨棄該封包。 An embodiment of the present invention provides a media access control circuit. The media access control circuit is coupled to a physical layer circuit, including a storage circuit, a receiving circuit, a checking circuit and a protection circuit. The storage circuit is used to store a first value and a second value. The receiving circuit is used to receive a packet from the physical layer circuit. A check circuit is used to check the packet. The protection circuit is coupled to the storage circuit, with The following steps are performed: updating the first value according to a clock; and discarding the packet when the absolute difference between the first value and a reference value is less than the second value.
本發明之另一實施例提供一種封包管理方法,應用於一媒體存取控制電路,該媒體存取控制電路耦接一物理層電路,並且包含儲存一第一數值、一第二數值及一基準值的一儲存電路。該封包管理方法包含:根據一時脈更新該第一數值;從該物理層電路接收一封包;檢查該封包;以及,當該第一數值與該基準值之絕對差值小於該第二數值時,捨棄該封包。 Another embodiment of the present invention provides a packet management method applied to a media access control circuit. The media access control circuit is coupled to a physical layer circuit and includes storing a first value, a second value and a reference. A storage circuit for values. The packet management method includes: updating the first value according to a clock pulse; receiving a packet from the physical layer circuit; checking the packet; and when the absolute difference between the first value and the reference value is less than the second value, Discard the packet.
本發明之實施例所體現的技術手段可以改善先前技術之缺點的至少其中之一,因此本發明相較於先前技術可以提升使用者體驗及/或避免電子裝置故障。 The technical means embodied in the embodiments of the present invention can improve at least one of the shortcomings of the prior art. Therefore, the present invention can improve user experience and/or avoid electronic device failures compared with the prior art.
有關本發明的特徵、實作與功效,茲配合圖式作實施例詳細說明如下。 The features, implementation and effects of the present invention are described in detail below with reference to the drawings and examples.
110:主要電路 110: Main circuit
120,201:媒體存取控制電路 120,201:Media access control circuit
130,203:物理層電路 130,203:Physical layer circuit
140:變壓器 140:Transformer
150:網路 150:Internet
200:電子裝置 200:Electronic devices
202:計算電路 202: Calculation circuits
204:外部記憶體 204:External memory
205:傳輸介面 205:Transmission interface
210:直接記憶體存取電路 210: Direct memory access circuit
220:封包產生電路 220: Packet generation circuit
225:傳送電路 225:Transmission circuit
230:時脈產生電路 230: Clock generation circuit
242:接收電路 242: Receiving circuit
244:檢查電路 244: Check circuit
246:保護電路 246: Protection circuit
250:儲存電路 250:Storage circuit
252:記憶體 252:Memory
254:設定電路 254: Set circuit
Intr:中斷 Intr: interrupt
PT:封包 PT:Packet
CLK,CLK_mac,CLK_phy:時脈 CLK,CLK_mac,CLK_phy: clock
310:封包種類檢查電路 310: Packet type checking circuit
320:廣播令牌控制電路 320: Broadcast token control circuit
330:群播令牌控制電路 330: Multicast token control circuit
340:單播令牌控制電路 340: Unicast token control circuit
400:令牌控制電路 400: Token control circuit
410:確定電路 410: Determine the circuit
420:計數電路 420:Counting circuit
Tc_tar:目標令牌數 Tc_tar: Target number of tokens
Tc:當前的令牌數 Tc: current number of tokens
Tc_step:步進值 Tc_step: step value
Tc_csm:令牌消耗數 Tc_csm: Token consumption number
N_drop:捨棄的封包數 N_drop: Number of dropped packets
Tc_ini:令牌基準值 Tc_ini: Token base value
Tc_csm1:廣播令牌消耗數 Tc_csm1: Number of broadcast tokens consumed
Tc1:廣播封包的當前令牌數 Tc1: Current token number of broadcast packet
Tc_csm2:群播令牌消耗數 Tc_csm2: Number of multicast tokens consumed
Tc2:群播封包的當前令牌數 Tc2: Current token number of multicast packet
Tc_csm3:單播令牌消耗數 Tc_csm3: Unicast token consumption number
Tc3:單播封包的當前令牌數 Tc3: Current token number of unicast packet
505,S512,S514,S516,S522,S524,S526,S528,S532,S534,S540,S542,S544,S546,S810,S820,S830,S534_1,S534_2,S534_4,S534_6,S542_2,S542_4,S542_6:步驟 505,S512,S514,S516,S522,S524,S526,S528,S532,S534,S540,S542,S544,S546,S810,S820,S830,S534_1,S534_2,S534_4,S534_6,S542_2,S542 _4,S542_6: Step
圖1顯示習知的電子裝置;圖2顯示本發明電子裝置之一實施例的功能方塊圖;圖3顯示本發明保護電路之一實施例的功能方塊圖;圖4顯示本發明令牌控制電路之一實施例的功能方塊圖;圖5是本發明封包管理方法之一實施例的流程圖;圖6顯示本發明數種封包的目標令牌數、令牌消耗數、步進值、令牌基準值及捨棄的封包數; 圖7是圖5之步驟S534與步驟S542的詳細步驟;以及圖8是本發明媒體存取控制電路及封包管理方法的一個操作實施例。 Figure 1 shows a conventional electronic device; Figure 2 shows a functional block diagram of an embodiment of the electronic device of the present invention; Figure 3 shows a functional block diagram of an embodiment of the protection circuit of the present invention; Figure 4 shows a token control circuit of the present invention Functional block diagram of one embodiment; Figure 5 is a flow chart of one embodiment of the packet management method of the present invention; Figure 6 shows the target token number, token consumption number, step value, token number of several packets of the present invention Baseline value and number of discarded packets; FIG. 7 is the detailed steps of step S534 and step S542 in FIG. 5; and FIG. 8 is an operational embodiment of the media access control circuit and packet management method of the present invention.
以下說明內容之技術用語係參照本技術領域之習慣用語,如本說明書對部分用語有加以說明或定義,該部分用語之解釋係以本說明書之說明或定義為準。 The technical terms used in the following description refer to the idioms in the technical field. If some terms are explained or defined in this specification, the explanation or definition of these terms shall prevail.
本發明之揭露內容包含媒體存取控制電路與封包管理方法。由於本發明之媒體存取控制電路所包含之部分元件單獨而言可能為已知元件,因此在不影響該裝置發明之充分揭露及可實施性的前提下,以下說明對於已知元件的細節將予以節略。此外,本發明之封包管理方法的部分或全部流程可以是軟體及/或韌體之形式,並且可藉由本發明之媒體存取控制電路或其等效裝置來執行,在不影響該方法發明之充分揭露及可實施性的前提下,以下方法發明之說明將著重於步驟內容而非硬體。 The disclosure of the present invention includes a media access control circuit and a packet management method. Since some components included in the media access control circuit of the present invention may be known components individually, the following description will not describe the details of the known components without affecting the full disclosure and implementability of the device invention. be abbreviated. In addition, part or all of the process of the packet management method of the present invention can be in the form of software and/or firmware, and can be executed by the media access control circuit of the present invention or its equivalent device, without affecting the invention of the method. On the premise of full disclosure and implementability, the following description of the method invention will focus on the step content rather than the hardware.
圖2顯示本發明電子裝置之一實施例的功能方塊圖。電子裝置200包含媒體存取控制電路201、計算電路202、物理層電路203及外部記憶體204。電子裝置200透過媒體存取控制電路201及物理層電路203存取網路。媒體存取控制電路201透過傳輸介面205耦接物理層電路203,以藉由物理層電路203傳送及接收資料。傳輸介面205包含但不限於媒介無關介面(media-independent interface,MII)、簡化媒介無關介面(Reduced MII,RMII)、十億位元媒介無關介面(Gigabit MII,GMII)或簡化十億位元媒介無關介面(Reduced GMII,RGMII)。
FIG. 2 shows a functional block diagram of an electronic device according to an embodiment of the present invention. The
計算電路202可以是具有程式執行能力的電路或電子元件,例如中央處理器、微處理器、微處理單元、數位訊號處理器、特殊應用積體電路(Application Specific Integrated Circuit,ASIC),或其等效電路。計算電路202藉由執行儲存在外部記憶體204(例如,動態隨機存取記憶體(Dynamic Random Access Memory,DRAM))中的程式碼及/或程式指令來實現電子裝置200的全部或部分功能。
The
媒體存取控制電路201包含直接記憶體存取(Direct Memory Access,DMA)電路210、封包產生電路220、傳送電路225、時脈產生電路230、接收電路242、檢查電路244、保護電路246及儲存電路250。儲存電路250包含記憶體252(例如,靜態隨機存取記憶體(Static Random Access Memory,SRAM))及設定電路254(例如,暫存器)。媒體存取控制電路201用來將資料從外部記憶體204複製或搬移至記憶體252,或是從記憶體252複製或搬移至外部記憶體204。
The media
計算電路202透過記憶體匯流排耦接外部記憶體204與設定電路254,以存取外部記憶體204及設定電路254(例如,改變設定電路254的設定值)。
The
封包產生電路220、傳送電路225、接收電路242、檢查電路244及保護電路246皆耦接設定電路254,該些電路根據設定電路254中的設定值(例如,暫存值)操作。換言之,計算電路202可以藉由改變設定電路254的設定值來***體存取控制電路201。另一方面,媒體存取控制電路201也可以藉由改變設定電路254的設定值來傳送中斷Intr給計算電路202。為了簡潔起見,圖2中省略設定電路254與封包產生電路220、傳送電路225、接收電
路242、檢查電路244及保護電路246之間的連線。
The
媒體存取控制電路201傳送資料時,封包產生電路220先將該資料封裝成封包,傳送電路225再將封包透過傳輸介面205傳送給物理層電路203。
When the media
媒體存取控制電路201接收資料時,接收電路242透過傳輸介面205從物理層電路203接收封包PT、檢查電路244檢查該封包PT(包含但不限於長度檢查及循環冗餘校驗(Cyclic redundancy check,CRC)的合法性校驗),然後保護電路246決定該封包PT是否能被計算電路202取用。更明確地說,當保護電路246決定封包PT可以被計算電路202取用時,則保護電路246將封包PT儲存至儲存電路250的記憶體252,然後直接記憶體存取電路210將封包PT複製或搬移至外部記憶體204以供計算電路202讀取;另一方面,當保護電路246決定封包PT不能被計算電路202取用時,保護電路246捨棄該封包PT。保護電路246的詳細操作流程將在下方配合圖3及圖5說明。
When the media
圖3顯示本發明保護電路之一實施例的功能方塊圖。保護電路246包含封包種類檢查電路310、廣播令牌(token)控制電路320、群播令牌控制電路330及單播令牌控制電路340。封包種類檢查電路310根據封包PT的內容(例如,特定的位元)判斷封包PT的種類(例如,廣播(broadcast)封包、群播(multicast)封包或單播(unicast)封包),並且根據封包PT的種類將封包PT傳送至相對應的令牌控制電路。本技術領域具有通常知識者可以根據廣播封包、群播封包及單播封包的定義或規範來實現封包種類檢查電路310,故不再贅述。
FIG. 3 shows a functional block diagram of an embodiment of the protection circuit of the present invention. The
圖4顯示本發明令牌控制電路之一實施例的功能方塊圖。圖3之
廣播令牌控制電路320、群播令牌控制電路330及單播令牌控制電路340的任一者可以由圖4之令牌控制電路400實作。令牌控制電路400包含確定電路410及計數電路420。確定電路410及計數電路420可以由數位邏輯電路實作。
FIG. 4 shows a functional block diagram of an embodiment of the token control circuit of the present invention. Figure 3
Any of the broadcast
確定電路410根據時脈CLK、當前的令牌數Tc、令牌基準值Tc_ini、令牌消耗數Tc_csm、步進值Tc_step及目標令牌數Tc_tar控制計數電路420更新當前的令牌數Tc。
The
在第一實施例中,目標令牌數Tc_tar大於令牌基準值Tc_ini。在第二實施例中,目標令牌數Tc_tar小於令牌基準值Tc_ini。 In the first embodiment, the target token number Tc_tar is greater than the token reference value Tc_ini. In the second embodiment, the target token number Tc_tar is smaller than the token reference value Tc_ini.
當確定電路410偵測到時脈CLK的上升緣及/或下降緣且當前的令牌數Tc小於(第一實施例)或大於(第二實施例)目標令牌數Tc_tar時,確定電路410控制計數電路420將當前的令牌數Tc增加(第一實施例)或減少(第二實施例)一個步進值Tc_step(例如,1)。換言之,在第一實施例中,當前的令牌數Tc的最小值與最大值分別是令牌基準值Tc_ini與目標令牌數Tc_tar;在第二實施例中,當前的令牌數Tc的最小值與最大值分別是目標令牌數Tc_tar與令牌基準值Tc_ini。
When the
在一些實施例中,時脈CLK是媒體存取控制電路201的內部時脈CLK_mac。在其他的實施例中,時脈CLK是傳輸介面205本身固有的時脈CLK_phy。相較於內部時脈CLK_mac,使用時脈CLK_phy可以簡化電子裝置200的設計(因為不需另外產生時脈)以及提升電子裝置200在封包計數上的精準度(因為時脈CLK_phy與封包PT屬於同一個時脈域)。
In some embodiments, the clock CLK is the internal clock CLK_mac of the media
當確定電路410收到封包PT時,確定電路410判斷當前的令牌數Tc與令牌基準值Tc_ini的絕對差值是否大於等於令牌消耗數Tc_csm。如果
是,則確定電路410控制計數電路420將當前的令牌數Tc減去令牌消耗數Tc_csm(即,Tc=Tc-Tc_csm,第一實施例)或是將當前的令牌數Tc加上令牌消耗數Tc_csm(即,Tc=Tc+Tc_csm,第二實施例),並且發送中斷Intr給計算電路202。如果否,則確定電路410捨棄該封包PT。
When the
請參閱圖5,圖5是本發明封包管理方法之一實施例的流程圖,包含以下步驟。請注意,廣播令牌控制電路320、群播令牌控制電路330及單播令牌控制電路340都使用圖5的流程,但可以有各自的目標令牌數Tc_tar、令牌消耗數Tc_csm、步進值Tc_step、令牌基準值Tc_ini及捨棄的封包數N_drop,如圖6所示。
Please refer to FIG. 5. FIG. 5 is a flow chart of an embodiment of the packet management method of the present invention, including the following steps. Please note that the broadcast
步驟S505:初始化步驟,確定電路410將當前的令牌數Tc設定為令牌基準值Tc_ini(例如,0)以及將捨棄的封包數N_drop設為初始值(例如,0)。
Step S505: Initialization step, the
步驟S512:確定電路410接收時脈CLK,並且當時脈CLK發生位準轉換時執行步驟S514。
Step S512: The
步驟S514:確定電路410判斷當前的令牌數Tc與目標令牌數Tc_tar的絕對差值是否大於步進值Tc_step。如果是(即,Tc_tar-Tc>Tc_step(第一實施例)或Tc-Tc_tar>Tc_step(第二實施例)),則執行步驟S516;如果否(表示當前的令牌數Tc已等於或接近目標令牌數Tc_tar),則回到步驟S512。
Step S514: The
步驟S516:令牌控制電路400依據步進值Tc_step更新當前的令牌數Tc。更明確地說,確定電路410控制計數電路420將當前的令牌數Tc增加步進值Tc_step(即,Tc=Tc+Tc_step,實施例一)或減少步進值Tc_step
(即,Tc=Tc-Tc_step,實施例二)。在一些實施例中,步進值Tc_step為1。
Step S516: The
簡言之,在初始化步驟S505之後,令牌控制電路400一方面根據時脈CLK調整當前的令牌數Tc(步驟S512~S516),一方面管理封包(傳送封包給計算電路202或捨棄封包,即,下方所討論之步驟S522~S546)。
In short, after the initialization step S505, the
步驟S522:保護電路246接收封包PT。如圖2所示,此封包PT已經先經過檢查電路244檢查。
Step S522: The
步驟S524:封包種類檢查電路310確認封包類型,即,根據封包PT的內容判斷封包PT是廣播封包、群播封包或單播封包。
Step S524: The packet
步驟S526:封包種類檢查電路310判斷是否需要過濾該封包類型。更明確地說,計算電路202可以藉由控制設定電路254來決定哪些種類的封包需要過濾及/或哪些種類的封包不需要過濾。舉例來說,在需要過濾廣播封包且不需要過濾群播封包及單播封包的情況下,當封包PT不是廣播封包時,保護電路246傳送該封包PT給計算電路202(即,執行步驟S532);當封包PT是廣播封包時,保護電路246執行步驟S528。
Step S526: The packet
步驟S528:保護電路246判斷是否需過濾虛擬區域網路(Virtual Local Area Network,VLAN)的封包。更明確地說,當封包PT不是VLAN的封包時,保護電路246傳送該封包PT給計算電路202(即,執行步驟S532);當封包PT是VLAN的封包時,保護電路246執行步驟S534。
Step S528: The
步驟S532:保護電路246將封包PT儲存至記憶體252,並且以中斷Intr通知計算電路202,然後回到步驟S522以接收下一個封包。因為被儲存至記憶體252的封包PT會被直接記憶體存取電路210複製或搬移至外部記憶體204,所以在步驟S532中保護電路246等效於將封包PT儲存至外部記憶
體204,而計算電路202可以回應於該中斷從外部記憶體204讀取封包PT。
Step S532: The
步驟S534:令牌控制電路400取得令牌消耗數Tc_csm。此步驟的細節將在下方配合圖7做說明。
Step S534: The
步驟S540:確定電路410判斷當前的令牌數Tc與令牌基準值Tc_ini的絕對差值是否大於等於令牌消耗數Tc_csm(等效於判斷當前的令牌數Tc是否足夠)。如果是(表示當前的令牌數Tc足夠),則依據令牌消耗數Tc_csm更新當前的令牌數Tc(步驟S542)並且傳送封包給計算電路202(步驟S532);如果否,則捨棄封包(步驟S544、S546)。
Step S540: The
步驟S542:確定電路410控制計數電路420將當前的令牌數Tc更新為Tc=Tc-Tc_sum(第一實施例)或Tc=Tc+Tc_sum(第二實施例)。此步驟的細節將在下方配合圖7做說明。
Step S542: The
步驟S544:確定電路410更新捨棄的封包數N_drop,例如,將捨棄的封包數N_drop加1。
Step S544: The
步驟S546:保護電路246捨棄封包PT,即,不將封包PT儲存至記憶體252,等效於不允許封包PT被儲存至外部記憶體204,亦等效於不傳送封包PT給計算電路202;因此,計算電路202無法取得封包PT。步驟S546結束後,流程回到步驟S522以接收下一個封包。
Step S546: The
請參閱圖7,圖7是步驟S534與步驟S542的詳細步驟。此處假設當前的令牌數Tc足夠(即,步驟S540的判斷為是)。 Please refer to FIG. 7 , which shows the detailed steps of step S534 and step S542. It is assumed here that the current number of tokens Tc is sufficient (that is, the judgment in step S540 is yes).
封包種類檢查電路310先判斷封包PT是廣播封包、群播封包或單播封包(步驟S534_1)。
The packet
當封包PT是廣播封包時,廣播令牌控制電路320從儲存電路
250中取得廣播令牌消耗數Tc_csm1(步驟S534_2),然後廣播令牌控制電路320的計數電路420在步驟S542_2中將廣播封包的當前令牌數Tc1更新為Tc1-Tc_csm1(實施例一)或Tc1+Tc_csm1(實施例二)。
When the packet PT is a broadcast packet, the broadcast
當封包PT是群播封包時,群播令牌控制電路330從儲存電路250中取得群播令牌消耗數Tc_csm2(步驟S534_4),然後群播令牌控制電路330的計數電路420在步驟S542_4中將群播封包的當前令牌數Tc2更新為Tc2-Tc_csm2(實施例一)或Tc2+Tc_csm2(實施例二)。
When the packet PT is a multicast packet, the multicast
當封包PT是單播封包時,單播令牌控制電路340從儲存電路250中取得單播令牌消耗數Tc_csm3(步驟S534_6),然後單播令牌控制電路340的計數電路420在步驟S542_6中將單播封包的當前令牌數Tc3更新為Tc3-Tc_csm3(實施例一)或Tc3+Tc_csm3(實施例二)。
When the packet PT is a unicast packet, the unicast
由上述的說明可知,當當前的令牌數Tc為目標令牌數Tc_tar時,保護電路246允許計算電路202最多連續接收M個封包,M=(Tc_tar-Tc_ini)/Tc_csm(實施例一)或M=(Tc_ini-Tc_tar)/Tc_csm個(實施例二)封包。細節如圖8的流程所示。
It can be seen from the above description that when the current token number Tc is the target token number Tc_tar, the
步驟S810:保護電路246連續接收M個封包。
Step S810: The
步驟S820:保護電路246允許該M個封被計算電路202存取,即,將該M個封包儲存至外部記憶體204,也就是等效於執行M次圖5之步驟S532。
Step S820: The
步驟S810~S820相當於連續執行M次圖5之步驟S522~S542,直到步驟S540的判斷為否,即,直到Tc-Tc_ini<Tc_csm(實施例一)或Tc_ini-Tc<Tc_csm(實施例二)。 Steps S810 to S820 are equivalent to continuously executing steps S522 to S542 in Figure 5 M times until the judgment of step S540 is no, that is, until Tc-Tc_ini<Tc_csm (Embodiment 1) or Tc_ini-Tc<Tc_csm (Embodiment 2) .
步驟S830:保護電路246捨棄該M個封包的下一個封包,也就是不允許該M個封包的下一個封包被傳送至計算電路202。因為在步驟S810及步驟S820中該連續M個封包已經消耗全部或幾乎全部的當前的令牌數Tc,所以保護電路246便捨棄下一個封包(即,步驟S544、S546),以保護計算電路202。
Step S830: The
圖8是本發明媒體存取控制電路及封包管理方法的一個操作實施例,說明保護電路246如何防止計算電路202連續接收超過M個封包。換句話說,計算電路202瞬時所能連續接收的最大封包數為M,而電子裝置200的製造商、開發者或使用者可以藉由調整令牌基準值Tc_ini、目標令牌數Tc_tar及/或令牌消耗數Tc_csm來改變M值。
FIG. 8 is an operational embodiment of the media access control circuit and packet management method of the present invention, illustrating how the
舉例來說,假設令牌消耗數Tc_csm=40,000且|Tc_ini-Tc_tar|=40,000,000,則對使用媒介無關介面的100M的乙太網路而言(接收時脈為25MHz),計算電路202每秒鐘最多接收625(=25M/40000)個封包,而瞬間最多連續接收40000000/40000=1000個封包;對使用簡化媒介無關介面的100M的乙太網路而言(接收時脈為50MHz),計算電路202每秒鐘最多接收1250(=50M/40000)個封包,而瞬間最多連續接收40000000/40000=1000個封包。
For example, assuming that the token consumption number Tc_csm=40,000 and |Tc_ini-Tc_tar|=40,000,000, for a 100M Ethernet network using a media-independent interface (the receiving clock is 25MHz), the
在一些實施例中,上述之當前的令牌數Tc、步進值Tc_step、令牌消耗數Tc_csm、目標令牌數Tc_tar、令牌基準值Tc_ini及捨棄的封包數N_drop可以儲存在儲存電路250中。
In some embodiments, the above-mentioned current token number Tc, step value Tc_step, token consumption number Tc_csm, target token number Tc_tar, token reference value Tc_ini and discarded packet number N_drop can be stored in the
在其他的實施例中,圖5之步驟S526可以由檢查電路244執行,而非由保護電路246執行。當檢查電路244判斷封包PT的類型是不需要
過濾的封包類型時,檢查電路244直接執行步驟S532,如此一來,保護電路246便不用處理該封包PT。
In other embodiments, step S526 in FIG. 5 may be performed by the checking
前揭實施例雖以廣播封包、群播封包及單播封包為例,然此並非對本發明之限制,本技術領域人士可依本發明之揭露適當地將本發明應用於其它類型的封包。 Although the foregoing embodiments take broadcast packets, multicast packets and unicast packets as examples, this is not a limitation of the present invention. Those skilled in the art can appropriately apply the present invention to other types of packets based on the disclosure of the present invention.
雖然本發明之實施例如上所述,然而該些實施例並非用來限定本發明,本技術領域具有通常知識者可依據本發明之明示或隱含之內容對本發明之技術特徵施以變化,凡此種種變化均可能屬於本發明所尋求之專利保護範疇,換言之,本發明之專利保護範圍須視本說明書之申請專利範圍所界定者為準。 Although the embodiments of the present invention are described above, these embodiments are not intended to limit the present invention. Those skilled in the art may make changes to the technical features of the present invention based on the explicit or implicit contents of the present invention. All these changes may fall within the scope of patent protection sought by the present invention. In other words, the patent protection scope of the present invention must be determined by the patent application scope of this specification.
200:電子裝置 200:Electronic devices
201:媒體存取控制電路 201:Media access control circuit
202:計算電路 202: Calculation circuits
203:物理層電路 203:Physical layer circuit
204:外部記憶體 204:External memory
205:傳輸介面 205:Transmission interface
210:直接記憶體存取 210: Direct memory access
220:封包產生電路 220: Packet generation circuit
225:傳送電路 225:Transmission circuit
230:時脈產生電路 230: Clock generation circuit
242:接收電路 242: Receiving circuit
244:檢查電路 244: Check circuit
246:保護電路 246: Protection circuit
250:儲存電路 250:Storage circuit
252:記憶體 252:Memory
254:設定電路 254: Set circuit
Intr:中斷 Intr: interrupt
PT:封包 PT:Packet
CLK,CLK_mac,CLK_phy:時脈 CLK,CLK_mac,CLK_phy: clock
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111147871A TWI829470B (en) | 2022-12-13 | 2022-12-13 | Media access control circuit and packet management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111147871A TWI829470B (en) | 2022-12-13 | 2022-12-13 | Media access control circuit and packet management method |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI829470B true TWI829470B (en) | 2024-01-11 |
TW202425613A TW202425613A (en) | 2024-06-16 |
Family
ID=90459014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111147871A TWI829470B (en) | 2022-12-13 | 2022-12-13 | Media access control circuit and packet management method |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI829470B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWM367532U (en) * | 2008-01-04 | 2009-10-21 | Interdigital Patent Holdings | Wireless transmit/receive unit for performing packet data convergence protocol re-establishment |
CN101938360A (en) * | 2009-06-30 | 2011-01-05 | 瑞昱半导体股份有限公司 | Network interface device and relevant electricity saving method |
US20110090319A1 (en) * | 2009-10-15 | 2011-04-21 | Bo-Ram Kim | Display Apparatus and Method of Driving the Same |
US20120257889A1 (en) * | 2011-04-08 | 2012-10-11 | Ting-Kang Chang | Communication apparatus with transmitted rate detecting function and method thereof |
US10211939B2 (en) * | 2013-06-27 | 2019-02-19 | Napatech A/S | Apparatus and a method for determining a point in time |
TW202010275A (en) * | 2018-08-29 | 2020-03-01 | 新加坡商瑞昱新加坡有限公司 | Wireless communication circuit with scheduling circuit in MAC layer |
-
2022
- 2022-12-13 TW TW111147871A patent/TWI829470B/en active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWM367532U (en) * | 2008-01-04 | 2009-10-21 | Interdigital Patent Holdings | Wireless transmit/receive unit for performing packet data convergence protocol re-establishment |
CN101938360A (en) * | 2009-06-30 | 2011-01-05 | 瑞昱半导体股份有限公司 | Network interface device and relevant electricity saving method |
US20110090319A1 (en) * | 2009-10-15 | 2011-04-21 | Bo-Ram Kim | Display Apparatus and Method of Driving the Same |
US20120257889A1 (en) * | 2011-04-08 | 2012-10-11 | Ting-Kang Chang | Communication apparatus with transmitted rate detecting function and method thereof |
US10211939B2 (en) * | 2013-06-27 | 2019-02-19 | Napatech A/S | Apparatus and a method for determining a point in time |
TW202010275A (en) * | 2018-08-29 | 2020-03-01 | 新加坡商瑞昱新加坡有限公司 | Wireless communication circuit with scheduling circuit in MAC layer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230367481A1 (en) | Implied directory state updates | |
US10198379B2 (en) | Early identification in transactional buffered memory | |
US10931329B2 (en) | High speed interconnect with channel extension | |
EP3370156B1 (en) | Speculative reads in buffered memory | |
EP3518131A1 (en) | Device authentication | |
EP3234778B1 (en) | Error handling in transactional buffered memory | |
KR100624610B1 (en) | A general input/output architecture protocol and related methods to manage data integrity | |
EP3238079B1 (en) | Packed write completions | |
US10050623B2 (en) | High performance repeater | |
KR100726304B1 (en) | A general input/output architecture protocol and related methods to provide isochronous channels | |
US10250436B2 (en) | Applying framing rules for a high speed data link | |
TWI829470B (en) | Media access control circuit and packet management method | |
US20050141418A1 (en) | Ring buffer management system and ring buffer management method | |
CN115883480A (en) | Media access control circuit and packet management method | |
US20040059734A1 (en) | Data access control | |
US20030210652A1 (en) | Method and device for processing management information | |
Haynie et al. | IBM system z10 open systems adapter ethernet data router | |
Errata | MPC8315E Chip Errata |