TW508926B - Method and system for efficient routing table compression and fast routing lookups - Google Patents
Method and system for efficient routing table compression and fast routing lookups Download PDFInfo
- Publication number
- TW508926B TW508926B TW089119541A TW89119541A TW508926B TW 508926 B TW508926 B TW 508926B TW 089119541 A TW089119541 A TW 089119541A TW 89119541 A TW89119541 A TW 89119541A TW 508926 B TW508926 B TW 508926B
- Authority
- TW
- Taiwan
- Prior art keywords
- index
- bit
- level
- digital
- bits
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q3/00—Selecting arrangements
- H04Q3/64—Distributing or queueing
- H04Q3/66—Traffic distributors
- H04Q3/665—Circuit arrangements therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/74591—Address table lookup; Address filtering using content-addressable memories [CAM]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13034—A/D conversion, code compression/expansion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13056—Routines, finite state machines
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13097—Numbering, addressing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13141—Hunting for free outlet, circuit or channel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13196—Connection circuit/link/trunk/junction, bridge, router, gateway
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13204—Protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13216—Code signals, frame structure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13353—Routing table, map memory
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2213/00—Indexing scheme relating to selecting arrangements in general and for multiplex systems
- H04Q2213/13389—LAN, internet
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(I ) [本發明之領域] 本發明係槪關於路徑選擇表內的IP路徑選擇查表之方 法與系統’其中在次跳躍表內包含在次跳躍表中相關於次 跳躍資訊的任意長度字首項目,藉此決定出該些IP網路封 包應前傳送往何處。 [本發明之背景] 網際網路係屬一諸_路間相互連接之集合,而其中各 個組成網路仍保留其本身之身分,並且需要特定機制以跨 越多個網路來進行通訊。該些組成網路茲稱爲子網路。 網際網路裡各個子網路可支援經連接至該子網路之諸 項裝置間通訊作業。此外,各個子網路彼此間係經稱爲Γ 網接單元(IWUs)」的裝置而相互連接。 有一種特定的IWU稱爲路由器,可用以連接兩個或爲 相似或爲迥異的網路。路由器會採行代表各個路由器與網 路上各個主機的網際網路協定(IP)。 IP可於諸站台間提供無連線式或網路封包服務。 一般是藉由在各站台與路由器之內維建某一路徑選擇 表,來完成路徑選擇作業,而對於各個可能之目的網路, 該表可標明出某ip網路封包所應送往之下一個路由器。 IP路由器在路徑選擇表中進行路徑選擇查表,藉以決 定該些IP網路封包究應前傳送往何處。其作業結果即爲朝 向該目的地之路徑上的次跳躍動作。槪念上,該路徑選擇 表中的某一項目係具相關於次跳躍資訊之任意長度字首。 3 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) I----I — I I — I ---— I I I I ^ 1------t I (請先閱讀背面之注意事項再填寫本頁) 508926 A7 B7 五、發明說明(z ) 而路徑選擇查表作業則是必須要以最長相符字首來找出該 路徑選擇項目。 由於IP路徑選擇查表作業既存的遲緩與複雜性,故先 前技藝解決方案實已轉爲技術繁複而多不願加以應用之。 目前多數的IP路由器設計均採行快取技術,其中最新 近使用過目的位址的路徑選擇項會被維持在快取之內。但 這種技術仰賴於話務需具有足夠的定位性,方能使得快取 產生足夠高的命中率,茈且路徑選擇查表成本也可分攤於 諸多封包上。在以往,這些快取技術運作狀況尙佳。然而 ,由於今日網際網路極劇成長造成位址快取所需的大小增 加,使得硬體快取變爲不具經濟利益。 IP路由器設計可採行特定目的硬體來進行IP處理。這 是一種無彈性的解決方案。任何的IP格式或協定變動均會 造成設計失效。故軟體彈性以及通用式處理器的高速效能 提昇會較適合該款解決方案。· [本發明之槪述] 從而本發明之一目的在於提供一款經改良之1p路徑選 擇查表方法與系統,以便對於各個1p封包up執行完整路 徑選擇查表作業,而該方法與系統足可克服前述諸多不便 性。 另一目的在於以傳統式微處理器來提高路徑選擇查表 的速度。 又另一目的在於最小化前傳表內的查表時間。 4 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公爱)""""""" . (請先閱讀背面之注意事項再填寫本頁) 裝 訂---------· 508926 A7 B7 五、發明說明()) 本發明之另一目的在於提供一種可完全相適於傳統式 微處理器快取內的資料結構。 因此,比起將該資料結構常駐在由例如像是較爲緩慢 的DRAM所組成之記憶體中的方式而言,即可按階數方式 大幅加速記憶體存取。 可藉由符合於本發明之IP路徑選擇查表方法與系統來 達成上揭目的,該系統係一種可按精簡形式來表示諸多大 型路徑選擇表的資料結捧,並僅利用少數記憶體參考即可 對其快速搜尋。 本發明之一優點爲具效率之查表實作,因而產生較佳 的指令快取行爲與更穩定的查表成本。 [圖示簡單說明] 爲詳細解說本發明,於後文內將詳述本發明較佳具體 實施例之優點及特性,隨附圖示裡並列載有參考編號,其 '中: 圖1爲一路由器設計之槪略圖; 圖2爲在根據本發明之資料結構的階層1處,經編碼 成數碼字元的直接次跳躍之說明圖; 圖3爲在根據本發明之資料結構的階層1處,經編碼 成一指標的直接次跳躍之說明圖; 圖4爲根據本發明經編碼成數碼字元且指向於階層2 的CPA之指標,以及在資料結構中階層1處的指標之說明 圖, 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) (請先閱讀背面之注意事項再填寫本頁) 裝----11 ---訂---- #· 經濟部智慧財產局員工消費合作社印製 508926 A7508926 Printed by A7 B7, Consumer Cooperatives, Intellectual Property Bureau, Ministry of Economic Affairs V. Description of the Invention (I) [Field of the Invention] The present invention is related to the method and system of IP path selection lookup table in the path selection table. The table contains any length prefix items related to the sub-hop information in the sub-hop table to determine where the IP network packets should be forwarded. [Background of the Invention] The Internet is a collection of interconnected roads, and each of the constituent networks still retains its identity and requires specific mechanisms to communicate across multiple networks. These constituent networks are referred to as subnetworks. Each subnet in the Internet can support communication operations between devices connected to the subnet. In addition, the sub-networks are connected to each other through a device called Γ network connection units (IWUs). There is a specific type of IWU called a router that can be used to connect two networks that are similar or very different. Routers use Internet Protocol (IP), which represents each router and each host on the network. IP can provide connectionless or network packet services between sites. Generally, a route selection table is established in each station and router to complete the route selection operation. For each possible destination network, the table can indicate the IP network packet to be sent below. A router. The IP router performs a path selection lookup table in the path selection table to determine where the IP network packets should be forwarded. The result of this operation is a secondary jump on the path to that destination. Fortunately, an item in the path selection table has an arbitrary length prefix related to the sub-jump information. 3 This paper size applies to China National Standard (CNS) A4 (210 X 297 mm) I ---- I — II — I ---— IIII ^ 1 ------ t I (Please read the back first (Notes on this page, please fill in this page) 508926 A7 B7 V. Description of the Invention (z) The path selection table lookup task must find the path selection item with the longest matching prefix. Due to the existing delay and complexity of the IP path selection and table lookup operation, the previous technical solutions have actually become complicated and unwilling to be applied. Most of the current IP router designs use caching technology, among which the path selection items that have recently used the destination address will be maintained in the cache. However, this technology depends on the sufficient positioning of the traffic to enable the cache to have a high hit rate, and the cost of path selection and table lookup can be shared among many packets. These cache technologies have worked well in the past. However, due to the rapid growth of the Internet today, the size required for address caching has increased, making hardware caching uneconomic. IP routers are designed to use specific purpose hardware for IP processing. This is an inelastic solution. Any IP format or protocol change will cause the design to fail. Therefore, software flexibility and high-speed performance improvement of general-purpose processors will be more suitable for this solution. · [Description of the present invention] Therefore, an object of the present invention is to provide an improved 1p path selection table lookup method and system, so as to perform a complete path selection table lookup operation for each 1p packet up, and the method and system are sufficient Many of the aforementioned inconveniences can be overcome. Another purpose is to increase the speed of path selection look-up table with traditional microprocessor. Yet another object is to minimize the lookup time in the forward table. 4 This paper size applies to China National Standard (CNS) A4 (210 x 297 public love) " " " " " " ". (Please read the precautions on the back before filling this page) Binding- -------- · 508926 A7 B7 V. Explanation of the invention ()) Another object of the present invention is to provide a data structure that can be completely adapted to the cache memory of a conventional microprocessor. Therefore, it is possible to greatly speed up the memory access in a stepwise manner than by resident the data structure in a memory composed of, for example, a slower DRAM. The disclosure purpose can be achieved by the IP path selection table lookup method and system consistent with the present invention. The system is a data binding that can represent many large path selection tables in a simplified form and uses only a few memory references. It can be searched quickly. One advantage of the present invention is the efficient implementation of table lookup, which results in better instruction cache behavior and more stable table lookup costs. [Brief description of the drawings] In order to explain the present invention in detail, the advantages and characteristics of the preferred embodiments of the present invention will be detailed in the following. The accompanying figures are provided with reference numbers in parallel. A schematic diagram of the design of a router; FIG. 2 is an explanatory diagram of a direct sub-hop encoded into a digital character at level 1 of a data structure according to the present invention; FIG. 3 is a level 1 of a data structure according to the present invention. An explanatory diagram of the direct secondary jump encoded as an index; FIG. 4 is an explanatory diagram of the index of the CPA that is encoded into digital characters and points to level 2 according to the present invention, and the index of the level 1 index in the data structure, this paper Standards are applicable to China National Standard (CNS) A4 specifications (210 X 297 mm) (Please read the precautions on the back before filling out this page) Packing ---- 11 --- Order ---- # · Ministry of Economy Intellectual Property Printed by the Bureau's Consumer Cooperatives 508926 A7
______BL 五、發明說明(40 圖5爲在根據本發明之資料結構的階層2處,經編碼 成數碼字元的直接次跳躍之說明圖; 圖6爲在根據本發明之資料結構的階層2處,經編碼 成一指標的直接次跳躍之說明圖; 圖7爲根據本發明經編碼成數碼字元而指向於階層3 的CPA之指標,以及在資料結構中階層2處的指標之說明 圖; 圖8爲在根據本發朋之資料結構的階層3處,經編碼 成數碼字元的直接次跳躍之說明圖; 圖9爲在根據本發明之資料結構的階層3處,經編碼 成一指標的次跳躍之槪述視圖; 圖10爲根據本發明來產生資料結構裝置之方法,藉以 表現出於一路徑表中之IP位址空間內對於各個字首的一組 主導點之高階觀視圖; 圖11爲根據本發明,用以於路徑選擇表中進行路徑選 擇查表作業之系統硬體實現佈局的第一實施例方塊圖; 圖12爲根據本發明,用以於路徑表中進行路徑查表之 系統硬體實現佈局的第二實施例方塊圖; 圖13爲根據本發明,作爲路徑表中進行路徑查表之系 統硬體實現第三實施例所用的數碼字元之說明圖; 圖14爲根據本發明,用以於路徑表中進行路徑查表之 系統硬體實現佈局的第三實施例方塊圖; 圖15爲用於本發明軟體實作之一 32位元階層1數碼 字元的說明圖。 6 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐)~ (請先閱讀背面之注意事項再填寫本頁) 裝i I 1______BL V. Description of the invention (40 FIG. 5 is an explanatory diagram of direct sub-jumps encoded into digital characters at level 2 of the data structure according to the present invention; FIG. 6 is at level 2 of the data structure according to the present invention FIG. 7 is an explanatory diagram of the direct sub-hop encoded as an index; FIG. 7 is an explanatory diagram of the index of the CPA directed to level 3 and the index of level 2 in the data structure according to the present invention; 8 is an explanatory diagram of direct sub-jumps encoded into digital characters at level 3 according to the data structure of the present invention; FIG. 9 is sub-jumps encoded as an index at level 3 according to the data structure of the present invention FIG. 10 is a high-level view of a method for generating a data structure device according to the present invention, so as to represent a set of dominant points for each prefix in an IP address space in a path table; FIG. 11 is According to the present invention, a block diagram of a first embodiment of a system hardware layout for performing a path selection lookup operation in a path selection table is shown. FIG. 12 is a diagram for performing the path selection in a path table according to the present invention. Figure 2 is a block diagram of a second embodiment of a system implementation layout of a look-up table; FIG. 13 is an explanatory diagram of digital characters used as a third embodiment of the system hardware for performing a path look-up table in a path table according to the present invention; 14 is a block diagram of a third embodiment of a hardware implementation layout of a system for performing a path lookup table in a path table according to the present invention; FIG. 15 is a 32-bit level 1 digital word used for software implementation of the present invention The explanatory diagram of Yuan. 6 This paper size is applicable to China National Standard (CNS) A4 specification (210 X 297 mm) ~ (Please read the precautions on the back before filling out this page) Install i I 1
« — — III 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(s) [元件符號說明] 1. 網路入方介面 2. 網路出方介面 3. 前傳引擎 4. 網路處理器 5. 連線設施 / [本發明之詳細描述] 現參考圖1,此爲一路由器,其中包含多個網路入方 介面1,網路出方介面2,前傳引擎3以及一網路處理器4 ,彼等所有俱經連線設施5而相互連線。入方介面1經由 連線設施5將封包標頭送往前傳引擎3。該前傳引擎3接 著決定該封包應送往哪一個出方介面2。這項資訊會被送 回到該入方介面1,該者將封包前傳到該出方介面2。該前 傳引擎3的唯一工作是處理封包標頭。所有其他的工作, 像是參與路徑選擇協定、資源保留、需特別注意的封包處 置以及其他管理性任務等,倶由該網路處理器4負責。 各個前傳引擎3使用路徑選擇表、前傳表的區域版本 ,自該網路處理器4處所下載並存放在該前傳引擎3的儲 存裝置內,以便進行路徑選擇決策。不需要在每次路徑選 擇更新時就下載一份新的前傳表。路徑選擇更新作業可屬 經常性,不過由於路徑選擇協定需要一些時間方得集結完 畢,前傳表會略爲增加且不需每秒鐘更新超過一次。該網 7 裝 (請先閱讀背面之注意事項再填寫本頁) 訂-------- 經濟部智慧財產局員工消費合作社印製 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明() 路處理器4需要一份設計用來快速更新且快速產生前傳表 的動態性路徑選擇表。但另一方面,亦可對該些前傳表按 查表速度而予以最佳化來且不需要爲動態性。 爲減少查表時間到最低,兩項參數,即於查表過程中 所需的記憶體存取次數,與資料結構大小,必須要同時在 前傳表內的資料結構中被最小化。 減少查表過程中所需的記憶體存取次數是很重要的, 因爲記憶體存取相當地_慢,並且通常會成爲查表程序的 瓶頸。如果能夠將資料結構作成足夠地小,則彼可完全適 入傳統式微處理器的快取記憶體內。而相較起資料結構需 要常駐在由相當緩慢的DRAM所構成之記憶體內來說,這 意味著這種記憶體存取可而爲數量級地加速,即如Patricia 樹狀結構情況。 但如前傳表並不完全適入快取記憶體內,如果大局部 的前傳表可常駐在記憶體內.則彼者仍屬有益。話務模型的 區域性可於快取內保留最常用到的資料結構片段,故多數 的查表作業仍屬快速。此外,利用快速SRAM作爲所需之 少量額外記憶體可較屬實際。SRAM比較昂貴,且愈貴者 愈爲快速。故對於某一給定成本,如用量較少,則可應用 較快的SRAM。 第二個設計目標是該資料結構應需要較少的指令,在 查表的過程中,並且盡可能保持各個項目自然地對齊,以 避免昂貴成本的指令和冗繁的位元擷取運算。 8 (請先閱讀背面之注意事項再填寫本頁) 裝 參· 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(^) 路潭潠擇表查表問題 路徑選擇表乃一種字首資料庫,其中各個字首會相關 到按照指入於次跳躍表的索引形式所顯示之次跳躍資訊。 字首基本上爲一位兀字串,包含0到32個位元,此即字首 長度。第一個位元編號爲31,第二個編號爲30,繼續下去 直到該位元字串結束爲止。以長度5的字首爲例,即檩示 爲位元31、30、29、28和27。這表示該個字首會配合於 任何其IP位址的位元3彡、30、29、28和27等於該字首的 對應位元之IP位址。由於僅標示出該字首的前面(最顯著) 五個位元,因此該些ΪΡ位址的位元〇到26並無關緊要。 長度〇的字首可合配於任何IP位址。 路徑選擇查表結果一般爲相關於該路徑選擇表裡最長 的合配字首之索引値。” 例如,某一以1〇1…起始之IP位址,其中位元31爲 最左位元,會合配於字首10*以及字首101*兩者,在此*表 示字首結束。然而該字首101*長於10*者。故在這兩項字 首間的路徑選擇查表較佳結果,即爲相關於字首101*的索 引値。 字首也可以IP位址空間〇···4294967295之大小爲2i的 範圍來表示,其中i爲非負整數。這種範圍的起始點必須 爲21的整數倍。否則,這就不是字首。這個稱爲「2次方 性質」。例如,字首10*起始於2147483648,而結束於 3221225472。其範圍的大小爲1073741824,該値等於23G 。起始點爲2*23()。 9 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐)«— — III Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 A7 B7 V. Description of the invention (s) [Explanation of component symbols] 1. Network interface interface 2. Network interface interface 3. Fronthaul engine 4. Network Road processor 5. Connection facilities / [Detailed description of the present invention] Referring now to FIG. 1, this is a router, which includes multiple network inbound interfaces 1, network outbound interfaces 2, fronthaul engine 3, and a network. The processor 4 is connected to each other via the connection facility 5. The inbound interface 1 sends the packet header to the fronthaul engine 3 via the connection facility 5. The fronthaul engine 3 then decides which outgoing interface 2 the packet should be sent to. This information is sent back to the incoming interface 1, and the person forwards the packet to the outgoing interface 2. The only job of the fronthaul engine 3 is to process the packet header. All other tasks, such as participation in routing protocols, resource reservation, packet processing requiring special attention, and other administrative tasks, are the responsibility of the network processor 4. Each fronthaul engine 3 uses a routing table and a regional version of the fronthaul table, which are downloaded from the network processor 4 and stored in the storage device of the fronthaul engine 3 to make routing decisions. It is not necessary to download a new forward list each time the path selection is updated. The path selection update operation may be recurring, but because the path selection agreement takes some time to complete, the front-end table is slightly increased and does not need to be updated more than once per second. This website is 7 packs (please read the precautions on the back before filling this page) Order -------- Printed by the Consumers' Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs This paper applies the Chinese National Standard (CNS) A4 specification (210 X 297 mm) 508926 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 B7 V. Description of the invention () The processor 4 needs a dynamic path selection table which is designed to quickly update and quickly generate a prequeue table. On the other hand, these forward tables can also be optimized according to the lookup speed and need not be dynamic. In order to reduce the table lookup time to the minimum, two parameters, that is, the number of memory accesses required during the table lookup process, and the size of the data structure must be minimized at the same time as the data structure in the forward table. It is important to reduce the number of memory accesses required during the table lookup process, because memory access is quite slow and often becomes a bottleneck in the table lookup process. If the data structure can be made small enough, it fits perfectly into the cache memory of a conventional microprocessor. Compared to the fact that the data structure needs to be resident in a memory composed of relatively slow DRAM, this means that such memory access can be accelerated by orders of magnitude, as in the case of the Patricia tree structure. However, if the prequel table is not completely fit into the cache memory, if most of the prequel tables can reside in the memory, the other is still beneficial. The regionality of the traffic model can retain the most commonly used data structure fragments in the cache, so most table lookup operations are still fast. In addition, it may be more practical to use fast SRAM as the small amount of additional memory required. SRAM is more expensive, and the more expensive it is, the faster it becomes. Therefore, for a given cost, if the amount is less, a faster SRAM can be applied. The second design goal is that the data structure should require fewer instructions. During the table lookup process, each item should be aligned as naturally as possible to avoid expensive instructions and verbose bit fetch operations. 8 (Please read the precautions on the back before filling out this page) Installation specifications · This paper size applies to Chinese National Standard (CNS) A4 (210 X 297 mm) Printed by the Intellectual Property Bureau of the Ministry of Economic Affairs Consumer Cooperatives 508926 A7 B7 5 2. Description of the invention (^) The road selection table lookup table is a type of prefix database, in which each prefix is related to the secondary jump information displayed according to the index form referred to in the secondary jump table. The prefix is basically a one-digit string containing 0 to 32 bits, which is the prefix length. The first bit is numbered 31 and the second is numbered 30. Continue until the end of the bit string. Take the prefix of length 5 as an example, that is, 檩 is shown as bits 31, 30, 29, 28, and 27. This means that the prefix will match any of the bits 3 彡, 30, 29, 28, and 27 of its IP address to the IP address of the corresponding bit of the prefix. Since only the first (most significant) five bits of the prefix are marked, the bits 0 to 26 of the HP addresses are irrelevant. A prefix of length 0 can be matched to any IP address. The result of the path selection lookup table is generally the index 値 related to the longest matching prefix in the path selection table. For example, for an IP address starting with 101…, bit 31 is the leftmost bit, and they are combined in the prefix 10 * and the prefix 101 *, where * indicates the end of the prefix. However, the prefix 101 * is longer than 10 *. Therefore, the better result of the path selection lookup table between these two prefixes is the index 値 related to the prefix 101 *. The prefix can also be IP address space. · The size of 4294967295 is represented by a range of 2i, where i is a non-negative integer. The starting point of this range must be an integer multiple of 21. Otherwise, this is not a prefix. This is called "square power." For example, the prefix 10 * starts at 2147483648 and ends at 3221225472. The size of the range is 1073741824, which is equal to 23G. The starting point is 2 * 23 (). 9 This paper size applies to China National Standard (CNS) A4 (210 X 297 mm)
508926 A7 B7508926 A7 B7
經濟部智慧財產局員工消費合作社印製 發明說明(g ) 每一個字首皆爲一個具有2次方性質的範圍,並且反 是。因此,吾人無須區分具有2次方性質的範圍以及子首 兩者的差別。字首長度係定義爲所標示之位元數,而字首 的大小即可定義成由該字首所涵蓋之IP位址空間範圍的大 小。可藉由對該字首的位元串表示式向右補零一直到位元 串的長度成爲32,來計算出字首起始點的二元表示法。長 度i的字首大小定爲232“。 在路徑選擇表中,遇常會有許多大型字首,會完全涵 蓋較小字首。爲減少用以表不該路徑選擇表所需的記憶體 數量,可藉產生含有正好相同路徑選擇資訊,但不具覆蓋 性字首之輔助性路徑選擇表的方式,即字首分割,來移除 掉冗餘的資訊。 覆蓋性字首可爲遞迴方式加以對半分割,直到由大型 字首所除餘之字首的大小等於被其涵蓋之較小字首的大小 ,這表示說彼等確已移除。然後這些從覆蓋性字首除剩而 得之除餘字首皆可拋除。可自最小字首開始並重複地應用 本方法,然後只要尙存有會涵蓋較小字首的較大字首,即 繼續到較大字首下去。其結果爲一組可構成IP位址空間分 割之字首的集合。 例如,考慮下列路徑選擇表: 字首 第一 ip位址 最終IP位址 次跳躍索引値 氺 0·0·0.0 255.255.255.255 1 0* 0·0·0·0 127.255.255.255 2 001* 32.0.0.0^~ 63.255.255.255 3 10* 128.0.0.0 191.255.255.255 4 該字首001*會被字首〇*者所涵蓋。因此,將較大字首 10 本紙張尺度適用中國國家標準(CNS)A4規格(21〇 X 297公髮) (請先閱讀背面之注意事項再填寫本頁)Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economics. Inventive Note (g) Each prefix is a range with a power of two, and vice versa. Therefore, we do not need to distinguish between the range of the power of second power and the difference between the two. The prefix length is defined as the number of bits marked, and the size of the prefix can be defined as the size of the IP address space range covered by the prefix. The binary representation of the starting point of the prefix can be calculated by zero-filling the bit string expression to the right until the length of the bit string becomes 32. The prefix size of length i is set to 232 ". In the path selection table, there are often many large prefixes that will completely cover the smaller ones. To reduce the amount of memory required to represent the path selection table, Redundant information can be removed by generating an auxiliary path selection table that contains exactly the same path selection information but does not have a covering prefix, that is, prefix division. Covering prefixes can be recursive Divided in half until the size of the remainder divided by the large prefix is equal to the size of the smaller prefix covered by it, which means that they have indeed been removed. Then these are left from the covering prefix Any method except the prefix can be discarded. This method can be applied repeatedly starting from the smallest prefix, and then continuing to the larger prefix as long as there is a larger prefix that will cover the smaller prefix. The result is one. Groups can form a set of prefixes for IP address space partitioning. For example, consider the following path selection table: prefix first IP address final IP address secondary hop index 値 氺 0 · 0 · 0.0 255.255.255.255 1 0 * 0 · 0 · 0 · 0 127.255.255.255 2 001 * 32.0.0.0 ^ ~ 63.255.255.255 3 10 * 128.0.0.0 191.255.255.255 4 The prefix 001 * will be covered by the prefix 0 *. Therefore, the 10 paper sizes with larger prefixes will apply the Chinese National Standard (CNS ) A4 specification (21〇X 297) (Please read the precautions on the back before filling in this page)
裝——I 訂--- 砉· 508926 A7B7 五、發明說明(?) 加以分割,;i:結里县 00* 0·0·0.0 一一^ 63.255.255.255 2 01* 64.0.0.0 一_ 127.255.255.255 2 藉由分割〇〇*,m德到 000* 0.0.0.0 一 31.255.255.255 2 001* 32.0.0.0 __ 63.255.255.255 移除 01* 64.0.0.0 一一^ 127.255.255.255 2 故路徑選擇表裡的結 字首 第一IP位 最終IP位址 次跳躍索引値 氺 0·0·0·0 一__ 255.255.255.255 1 000* 0·0·0·0 ^一^一 31.255.255.255 2 001* 32.0.0.0 __ 63.255.255.255 3 01* 64.0.0.0 _一 127.255.255.255 2 10* 128.0.0.0 一 191.255.255.255 4 該字首*仍 然會涵蓋所首並医1 “以分割 0* 0·0·0·0 127.255.255.255 _ 1* 128.0.0.0 255.255.255.255 1 t. -------- 艰寫本頁) 藉雷複推符公割1*,可得到 10* 128.0.0.0 191.255.255.255 移除 01* 192.0.0.0 255.255.255.255 1 最後,可得到下列路徑選擇表,其中該些字首確已適 訂!嫌. 經齊卽智慧讨轰笱員!-肖費合乍i. 字首 第一IP位址 最終π>位址 次跳躍索引値 000* 0.0·0.0 31.255.255.255 2 001* 32.0.0.0 63.255.255.255 3 01* 64.0.0.0 127.255.255.255 2 _ 10* 128.0.0.0 1 191.255.255.2551 4 11* 192.0.0.0 255.255.255.255 1 路徑選擇表也可以按照二元樹的方式來表示’其中各 個節點可爲零個、一個或兩個子代。某一具有零個子代的 節點被稱爲外部節點,或是葉點,而某一具有一個或兩個 11 本紙張尺度適用中國國家標準(CNS)A4規袼(210 X 297公釐) 508926 A7 B7 五、發明說明(/ 〃) 子代的節點則被稱爲內部節點。在該款樹狀物裡,字首 01*的次跳躍索引値會被存放在根點的左端(0th)子代之右端 (Ist)子代。而字首*的次跳躍索引値會被存放在根點處。該 款源自於施用前述方法的有限字首分割之樹狀表示方式具 有下列重要性質: •所有的內部節點正好具有兩個子代 •唯一的外部節點包含有次跳躍資訊 該款方法有時亦稱爲樹狀盡成法_其原始路徑選擇 表的樹狀表示可完盡建構爲某一完整的二元數。 將字首分割表示爲字首起始點集合 既然字首分割作業會產生一組字首的集合,其中各個 •字首會相關於次跳躍資訊,並可適當地分割該IP空間,故 將該項分割以一組該些字首的起始點(第一個IP位址)之集 合來表示確屬足夠。 因此,用以呈示如上範例中表單的所需資訊可爲下述 請 先 閱 讀 背 意 事 項Installation——I order --- 砉 · 508926 A7B7 V. Description of the invention (?) Divide it; i: Jieli County 00 * 0 · 0 · 0.0 one one ^ 63.255.255.255 2 01 * 64.0.0.0 one _ 127.255 .255.255 2 By dividing 〇〇 *, m to 000 * 0.0.0.0-31.255.255.255 2 001 * 32.0.0.0 __ 63.255.255.255 Remove 01 * 64.0.0.0 one one ^ 127.255.255.255 2 Therefore the path selection table The first IP bit in the end of the word here, the last IP address, and the second hop index 値 氺 0 · 0 · 0 · 0 a__ 255.255.255.255 1 000 * 0 · 0 · 0 · 0 ^ a ^ a 31.255.255.255 2 001 * 32.0.0.0 __ 63.255.255.255 3 01 * 64.0.0.0 _ one 127.255.255.255 2 10 * 128.0.0.0 one 191.255.255.255 4 The prefix * will still cover the first combination of medical treatment 1 "to divide by 0 * 0 · 0 · 0 · 0 127.255.255.255 _ 1 * 128.0.0.0 255.255.255.255 1 t. -------- Difficult to write this page) Borrow and recurse to cut 1 * to get 10 * 128.0.0.0 191.255 .255.255 Remove 01 * 192.0.0.0 255.255.255.255 1 Finally, you can get the following path selection table, in which the prefixes are indeed customizable! Suspect. After all the wisdom to discuss the bombers!-肖 费 合 Cha i. Prefix first IP address final > Address Secondary Jump Index 値 000 * 0.0 · 0.0 31.255.255.255 2 001 * 32.0.0.0 63.255.255.255 3 01 * 64.0.0.0 127.255.255.255 2 _ 10 * 128.0.0.0 1 191.255.255.2551 4 11 * 192.0. 0.0 255.255.255.255 1 The path selection table can also be expressed in the form of a binary tree, where each node can have zero, one, or two children. A node with zero children is called an external node, or Leaf point, and a paper with one or two 11 paper sizes applicable to Chinese National Standards (CNS) A4 (210 X 297 mm) 508926 A7 B7 V. Description of the invention (/ 〃) The nodes of the children are called Are internal nodes. In this tree, the subjump index 次 of the prefix 01 * is stored in the left (0th) child and the right (Ist) child of the root point. The sub-jump index 値 of the prefix * will be stored at the root point. The tree-like representation of the limited prefix division derived from the application of the aforementioned method has the following important properties: • all internal nodes have exactly two children • the only external node contains sub-hop information It is called a tree-like perfection method. The tree-like representation of its original path selection table can be constructed as a complete binary number. Represent the prefix segmentation as a set of prefixes. Since the prefix segmentation operation will generate a set of prefixes, each of the prefixes will be related to the sub-hop information and the IP space can be appropriately segmented. The term segmentation is indeed sufficient with a set of starting points (the first IP address) of these prefixes. Therefore, the information required to present the form in the example above can be as follows. Please read the memorandum first.
填零1 窝裝 本衣 頁 I 訂 經濟部智慧財產局員工消費合阼fi.印製 第一 IP位址 次跳躍索引値 0·0·0·0 2 32.0.0.0 3 64.0.0.0 2 128.0.0.0 4 192.0.0.0 1 尋出字首集合中的最近主導點 在實數集合中給定一組點集合,茲定義兩點以與巧間 按範數L〇〇上(即L-無窮)的距離爲lim卜。odpi-p/y/k = jpi-pj (在一維上,I-距離會等於歐基理德距離)。此外,吾人可 12 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公叙) # 508926 A7 B7 五、發明說明(il ) 說點P2主導點Pl(或是點Pl被點P2所主導)若且唯若ρι$ρ2 。當某路徑選擇表表示爲一組字首起始點的集合時,即如 上文所述,則該路徑選擇表問題就降爲找出最近主導點P 的問題。 例如,爲執行上表中的IP位址172.16.0.20之路徑選 擇查表作業,則僅需於諸主導點〇·〇·〇·〇、32.〇·〇·〇、 64.0.0.0、128.0.0.0的集合中,尋出距該ι72·16·〇·20最短 Loo距離的點即可。很顯然地,該點即爲128·〇·〇·〇,並且其 路徑選擇查表結果爲次跳躍索引4。 XTC資料結構 XTC是一種利用三階層的「壓縮指標陣列」,來有效 地表示諸主導點所成之集合的資料結構。各個壓縮指標陣 列(CPA)包含有一個塊區,與一個相關於20位元指標及/或 15位元次跳躍索引値的陣列。構成階層1的CPA表示一 種未經壓縮而大小爲65536指檩的指標陣列(IP位址的位元 31·· 16),並且構成階層2和3的CPA則各者表示256的指 標。 壓縮指標陣列與主導點集合 壓縮指標陣列是由一個塊區,與諸多指標所表示。該 塊區裡包含數碼字元,而各個數碼字元係表示代表著該塊 區的隱性位元陣列之16位元。該隱性位元陣列的大小等同 於CPA中最大的指標數目。 在該隱性位元陣列中,具索引値i的位元可經設定若 且唯若確具一字首起始於該位置i處。所謂起始點,意思 13 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) (請先閱讀背面之注意事項寫本頁) rl裝 --訂·-------- 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(A) 是主導點裡的既經檢視之諸位元(階層1的3L.16、階層2 的15..8以及階層3的7··0),當經索引而編入CPA時,會 相等於i。而該隱性位元陣列則又係由16個隱性位元遮罩 所表示。有三個類型的位元遮罩: •空位元遮罩,不具有位元集合 •僅具一個位元集合的位元遮罩 •具兩個或更多個位元集合的位元遮罩 藉由2次方性質^具一個位元集合的位元遮罩表示一 個起始點在該塊區內的字首爲16的倍數。彼可完整涵蓋整 個位元遮罩,以及所有隨即依從的空位元遮罩。 例如,如果某字首的次跳躍索引起始於位置64 = 4 * 16處(表示出該字首的主導點爲16),並且結束於位置127 =7 * 16 + 15,位元遮罩4僅具第一位元集合,而遮罩5、 6和7則屬空者。 對於具一個位元集合且隨即依從空位元集合的位元遮 罩來說,可直接將次跳躍索引値編碼爲數碼字元。這種數 碼字元各個可表示出16個當指標陣列未經壓縮時所需要的 指標。在上例中,該數碼字元4..7將屬相同。 經濟部智慧財產局員工消費合作社印製 然具兩個以上位元集合的位元遮罩,則表示並不完全 涵蓋某位元遮罩的字首。對於這種數碼字元,其起始點與 終結點會位於相同的位元遮罩內。藉2次方性質,具至少 一個位元集合而長度爲21的不同種類位元遮罩之數量,可 由下列遞迴等式所給定: A(0) = 1 14 本紙張尺度適用中國國家標準(CNS)A4規袼(210 X 297公釐) 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(ο ) A(i) = 1 + A(i-l) 這個意思是對於i = 1,2和3,該些位元遮罩可爲如 下表內所示。而對於i = 4來說,會有677種可能情況,在 此並未加以說明。 (如第13頁附表) 因此,藉2次方性質,會有676種具有兩個以上位元 集合的不同16位元遮罩。這種位元遮罩與其對應之指標, 確可由數碼字元及相關於該數碼字元的指標列表之組合來 加以表示。各個指標要不由一 15位元次跳躍索引値,要不 則爲由一 20位元朝向下一階層CPA的指標所組成。 起初,在位元遮罩中每一個位元集合會有一個指標。 然而,在XTC演算法裡,指標(與位元)的數量會在編碼的 過程中略增,藉此減低如於FTC演算法裡的複雜度。 在FTC裡,利用10個位元來將位元遮罩種類作爲索 引値而編碼成映圖表。該映圖表需要進行記憶體存取,因 而減緩了查表速度。爲改善其速度,XTC中採用了 2位元 而非10位元的類似編碼方式。此外,一點也不必再使用該 映圖表,因此大幅地減少了記憶體存取次數。 藉由檢核該些起始點位於相同位元遮罩內的字首之集 合,實可辨識出其大小確屬最短之字首(對於起始點與終結 點位於相同位元內的字首而言,其大小爲· 1)。該集合中的 各個字首,其大小可爲1、2、4或8。如果大小爲16,則 彼可完全涵蓋位元遮罩,並可施用前述的直接編碼作業(該 位元遮罩恰好爲一個位元集合)。任何具有大於最短字首之 15 表紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) . ^—-----^ ------ (請先閱讀背面之注意事項再填寫本頁) # 經濟部智慧財產局員工消費合作社印製 508926 A7 ____B7___ 五、發明說明(哗) 大小的諸字首可予以重複對半分割,一直到所有字首的大 小皆同爲止。每當字首進行分割時,就會在位元遮罩內設 定零位元(撥覆),並且會將一份相關於最靠近該既撥位元 左端之位元集合的指標之拷貝’直接增列於該指標列表內 的複製指標之後。各個分割作業會使指標數量逐個增加。 各個步驟之後,即可得到如下表所示之情況。 大小 位元遮罩 數碼 說明 8 1000000010000000 3 兩個字首,各個字首會涵蓋一 半的位元遮罩 4 1000100010001000 2 四個字首,各個字首會涵蓋 1/4的位元遮罩 2 1010101010101010 1 1八個字首,各個字首會涵蓋 1/8的位元遮罩 1 11111111111111111 0 十六個或更多字首,諸位元遮 罩的各位元可對應於某一或多 個字首 在此不按如FTC演算法般處理676個不同種類的位元 遮罩,而是僅有四種位元遮罩需加處理。倘最初所設定之 位元爲5個,則可容易地顯示出按照本法所引入的額外指 標數量爲11。因此,在最壞情況下,XTC表示法所需要的 指標個數比起FTC表示法會增加16/5的因數。而實驗顯 示一般的增加量爲2的因數。 在查表中,IP位址的一部份會被用來索引至CPA處。 該高部12 (於階層1)或是4 (另者)位元即爲數碼字元的索 引。而低部(即最不顯著)4位元會被用來索引至數碼字元 的位元遮罩(假設數碼字元裡並不包含既經編碼之直接次跳 16 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) .——1-— J^T--------1 (請先閱讀背面之注意事項再填寫本頁) 508926 A7 B7 五、發明說明(6) 躍的話)。藉由索引至位元遮罩,即可要不索引一個既經設 定爲(諸設定位元中)擷取關連到該位元之指標的位元,要 不就是索引一個未經設定的位元。如果該位元未經設定, 則需要擷取關連到最靠近既經索引位元左端的設定位元之 指標。即如前述,現存一相關於各個位元遮罩/數碼字元的 指標列表。這些指標列表可包含有2、4、8或16個指標。 如上述般將位元遮罩加以編碼於前表內,在諸設定位元中 ,最靠近位元集合左端之索引(以及該指標列表內其對應指 標的索引),可由簡單的移位運算而計算出來。換言之,在 查表時,用以索引入該位元遮罩的低部4位元,會被向右 移位「數碼」所示個位元。可與該FTC演算法中所採用之 昂貴的映圖表查表作業互相比較。 經濟部智慧財產局員工消費合作社印製 在XTC資料結構裡,該塊區中包含有一固定大小的數 碼字元陣列(其大小係依照階層而定)。爲減少用以表示該 相關於各個數碼字元之「第一」指標索引値(相關於該數碼 字元之指標列表的起始處)所需之位元數量,該些XTC資 料結構裡的指標會被存放在與該塊區相同的陣列之φ。在 該塊區的最後一個數碼字元之後,就會立即存妥與某塊區 所相關的指標陣列。 即如前述,該指標陣列中包含20個位元的指標,及/ 或15個位元的次跳躍索引。這是由16位元整數所表示之 陣列,其中最顯著位元標明出該低部15位元表示著次跳躍 索引,抑或該20位兀指標的低部15位元。爲袠示某個指 向下一階層之20位兀指標,可利用數碼字元的$個位元來 17 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 508926 A7 B7 五、發明說明(屮) 表示該20位元指標的高部5位元。當被擷取時,即僅僅是 將這些位元附加於該指標。如此,很明顯地會要求在任何 朝向關聯於相同位元遮罩的下一階層之指標列表裡,彼等 位元15..19必須要完全相同。這可藉由倘該些指標的低部 15位元可隱蔽的話,則於建造的過程中在下一階層處移動 該塊區來達成,而在關聯到於目前階層處建造中之位元遮 罩的下一階層處構建出該塊區(參閱第3節之詳細說明)。 歸納而論,各個數碼字元由下者所組成: • 1個位元,可標示出彼者是否爲直接次跳躍。 若此爲次跳躍,則尙有15位元表示次跳躍索引。若否 ,後有: • 2個位元以作爲數碼之用(位移値) • 5個位元以作爲相關指標的高部位元之用 • 16 (階層1)或是8 (階層2與3)個位元,用以表示在 該直接存放於該塊區之後的指標陣列內的指標位移値,即 相關於該數碼字元之「第一」指標的索引。 χ)階層1 : 一 65536元素既壓指標陣列 XTC資料結構的第一階層(階層1)可由具有4096數碼 字元以及〇…65536個指標的CPA所表示。查表作業中的 第一步驟,即爲利用IP位址的位元31···2〇作爲指往該24 位元數碼字元且既經擷取之索引(軟體實作上,可爲對齊原 因而將該24位元數碼字元存放於32位元整數內)。如果該 數碼字元的最顯著位元係經設定(由圖2中的黑底白字局部 所表示),則後接之15位元表示次跳躍索引,可立即擷取 18 本紙張尺度適用中國國家標準(CNS)A4規格(210 χ 297公釐) (請先閱讀背面之注意事項再填寫本頁) i 經濟部智慧財產局員工消費合作社印製 508926 Α7 Β7 五、發明說明(η ) 出來並完成查表作業。在此情況下並未用到位元7…0 ° 在第二個步驟裡,IP位址的位元19…16係用於索弓丨 到數碼字元,藉以在指標列表內尋出該指標。這可藉由用 自數碼字元(數碼)所擷獲之2位元整數,來對該IP位址移 位4個位元,並且再增附亦由該數碼字元所擷取之16位元 的位移値而達成(參閱圖3)。其結果數値即爲指往存放在相 關於該塊區的指標列表內的指標之索引値。然如果該數碼 字元的最顯著位元未經設定,該低部I5位元會組成一次跳 躍索引,並完成查表作業(如圖3)。 假使該指標並不表示某個直接次跳躍,則可擷取該低 部15位元,並與存放於數碼字元內的5個位元相互合倂, 以構成一20位元的指標,指向階層2的CPA (如圖4),並 繼續查表作業。 經濟部智慧財產局員工消費合作社印製 在階層2的既經壓縮之指標陣列會被存放於某一 16位 元整數的大型陣列中,其中各個CPA的大小係依照在其指 標列表內的指標數目而定,而該者存放在緊隨該數碼字元 列表之後。因此,確實無法在階層2將第i個CPA加以索 引。反之,在階層3的CPA必須按其起始點作爲參考(第 一數碼字元的索引),而這也就是爲什麼當表示大的路徑選 擇表時,會需要20個位元指標的原因。 階層2 : — 256元素既壓指標陣列 XTC的第二階層包含一階層2 CPA大型矩陣。各個該 種CPA包括16個數碼字元以及0…256個指標。當於階層 1處計算出階層2 CPA的位置之後,即按如下方式繼續進 19 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公β ~一 926 A7 B7 五、發明說明(β) 行查表作業。查表作業中的第三步驟爲利用IP位址的位元 15···12作爲接往既經擷取之16位元數碼字元的索引。如 果該數碼字元的最顯著位元係經設定(由圖5中的黑底白字 局部所表示),則後接之15位元表示次跳躍索引,可立即 擷取出來並完成查表作業。 在第四個步驟裡,IP位址的位元11···8係用於索引到 數碼字元,藉以在指標列表內尋出該指標。這可藉由用自 數碼字元(數碼)所擷獲之2位元整數,來對該IP位址移位 4個位元,並且再增附亦由該數碼字元所擷取之16位元的 位移値而達成(參閱圖6)。其結果數値即爲指往存放在相關 於該塊區的指標列表內的指標之索引値。然如果該數碼字 元的最顯著位元未經設定,該低部15位元會組成一次跳躍 索引,並完成查表作業(如圖6)。 假使該指標並不表示某個直接次跳躍,則可擷取該低 部15位元,並與存放於數碼字元內的5個位元相互合倂, 以構成一20位元的指標,指向階層3的CPA (如圖7),並 繼續查表作業。 依照與在階層2相同的方式,該階層3的既經壓縮之 指標陣列也會被存放於某一 16位元整數的大型陣列中,其 中各個CPA的大小係依照在其指標列表內的指標數目而定 。因此,會需要一個20位元的指標,來表示下一個階層 CPA的位置。 階層3 : — 256元素既壓指標陣列 XTC的第三階層包含一階層3 CPA大型矩陣。各個該 20 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) (請先閱讀背面之注意事項寫本頁) rl裝Fill in 1 Sheet of nested book I Order the consumer spending agreement of the Intellectual Property Bureau of the Ministry of Economic Affairs. Print the first IP address jump index 値 0 · 0 · 0 · 0 2 32.0.0.0 3 64.0.0.0 2 128.0. 0.0 4 192.0.0.0 1 Find the nearest dominant point in the prefix set. Given a set of points in the real number set, here are two points defined by a distance above the norm L0〇 (that is, L-infinity). For lim Bu. odpi-p / y / k = jpi-pj (I-distance will be equal to Euclidean distance in one dimension). In addition, we can apply 12 Chinese paper standards (CNS) A4 specifications (210 x 297 public narrative) # 508926 A7 B7 V. Description of the invention (il) Say point P2 leading point Pl (or point P1 is determined by point P2 (Dominant) if and only if ρι $ ρ2. When a path selection table is represented as a set of starting points of a set of prefixes, that is, as described above, the problem of the path selection table is reduced to the problem of finding the nearest dominant point P. For example, in order to perform the path selection table lookup operation of the IP address 172.16.0.20 in the table above, only the leading points 〇〇〇〇〇〇, 32.〇 · 〇 · 〇, 64.0.0.0, 128.0. In the set of 0.0, the point with the shortest Loo distance from ι72 · 16 · 20 · 20 can be found. Obviously, this point is 128 · 〇 · 〇 · 〇, and its path selection lookup table result is the sub-hop index 4. XTC data structure XTC is a data structure that uses three levels of "compressed index array" to effectively represent the set of dominant points. Each compression indicator array (CPA) contains a block and an array related to a 20-bit index and / or a 15-bit sub-hop index frame. The CPA constituting level 1 represents an uncompressed index array (bits 31 ·· 16 of the IP address) with a size of 65536 pointers, and the CPA constituting levels 2 and 3 each represent an index of 256. Compression indicator array and dominant point set Compression indicator array is represented by a block and many indicators. The block contains digital characters, and each digital character represents a 16-bit character representing a recessive bit array of the block. The size of the recessive bit array is equivalent to the largest number of indicators in the CPA. In the recessive bit array, the bit with index 値 i can be set if and only if a prefix begins at the position i. The so-called starting point, meaning 13 This paper size is applicable to the Chinese National Standard (CNS) A4 specification (210 x 297 mm) (please read the precautions on the back first to write this page) -Printed by the Employees' Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 A7 B7 V. Invention Description (A) is the inspected bits in the leading point (3L.16 of class 1, 15..8 of class 2 and class) 3 · 7 · 0), when indexed into the CPA, will be equal to i. The recessive bit array is represented by 16 recessive bit masks. There are three types of bit masks: • Empty bit masks without a bit set • Bit masks with only one bit set • Bit masks with two or more bit sets by The power of the second power ^ A bit mask with a bit set indicates that the initial of a starting point in the block is a multiple of 16. He can completely cover the entire bit mask, as well as all the empty bit masks that follow. For example, if the first jump index of a prefix starts at position 64 = 4 * 16 (indicating that the leading point of the prefix is 16) and ends at position 127 = 7 * 16 + 15, the bit mask 4 Only the first set of bits is available, and masks 5, 6, and 7 are empty. For bit masks that have a set of bits and then follow the empty set of bits, the secondary skip index 値 can be directly encoded as a digital character. Each of these digital characters can represent 16 indicators required when the indicator array is not compressed. In the example above, the numeric characters 4..7 will be the same. The bitcoin mask printed by the employee's consumer cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs, which has more than two bit sets, indicates that the prefix of a bit mask is not completely covered. For such digital characters, the starting point and the ending point are located in the same bit mask. By the nature of the second power, the number of different types of bit masks with a length of at least one bit set and a length of 21 can be given by the following recursive equation: A (0) = 1 14 This paper scale applies Chinese national standards (CNS) A4 Regulations (210 X 297 mm) 508926 Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 B7 V. Description of Invention (ο) A (i) = 1 + A (il) This means that for i = 1, 2 and 3, the bit masks can be as shown in the following table. For i = 4, there are 677 possible situations, which are not explained here. (See the attached table on page 13.) Therefore, by the power of 2 power, there will be 676 different 16-bit masks with more than two bit sets. Such a bit mask and its corresponding indicator can be represented by a combination of a digital character and a list of indicators related to the digital character. Each indicator consists of a 15-bit jump index, or it consists of a 20-bit indicator that is oriented towards the next level of CPA. Initially, each bit set in the bit mask will have an index. However, in the XTC algorithm, the number of indicators (and bits) will increase slightly during the encoding process, thereby reducing the complexity as in the FTC algorithm. In FTC, 10 bits are used to encode the bit mask type as an index frame into a map. This map requires memory access, which slows down the lookup of the table. To improve its speed, XTC uses a similar encoding method of 2 bits instead of 10 bits. In addition, the mapping table is no longer needed at all, thus significantly reducing the number of memory accesses. By checking the set of prefixes whose starting points are located in the same bit mask, it can be identified that the size of the prefix is indeed the shortest (for prefixes whose starting point and ending point are in the same bit mask) In terms of size, it is · 1). Each prefix in the set can be 1, 2, 4, or 8. If the size is 16, he can completely cover the bit mask, and can apply the aforementioned direct encoding operation (the bit mask happens to be a bit set). Any paper with a size greater than the shortest of 15 sheets is applicable to the Chinese National Standard (CNS) A4 specification (210 X 297 mm). ^ —----- ^ ------ (Please read the notes on the back first (Fill in this page again) # Printed by the Employees' Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 A7 ____B7___ 5. The initials of the size of the invention description (wow) can be repeated in half until all the prefixes are the same size. Whenever the prefix is divided, a zero bit (overlap) is set in the bit mask, and a copy of the index related to the set of bits closest to the left end of the dialed bit is' directly Added after the duplicated indicator in the indicator list. Each split operation will increase the number of indicators one by one. After each step, you can get the situation shown in the following table. Digital description of large and small bit masks 8 1000000010000000 3 Two prefixes, each prefix will cover half of the bit mask 4 1000100010001000 2 Four prefixes, each prefix will cover a 1/4 bit mask 2 1010101010101010 1 18 prefixes, each prefix will cover 1/8 of the bit mask 1 11111111111111111 0 16 or more prefixes, each element of each mask can correspond to one or more prefixes here Instead of processing 676 different kinds of bit masks like the FTC algorithm, only four kinds of bit masks need to be processed. If the number of bits initially set is 5, it can be easily shown that the number of additional indicators introduced under this law is 11. Therefore, in the worst case, the number of indicators required by XTC notation will increase by a factor of 16/5 compared to FTC notation. The experiment shows that the general increase is a factor of two. In the lookup table, a part of the IP address is used to index to the CPA. The high 12 (at level 1) or 4 (other) bits are the index of the digital characters. The lower (that is, the least significant) 4 bits will be used to index to the bit mask of the digital character (assuming that the digital character does not include the coded direct next hop 16) This paper standard applies Chinese national standards (CNS) A4 specifications (210 x 297 mm) .—— 1-— J ^ T -------- 1 (Please read the notes on the back before filling this page) 508926 A7 B7 V. Description of the invention (6) If you jump). By indexing to a bit mask, you can either index a bit that has been set to (out of the set bits) to capture an indicator associated with that bit, or index an unset bit . If the bit is not set, then an indicator related to the set bit closest to the left end of the indexed bit needs to be retrieved. That is, as mentioned above, there is an index list related to each bit mask / digital character. These indicator lists can contain 2, 4, 8 or 16 indicators. The bit mask is encoded in the previous table as described above. Among the set bits, the index closest to the left end of the bit set (and the index of its corresponding index in the index list) can be obtained by a simple shift operation. Calculated. In other words, when looking up the table, the lower 4 bits that are used to index into the bit mask will be shifted to the right by the "digit" indicated bits. It can be compared with the expensive mapping table lookup operation used in the FTC algorithm. Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs In the XTC data structure, this block contains a fixed-size array of digital characters (the size of which depends on the class). In order to reduce the number of bits required to indicate the "first" index index 値 (the beginning of the index list related to the digital character) related to each digital character, the indicators in the XTC data structure Will be stored in φ of the same array as the block. After the last digital character of the block, the indicator array related to a block is stored immediately. That is, as mentioned above, the index array includes a 20-bit index and / or a 15-bit sub-hop index. This is an array represented by a 16-bit integer. The most significant bit indicates whether the lower 15 bits indicate a sub-jump index, or the lower 15 bits of the 20-bit index. In order to show a 20-digit indicator that points to the next level, you can use the $ digits of the digital character to 17 This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 mm) 508926 A7 B7 5 2. Description of the invention (屮) It indicates the upper 5 bits of the 20-bit indicator. When captured, these bits are simply appended to the indicator. In this way, it is obviously required that in any list of indicators directed to the next level associated with the same bit mask, their bits 15..19 must be exactly the same. This can be achieved by moving the block at the next level during the construction process if the lower 15 bits of the indicators can be hidden, and the bit mask associated with the current level at the construction level The block is constructed at the next level of the (see section 3 for details). In summary, each digital character is composed of the following: • 1 bit, which can indicate whether the other is a direct sub-jump. If this is a sub-jump, there are 15 bits to represent the sub-jump index. If not, the following are: • 2 bits for digital use (displacement 値) • 5 bits for high index use of related indicators • 16 (Tier 1) or 8 (Tier 2 and 3) The single bit is used to indicate the index displacement 内 in the index array directly stored behind the block, that is, the index of the "first" index related to the digital character. χ) Level 1: A 65536-element pre-existing index array The first level (level 1) of the XTC data structure can be represented by a CPA with 4096 digital characters and 0 ... 65536 indicators. The first step in the table lookup operation is to use bits 31 ··· 20 of the IP address as the index to the 24-bit digital character that has been retrieved (in software implementation, it can be aligned The reason is to store the 24-bit digital character in a 32-bit integer). If the most significant bit of the digital character is set (indicated by the white characters on the black background in Figure 2), the next 15 bits represent the sub-jump index, and 18 paper sizes can be captured immediately. Standard (CNS) A4 specification (210 x 297 mm) (Please read the notes on the back before filling out this page) i Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 Α7 Β7 5. The invention description (η) came out and completed Lookup table job. In this case, bits 7… 0 ° are not used. In the second step, bits 19… 16 of the IP address are used to search the digital characters to find the indicator in the indicator list. This can be done by shifting the IP address by 4 bits with a 2-bit integer captured from a digital character (digital), and adding 16 bits that are also captured by the digital character. The displacement of the element is achieved (see Figure 3). The result number is the index number of the index stored in the index list related to the block. However, if the most significant bit of the digital character is not set, the lower I5 bit will form a jump index and complete the table lookup operation (see Figure 3). If the indicator does not represent a direct jump, the lower 15 bits can be captured and combined with the 5 bits stored in the digital character to form a 20-bit indicator, pointing to Level 2 CPA (see Figure 4), and continue to look up the table. The compressed consumer array printed by the Intellectual Property Bureau of the Ministry of Economic Affairs' employee co-operatives will be stored in a large array of 16-bit integers. Depending on who is immediately following the list of digital characters. Therefore, it is indeed impossible to index the i-th CPA at level 2. Conversely, the CPA at level 3 must be based on its starting point (the index of the first digital character), and this is why when representing a large path selection table, a 20-bit index is needed. Tier 2: — 256 element pressure index array The second level of XTC contains a large matrix of Tier 2 CPAs. Each such CPA includes 16 digital characters and 0 ... 256 indicators. After calculating the position of Level 2 CPA at Level 1, proceed as follows: 19 This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 male β ~ -926 A7 B7 V. Description of the invention (β ) Perform a table lookup operation. The third step in the table lookup operation is to use bits 15 ... 12 of the IP address as an index to the 16-bit digital characters that have been retrieved. The most significant bit is set (indicated by the white characters on the black background in Figure 5), then the next 15 bits represent the secondary jump index, which can be immediately retrieved and completed the table lookup operation. In the fourth step , Bits 11 ·· 8 of the IP address are used to index to digital characters to find the index in the index list. This can be achieved by using the 2 bits captured from the digital character (digital) An integer to shift the IP address by 4 bits, and then add the 16-bit shift 値 also captured by the digital character (see Figure 6). The resulting number 値 refers to Index of the index stored in the index list related to the block. However, if the most significant bit of the digital character is After setting, the lower 15 bits will form a jump index and complete the look-up table operation (see Figure 6). If the indicator does not indicate a direct jump, the lower 15 bits can be retrieved and Combine with the 5 bits stored in the digital character to form a 20-bit index, point to the CPA of level 3 (as shown in Figure 7), and continue to look up the table. Follow the same way as in level 2. The compressed indicator array of this layer 3 will also be stored in a large array of 16-bit integers, where the size of each CPA is determined by the number of indicators in its indicator list. Therefore, one will be needed A 20-bit index to indicate the position of the next level of CPA. Level 3: The third level of the 256-element pressure index array XTC contains a large level 3 CPA matrix. Each of these 20 paper standards is subject to Chinese National Standards (CNS ) A4 size (210 X 297 mm) (Please read the precautions on the back first and write this page) rl pack
訂--------I 經濟部智慧財產局員工消費合作社印製 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(q) 種CPA包括16個數碼字元以及0…256個指標。當於階層 2處計算出階層3 CPA的位置之後,即按類似於階層2的 方式繼續進行查表作業。該第五步驟爲利用IP位址的位元 7·.·4作爲接往既經擷取之16位元數碼字元的索引。如果 該數碼字元的最顯著位元係經設定(由圖8中的黑底白字局 部所表示),則後接之15位元表示次跳躍索引,可立即擷 取出來並完成查表作業。 在第六個步驟裡,灰位址的位元3···0係用於索引到 數碼字元,藉以在指標列表內尋出該指標。這可藉由用自 數碼字元(數碼)所擷獲之2位元整數,來對該IP位址移位 4個位元,並且再增附亦由該數碼字元所擷取之8位元的 位移値而達成(參閱圖6)。其結果數値即爲指往存放在相關 於該塊區的指標列表內的指標之索引値。此時,該IP位址 的所有位元皆經檢視。故由指標列表內所擷取的指標必定 表示某次跳躍索引。因此,該步驟即完成查表作業(如圖9) 〇 藉由前文四節中所述,吾人完整描述了 XTC的資料結 捧。前文中詳細說明了如何在各個階層裡表示諸塊區與數 碼字元,並且如何地將資訊編碼於其中。最後,也詳細說 明了在各個階層裡執行的查表作業,得出次跳躍索引或是 朝向下一階層的指標。該查表作業係執行於六個步驟之內 得到結果。在各個步驟裡,除了第一次存取而會存取到24 個位元(於軟體實作上則爲32位元)之外,餘均執行一次16 位元記憶體存取。利用XTC方法,可僅由6個記憶體存取 21Order -------- I Printed by the Employees 'Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs Printed by the Employees' Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs Printed by 508926 A7 B7 V. Description of the Invention (q) CPAs include 16 digital characters and 0 … 256 indicators. After calculating the position of the CPA at level 3 at level 2, the table lookup operation is continued in a similar manner to that at level 2. The fifth step is to use bits 7 ··· 4 of the IP address as an index to the 16-bit digital characters that have been retrieved. If the most significant bit of the digital character is set (indicated by the black and white characters in Figure 8), the next 15 bits represent the sub-skip index, which can be immediately retrieved and completed the table lookup operation. In the sixth step, bits 3 ... 0 of the gray address are used to index to the digital characters, so as to find the indicator in the indicator list. This can be done by shifting the IP address by 4 bits with a 2-bit integer captured from a digital character (digital), and adding 8 bits that are also captured by the digital character. The displacement of the element is achieved (see Figure 6). The result number is the index of the index stored in the index list related to the block. At this point, all bits of the IP address are inspected. Therefore, the index retrieved from the index list must indicate a jump index. Therefore, this step is to complete the table look-up operation (as shown in Figure 9) 〇 As described in the previous four sections, I have fully described the data binding of XTC. The previous article explained in detail how blocks and digital characters are represented at various levels, and how information is encoded in them. Finally, it also explains in detail the table lookup operations performed in each hierarchy to obtain the secondary jump index or the index towards the next hierarchy. The lookup operation was performed in six steps to obtain results. In each step, except for the first access, which will access 24 bits (32 bits in software implementation), the rest will perform a 16-bit memory access. XTC method can be accessed from only 6 memories 21
本纸張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(w ) 而計算出次跳躍索引,而最劣狀況則是共計存取13 (14)個 位元組。 XTC建構 爲達到最快速的可能建構方式,XTC係覽越整個路徑 選擇表項目而構築,並以單一檢閱方式製作次跳躍表且建 造出既壓XTC表示法。對該建構作業唯一的要求是該些路 徑選擇項會以某種順序加以覽越,並且針對各個項目呼叫 某個函式。因此,該動態路徑選擇表表示法就會完全無關 於XTC建構演算法,並可由彼而造出XTC前傳表。 路徑選擇項轉換與次跳躍表建構作業 完整的建造程序包含有三個同時執行的步驟(參閱圖 10)。第一個步驟裡,該動態路徑選擇表係按IP位址(起始 點)以及IP遮罩長度所加排序之順序加以覽越。將具有較 小的IP位址數値者處理排在具有較大的IP位址數値者之 前。而對具有相同IP位址數値者,則是以具有較短的IP 遮罩長度(最短字首)者處理排在前面。樹狀結構覽越與所 用之動態路徑選擇表的表示方式密切相關,而在Effnet的 情況裡即爲一 Radix樹狀結構,在此並不贅述(覽越路徑選 擇表非屬發明物,彼乃技術整合之項目)。 各個路徑選擇項會被送出進行如圖10所示之路徑選擇 項轉換與次跳躍表產生程序。該程序可有效地將諸路徑選 擇項分割爲諸多字首,並拋棄涵蓋其他字首的字首,即如 22 ^紙張尺度適用_中國國家標準(CNS〉A4規格(210 x 297公髮^~" (請先閱讀背面之注意事項再填寫本頁)This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 mm) 508926 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 B7 V. Invention description (w) and calculate the secondary jump index, and the worst The situation is a total of 13 (14) bytes accessed. XTC Construction In order to achieve the fastest possible construction method, XTC system is constructed by selecting the table items across the entire path, and making a jump table in a single review mode and constructing an overriding XTC notation. The only requirement for this construction operation is that the path selections are browsed in a certain order and a function is called for each item. Therefore, the representation of the dynamic path selection table will be completely independent of the XTC construction algorithm, and the XTC forward table can be created by each other. Path selection conversion and sub-jump table construction The complete construction process consists of three simultaneous steps (see Figure 10). In the first step, the dynamic routing table is viewed in the order of the IP address (starting point) and the IP mask length. Those with a smaller number of IP addresses are ranked before those with a larger number of IP addresses. For those with the same number of IP addresses, the one with the shorter IP mask length (shortest prefix) is ranked first. The tree structure view is closely related to the representation of the dynamic path selection table used, and in the case of Effnet, it is a Radix tree structure, which is not described here (the view path selection table is not an invention, and it is not Technology integration projects). Each path selection item will be sent for the path selection item conversion and sub-jump table generation procedure shown in FIG. 10. This program can effectively split the path choices into many prefixes, and discard the prefixes that cover other prefixes, that is, if 22 ^ paper size is applicable _ Chinese National Standard (CNS> A4 size (210 x 297 public issued ^ ~ " (Please read the notes on the back before filling this page)
經濟部智慧財產局員工消費合作钍印製 508926 A7 B7 五、發明說明(>1 ) 序言所述。彼亦負責自出現於動態路徑選擇表內的次跳躍 資訊(介面、MAC位址、ATM頻道等等)來產生次跳躍表。 最後,各個源自於路徑選擇項分割的字首(因分割一路徑選 擇項可產生諸多字首),會被饋送至XTC建造者程序,下 節中將對此詳加說明。可對FTC建造者程序以及XTC建 造者程序兩者,施用相同的路徑選擇項轉換與次跳躍表產 生程序。因此,在此不另重複詳論。彼者槪屬個別之專利 申請項目。 深度優先左至右XTC建構作業 當按第3.1節所述覽越路徑選擇項並分割爲諸字首之 後,各個既生字首會傳往進行中的XTC建構作業。即如序 言所述,各個字首會具有一起始點以及一終結點。藉由前 一節所述之轉換作業,該些字首會按既排之順序而被饋送 至XTC建構作業。此外,下一個需加處理之字首的終結點 會等於目前字首加一的終結點。 所有三個階層的XTC皆係同時建造。根據此刻所處理 之字首長度而定,建構作業可於不同階層進行。有時,對 於某一字首亦會需要在所有階層上進行建構作業。這會需 要在建構作業過程中大量的記帳作業。吾人現追蹤下列事 件··Printed by the Intellectual Property Bureau of the Ministry of Economic Affairs on consumer cooperation 508926 A7 B7 V. Description of the invention (> 1) As mentioned in the preamble. He is also responsible for generating the sub-hop table from the sub-hop information (interface, MAC address, ATM channel, etc.) appearing in the dynamic routing table. Finally, each prefix that originates from the split of the path option (many prefixes can be generated by splitting a path option) will be fed to the XTC builder program, which will be explained in detail in the next section. The same path selection conversion and sub-jump table generation program can be applied to both the FTC builder program and the XTC builder program. Therefore, I will not repeat the details here. They are not separate patent applications. Depth-first left-to-right XTC construction work After browsing through the path selection items described in Section 3.1 and splitting them into prefixes, each existing prefix is passed to the ongoing XTC construction work. That is, as mentioned in the preamble, each prefix will have a starting point and an ending point. With the conversion operation described in the previous section, these prefixes will be fed to the XTC construction operation in the same order. In addition, the endpoint of the next prefix to be processed will be equal to the current prefix plus one. All three levels of XTC are built at the same time. Depending on the length of the prefix that is being processed at this time, construction can be performed at different levels. Sometimes, the construction of a certain prefix is required at all levels. This will require a large number of accounting operations during the construction operation. I am following the following events ...
Expect 所預期之下一待處理字首的起始點 has el 建造階層1的位址 23 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 508926 經濟部智慧財產局員工消費合作社印製 五、發明說明(/) A7 B7 base2 建造階層2的位址(指向第一個階層2塊區的位址) base3 建造階層3的位址(指向第一個階層3塊區的位址) chunk1 指向目前建構中的階層1塊區之位址 chunk2 指向目前建構中的階層2塊區之位址 chunk3 指向目前建構中的階層3塊區之位址 pointer 1 指向目前建構中的階層1指標列表之位址 pointer2 指向目前建構中的階層2指標列表之位址 pointer 3 指向目前建構中的階層3指標列表之位址 f pos2 相對於base2目前建構中的階層2塊區之位置 pos3 from2 相對於base3目刖建構中的階層3塊區之位置 相關於目前階層1數碼字元的第一個階層2塊區之位 置 相關於目前階層2數碼字元的第一個階層3塊區之位 fromS 置 bucket 1 口 含有16個相關於目前階層1數碼字元的指標之集桶 bucket2[] 含有16個相關於目前階層2數碼字元的指標之集桶 bucket3 [] 含有16個相關於目前階層3數碼字元的指標之集桶 offsetl 相關於目前階層1數碼字元之指標位移値 offset2 相關於目前階層2數碼字元之指標位移値 offsets 相關於目前階層3數碼字元之指標位移値 maskl 相關於目前階層1數碼字元之位元遮罩 mask2 相關於目前階層2數碼字元之位元遮罩 maskS 相關於目前階層3數碼字元之位元遮罩 24 (請先閱讀背面之注意事項再填寫本頁) * I------訂* ------· 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(岣) 對於各個經處理之字首,可依據該起始點來檢查該 expect變數,藉此確保該字首串流係屬有效。各個字首的 處理作業包含「初始化階段」、「建構階段」與「完成階 段」。在第一個字首(起始點爲零)的初始化階段裡,整個 建構作業係藉由將basel、base2與base3設定至各個階層 的記憶體位址,以及將p〇s2、p〇s3、from2與from3等歸 零而予以初始化。在此,亦可將chunkl設定爲設到basel ,以及將pointl設到該層1指標列表需將加以存放的記 憶體位址,如倘該指標列表需緊隨存放於該塊區後,則該 値爲設往basel+8192,而藉此來初始化階層1的建構作業 。此外,offsetl亦被設定爲零値。 接著,對所有的字首(包括該第一者),該項初始化作 業會執行下述項目。首先,可藉由分析存放於字首之內的 網路遮罩,來算出建構作業的「深度」(可爲12、16、20 、24、28或32)。爲自網路遮罩m來計算該深度値,可利 用下式: 32- ((!(m&0xf)+!(m&0xf0)+!(m&0xf00)+!(m&0xf000)+!(m&0xf 0000))«2) 其中&表示位元運算,!表示邏輯的「否」運算,也就 是如果x=0則!x=l ’而〇則反是,以及<<表τρ;位兀向左移 位運算。亦需注意通常是以Οχ爲起首標示的16進位表示 法之整數來表註該位元遮罩。 藉由對所計得之深度進行處理特定的初始化作業,而 25 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 一Expect expected the starting point of the next pending prefix has el address of construction class 1 23 This paper size applies to China National Standard (CNS) A4 specification (210 X 297 mm) 508926 Employees of Intellectual Property Bureau of the Ministry of Economic Affairs Printed by the cooperative V. Description of the invention (/) A7 B7 base2 The address of the construction level 2 (point to the first level 2 block) base3 The address of the construction level 3 (to the first level 3 block) Address) chunk1 points to the address of layer 1 in the current construction chunk2 points to the address of layer 2 in the current construction chunk3 points to the address of layer 3 in the current construction pointer 1 points to layer 1 in the current construction The address pointer2 of the index list points to the address pointer 3 of the level 2 index list under construction. Pointer 3 points to the address f pos2 of the level 3 index list currently under construction relative to the position pos3 from 2 of the level 2 block currently under construction in base2. The position of the layer 3 block in the base3 project is related to the first layer 2 of the current layer 1 digital character. The position of the block 2 is related to the first layer 3 of the current layer 2 digital character. The bit of the block fromS is set to bucket 1. The bucket contains 16 indicators related to the current level 1 digital characters bucket2 [] contains 16 indicators related to the current level 2 digital characters bucket3 [] contains 16 The offset of the index related to the current level 3 digital characters offsetl The offset of the index related to the current level 1 digital characters 値 offset2 The index displacement of the current level 2 digital characters 値 offsets the index of the current level 3 digital characters Displacement 値 maskl is related to the bit mask of the current level 1 digital character mask2 is related to the bit mask of the current level 2 digital character maskS is related to the bit mask of the current level 3 digital character 24 (please read the back first Please note this page before filling in this page) * I ------ Order * ------ · This paper size applies to China National Standard (CNS) A4 (210 X 297 mm) Employees of the Intellectual Property Bureau of the Ministry of Economic Affairs Printed by the Consumer Cooperative 508926 A7 B7 V. Description of the Invention (岣) For each processed prefix, the expected variable can be checked based on the starting point to ensure that the prefix stream is valid. The processing operations of each prefix include "initialization phase", "construction phase" and "completion phase". In the initialization phase of the first prefix (starting point is zero), the entire construction operation is performed by setting basel, base2, and base3 to the memory address of each hierarchy, and setting p0s2, p0s3, and from2 It is initialized with zero from3 and so on. Here, chunkl can also be set to basel, and pointl to the memory address of the layer 1 index list to be stored. If the index list needs to be stored immediately after the block, then 値In order to set to basel + 8192, use this to initialize the construction operation of level 1. In addition, offsetl is also set to zero. Then, for all prefixes (including the first one), the initialization job executes the following items. First, the "depth" of the construction operation (which can be 12, 16, 20, 24, 28, or 32) can be calculated by analyzing the network mask stored in the prefix. To calculate the depth 値 for the network mask m, the following formula can be used: 32- ((! (M & 0xf) +! (M & 0xf0) +! (M & 0xf00) +! (M & 0xf000) + ! (m & 0xf 0000)) «2) where & means bitwise operation ,! Represents the logical "no" operation, that is, if x = 0, then x = l 'and 0 is the opposite, and the < < table τρ; bitwise shift operation to the left. It should also be noted that this bit mask is usually indicated by an integer in the hexadecimal notation that starts with 0x. By processing the specific depth of the calculated depth, 25 paper sizes are applicable to China National Standard (CNS) A4 (210 X 297 mm).
508926 A7 B7 五、發明說明(蚪) 來繼續進行該初始化作業。然對於諸多深度而或將需要加 以初始化的的單一字首建構作業而言,可由最深者開始。 深度 32 藉由下式決定新的階層3數碼字元之建構作業是否開 始: !(expect & ((1<<:4) - 1)) 如上式之結果爲「揭」(即零値),則無須進行階層3 數碼字元初始化作業’並且進行到建構階段。否則’藉由 設定 mask3 爲 〇 ’ 設疋 bucket3[0]、…、^)11〇1(^3[15]爲「 EMPTY」來啓動階層3數碼字元建構作業’然後繼續進行 深度28的初始化作業。 澤彦28的初始化作ϋ 藉由下式決定新的階層3塊區之建構作業是否開始: !(expect & ((1<<8) - 1)) 經濟部智慧財產局員工消費合作社印製 如上式之結果爲「僞」(即零値),則無須進行階層3 塊區初始化作業,並且進行到建構階段。否則’比較 from3與P〇s3的位元15…19以確保彼者具爲相等。記得該 fr〇m3與P〇s3分別是相關於建構中目前階層2數碼字元的 第一個階層3塊區和目前階層3塊區之位置。並且,記得 該些指向彼等塊區的20位元指標會被存放在階層2,其中 5個高部位元在數碼字元內,而15個低部位元在相關於該 數碼字元的指標內(由fr〇m3與pos3所表示)。因此,可要 26 _本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公爱) 咖 508926 A7 B7 五、發明說明(4) 求from3與pos3的位元15...19皆屬相等。如果彼等確屬 相同,則可藉由將chunk3設定爲base3 + P〇s3,將 pointed設定爲chunk3 + 16 (此爲該塊區之大小),以及將 〇ffset3設定爲零値,來完成深度28的初始化作業。但如 彼等並不相同,則需要將建造於階層3內的壓縮指標陣列 予以調整由from3開始,以便讓5個高部位元變爲相等, 方得進行20位元指標的編碼作業。這可由計算p〇s3 & OxfSOOO並將該値指配f wrap變數來達成。然後該項調整 的距離delta (即需移動該些CPA多少位置),可按wrap與 from3之間的差値來計算。然後藉由重複地將base3[index] 指定給base3[index+delta],以此來移動諸CPA,其中 index迴圏爲自p〇s3-l到from3。剩下的是更新存放在相關 於建構中階層2數碼字元之集桶內的各個指標,這是因爲 相關於彼等之階層3 CPA的位置確已變動。這點可由對各 個存放在bucket2陣列內(略過EMPTY集桶)的指標增加一 delta値,然後再藉簡單的位元遮罩運算來僅保留低部15 位元來達成。最後,將from3設定爲wraP ’而P〇s3增加 一 delta値,而在完成深度28初始化作業之前,藉由設定 chunk3 爲 base3 + pos3 以及 p〇inter3 設定爲 chunk3 + 16 以及將〇ffset3設定爲零値’然後再繼續深度24的初始化 作業。 深度24初始化作業_ 藉由下式決定新的階層2數碼字兀之建構作業是否開 27 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) (請先閱讀背面之注意事項再填寫本頁) --I-- till! 經濟部智慧財產局員工消費合作社印製 508926 A7 —_______E.____ 五、發明說明(4) 始: !(expect & ((1«12) - 1))508926 A7 B7 5. Description of the Invention (蚪) Continue the initialization operation. However, for many deep single-word construction tasks that will need to be initialized, the deepest can be started. Depth 32 determines whether the construction of the new level 3 digital characters begins with the following formula:! (Expect & ((1 < <: 4)-1)) The result of the above formula is "exposure" (ie zero) ), There is no need to perform the initialization operation of the level 3 digital characters' and proceed to the construction stage. Otherwise, 'by setting mask3 to 0', set bucket3 [0], ..., ^) 11〇1 (^ 3 [15] is "EMPTY" to start the construction of digital characters of layer 3 "and then proceed to the initialization of depth 28 Operation. Initialization of Zeyan 2828 Determine whether the construction of the new three-level block begins with the following formula:! (Expect & ((1 < < 8)-1)) Employees ’Consumption of Intellectual Property, Ministry of Economic Affairs The result printed by the cooperative as above is "false" (ie, zero), so there is no need to initialize the block of level 3 and proceed to the construction stage. Otherwise, compare bits 15 ... 19 of from3 and P0s3 to ensure that They are equal. Remember that fr0m3 and Pos3 are related to the position of the first level 3 block and the current level 3 block of the current level 2 digital characters under construction, respectively, and remember that these points point to each other. The 20-bit indicator of the equal block will be stored in level 2, where 5 high-positioned elements are in the digital character, and 15 low-positioned elements are in the index related to the digital character (by fr0m3 and pos3 (Represented). Therefore, it may be necessary to 26_ this paper size applies Chinese National Standard (CNS) A4 Grid (210 x 297 public love) Coffee 508926 A7 B7 V. Description of the invention (4) Find the bits 15 ... 19 of from3 and pos3 are equal. If they are the same, you can set chunk3 to base3 + P〇s3, set pointed to chunk3 + 16 (this is the size of the block), and set 0ffset3 to zero 完成 to complete the initialization of depth 28. But if they are not the same, you need The compression index array built in layer 3 is adjusted starting from3, so that the 5 high-level elements become equal, and then the 20-bit index coding operation can be performed. This can be calculated by calculating p0s3 & OxfSOOO and値 Assign the f wrap variable to achieve. Then the delta of the adjustment (that is, how many positions of the CPA need to be moved) can be calculated by the difference between wrap and from3. Then, repeatedly by base3 [index] Assigned to base3 [index + delta] to move the CPAs, where the index is from p0s3-l to from3. The rest is stored in the bucket related to the digital characters of layer 2 under construction Indicators, because the position of CPAs related to their Tier 3 CPAs is indeed This can be achieved by adding a delta 値 to each index stored in the bucket2 array (skipping the EMPTY bucket), and then using a simple bit mask operation to retain only the lower 15 bits. Finally, from3 is set to wraP 'and P〇s3 adds a delta 値, and before completing the depth 28 initialization operation, set chunk3 to base3 + pos3 and p〇inter3 to chunk3 + 16 and ffff3 to zero 値' then The initialization operation of the depth 24 is resumed. Depth 24 initialization operation_ Determine whether the construction work of the new level 2 digital characters is opened by the following formula 27 This paper size applies to China National Standard (CNS) A4 specification (210 X 297 public love) (Please read the precautions on the back first Fill out this page again) --I-- till! Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 A7 —_______ E .____ V. Description of the Invention (4) Start:! (Expect & ((1 «12)-1 ))
如上式之結果爲「僞」(即零値),則無須進行階層2 數碼字元初始化作業,並且進行到建構階段。否則,藉由 設定 mask2 爲 0,bucket2[0]、…、bucket2[15]爲「EMPTY 」,來啓動階層2數碼字元建構作業,並且接著繼續深度 20的初始化作業。 溧度20初始化作業 藉由下式決定新的階層2塊區之建構作業是否開始: !(expect & ((1<<16) - 1)) 如上式之結果爲「僞」(即零値),則無須進行階層2 塊區初始化作業,並且進行到建構階段。否則,比較 from2與P〇s2的位元15...19以確保彼者具爲相等。記得該 from2與P〇s2分別是相關於建構中目前階層1數碼字元的 第一個階層2塊區和目前階層2塊區之位置。並且,記得 該些指向彼等塊區的20位元指標會被存放在階層1,其中 5個高部位元在數碼字元內,而15個低部位元在相關於該 數碼字元的指標內(由fr〇m2與pos2所表示)。因此,可要 求fr〇m2與p〇S2的位元15...19皆屬相等。如果彼等確屬 相同,則可藉由將chunk2設定爲base2 + pos2,將 pointer2設定爲chunk2 + 16 (此爲該塊區之大小),以及將 offset2設定爲零値,來完成深度28的初始化作業。但如 彼等並不相同,則需要將建造於階層2內的壓縮指標陣列 28 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) 508926 A7 ____ __B7____ 五、發明說明(州) 予以調整由fr〇m2開始,以便讓5個高部位元變爲相等, 方得進行20位元指標的編碼作業。這可由計算p〇s2 & 0xf8000並將該値指配予wrap變數來達成。然後該項調整 的距離delta (即需移動該些CPA多少位置),可按wrap與 from2之間的差値來計算。然後藉由重複地將base2[index] 指定給base2[index+delta],以此來移動諸CPA,其中 index迴圈爲自pos2-l到from2。剩下的是更新存放在相關 於建構中階層2數碼字元之集捅內的各個指標,這是因爲 / 相關於彼等之階層2 CPA的位置確已變動。這點可由對各 個存放在bucket〗陣列內(略過EMPTY集桶)的指標增加一 delta値,然後再藉簡單的位元遮罩運算來僅保留低部15 位元來達成。最後,將from2設定爲wrap,而pos2增加 一 delta値,而在完成深度28初始化作業之前,藉由設定 chunk2 爲 base2 + pos2 以及 pointer2 設定爲 chunk2 + 16 以及將〇ffset2設定爲零値,然後再繼續深度16的初始化 作業。 深度16初始化作業 經濟部智慧財產咼員X.消費釜阼·fi.印裂 藉由下式決定新的階層1數碼字元之建構作業是否開 始: !(expect & ((1<<20) - 1)) 如上式之結果爲「僞」(即零値),則無須進行階層1 數碼字元初始化作業,並且進行到建構階段。否則’藉由 將設定 maskl 爲 0 ’ bucketl[0]、…、1>11〇1<^1:1[15]爲「 29 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 508926 經濟部智慧財產咼員X消費合阼杜印製 A7 B7 五、發明說明(β) EMPTY」,來啓動階層1數碼字元建構作業,並且接著繼 續深度12的初始化作業。 深度12初始化作業 在此無須進行初始化作業,當整個建構作業經啓動後 就會對彼加以安排。 在經過初始化階段之後,可藉由將彼設定到既經處理 之字首的終結點加一,萌來更新該expect變數。接著,繼 續到建構階段,並在處理程序開始之時所算出的深度處進 行建構作業。 深度32建構作業 可按下述方法建造存放於階層3指標內的直接次跳躍 。可藉從字首的起始點內擷取出其位元0...3,來計算位元 索引値bix。然後,設定mask3的位元bix,並將該字首的 次跳躍索引値(未加編碼)存入bucket3[bix]之內。在完成階 段裡,該些集桶的內容會被移出到相關於建構中的階層3 數碼字元之指標陣列內。 梁度28建構作業 可按下述方法建造直接編碼於階層3數碼字元內的直 接次跳躍。所欲建造之第一與最終數碼字元的諸索引値, 即start與stop,可由分別擷取出該字首的起始點與終結點 之位元4…7而計得。然後,藉設定位元15以對該字首的 30 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ---------— 丨----- (請先閱讀背面之注意事項再填寫本頁) 訂.丨 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(β) 次跳躍索引値進行編碼,並將既經編碼的次跳躍索引値指 配至 chunk3[start]、…、chunk3[stop]來儲存該塊區。 深度24建構作業 可按下述方法建造存放於階層2指標內的直接次跳躍 。可藉從字首的起始點內擷取出其位元8...11,來計算位 元索引値bix。然後,設定mask2的位元bix,並藉設定位 元15來將該字首的豕跳躍索引値加以編碼,再存入 bucket2[bix]之內。在完成階段裡,該些集桶的內容會被移 出到相關於建構中的階層2數碼字元之指標陣列內。 深度20建構作業 可按下述方法建造直接編碼於階層2數碼字元內的直 接次跳躍。所欲建造之第一與最終數碼字元的諸索引値, 即start與stop,可由分別擷取出該字首的起始點與終結點 之位元12…15而計得。然後,藉設定位元15以對該字首 的次跳躍索引値進行編碼,並將既經編碼的次跳躍索引値 指配至chunk2[start]、…、chunk2[stop]來儲存該塊區。 深度16建構作業 可按下述方法建造存放於階層2指標內的直接次跳躍 。可藉從字首的起始點內擷取出其位元16···19,來計算位 元索引値bix。然後,設定mask2的位元bix,並藉設定位 元15來將該字首的次跳躍索引値加以編碼,再存入 31 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ------------·裝--------丨訂i (請先閱讀背面之注意事項再填寫本頁) # 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(π ) bucket2[bix]之內。在完成階段裡,該些集桶的內容會被移 出到相關於建構中的階層1數碼字元之指標陣列內。 深度12建構作業 可按下述方法建造直接編碼於階層3數碼字元內的直 接次跳躍。所欲建造之第一與最終數碼字元的諸索引値, 即start與stop,可由分別擷取出該字首的起始點與終結點 之位元20…31而計得%然後,藉向左移位8個位元,設定 位元23,以對該字首的次跳躍索引値進行編碼,並將既經 編碼的次跳躍索引値指配至chunkl[start]、...、 diunkl[St〇p]來儲存該塊區。記得階層1塊區包含24位元 整數,並且在此該低部8位元尙屬未用狀態。在軟體實作 上,可爲對齊原因而將該24位元數碼字元存放於32位元 整數內,而此僅需將編碼方式略加修改即得。 字首處理作業可於完成階段內處理完畢,而該者係開 始於與進行建構作業時的相同深度。對於某一字首來說, 多種深度的完成作業或將會要求從最深位置開始。 深度32完成作業 可藉由下式決定階層3數碼字元之建構作業是否結束( 記得該expect變數確已於起始化階段之後更新): ’·(expect & ((1<<4) - 1)) 如上式之結果爲「僞」(即零値),則需要一個或多個 字首來完成階層3數碼字元,並且目前字首的處理作業確 32 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ------------- (請先閱讀背面之注意事項再填寫本頁) 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(μ ) 告完成。否則,可藉擷取出字首起始點的位元4…7 ’來算 出所欲完成之數碼字元的索引tix。接著,分析mask3來算 出2個位元的位移値shift。這可藉下列簡易程序求得: mask3 & Oxaaaa > 0 shift = 0 mask3 & 0x4444 > 0 —> shift = 0 mask3 & 0x1010 > 0 > shift = 0 mask3 & 0x0100 > 0 shift = 0 由此可算出該位移値與數碼字元的編碼(shift << 8) + offset3,並將其存放於'chunk3[tix]之內。爲完成該數碼字 元,即必須將存放於集桶內的諸指標移出到相關於該數碼 字元的指標列表。根據該位移値而定,吾人可自2、4、8 或16個集桶內擷取出指標。 位移値 集桶 0 0, 1,2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12, 13, 14, 15 1 0, 2, 4, 6, 8, 10, 12, 14 2 0,4,8, 12 3 0, 8 指標可自集桶擷取而得,並藉迴視旅經該些標示在上 表之內的集桶,而將其存放在相關於數碼字元的指標陣列 內。對於各個非EMPTY集桶,該集桶內容會被指配到 pointed[offset3],並且對於各個EMPTY集桶,該 pointer3[offset3-l]會被指配爲 p〇inter3[offset3]。因此,在 繼續處理下一個集桶之前,會將offset3加一。當處理完各 個列於上表之內的集桶後,即完成該數碼字元並繼續進行 深度28完成作業。 33 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ----------—· I------訂--------- (請先閱讀背面之注意事項再填寫本頁) 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(p) 深度28完成作藍 可藉由下式決定階層3塊區之建構作業是否結束(記得 該expect變數確已於起始化階段之後更新): !(expect & ((1<<8) - 1)) 如上式之結果爲「僞」(即零値),則需要一個或多個 字首來完成階層3塊區,並且目前字首的處理作業確告完 成。否則,可在設定mask2的位元bix之後,藉由擷取出 字首起始點的位元8...U,來算出階層2位元索引bix。最 後,在進行到深度24完成作業之前,該P〇s3的低部15位 元,此爲刻正完成之階層3塊區的位置,會在將 16+offset3加到pos3之後,再被存到bucket2[bix]內,以 準備進行下一個階層3塊區的建構作業。 深度24完成作業 可藉由下式決定階層2數碼字元之建構作業是否結束( 記得該expect變數確已於起始化階段之後更新): !(expect & ((1<<12) - 1)) 如上式之結果爲「僞」(即零値),則需要一個或多個 字首來完成階層2數碼字元,並且目前字首的處理作業確 告完成。否則,可藉擷取出字首起始點的位元12···15,來 算出所欲完成之數碼字元的索引tix。接著,分析mask2來 算出2個位兀;的位移値shift。這可藉與前述深度32完成 作業裡相同的簡易程序求得。因此,可算出該位移値與數 碼字元的編碼 34 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) (請先閱讀背面之注意事項再填寫本頁) · n I n n ·ϋ i>— n』,I n m n ϋ i 508926 A7 B7 五、發明說明(c) ((from3 & 0xf8000) » 5) + (shift « 8) + offset2 並將其存放於chunk2[tix]之內。除了前述深度32完成 作業之編碼以外,指向相關於該數碼字元的階層3 CPAs之 指標位元15…19會由from3內擷取出來,並且在設定 from3爲pos3以準備進行下一個階層2數碼字元的建構作 業之後,將其編碼爲數碼字元的位元1〇.··14。爲完成該數 碼字元,即必須將存放於集桶內的諸指標移出到相關於該 數碼字元的指標列表。根據該位移値而定,吾人可按照與 前述深度32完成作業裡相同的方式來自2、4、8或16個 集桶內擷取出指標。自集桶擷取得到指標,並藉迴視旅經 該些標示在上表之內的集桶,而將其存放在相關於數碼字 元的指標陣列內。對於各個非EMPTY集桶,該集桶內容 會被指配到p〇inter2[offset2],並且對於各個EMPTY集桶 ,該 pointer2[offset2-l]會被指配爲 pointer2[offset2]。因此 ,在繼續處理下一個集桶之前,會將〇ffset2加一。當處理 完各個列於上表之內的集桶後,即完成該數碼字元並繼續 進行深度20完成作業。 請 先 閱 讀 背If the result of the above formula is "false" (that is, zero), it is not necessary to perform the initialization operation of the digital characters of level 2 and proceed to the construction stage. Otherwise, by setting mask2 to 0 and bucket2 [0], ..., bucket2 [15] to "EMPTY", start the layer 2 digital character construction operation, and then continue the initialization operation of depth 20. The initial operation of degree 20 determines whether the construction of the new layer 2 block starts by the following formula:! (Expect & ((1 < < 16)-1)) The result of the above formula is "false" (that is, zero)値), there is no need to carry out the initialization of Level 2 blocks and proceed to the construction stage. Otherwise, bits 15 ... 19 of from2 and Pos2 are compared to ensure that they are equal. Remember that from2 and Pos2 are related to the position of the first layer 2 block and the current layer 2 block of the current layer 1 digital characters under construction, respectively. Also, remember that the 20-bit indicators that point to their blocks will be stored in level 1, of which 5 high-position elements are in the digital character, and 15 low-position elements are in the index related to the digital character. (Represented by fr0m2 and pos2). Therefore, it is required that the bits 15 ... 19 of fr0m2 and poS2 are equal. If they are the same, you can complete the initialization of depth 28 by setting chunk2 to base2 + pos2, pointer2 to chunk2 + 16 (this is the size of the block), and offset2 to zero. operation. But if they are not the same, the compression index array built in layer 2 needs to be 28. The paper size is applicable to the Chinese National Standard (CNS) A4 specification (210 X 297 public love) 508926 A7 ____ __B7____ V. Description of the invention (State ) The adjustment starts from fr0m2 so that the five high-level elements become equal, and then a 20-bit index coding operation can be performed. This can be achieved by calculating p0s2 & 0xf8000 and assigning this unit to the wrap variable. Then the delta of this adjustment (that is, how many CPA positions need to be moved) can be calculated by the difference between wrap and from2. Then repeatedly move the CPAs by repeatedly specifying base2 [index] to base2 [index + delta], where the index loop is from pos2-l to from2. What remains is to update the various indicators stored in the set of digital characters related to the stratum 2 under construction. This is because / the position of the stratum 2 CPA related to them has indeed changed. This can be achieved by adding a delta 对 to each indicator stored in the bucket array (skipping the EMPTY bucket), and then using a simple bit mask operation to retain only the lower 15 bits. Finally, set from2 to wrap and add pos2 to deltadel, and before completing the depth 28 initialization operation, set chunk2 to base2 + pos2 and pointer2 to chunk2 + 16 and set ffset2 to zero, and then Continue the initialization operation at depth 16. Depth 16 initialization operation Intellectual property staff of the Ministry of Economic Affairs X. Consumption Kettle · fi. Yinli determines whether the construction of the new class 1 digital characters is started by the following formula:! (Expect & ((1 < < 20 )-1)) If the result of the above formula is "false" (that is, zero), then it is not necessary to perform the initialization operation of the digital characters of level 1 and proceed to the construction stage. Otherwise 'by setting maskl to 0' bucketl [0], ..., 1 > 11〇1 < ^ 1: 1 [15] is "29 This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 cm) 508926 508926 Intellectual Property Staff of the Ministry of Economic Affairs X Consumption Cooperation Du printed A7 B7 V. Description of Invention (β) EMPTY "to start the construction of digital characters at level 1, and then continue the initialization at depth 12. Depth 12 initialization operation There is no need to perform initialization operation here. When the entire construction operation is started, it will be arranged. After the initialization phase, the expect variable can be updated by setting it to the end point of the processed prefix by one. Then, proceed to the construction phase and perform the construction operation at the depth calculated at the beginning of the processing procedure. Depth 32 construction operation The direct sub-jumps stored in the level 3 index can be constructed as follows. The bit index 値 bix can be calculated by extracting its bits 0 ... 3 from the starting point of the prefix. Then, set the bit bix of mask3, and store the sub-jump index 値 (uncoded) of the prefix into bucket3 [bix]. During the completion phase, the contents of these buckets will be moved to the indicator array related to the layer 3 digital characters under construction. Liangdu 28 construction operation The following method can be used to construct the direct jump directly encoded in the layer 3 digital characters. The indexes of the first and final digital characters to be constructed, namely start and stop, can be calculated by extracting the bits 4 ... 7 of the starting point and ending point of the prefix respectively. Then, set bit 15 to apply the Chinese National Standard (CNS) A4 specification (210 X 297 mm) to the 30 paper sizes of the prefix ----------- 丨 ----- ( Please read the precautions on the back before filling this page.) Order. 508926 Printed by A7 B7, Consumer Cooperatives, Intellectual Property Bureau, Ministry of Economic Affairs 5. Description of the invention (β) Jump index 値, and the encoded jump Index 値 is assigned to chunk3 [start], ..., chunk3 [stop] to store the chunk. Depth 24 construction operation The direct sub-jumps stored in the level 2 index can be constructed as follows. The bit index 値 bix can be calculated by extracting bits 8 ... 11 from the starting point of the prefix. Then, bit 2 of mask2 is set, and by setting bit 15, the "jump index" of the prefix is encoded and stored in bucket2 [bix]. During the completion phase, the contents of these buckets will be moved out into the indicator array related to the layer 2 digital characters under construction. Depth 20 construction operation The following method can be used to construct a direct jump directly encoded in the layer 2 digital characters. The indexes of the first and final digital characters to be constructed, namely start and stop, can be calculated by extracting the bits 12 ... 15 of the starting point and ending point of the prefix respectively. Then, bit 15 is set to encode the sub-jump index 値 of the prefix, and the encoded sub-jump index 値 is assigned to chunk2 [start], ..., chunk2 [stop] to store the block. Depth 16 construction operation The direct sub-jumps stored in the level 2 index can be constructed as follows. The bit index 値 bix can be calculated by extracting its bits 16 ... 19 from the starting point of the prefix. Then, set bit 2 of mask2, and set bit 15 of this prefix by encoding bit 15, and then save it into 31. This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 mm) ) ------------ · Install -------- 丨 Order i (Please read the notes on the back before filling out this page) # 508926 Printed by the Employees ’Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs System A7 B7 V. Invention description (π) Within bucket2 [bix]. During the completion phase, the contents of these buckets will be moved out into the index array related to the stratum 1 digital characters under construction. Depth 12 construction operation The following steps can be used to construct a direct jump directly encoded in the layer 3 digital characters. The indexes of the first and final digital characters you want to build, namely start and stop, can be calculated by extracting the starting point and ending point of the word at 20 ... 31, respectively, and then counting to the left. Shift 8 bits and set bit 23 to encode the first jump index 値 of the word and assign the encoded second jump index 编码 to chunkl [start], ..., diunkl [St Op] to store the block. Remember that the first block of the hierarchy contains 24-bit integers, and the lower 8-bits are unused here. In software implementation, the 24-bit digital character can be stored in a 32-bit integer for alignment reasons, and only a slight modification of the encoding method is required. The prefix processing operation can be completed within the completion phase, which starts at the same depth as the construction operation. For a certain prefix, completion work of multiple depths may require starting from the deepest position. The completion of the depth 32 operation can be determined by the following formula whether the construction of the digital characters of level 3 is completed (remember that the expect variable has been updated after the initialization stage): '· (expect & ((1 < < 4) -1)) If the result of the above formula is "false" (that is, zero), then one or more prefixes are required to complete the level 3 digital characters, and the current processing of prefixes is indeed 32 (CNS) A4 specifications (210 X 297 mm) ------------- (Please read the precautions on the back before filling out this page) 508926 Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 B7 5. The invention description (μ) is completed. Otherwise, the index tix of the digital character to be completed can be calculated by extracting the bits 4 ... 7 'of the starting point of the prefix. Next, analyze mask3 to calculate the two-bit shift 値 shift. This can be obtained by the following simple program: mask3 & Oxaaaa > 0 shift = 0 mask3 & 0x4444 > 0 — > shift = 0 mask3 & 0x1010 > 0 > shift = 0 mask3 & 0x0100 > 0 shift = 0 This can calculate the shift 値 and the code of the digital character (shift < < 8) + offset3, and store it in 'chunk3 [tix]. In order to complete the digital character, the indicators stored in the bucket must be moved out to the index list related to the digital character. Depending on the displacement, we can extract indicators from 2, 4, 8 or 16 buckets. Displacement unit set buckets 0 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 1 0, 2, 4, 6, 8, 10, 12 , 14 2 0,4,8, 12 3 0, 8 The indicators can be retrieved from the buckets, and borrowed from the buckets marked in the table above, and stored them in the relevant digital Character array. For each non-EMPTY bucket, the contents of the bucket will be assigned to pointed [offset3], and for each EMPTY bucket, the pointer3 [offset3-l] will be assigned to p0inter3 [offset3]. Therefore, offset3 is incremented by one before proceeding to the next bucket. After processing the buckets listed in the table above, the digital character is completed and the deep 28 completion operation is continued. 33 This paper size applies to China National Standard (CNS) A4 (210 X 297 mm) ------------ · I ------ Order --------- ( Please read the precautions on the back before filling in this page) 508926 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 B7 V. Description of the invention (p) The completion of the depth 28 can be determined by the following formula: Whether to end (remember that the expect variable has indeed been updated after the initialization phase):! (Expect & ((1 < < 8)-1)) If the result of the above formula is "false" (that is, zero), then One or more prefixes are required to complete the three blocks of the hierarchy, and the current processing of prefixes has been completed. Otherwise, after setting bit bix of mask2, by extracting bits 8 ... U of the starting point of the prefix, calculate the level 2 bit index bix. Finally, before proceeding to the depth 24 to complete the operation, the lower part of the P0s3 is 15 bits. This is the position of the layer 3 block that is being completed at the moment. After adding 16 + offset3 to pos3, it is stored bucket2 [bix] to prepare for the construction of the next layer of 3 blocks. The completion of the depth 24 operation can be determined by the following formula whether the construction of the digital characters of level 2 is completed (remember that the expect variable has been updated after the initialization stage):! (Expect & ((1 < < 12)- 1)) If the result of the above formula is "false" (that is, zero), one or more prefixes are required to complete the level 2 digital characters, and the current prefix processing operation is confirmed to be completed. Otherwise, you can calculate the index tix of the digital character you want to complete by extracting bits 12 ... 15 of the starting point of the prefix. Next, analyze mask2 to calculate the displacement of two bits; shift. This can be obtained by the same simple procedure as in the above-mentioned depth 32 completion operation. Therefore, the displacement 値 and the number of digital characters can be calculated. 34 This paper size is applicable to the Chinese National Standard (CNS) A4 (210 X 297 public love) (Please read the precautions on the back before filling this page) · n I nn · Ϋ i > — n ″, I nmn ϋ i 508926 A7 B7 V. Description of the invention (c) ((from3 & 0xf8000) »5) + (shift« 8) + offset2 and store it in chunk2 [tix] Inside. In addition to the coding of the depth 32 completion operation, the index bits 15 ... 19 pointing to the level 3 CPAs related to the digital character will be extracted from from3, and from3 is set to pos3 to prepare for the next level 2 digital After the character construction operation, it is encoded into the digital character bit 10. ·· 14. In order to complete the digital character, the indicators stored in the bucket must be moved out to the index list related to the digital character. Depending on the displacement, we can retrieve indicators from 2, 4, 8 or 16 buckets in the same way as in the previous depth 32 completion. The indicators are obtained from the buckets, and the buckets marked in the above table are borrowed from the tour, and stored in the indicator array related to digital characters. For each non-EMPTY bucket, the contents of the bucket will be assigned to point2 [offset2], and for each EMPTY bucket, the pointer2 [offset2-l] will be assigned as pointer2 [offset2]. Therefore, 0ffset2 will be incremented by one before proceeding to the next bucket. When the buckets listed in the above table are processed, the digital character is completed and the depth 20 completion operation is continued. Please read it first
意 事 項 再(重裝 本 . 頁I 訂 # 經濟部智慧財產局員工消費合作杜印製 深度20完成作業 可藉由下式決定階層2塊區之建構作業是否結束(記得 該expect變數確已於起始化階段之後更新): !(expect & ((1«16) - 1)) 如上式之結果爲「僞」(即零値),則需要一個或多個 字首來完成階層2塊區,並且目前字首的處理作業確告完 35 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 508926 經濟部智慧財產局員工消費合作钍印製 A7 B7 五、發明說明(饵) 成。否則,可在設定maskl的位元bix之後,藉由擷取出 字首起始點的位元16·.. 19,來算出階層1位元索引bix。 最後,在進行到深度16完成作業之前,該P〇S2的低部15 位元,此爲刻正完成之階層2塊區的位置,會在將 16+offset2加到pos2之後,再被存到bucketl[bix]內,以 準備進行下一個階層2塊區的建構作業。 深度16完成作業, 可藉由下式決定階層1數碼字元之建構作業是否結束( 記得該expect變數確已於起始化階段之後更新): !(expect & ((1«20) - 1)) 如上式之結果爲「僞」(即零値),則需要一個或多個 字首來完成階層1數碼字元,並且目前字首的處理作業確 告完成。否則,可藉擷取出字首起始點的位元20···31,來 算出所欲完成之數碼字元的索引tix。接著,分析maskl來 算出2個位元的位移値shift。這可藉與前述深度32完成 作業裡相同的簡易程序求得。因此,可算出該位移値與數 碼字元的編碼 ((from2 & 0xf8000) « 3) + (shift « 16) + offsetl 並將其存放於chunkl[tix]之內。除了前述深度32完成 作業之編碼以外,指向相關於該數碼字元的階層2 CPAs之 指標位元15…19會由from2內擷取出來,並且在設定 from2爲pos2以準備進行下一個階層1數碼字元的建構作 業之後,將其編碼爲數碼字元的位元20...23。爲完成該數 36 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ----------------- (請先閱讀背面之注意事項再填寫本頁) 508926 A7 ___B7_ 五、發明說明(5 ) 碼字元’即必須將存放於集桶內的諸指標移出到相關於該 數碼字元的指標列表。根據該位移値而定,吾人可按照與 前述深度32完成作業裡相同的方式來自2、4、8或16個 集桶內擷取出指標。自集桶擷取得到指標,並藉迴視旅經 該些標示在上表之內的集桶,而將其存放在相關於數碼字 元的指標陣列內。對於各個非EMPTY集桶,該集桶內容 會被指配到p〇interl[0ffSetl],並且對於各個EMPTY集桶 ,該 pointerl[offsetl_l]會被指配爲 p〇interl[0ffsetl]。因此 ,在繼續處理下一個集桶之前,會將offsetl加一。當處理 完各個列於上表之內的集桶後,即完成該數碼字元並繼續 進行深度12完成作業。 深度12完成作業 g亥XTC建構作業確告完成。在建構作業軟體裡,可更 新某些有關於建構作業的統計資料,然實無須執行在深度 12完成作業。 本節中,將說明處理用以重複地饋送至建構作業,俾 將彼等予以壓縮並轉換成爲XTC表現方式之路徑選擇項目 表的完整方法。 xtc查表實作 本節內將描述諸多可能的XTC查表硬體與軟體實作方 式。這些之中,局部確屬直觀,然某些又略異於前揭敘述 ’其局部資料結構與建造者程序另需細部更動。 37 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公餐) 一 ^ (請先閱讀背面之注意事項再填寫本頁) r.丨裝 訂--------.等 508926 經濟部智慧財產局員工消費合作社印製 Α7 Β7 五、發明說明(4) 直觀性硬體實作 該XTC查表極爲適合硬體實作。圖11中顯示一款按 前節中所敘述之演算法而爲直觀性硬體實作的佈設略® ° 可將IP位址自左端饋送進行查表,並按照六個步驟來 處理整個查表作業,一直到右端處可用該次跳躍索引値爲 止。茲假設該資料結構係由各階層存放於個別的記億體1^ 。換言之,一個是用於ί單一」階層1塊區,一個用於相 關於節層1指標的陣列,一個是節層2塊區與指標’而一 個是節層3塊區與指標(該等亦可對映至單一記憶體中)。 如果查表作業在六個步驟內確已完訖,該項結果會被「鎖 住」,將結果的15個位元饋送到多工器鏈序處。按此’即 會將自其他的查表作業部份而來但不必盡然爲同時發生之 結果予以拋棄不計。如果確已使用了四個足可同時存取到 的記憶體,該項查表作業會被按四個步驟予以管線處理’ 藉此加快其速度。鑒於其單純性,故未含納相關必要之控 制邏輯之細部說明。 成本效益性硬體實作 圖12中顯示一款較具成本效益性之硬體實作佈設圖’ 其效能略低,然具備較高的壓縮量。其槪念爲具備四個而 非三個階層,其中各個階層係正好表示爲原來資料結構內 的階層2與3。如此雖可簡化設計,但卻會增加兩個對該 項查表的額外記憶體存取。 38 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ----------------- (請先閱讀背面之注意事項再填寫本頁) 訂--- # 508926 經濟部智慧財產局員工消費合作钍印製 A7 B7 五、發明說明(VI ) 茲亦假定僅使用一個記憶體存取,這意味著花在某一 查表上的時間係與執行八個記憶體參考的時間成正比。在 此使用了多工器來同時一次自IP位址裡撿拾出四個位元, 並且來解譯出各次記憶體存取的結果究爲數碼字元或指標 。而如果在所有八個步驟之前即確已完成該項查表作業的 話,此處亦採用了多工器來鎖定前一次既經存取的記憶體 位址。這或爲結果鎖定的較佳方式,甚對他種設計者亦同 ,因爲如此可防止非法的記憶體存取,而提高本項實作某 些程度上的穩定性。 極速性硬體實作 爲提高查表速度,確有可能利用六個可同時被存取到 ,並且可在所有三個階層處將該些數碼字元改變爲24位元 數碼字元的記憶體。如此可將某21位元指標存入指標陣列 ,意思是說吾人可將指標儲存於個別的記憶體內,而無須 非得將相關於某塊區的指標直接存在該塊區之後。 如圖14所示,比起原先的設計方式,如此確可將設計 略爲簡化。 其原因在於各個塊區會在彼所歸屬之階層裡的塊區記 憶體內,佔據正好16個24位元的字元,這表示塊區的起 始點總會是16的倍數。故會存妥4個位元以供塊區參考之 用,因而指標的15個位元即足以參考到下一個階層的塊區 。從而既無須編碼該些指標的高部位元,也不必擷取出彼 等位元來得到「足夠大」的指標。該項查表可爲管線排定 39 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ttw ------—^------— (請先閱讀背面之注意事項再填寫本頁) 508926 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(β) 於六個步驟,意思是每次完成一個記憶體存取後,也就完 成了一個路徑選擇查表作業。藉此頗爲簡易之查表設計方 式,即可達到每秒超過一億個封包的效能。 直觀性軟體實作 在軟體實作方面,吾人無法輕易地不增加額外的記憶 體存取,而足可用24位元來表示該階層1數碼字元。因此 ,彼等係按32位元字元,而將指標位移値存放在高部16 位元之內(參見圖15)。除了 8個最不顯著位元以外,在此 倘該數碼字元並不表示某直接次跳躍的話則並未使用到該 等,該些低部15位元係按與階層2與3相同的方式加以應 用。 並且,整體資料結構被存放在足夠大的記憶體連續性 區塊之內,而既經配置予三個階層各者的空間議案一常數 所標定。除了這些細微變動以外,該查表作業的軟體版本 係屬按第2節所撰之演算法的直觀性實作結果。 效能改良Remarks (reload this book. Page I Order # The consumer cooperation of the Intellectual Property Bureau of the Ministry of Economic Affairs, the printing depth 20 is completed. The operation can be determined by the following formula whether the construction of the 2 blocks of the stratum is completed (remember that the expect variable is already in the Updated after the initialization stage):! (Expect & ((1 «16)-1)) As the result of the above formula is" false "(that is, zero), one or more prefixes are required to complete the level 2 block Area, and the processing of the current prefix has been completed. 35 This paper size is applicable to the Chinese National Standard (CNS) A4 (210 X 297 mm) 508926 Employees' cooperation in intellectual property bureau of the Ministry of Economic Affairs, printed A7 B7 V. Description of the invention (Bait). Otherwise, you can calculate the level 1 bit index bix by extracting the bit 16 ... 19 of the initial point of the maskl bit bix. Finally, go to depth Before the 16 operation is completed, the lower part of the P0S2 is 15 bits. This is the position of the block 2 that is currently being completed. It will be added to bucketl [bix] after adding 16 + offset2 to pos2. In preparation for the construction of the next level of 2 blocks. Industry, you can determine whether the construction of the digital characters of level 1 is completed by the following formula (remember that the expect variable has been updated after the initialization stage):! (Expect & ((1 «20)-1)) as above The result of the formula is "pseudo" (that is, zero), then one or more prefixes are required to complete the level 1 digital characters, and the current prefix processing operation is confirmed to be completed. Otherwise, the prefix can be retrieved by extracting Point bit 20 ... 31, to calculate the index tix of the digital character you want to complete. Then, analyze maskl to calculate the displacement of two bits 値 shift. This can be done by the same operation as in the previous depth 32 completion operation. It can be obtained by a simple program. Therefore, the code of the displacement 値 and the digital character ((from2 & 0xf8000) «3) + (shift« 16) + offsetl can be calculated and stored in chunkl [tix]. Except the foregoing In addition to the coding of the completed operation at depth 32, the index bits 15 ... 19 pointing to the level 2 CPAs related to the digital character will be retrieved from from2, and from2 is set to pos2 to prepare for the next level 1 digital character After encoding, encode it into bits of a digital character 20 ... 23. In order to complete this number, 36 paper sizes are applicable to China National Standard (CNS) A4 (210 X 297 mm) ----------------- (please first (Please read the notes on the back and fill in this page) 508926 A7 ___B7_ V. Description of the invention (5) The code character 'that is, the indicators stored in the bucket must be moved out to the index list related to the digital character. Depending on the displacement, we can retrieve indicators from 2, 4, 8 or 16 buckets in the same way as in the previous depth 32 completion. The indicators are obtained from the buckets, and the buckets marked in the above table are borrowed from the tour, and stored in the indicator array related to digital characters. For each non-EMPTY set bucket, the contents of the set bucket will be assigned to pointerl [0ffSetl], and for each EMPTY set bucket, the pointerl [offsetl_l] will be assigned as p〇interl [0ffsetl]. Therefore, offsetl is incremented by one before proceeding to the next bucket. After processing the buckets listed in the above table, the digital character is completed and the depth 12 completion operation is continued. Depth 12 Completion The gXI XTC construction operation was confirmed to be complete. In the construction operation software, some statistics about the construction operation can be updated, but it is not necessary to perform the operation completed in depth 12. In this section, we will explain the complete method of processing the route selection items that are repeatedly fed into the construction operation, compressing them and converting them into XTC representations. xtc lookup table implementation This section describes many possible XTC lookup table hardware and software implementations. Some of these are intuitive, but some of them are slightly different from the previous narratives. The details of the structure of the data and the procedures of the builder need to be changed in detail. 37 This paper size is applicable to Chinese National Standard (CNS) A4 specification (210 X 297 meals) ^ (Please read the precautions on the back before filling this page) r. 丨 Binding --------. Etc. 508926 Printed by the Intellectual Property Bureau of the Ministry of Economic Affairs' Consumer Cooperatives A7 B7 V. Description of Invention (4) Intuitive hardware implementation This XTC lookup table is very suitable for hardware implementation. Figure 11 shows the layout of an intuitive hardware implementation based on the algorithm described in the previous section. ° The IP address can be fed from the left end for table lookup, and the entire table lookup operation is processed in six steps. , Until the jump index 値 is available at the right end. It is assumed that the data structure is stored by individual strata in individual records. In other words, one is for a single "level 1 block, one is for an array of indicators related to node level 1, one is for node level 2 and the index 'and one is node 3 for the level and index (these also Can be mapped into a single memory). If the table lookup operation is indeed completed in six steps, the result will be “locked” and the 15 bits of the result will be fed to the multiplexer chain sequence. Pressing this' will come from other parts of the table lookup operation, but not necessarily discard it for simultaneous results. If you have used four memories that can be accessed at the same time, the table lookup operation will be pipelined in four steps ’to speed it up. Because of its simplicity, it does not include detailed descriptions of the necessary control logic. Cost-Effective Hardware Implementation Figure 12 shows a more cost-effective hardware implementation layout, which has a slightly lower performance but a higher compression. The idea is to have four rather than three levels, where each level is represented exactly as levels 2 and 3 in the original data structure. This simplifies the design, but adds two extra memory accesses to the lookup table. 38 This paper size applies to China National Standard (CNS) A4 (210 X 297 mm) ----------------- (Please read the precautions on the back before filling this page) Order --- # 508926 Employees' cooperation in the Intellectual Property Bureau of the Ministry of Economic Affairs printed A7 B7 V. Description of Invention (VI) It is also assumed that only one memory is used for access, which means that the time spent on a certain lookup table is It is proportional to the time taken to perform eight memory references. Here, a multiplexer is used to pick up four bits from the IP address at the same time, and to interpret the results of each memory access as digital characters or indicators. If the table lookup operation is completed before all eight steps, a multiplexer is also used here to lock the previously accessed memory address. This may be a better way to lock results, even for other designers, because it prevents illegal memory access and improves the stability of this implementation to some extent. Real-time hardware implementation To increase the lookup speed, it is indeed possible to use six memories that can be accessed simultaneously and change these digital characters into 24-bit digital characters at all three levels. In this way, a 21-bit indicator can be stored in the indicator array, which means that we can store the indicator in a separate memory without having to store the indicator related to a block directly behind the block. As shown in Fig. 14, compared with the original design method, the design can be simplified slightly. The reason is that each block will occupy exactly 16 24-bit characters in the block memory in the hierarchy to which it belongs, which means that the starting point of the block will always be a multiple of 16. Therefore, 4 bits will be stored for reference of the block, so the 15 bits of the indicator are enough to refer to the block of the next level. Therefore, it is not necessary to encode the high-level elements of these indicators, nor is it necessary to extract their bits to obtain an "enough" indicator. This lookup table can be used to schedule 39 pipelines. The paper size is applicable to the Chinese National Standard (CNS) A4 (210 X 297 mm) ttw ------— ^ ------— (Please read the back first Note: Please fill in this page again) 508926 Printed by A7 B7 of the Consumer Cooperatives of Intellectual Property Bureau of the Ministry of Economic Affairs 5. The invention description (β) is in six steps, which means that each time you complete a memory access, you also complete a Path selection lookup job. In this way, the simple look-up table design method can achieve the performance of more than 100 million packets per second. Intuitive software implementation In terms of software implementation, we can't easily add extra memory access, but we can use 24 bits to represent this level 1 digital character. Therefore, they use 32-bit characters and store the index shift 値 in the upper 16-bits (see Figure 15). Except for the 8 least significant bits, if the digital character does not indicate a direct jump, these are not used. The lower 15 bits are in the same way as levels 2 and 3. Apply it. In addition, the overall data structure is stored in a sufficiently large contiguous block of memory, which is calibrated by a constant number of spatial motions allocated to each of the three levels. In addition to these minor changes, the software version of this lookup operation is the result of intuitive implementation of the algorithm written in Section 2. Performance improvement
比起FTC資料結構,XTC資料結構的效能改良成果係 源自於以記憶體用量來交換記憶體存取、簡易性和速度。 眾知之事實爲倘記憶體用量確實無關輕重,則某人適可依 據單獨一次記憶體存取,來進行某項極爲簡易之路徑選擇 查表作業。這可由僅備製一具232元素的陣列而達成,其 中各個可能IP位址的次跳躍索引値,係儲存於具有與該IP 40 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) --· I------^---I-- (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(4) 位址數値相同的索引値之格槽內。 爲獲取該項交換成果,如果考慮採用僅單一階層而具 228數碼字元的話,則可按僅用兩次的記憶體存取來進行一 XTC查表,不過仍會耗用極爲大量的記憶體。一種可能方 式是讓各個數碼字元能夠表示超過16位元,來降低數碼字 元的數量。例如,如果各個數碼字元表示256個位元而不 是16個的話,8位元的數碼字元即必須用來作爲位移値。 在最壞的情況下,因簡化XTC編碼方式所產生之「外增」 指標數目,會以最差爲>56/9的因數而提高。數碼字元的 總數會是224,而該値仍屬過於龐大。 一種可提昇效能而不會浪費太多記億體的較佳方式是 ,將查表減少至四次記憶體存取。這可藉由建造一僅具兩 個階層的XTC而輕易達成。,其中例如階層1表示高部 20位元,而各個階層2塊區則表示低部12位元。據此, 各個在階層1的塊區會以16因數的方式來增加,該者也可 對資料結構的總體成長提供出一項槪略估計値。而這也可 以與前文所述在階層1利用「較大」數碼字元的槪念相互 合倂。 增加速度的最直觀方式是槪僅在階層2和3處利用到 XTC技術,而在階層1處則利用直接定址方式。這即可移 除一次記憶體存取作業。 本節焦點在於如何藉由耗甩更多的記憶體來提昇效能 的槪念。假使目標現爲盡可能地壓縮該表現方式,則可採 行該些槪念的反項。亦即「較小」的數碼字元和更多階層 41 本紙張尺度適用中國國家標準(CNS)A4規格(21〇 X 297公爱) I -1----—^--------- (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 508926 A7 B7 五、發明說明(抽) Ο 明顯地,本發明確可提供一種經改良之IP位址查表方 法與系統',而可完全滿足前揭設定之目標與優點。本發明 雖即如前文按諸特定具體實施例加以說明,然諸替代方案 、修飾結果與變化轉型,對於熟捻本項技藝之人士而言實 屬顯易。 42 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐7 . I --------^ , I-------- (請先閱讀背面之注意事項再填寫本頁)Compared to the FTC data structure, the performance improvement results of the XTC data structure are derived from exchanging memory access, simplicity, and speed with memory usage. It is a well-known fact that if the amount of memory is really irrelevant, then someone can use a single memory access to perform a very simple path selection lookup operation. This can be achieved by preparing only an array of 232 elements, where the sub-hop index of each possible IP address is stored in a paper with the same IP 40 size as the Chinese National Standard (CNS) A4 (210 X 297) (Mm) --- I ------ ^ --- I-- (Please read the notes on the back before filling out this page) Printed by the Employees' Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 A7 B7 V. Description of the invention (4) In the slot with the same number of addresses. In order to obtain this exchange result, if only a single layer with 228 digital characters is considered, an XTC lookup table can be performed with only two memory accesses, but it will still consume a very large amount of memory . One possible way is to reduce the number of digital characters by allowing each digital character to represent more than 16 bits. For example, if each digital character represents 256 bits instead of 16, then an 8-bit digital character must be used as a displacement 値. In the worst case, the number of "externally increased" indicators generated by the simplified XTC encoding method will increase with the worst factor being > 56/9. The total number of digital characters would be 224, and the number would still be too large. A better way to improve performance without wasting too much memory is to reduce the lookup table to four memory accesses. This can be easily achieved by building an XTC with only two levels. , Where, for example, level 1 indicates the upper 20 bits, and each level 2 blocks indicates the lower 12 bits. According to this, each block in level 1 will be increased by a factor of 16, which can also provide a rough estimate of the overall growth of the data structure. And this can be combined with the idea of using “larger” digital characters at level 1 as described above. The most intuitive way to increase speed is to use XTC technology only at levels 2 and 3, while using direct addressing at level 1. This will remove a memory access operation. This section focuses on the idea of how to increase performance by consuming more memory. If the goal is to reduce the representation as much as possible, the anti-terms of these thoughts can be adopted. That is, "smaller" digital characters and more levels 41 This paper size applies to the Chinese National Standard (CNS) A4 specification (21〇X 297 public love) I -1 -------- ^ ------ --- (Please read the notes on the back before filling in this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 508926 A7 B7 V. Description of the invention (drawing) 〇 Obviously, the present invention can provide an improved IP Address look-up table method and system 'can fully meet the goals and advantages set by the previous disclosure. Although the present invention has been described in terms of specific embodiments, the alternatives, modification results, and changes in transformation are obvious to those skilled in the art. 42 This paper size applies to China National Standard (CNS) A4 (210 X 297 mm 7. I -------- ^, I -------- (Please read the precautions on the back before (Fill in this page)
Claims (1)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SE9903460A SE9903460L (en) | 1999-09-22 | 1999-09-22 | Method and system for fast routing lookups |
Publications (1)
Publication Number | Publication Date |
---|---|
TW508926B true TW508926B (en) | 2002-11-01 |
Family
ID=20417140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW089119541A TW508926B (en) | 1999-09-22 | 2000-09-21 | Method and system for efficient routing table compression and fast routing lookups |
Country Status (4)
Country | Link |
---|---|
AU (1) | AU7819300A (en) |
SE (1) | SE9903460L (en) |
TW (1) | TW508926B (en) |
WO (1) | WO2001022667A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8170694B2 (en) | 2005-11-14 | 2012-05-01 | Mitsubishi Electric Corporation | Network unit and programmable controller using the same |
TWI413910B (en) * | 2008-01-25 | 2013-11-01 | Univ Nat Taiwan | Data item interval indentifier lookup method and system |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1330190C (en) * | 2001-08-14 | 2007-08-01 | 中兴通讯股份有限公司 | Method for selecting route based on user' IP address route |
SE521907C2 (en) * | 2002-01-21 | 2003-12-16 | Rockstorm Technologies Ab | Method and system for fast IP route search to determine where an IP datagram with a given destination address should be forwarded |
CN101060482B (en) * | 2007-03-31 | 2011-02-02 | 华为技术有限公司 | A route search method and forwarding system |
US9361404B2 (en) | 2014-05-07 | 2016-06-07 | Red Hat Israel, Ltd. | Offline radix tree compression with key sequence skip |
US9442927B2 (en) | 2014-05-07 | 2016-09-13 | Red Hat Israel, Ltd. | Offline generation of compressed radix tree with key sequence skip |
CN106302181B (en) * | 2015-05-19 | 2020-06-26 | 中兴通讯股份有限公司 | Message forwarding configuration method and device of communication equipment and message forwarding method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SE511972C2 (en) * | 1997-09-09 | 2000-01-10 | Sics Swedish Inst Of Computers | Lookup device and method for classifying and forwarding data packets |
US6266706B1 (en) * | 1997-09-15 | 2001-07-24 | Effnet Group Ab | Fast routing lookup system using complete prefix tree, bit vector, and pointers in a routing table for determining where to route IP datagrams |
-
1999
- 1999-09-22 SE SE9903460A patent/SE9903460L/en not_active Application Discontinuation
-
2000
- 2000-09-21 TW TW089119541A patent/TW508926B/en active
- 2000-09-22 WO PCT/SE2000/001841 patent/WO2001022667A1/en active Application Filing
- 2000-09-22 AU AU78193/00A patent/AU7819300A/en not_active Abandoned
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8170694B2 (en) | 2005-11-14 | 2012-05-01 | Mitsubishi Electric Corporation | Network unit and programmable controller using the same |
TWI413910B (en) * | 2008-01-25 | 2013-11-01 | Univ Nat Taiwan | Data item interval indentifier lookup method and system |
Also Published As
Publication number | Publication date |
---|---|
SE9903460L (en) | 2001-03-23 |
SE9903460D0 (en) | 1999-09-22 |
WO2001022667A1 (en) | 2001-03-29 |
AU7819300A (en) | 2001-04-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6985483B2 (en) | Methods and systems for fast packet forwarding | |
JP4565793B2 (en) | Method and apparatus for longest match address lookup | |
US7433871B2 (en) | Efficient ipv4/ipv6 best matching prefix method and apparatus | |
TW494322B (en) | Prefix search method and data structure using compressed search tables | |
US7913060B2 (en) | Method and apparatus for physical width expansion of a longest prefix match lookup table | |
US6963924B1 (en) | IP routing lookup scheme and system for multi-gigabit switching routers | |
US7986696B1 (en) | Method and apparatus for longest prefix matching | |
US6266706B1 (en) | Fast routing lookup system using complete prefix tree, bit vector, and pointers in a routing table for determining where to route IP datagrams | |
US6633953B2 (en) | Range content-addressable memory | |
US5276868A (en) | Method and apparatus for pointer compression in structured databases | |
Waldvogel et al. | Scalable high-speed prefix matching | |
Huang et al. | A fast IP routing lookup scheme for gigabit switching routers | |
US6888838B1 (en) | Fast IP route lookup with configurable processor and compressed routing table | |
Warkhede et al. | Multiway range trees: scalable IP lookup with fast updates | |
US20040255045A1 (en) | IP address lookup method and hardware architecture using hashing | |
WO2009135417A1 (en) | The longest prefix match mehtod and device based on tree data structure | |
JP2003044335A (en) | Digital tree data structure | |
TW508926B (en) | Method and system for efficient routing table compression and fast routing lookups | |
US7478109B1 (en) | Identification of a longest matching prefix based on a search of intervals corresponding to the prefixes | |
CN112528094B (en) | Multi-field range TCAM coding method and system based on hierarchical mapping | |
TWI239476B (en) | Address search | |
Sun et al. | An on-chip IP address lookup algorithm | |
CN105700825B (en) | A kind of thumbnail storage method and apparatus based on android system | |
TW410292B (en) | Method and system applicable for routing data construction and IP route lookup of super high speed switching router | |
Erdem et al. | Value-coded trie structure for high-performance IPv6 lookup |