[go: up one dir, main page]

TW201810019A - Floating-point divider and method for operating floating-point divider - Google Patents

Floating-point divider and method for operating floating-point divider Download PDF

Info

Publication number
TW201810019A
TW201810019A TW105138802A TW105138802A TW201810019A TW 201810019 A TW201810019 A TW 201810019A TW 105138802 A TW105138802 A TW 105138802A TW 105138802 A TW105138802 A TW 105138802A TW 201810019 A TW201810019 A TW 201810019A
Authority
TW
Taiwan
Prior art keywords
quotient
remainder
value
divisor
floating
Prior art date
Application number
TW105138802A
Other languages
Chinese (zh)
Other versions
TWI606391B (en
Inventor
陳靜
張稚
Original Assignee
上海兆芯集成電路有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海兆芯集成電路有限公司 filed Critical 上海兆芯集成電路有限公司
Application granted granted Critical
Publication of TWI606391B publication Critical patent/TWI606391B/en
Publication of TW201810019A publication Critical patent/TW201810019A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/535Dividing only

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A floating-point divider operated based on first partial reminder, a divisor and a first quotient value to generate second partial reminder, and operated based on the second partial reminder, the divisor and second quotient value candidates to generate third partial reminder candidates. Based on a first quotient value look-up table, a second quotient value is obtained according to the second partial reminder and the divisor, and third quotient value candidates are obtained according to the third partial reminder candidates and the divisor. A first multiplexer outputs a third quotient value which is selected from the third quotient value candidates and corresponds to the second quotient value. The third quotient value is transformed to partial bits of the next-round quotient, or is output in this round of quotient calculation and used in prediction of the next-round quotient.

Description

浮點除法器以及浮點除法器操作方法 Floating-point divider and floating-point divider operation method

本案係關於浮點除法器(floating-point dividers)。 This case is about floating-point dividers.

浮點除法器需要反覆疊代進行多輪的商值計算。然而,面對大基數(radix)的設計需求,浮點除法器每輪計算出的商值具有相當多的位元數量,邏輯電路設計相當冗雜。 The floating-point divider needs to iterate repeatedly for multiple rounds of quotient calculation. However, in the face of large radix design requirements, the quotient calculated by each round of the floating-point divider has a considerable number of bits, and the logic circuit design is quite cumbersome.

本案提出一種浮點除法器,將多次查表獲得的短位元量商值在一輪運算中組合在一起,呈長位元量的結合商值輸出,其中各輪運算更包括預測下一輪運算所得的結合商值的部分位元。 This case proposes a floating-point divider that combines the short-bit quotient values obtained from multiple table lookups in one round of operation and outputs the combined quotient value of long-bit values, where each round of operations further includes prediction of the next round of operations The resulting bits of the combined quotient.

根據本案一種實施方式所實現一浮點除法器包括一當輪部分餘數產生器、一部分餘數模擬器、一第一商值表格以及一第一多工器。該當輪部分餘數產生器根據一第一部分餘數、一除數以及一第一商值,產生一第二部分餘數。該部分餘數模擬器,根據該第二部分餘數、該除數以及複數個第二商值待測值,產生複數個第三部分餘數候選。該第一商值表格經查詢,供應對應該第二部分餘數以及該除數的一第二商值。該第一商值表格更經查詢,供應對應該等第三部分餘數候選以及該除數的複數個第三商值候選。該第一多工器自該等第三商值候 選中選擇對應該第二商值者輸出,作為一第三商值。該第三商值用作下一輪運算的結合商值的部分位元、或是用作當輪之結合商值的部分位元但更用於預測下一輪運算所需內容。 A floating-point divider implemented according to an embodiment of the present invention includes a round remainder generator, a remainder simulator, a first quotient table, and a first multiplexer. The current round partial remainder generator generates a second partial remainder according to a first partial remainder, a divisor and a first quotient. The partial remainder simulator generates a plurality of third partial remainder candidates according to the second partial remainder, the divisor, and a plurality of second quotient values to be measured. The first quotient table is queried to provide a second quotient corresponding to the second part of the remainder and the divisor. The first quotient table is further queried to provide a plurality of third quotient candidates corresponding to the third partial remainder candidates and the divisor. The first multiplexer is from the third quotient Check and select the output corresponding to the second quotient, as a third quotient. The third quotient value is used as a part of the combined quotient value of the next round of operation, or as a part of the combined quotient value of the current round, but is more used to predict the content required for the next round of operation.

根據本案一種實施方式所實現的一種浮點除法器操作方法,用以操作包括一第一商值表格的一浮點除法器,包括:根據一第一部分餘數、一除數以及一第一商值,產生一第二部分餘數;根據該第二部分餘數、該除數以及複數個第二商值待測值,產生複數個第三部分餘數候選;查詢該第一商值表格,供應對應該第二部分餘數以及該除數的一第二商值;查詢該第一商值表格,供應對應該等第三部分餘數候選以及該除數的複數個第三商值候選;以及提供一第一多工器,自該等第三商值候選中選擇對應該第二商值者輸出,作為一第三商值。該第三商值用作下一輪運算的結合商值的部分位元、或是用作當輪之結合商值的部分位元但更用於預測下一輪運算所需內容。 A method for operating a floating-point divider implemented according to an embodiment of the present invention, for operating a floating-point divider including a first quotient table, includes: according to a first partial remainder, a divisor, and a first quotient , Generating a second partial remainder; generating a plurality of third partial remainder candidates according to the second partial remainder, the divisor, and a plurality of second quotient values to be measured; querying the first quotient table, the supply should correspond to the first A two-part remainder and a second quotient of the divisor; querying the first quotient table to supply the third-part remainder candidates and a plurality of third quotient candidates for the divisor; and providing a first multiple The worker selects the output corresponding to the second quotient from the third quotient candidates as a third quotient. The third quotient value is used as a part of the combined quotient value of the next round of operation, or as a part of the combined quotient value of the current round, but is more used to predict the content required for the next round of operation.

本案使得浮點除法器的一輪運算不只進行一次商值表格查詢。多次獲得的商值表格查詢結果可結合,在浮點除法器的一輪運算中作結合商值輸出。基數較大的浮點除法器在每輪運算所應輸出的長位元商值因而可由查表獲得的多個短位元數據結合。此外,本案浮點除法器的各輪運算更包括預測下一輪運算所輸出之結合商值的部分位元,其效率遠優於傳統浮點除法器架構。 In this case, a round of operation of the floating-point divider does not only perform a query of the quotient table. The query results of the quotient table obtained multiple times can be combined, and the combined quotient value is output in one operation of the floating-point divider. The long-bit quotient value that a floating-point divider with a large radix should output in each round of operation can therefore be combined with multiple short-bit data obtained by looking up a table. In addition, the rounds of operations of the floating-point divider in this case further include prediction of the bits of the combined quotient value output by the next round of operations, which is far superior to the traditional floating-point divider architecture.

下文特舉實施例,並配合所附圖示,詳細說明本發明內容。 The embodiments are exemplified below, and the accompanying drawings are used to describe the content of the present invention in detail.

200‧‧‧浮點除法器 200‧‧‧ floating-point divider

202‧‧‧當輪部分餘數產生器 202‧‧‧ Partial remainder generator

204‧‧‧部分餘數模擬器 204‧‧‧Partial Residual Simulator

206‧‧‧第一商值表格 206‧‧‧First Quotient Form

207‧‧‧第一多工器 207‧‧‧The first multiplexer

208‧‧‧第二商值表格以及第二多工器 208‧‧‧Second quotient form and second multiplexer

210‧‧‧商值轉換器 210‧‧‧Quotient Converter

212‧‧‧後續輪部分餘數產生器 212‧‧‧Partial remainder generator for subsequent rounds

400‧‧‧浮點除法器 400‧‧‧ floating-point divider

410‧‧‧部分餘數模擬器 410‧‧‧partial remainder simulator

420‧‧‧第一商值表格以及第一多工器 420‧‧‧ First quotient form and first multiplexer

430‧‧‧商值轉換器 430‧‧‧Quotient Converter

440‧‧‧後續輪部分餘數產生器 440‧‧‧Partial remainder generator for subsequent rounds

d‧‧‧除數 d‧‧‧Divisor

Q‧‧‧結合商數 Q‧‧‧Combined Quotient

q0…q3、q(i+1)、qa、qb、qc、qan‧‧‧商值 q0 ... q3, q (i + 1), qa, qb, qc, qan‧‧‧quotient

qp1…qpN‧‧‧第二/第三商值待測值 qp1… qpN‧‧‧Second / third quotient value to be measured

S1…S3、S(i+1)、Sa、Sb、San‧‧‧部分餘數 S1 ... S3, S (i + 1), Sa, Sb, San‧‧‧partial remainder

S302…S314、S502…S518‧‧‧步驟 S302 ... S314, S502 ... S518‧‧‧ steps

San1…SanN、Sc1…ScN、San11…San1N、…、SanN1…SanNN‧‧‧部分餘數候選 San1 ... SanN, Sc1 ... ScN, San11 ... San1N, ..., SanN1 ... SanNN‧‧‧Partial remainder candidates

qan1…qanN‧‧‧第三商值候選 qan1… qanN‧‧‧ third quotient candidate

w‧‧‧被除數 w‧‧‧ dividend

w0…w2、w(i+1)‧‧‧中間餘數 w0… w2, w (i + 1) ‧‧‧ intermediate remainder

第1A圖舉例說明除法運算的各運算元;第1B圖以及的1C圖以二維座標顯示商值表格;第2圖根據本案一種實施方式圖解一浮點除法器200;第3圖為流程圖,圖解第2圖浮點除法器200的操作方法,以提供一除法運算(w/d);第4圖根據本案另一種實施方式圖解一浮點除法器400;以及第5A、5B圖為流程圖,圖解第4圖浮點除法器400的操作方法,以提供一除法運算(w/d)。 Fig. 1A illustrates each operand of division operation; Fig. 1B and Fig. 1C display a quotient table in two-dimensional coordinates; Fig. 2 illustrates a floating-point divider 200 according to an embodiment of the present case; and Fig. 3 is a flowchart 2 illustrates the operation method of the floating-point divider 200 in FIG. 2 to provide a division operation (w / d); FIG. 4 illustrates a floating-point divider 400 according to another embodiment of the present case; and FIGS. 5A and 5B are flowcharts. FIG. 4 illustrates the operation method of the floating-point divider 400 of FIG. 4 to provide a division operation (w / d).

以下敘述列舉本發明的多種實施例。以下敘述介紹本發明的基本概念,且並非意圖限制本發明內容。實際發明範圍應依照申請專利範圍界定之。 The following description lists various embodiments of the present invention. The following description introduces the basic concepts of the present invention and is not intended to limit the present invention. The actual scope of the invention should be defined in accordance with the scope of the patent application.

第1A圖舉例說明一除法運算的各運算元,包括被除數w以及除數d,運算中依序獲得商值q0、q1、q2、q3。值得注意的是,這裡運算得到4個商值q0~q3僅為示例,本發明並不限於此,商值的數量由除數w何時被除數d除盡或者收斂決定,因此除法運算很可能獲得其它數量的商值,並不限於4個。本實施例採基數(radix)4,即每個時鐘週期產生2位元的商值。商值q0、q1、q2、q3運算期間需將中間餘數wi的小數點向右移位2位元(即4×wi),i為編號。本案將數值wi以及4×wi都稱為部分餘數(partial remainder),標號S(i+1)。商值q(i+1)可根據部分餘數S(i+1)與除數d以查表方式獲得。 FIG. 1A illustrates each operand of a division operation, including a dividend w and a divisor d. In the operation, quotient values q0, q1, q2, and q3 are sequentially obtained. It is worth noting that the four quotients q0 ~ q3 obtained by the operation here are just examples. The present invention is not limited to this. The number of quotients is determined by when the divisor w is divided by the divisor d or convergence, so the division operation is likely Obtain other quantities of quotient, not limited to four. In this embodiment, a radix 4 is adopted, that is, a quotient of 2 bits is generated every clock cycle. During the operation of the quotients q0, q1, q2, and q3, the decimal point of the intermediate remainder wi needs to be shifted to the right by 2 bits (that is, 4 × wi), and i is the number. In this case, both the value wi and 4 × wi are called partial remainders, and the label is S (i + 1). The quotient value q (i + 1) can be obtained by looking up the table according to the partial remainder S (i + 1) and the divisor d.

第1B圖以二維座標顯示一商值表格。一種查表方式係利用部分餘數4×wi(即S(i+1))查表,將部分餘數4×wi(即S(i+1))與除數d的各種倍數比較,即可獲得對應的商值q(i+1)線條。在商值q(i+1)線條上,呈現為除數d的一定倍數的部分餘數4×wi,在一定範圍內的商值q(i+1)相同,如第1B圖中,呈現為[-d,d]區間內的部分餘數4×wi對應商值q(i+1)=0。下面結合第1A圖具體說明如何查詢商值表格獲得對應的商值,例如部分餘數4×w0=1.110101B1.75D(其中B代表二進制數,D代表十進制數),除數d=1.101B1.625D,則部分餘數4×w0呈現為除數d的大約1.08倍,因此查詢第1B圖中的商值表格可知對應商值q1=1。部分餘數4×wi(即S(i+1))軸上更可設計多個臨界值,使得對應多條商值q(i+1)線條的部分餘數4×wi得以正確自該等商值q(i+1)線條選出正確對應者。第1C圖以另一種二維座標顯示一商值表格,其中是採用wi為部分餘數,即S(i+1)軸上的值係wi的值,利用部分餘數wi查表,將部分餘數wi與除數d的各種倍數比較,即可獲得對應的商值q(i+1)線條。第1B圖、或第1C之商值表格是用來根據部分餘數S(i+1)以及除數d查表獲得商值q(i+1)。以上商值表格概念可使用在各種基數的浮點除法器應用中。本實施例採基數(radix)4,即每個時鐘週期產生2位元的商值,如果每時鐘週期只能查詢一次商值表格,則商值的取值範圍為{-2,-1,0,1,2}。在採用其他基數的實施例中,例如採基數16,則每個時鐘週期產生4位元的商值,如果每時鐘週期只能查詢一次商值表格,則商值的取值範圍為{-15,-14,-13,-12,...-1,0,1,...12,13,14,15},即[-15,15],但本發 明並不限於此,採取不同的商值編碼方式時,商值的取值範圍會有所不同。浮點除法運算中查詢商值表格比較耗時,而且每次查表得到的商值位元數越多,則硬件開銷越大。因此本發明提出了一種一輪運算進行多次商值表格查詢的浮點除法器,即使採用硬件開銷較小的商值表格,舉例而言,即使採用每次查表僅能得到2位元的商值的表格(例如查詢圖1B的商值表格),一輪運算查詢兩次也可以得到4位元的商值,即實現基16,例如SRT-16,而不必採用硬件開銷較大的商值取值範圍為[-15,15]的商值表格。 Figure 1B shows a quotient table in two-dimensional coordinates. A table lookup method is to use a partial remainder 4 × wi (that is, S (i + 1)) to look up the table, and compare the partial remainder 4 × wi (that is, S (i + 1)) with various multiples of the divisor d to obtain Corresponding quotient q (i + 1) lines. On the line of the quotient q (i + 1), the remainder 4 × wi, which is a certain multiple of the divisor d, has the same quotient q (i + 1) within a certain range, as shown in Figure 1B, as [- d, d] Partial remainder 4 × wi in the interval corresponds to the quotient q (i + 1) = 0. The following describes in detail how to query the quotient value table to obtain the corresponding quotient value in conjunction with FIG. 1A, for example, the partial remainder 4 × w0 = 1.110101B 1.75D (where B represents a binary number and D represents a decimal number), the divisor d = 1.101B 1.625D, the partial remainder 4 × w0 appears to be approximately 1.08 times the divisor d, so querying the quotient table in Figure 1B shows that the corresponding quotient q1 = 1. Partial remainder 4 × wi (ie S (i + 1)) axis can be designed with multiple critical values, so that the partial remainder 4 × wi corresponding to multiple quotients q (i + 1) lines can be correctly derived from these quotients The q (i + 1) line selects the correct counterpart. Figure 1C shows a quotient table with another two-dimensional coordinate, in which wi is used as the partial remainder, that is, the value on the S (i + 1) axis is the value of wi. Compared with various multiples of the divisor d, the corresponding quotient q (i + 1) lines can be obtained. The quotient table in FIG. 1B or 1C is used to obtain a quotient value q (i + 1) according to a lookup table based on the partial remainder S (i + 1) and the divisor d. The above quotient table concept can be used in various radix floating-point divider applications. In this embodiment, a radix 4 is used, that is, a two-bit quotient is generated every clock cycle. If the quotient table can only be queried once per clock cycle, the range of the quotient is {-2, -1, 0,1,2}. In the embodiment using other cardinality, for example, using a cardinality of 16, a quotient of 4 bits is generated per clock cycle. If the quotient table can only be queried once per clock cycle, the value range of the quotient is {-15 , -14, -13, -12, ...- 1,0,1, ... 12,13,14,15}, that is, [-15,15], but the present invention is not limited to this, and adopts different When the quotient value encoding method is used, the value range of the quotient value will be different. It is time-consuming to query the quotient value table in the floating-point division operation, and the more quotient bits are obtained each time the table is looked up, the greater the hardware overhead. Therefore, the present invention proposes a floating-point divider that performs multiple rounds of quotient table query in one round of operation. Even if a quotient table with less hardware overhead is used, for example, only 2 digit quotients can be obtained even with each table lookup. A table of values (for example, querying the quotient table in Figure 1B). You can also get a 4-bit quotient value in two rounds of query operations, that is, to implement a base 16, such as SRT-16, without having to use a quotient with a large hardware overhead. A table of quotients with a value range of [-15,15].

本案使得浮點除法器的一輪運算不只進行一次商值表格查詢。多次獲得的商值表格查詢結果可結合,在浮點除法器的一輪運算中作結合商值輸出。基數較大的浮點除法器在每輪運算所應輸出的長位元商值因而可由查表獲得的短位元數據結合。此外,本案浮點除法器的各輪運算更包括預測下一輪運算所輸出之結合商值的部分位元,其效率遠優於傳統浮點除法器架構。 In this case, a round of operation of the floating-point divider does not only perform a query of the quotient table. The query results of the quotient table obtained multiple times can be combined, and the combined quotient value is output in one operation of the floating-point divider. The long-bit quotient value that a floating-point divider with a large radix should output in each round of operation can therefore be combined with the short-bit data obtained from the look-up table. In addition, the rounds of operations of the floating-point divider in this case further include prediction of the bits of the combined quotient value output by the next round of operations, which is far superior to the traditional floating-point divider architecture.

第2圖根據本案一種實施方式圖解一浮點除法器200,包括一當輪部分餘數產生器202、一部分餘數模擬器204、一第一商值表格206以及一第一多工器207、一第二商值表格以及一第二多工器(結合以方塊208表示)、一商值轉換器210、以及一後續輪部分餘數產生器212。 FIG. 2 illustrates a floating-point divider 200 according to an embodiment of the present case, including a round part remainder generator 202, a part remainder simulator 204, a first quotient table 206, a first multiplexer 207, a first Two quotient tables and a second multiplexer (combined with block 208), a quotient converter 210, and a subsequent round of partial residue generator 212.

該當輪部分餘數產生器202根據一第一部分餘數Sa、一除數d以及一第一商值qa產生一第二部分餘數Sb。該部分餘數模擬器204根據該第二部分餘數Sb、該除數d以及複數個 第二商值待測值qp1…qpN產生複數個第三部分餘數候選San1…SanN。該等第二商值待測值qp1…qpN可為第二商值qb的所有可能數值,舉例而言,qp1…qpN取值為圖1B或圖1C的商值表格中所有可能的商值。該第一商值表格206經查詢,供應對應該第二部分餘數Sb以及該除數d的一第二商值qb。該第一商值表格206更用於查詢供應對應該等第三部分餘數候選San1…SanN以及該除數d的複數個第三商值候選qan1…qanN,交由該第一多工器207根據該第二商值qb從該等第三商值候選qan1…qanN中選擇對應該第二商值qb的一個輸出,作為一第三商值qan,即選擇該第二商值qb(作為複數個第二商值待測值qp1…qpN之一)所對應的第三部分餘數候選(San1…SanN之一)所對應的第三商值候選(qan1…qanN之一)作為第三商值qan。特別是,該第二商值表格以及第二多工器(208)是在該浮點除法器200的一第一輪運算中使用,對應一被除數w以及該除數d供應上述第一商值qa以及該第一部分餘數Sa至該當輪部分餘數產生器202。如圖所示,商值轉換器210於各輪運算中,將各提供M位元資訊的該第一商值qa以及該第二商值qb轉換結合成為2M位元的結合商值Q,上述M為數值。至於該第三商值qan,此實施例係將之用作下一輪結合商值Q的部分位元。該第三商值qan將經方塊208內的該第二多工器切換供應作為下一輪運算使用的該第一商值qa。至於下一輪結合商值Q運算所需要的該第一部分餘數Sa,則是由該後續輪部分餘數產生器212提供。該後續輪部分餘數產生器212係根據該第二部分餘數Sb、該除數d以及該第二商值qb產生一第三部分餘數San,經方 塊208內的該第二多工器切換供應作為下一輪運算所需要的該第一部分餘數Sa。如前所述,第二商值表格以及第二多工器(208)僅在該浮點除法器200的第一輪運算中供被除數w以及除數d查詢獲得第一部分餘數Sa及第一商值qa使用;而後續輪的運算中,無需使用方塊208中的該第二商值表格,而是由方塊208中的該第二多工器直接選擇前一輪運算所得的第三商值qan作為本輪運算的第一商值qa,並且選擇前一輪運算所得的第三部分餘數San作為本輪運算的第一部分餘數Sa。 The current partial remainder generator 202 generates a second partial remainder Sb according to a first partial remainder Sa, a divisor d, and a first quotient qa. The partial remainder simulator 204 is based on the second partial remainder Sb, the divisor d, and a plurality of The second quotient values qp1 ... qpN generate a plurality of third part remainder candidates San1 ... SanN. The measured values of the second quotient values qp1 ... qpN can be all possible values of the second quotient value qb. For example, the values of qp1 ... qpN are all possible quotient values in the quotient value table of FIG. 1B or FIG. The first quotient table 206 is queried to provide a second quotient qb corresponding to the second partial remainder Sb and the divisor d. The first quotient table 206 is further used for querying and supplying a plurality of third quotient candidates qan1 ... qanN corresponding to the third partial remainder candidates San1 ... SanN and the divisor d, and the multiplexer 207 sends The second quotient qb selects an output corresponding to the second quotient qb from the third quotient candidates qan1 ... qanN as a third quotient qan, that is, the second quotient qb (as a plurality of The third quotient candidate (one of qan1 ... qanN) corresponding to the third partial remainder candidate (one of San1 ... SanN) corresponding to the second quotient value to be measured qp1 ... qpN) is used as the third quotient value qan. In particular, the second quotient table and the second multiplexer (208) are used in a first round operation of the floating-point divider 200, corresponding to a dividend w and the divisor d to supply the first The quotient qa and the first partial remainder Sa go to the current round partial remainder generator 202. As shown in the figure, the quotient value converter 210 converts and combines the first quotient value qa and the second quotient value qb that each provide M-bit information into a 2M-bit combined quotient value Q in each round of operations. M is a numerical value. As for the third quotient qan, this embodiment uses it as a part of the bits of the combined quotient Q in the next round. The third quotient qan will be switched and supplied by the second multiplexer in block 208 as the first quotient qa for the next round of calculation. As for the first part of the remainder Sa required for the next round of combined quotient Q operation, it is provided by the subsequent part of the remainder generator 212. The subsequent round partial remainder generator 212 generates a third partial remainder San based on the second partial remainder Sb, the divisor d, and the second quotient value qb. The second multiplexer in block 208 switches to supply the first partial remainder Sa required for the next round of operations. As mentioned above, the second quotient table and the second multiplexer (208) are used to query the dividend w and the divisor d in the first round of the floating-point divider 200 to obtain the first remainder Sa and the first A quotient qa is used; in subsequent calculations, the second quotient table in block 208 need not be used. Instead, the second multiplexer in block 208 directly selects the third quotient obtained in the previous calculation. qan is used as the first quotient value qa of the current round of operations, and the third part of the remainder San obtained from the previous round of operations is selected as the first part of the remainder Sa of this round of operations.

在一實施例中,該當輪部分餘數產生器202、該部分餘數模擬器204、以及該後續輪部分餘數產生器212都是基於r×wi-q(i+1)×d=w(i+1)運算而設計,其中r為中間餘數wi移位位元量。例如第1A圖的實施例中,r取值為4,w(i+1)=4×wi-q(i+1)×d,而部分餘數S(i+1)=4×wi,具體舉例而言,d=1.101B,並且根據第一部分餘數S1=4×w0=1.110101B查詢商值表格得到q1=1;則w1=4×w0-q1×d=1.110101B-1×1.101B=0.001101B,則第二部分餘數S2=4×w1=0.1101B。視部分餘數S(i+1)的不同定義方式(如,S(i+1)=r×wi或S(i+1)=wi),該當輪部分餘數產生器202、該部分餘數模擬器204以及該後續輪部分餘數產生器212的邏輯電路設計會相應調整。該當輪部分餘數產生器202、該部分餘數模擬器204以及該後續輪部分餘數產生器212可使用串行加法器、加法器、以及乘法器…等邏輯運算元件實現上述r×wi-q(i+1)×d=w(i+1)運算,使根據部分餘數S(i+1)(即r×wi或wi)、除數d以及商值q(i+1)輸出部分餘數S(i+2)(即r×w(i+1)或w(i+1))。第一商值表格206 也是視部分餘數定義而建立。 In one embodiment, the current round part remainder generator 202, the partial remainder simulator 204, and the subsequent round part remainder generator 212 are all based on r × wi-q (i + 1) × d = w (i + 1) Designed for operations, where r is the intermediate remainder wi shift bit amount. For example, in the embodiment of FIG. 1A, r has a value of 4, w (i + 1) = 4 × wi-q (i + 1) × d, and part of the remainder S (i + 1) = 4 × wi. Specifically, For example, d = 1.101B, and query the quotient table according to the first part of the remainder S1 = 4 × w0 = 1.110101B to get q1 = 1; then w1 = 4 × w0-q1 × d = 1.110101B-1 × 1.101B = 0.001101B, the remainder of the second part S2 = 4 × w1 = 0.1101B. Depending on the different definitions of the partial remainder S (i + 1) (for example, S (i + 1) = r × wi or S (i + 1) = wi), the current partial remainder generator 202 and the partial remainder simulator The logic circuit design of 204 and the subsequent round partial remainder generator 212 will be adjusted accordingly. The current round part remainder generator 202, the partial remainder simulator 204, and the subsequent round part remainder generator 212 may use serial adders, adders, multipliers, etc. to implement the above-mentioned r × wi-q (i +1) × d = w (i + 1) operation, so that the partial remainder S (is output according to the partial remainder S (i + 1) (that is, r × wi or wi), the divisor d, and the quotient value q (i + 1) i + 2) (i.e. r × w (i + 1) or w (i + 1)). First quotient form 206 It is also established based on the definition of some remainders.

以基數256為例,浮點除法器200各輪運算應當輸出的結合商值Q為8位元,其中較高4位元由第一商值qa提供,較低4位元由第二商值qb提供。4位元的商值運算遠較8位元硬件開銷小且簡易,其中對中間餘數wi的位移量僅24位元,遠低於傳統浮點除法器架構所需要的28位元。此外,關於基數256的浮點除法器200架構,第二商值待測值qp1…qpN可設定為{-15,-14,-13,-12,...-1,0,1,...12,13,14,15}如此31個數值,以估算出31個第三部分餘數候選。當然,本發明並不限於關於基數256的商值範圍為[-15,15],採取不同的商值編碼方式時,商值的取值範圍會有所不同,為[-N,N]一共2N+1个數值,其中N{8,9,10,11,12,13,14,15}。 Taking the base 256 as an example, the combined quotient value Q that each round of operations of the floating-point divider 200 should output is 8 bits, in which the higher 4 bits are provided by the first quotient qa and the lower 4 bits are provided by the second quotient. qb provided. The 4-bit quotient calculation is much less expensive and simpler than the 8-bit hardware. The displacement of the intermediate remainder wi is only 24 bits, which is far lower than the 28 bits required by the traditional floating-point divider architecture. In addition, regarding the architecture of the floating-point divider 200 with a base of 256, the second quotient values to be measured qp1 ... qpN can be set to {-15, -14, -13, -12, ...- 1,0,1 ,. ..12,13,14,15} so 31 values to estimate 31 candidates for the third part of the remainder. Of course, the present invention is not limited to the quotient range of the base 256 being [-15,15]. When different quotient encoding methods are adopted, the range of the quotient value will be different, which is [-N, N] in total. 2N + 1 values, where N {8,9,10,11,12,13,14,15}.

第3圖為流程圖,圖解第2圖浮點除法器200的操作方法,以提供一除法運算(w/d)。 FIG. 3 is a flowchart illustrating the operation method of the floating-point divider 200 of FIG. 2 to provide a division operation (w / d).

步驟S302接收被除數w與除數d,據以查詢方塊208內的第二商值表格獲得第一商值qa。步驟S304操作該當輪部分餘數產生器202根據被除數w(作為第一輪結合商值Q運算的第一部分餘數Sa)、除數d以及第一商值qa產生第二部分餘數Sb。步驟S306操作該部分餘數模擬器204根據第二部分餘數Sb、除數d以及第二商值待測值qp1…qpN產生第三部分餘數候選San1…SanN。步驟S308根據第二部分餘數Sb以及除數d,查詢第一商值表格206獲得第二商值qb。步驟S310根據第三部分餘數候選San1…SanN以及除數d,查詢第一商值表格206獲得第三商值候選qan1…qanN,交由第一多工器207根據步驟S308產生 的第二商值qb從該等第三商值候選qan1…qanN中選擇對應該第二商值qb的一個輸出,作為第三商值qan。步驟S312操作後續輪部分餘數產生器212根據第二部分餘數Sb、除數d以及第二商值qb產生第三部分餘數San。步驟S314中,上述第三商值qan以及第三部分餘數San經方塊208內的該第二多工器交由該當輪部分餘數產生器202分別作為浮點除法器200新一輪運算所需的第一商值qa以及第一部分餘數Sa,即是說,上一輪運算產生的第三商值qan作為新一輪運算所需的第一商值qa,上一輪運算產生的第三部分餘數San作為新一輪運算所需的第一部分餘數Sa,據以產生該新一輪運算的第二部分餘數Sb,進而流程重回步驟S306。第3圖所示流程可循環運作直至部分餘數位元數不足。所揭露之除法流程將在各輪運算中取得第一商值qa以及第二商值qb,轉換結合為結合商值Q。不同輪運算獲得的所有結合商值Q將再結合成為除法運算w/d的結果。其他實施方式中,步驟S308可以安排在步驟S306之前,或是安排在步驟S310之中,即步驟S306和步驟S308不分先後順序。 Step S302 receives the dividend w and the divisor d, and obtains the first quotient qa according to the second quotient table in the query block 208. Step S304 operates the current round partial remainder generator 202 to generate a second partial remainder Sb according to the dividend w (the first partial remainder Sa calculated as the first round combined quotient value Q), the divisor d, and the first quotient qa. Step S306 operates the partial remainder simulator 204 to generate a third partial remainder candidate San1 ... SanN according to the second partial remainder Sb, the divisor d, and the second quotient values to be measured qp1 ... qpN. Step S308 queries the first quotient table 206 to obtain the second quotient qb according to the second partial remainder Sb and the divisor d. Step S310 queries the first quotient table 206 to obtain the third quotient candidates qan1 ... qanN according to the third part of the remaining candidate candidates San1 ... SanN and the divisor d, and passes them to the first multiplexer 207 to generate according to step S308. The second quotient value qb is selected from the third quotient value candidates qan1 ... qanN as an output corresponding to the second quotient value qb as the third quotient value qan. Step S312 operates the subsequent-round partial remainder generator 212 to generate a third partial remainder San based on the second partial remainder Sb, the divisor d, and the second quotient value qb. In step S314, the third quotient qan and the third part remainder San are passed to the current round part remainder generator 202 via the second multiplexer in block 208, respectively, and are used as the first round required for the new round of operation of the floating-point divider 200. A quotient qa and the first part of the remainder Sa, that is, the third quotient value qan generated in the previous operation is used as the first quotient qa required for the new operation, and the third part of the remainder San generated in the previous operation is used as the new The first part of the remainder Sa required for the operation is used to generate the second part of the remainder Sb for the new round of operation, and the flow returns to step S306. The process shown in Figure 3 can be cyclically operated until some of the remaining bits are insufficient. The disclosed division process will obtain the first quotient value qa and the second quotient value qb in each round of operation, and convert and combine them into a combined quotient value Q. All the combined quotients Q obtained in different rounds of operation will be recombined into the result of the division operation w / d. In other embodiments, step S308 may be arranged before step S306, or may be arranged in step S310, that is, step S306 and step S308 are not in any order.

第4圖根據本案另一種實施方式圖解一浮點除法器400,相較於浮點除法器200對應修正提供部分餘數模擬器410、第一商值表格以及第一多工器(結合以方塊420表示)、商值轉換器430、以及後續輪部分餘數產生器440,使每輪運算所獲得的結合商值Q是由三個商值qa、qb以及qc結合轉換成。 FIG. 4 illustrates a floating-point divider 400 according to another embodiment of the present case. Compared with the floating-point divider 200, a partial remainder simulator 410, a first quotient table, and a first multiplexer (combined with block 420) Representation), quotient value converter 430, and subsequent round part remainder generator 440, so that the combined quotient value Q obtained by each round of operation is converted from three quotient values qa, qb, and qc.

部分餘數模擬器410除了根據該第二部分餘數Sb、該除數d以及複數個第二商值待測值qp1…qpN產生複數個第三部分餘數候選Sc1…ScN,更根據該等第三部分餘數候選 Sc1…ScN、該除數d以及複數個第三商值待測值(此例同樣為qp1…qpN)產生複數個第四部分餘數候選San11…San1N、…、SanN1…SanNN。方塊420內的該第一商值表格經查詢,供應對應該第二部分餘數Sb以及該除數d的一第二商值qb;方塊420內的該第一商值表格更被查詢,對應該等第三部分餘數候選Sc1…ScN以及該除數d供應複數個第三商值候選qc1…qcN(圖未示出)交由方塊420內的第一多工器根據第二商值qb從該等第三商值候選qc1…qcN中選擇對應該第二商值qb的一個輸出為一第三商值qc,即先選擇該第二商值qb(作為複數個第二商值待測值qp1…qpN之一)所對應的第三部分餘數候選(Sc1…ScN之一)所對應的第三商值候選(qc1…qcN之一)作為第三商值qc。此外,方塊420內的第一商值表格更被查詢,根據該等(N×N個)第四部分餘數候選San11…San1N、…、SanN1…SanNN以及該除數d,供應複數個第四商值候選qan11…qan1N、…、qanN1…qanNN(圖未示出),交由方塊420內的第一多工器對應該第二商值qb以及該第三商值qc擇一作為一第四商值qan輸出。具體舉例而言,方塊420內的第一多工器根據查表所得的第二商值qb選擇該第二商值qb(作為複數個第二商值待測值qp1…qpN之一)所對應的第三部分餘數候選(Sc1…ScN之一)所對應那N個第四部分餘數候選(San11…San1N、…、SanN1…SanNN中的一組,例如為Sani1…SaniN);再根據查表所得的第三商值qc從前述所選擇的那N個第四部分餘數候選(如前為Sani1…SaniN)中選擇該第三商值qc(作為複數個第三商值待測值,同樣為qp1…qpN之一)所對應的第四 部分餘數候選(為Sani1…SaniN之一)所對應的那個第四商值候選(為qani1…qaniN之一)作為第四商值qan輸出。在其他實施方式中,第二商值qb可更輸入該部分餘數模擬器410,使該部分餘數模擬器410不再冗餘提供該等第三部分餘數候選Sc1…ScN中以及該等第四部分餘數候選San11…San1N、…、SanN1…SanNN中不對應該第二商值qb者。 The partial remainder simulator 410 generates a plurality of third partial remainder candidates Sc1 ... ScN based on the second partial remainder Sb, the divisor d and a plurality of second quotient values to be measured qp1 ... qpN. Remainder candidate Sc1 ... ScN, the divisor d, and a plurality of third quotient values to be measured (this example is also qp1 ... qpN) generate a plurality of fourth part remainder candidates San11 ... San1N, ..., SanN1 ... SanNN. After querying the first quotient table in block 420, a second quotient value qb corresponding to the second part remainder Sb and the divisor d is supplied; the first quotient table in block 420 is further queried, corresponding to Wait for the third part of the remainder candidates Sc1 ... ScN and the divisor d to supply a plurality of third quotient candidates qc1 ... qcN (not shown in the figure) to the first multiplexer in block 420 from this second quotient qb from the After the third quotient candidate qc1 ... qcN is selected, an output corresponding to the second quotient value qb is selected as a third quotient value qc, that is, the second quotient value qb is selected first (as a plurality of second quotient values to be measured qp1). The third quotient candidate (one of qc1 ... qcN) corresponding to the third partial remainder candidate (one of Sc1 ... ScN) corresponding to one of qpN) is used as the third quotient value qc. In addition, the first quotient table in block 420 is further queried. According to the (N × N) fourth part remainder candidates San11 ... San1N, ..., SanN1 ... SanNN and the divisor d, a plurality of fourth quotients are supplied. The value candidates qan11 ... qan1N, ..., qanN1 ... qanNN (not shown) are assigned to the first multiplexer in block 420 corresponding to the second quotient value qb and the third quotient value qc as a fourth quotient. The value qan is output. Specifically, for example, the first multiplexer in block 420 selects the second quotient value qb (as one of the plurality of second quotient values to be measured qp1 ... qpN) according to the second quotient value qb obtained from the look-up table. Corresponding to the N fourth part remainder candidates (San11 ... San1N, ..., SanN1 ... SanNN, for example, Sani1 ... SaniN); then according to the table The third quotient value qc is selected from the N selected fourth partial remainder candidates (such as Sani1 ... SaniN) as the third quotient value qc (as a plurality of third quotient values to be measured, which is also qp1 ... the fourth corresponding to qpN) The fourth quotient candidate (which is one of qani1 ... qaniN) corresponding to the partial remainder candidate (which is one of Sani1 ... SaniN) is output as the fourth quotient value qan. In other embodiments, the second quotient value qb may be further input to the partial remainder simulator 410, so that the partial remainder simulator 410 no longer redundantly provides the third partial remainder candidates Sc1 ... ScN and the fourth partial The remaining candidates San11 ... San1N, ..., SanN1 ... SanNN do not correspond to the second quotient qb.

至於該商值轉換器430,係設計於各輪運算中,將各提供M位元資訊的該第一商值qa、該第二商值qb以及該第三商值qc轉換結合成為3M位元的結合商值Q,上述M為數值。以基數29為例,浮點除法器400可在各輪運算中產生9位元的結合商值Q,是由3位元的第一商值qa、3位元的第二商值qb以及3位元的第三商值qc結合轉換而得。 As for the quotient converter 430, it is designed in each round of operation to convert the first quotient value qa, the second quotient value qb, and the third quotient value qc, which provide M-bit information, into 3M bits. The combined quotient Q is the value of M. Taking radix 2 9 as an example, the floating-point divider 400 can generate a 9-bit combined quotient value Q in each round of operation, which is a 3-bit first quotient value qa, a 3-bit second quotient value qb, and The 3 digit third quotient qc is combined with the conversion.

後續輪部分餘數產生器440動作如下。根據該第二部分餘數Sb、該除數d以及該第二商值qb,該後續輪部分餘數產生器440產生一第三部分餘數Sc(於方塊440內部,圖未示出),且更根據該第三部分餘數Sc(圖未示出)、該除數d以及該第三商值qc,產生一第四部分餘數San。浮點除法器400產生的第四商值qan以及第四部分餘數San是由方塊208內的該第二多工器於該浮點除法器400的第一輪運算後,切換輸出作下一輪運算所需的上述第一商值qa以及第一部分餘數Sa。相較於浮點除法器200,浮點除法器400產生的第三商值qc是用作當輪之結合商值Q的部分位元,但更用於預測下一輪運算所需內容(例如,qan與San係基於qc獲得)。相較於浮點除法器200,浮點除法器400在同一輪運算中,並行進行了3次商值表格查詢的動 作,其中部分餘數模擬器410進行運算產生N個第三部分餘數候選Sc1…ScN,又接著根據所產生的N個第三部分餘數候選Sc1…ScN進行嵌套運算產生N×N個第四部分餘數候選San11…San1N、…、SanN1…SanNN,由確定的qb和qc作為方塊420中第一多工器中的多工器邏輯的選擇信號,從N×N個第四部分餘數候選San11…San1N、…、SanN1…SanNN對應的N×N個q值中選擇的一個作為qan輸出。第4圖的實施例將比較耗時的輸出qb、qc和qan的三次商值表格查詢操作並列進行,使其得以在同一輪運算中完成,較先前技術之必須等待第一輪查表得第二商值qb之後,再由第二商值qb計算第三部分餘數Sc以進行第二輪查表得由第三商值qc,之後再由第三商值qc計算第四部分餘數San以進行第三輪查表得qan,耗時大大降低。 The operation of the remainder generator 440 in the subsequent rounds is as follows. Based on the second partial remainder Sb, the divisor d, and the second quotient value qb, the subsequent round partial remainder generator 440 generates a third partial remainder Sc (inside block 440, not shown in the figure), and more The third partial remainder Sc (not shown in the figure), the divisor d and the third quotient value qc generate a fourth partial remainder San. The fourth quotient qan and the fourth partial remainder San generated by the floating-point divider 400 are switched by the second multiplexer in block 208 after the first round of operations of the floating-point divider 400, and the next round of operations is switched. The required first quotient qa and the first partial remainder Sa. Compared with the floating-point divider 200, the third quotient qc generated by the floating-point divider 400 is used as part of the combined quotient value Q of the current round, but is more used to predict the content required for the next round of operations (for example, qan and San were obtained based on qc). Compared to the floating-point divider 200, the floating-point divider 400 performs three operations of querying the quotient table in parallel in the same round of operations. In which, the partial remainder simulator 410 performs operations to generate N third partial remainder candidates Sc1 ... ScN, and then performs nested operations based on the generated N third partial remainder candidates Sc1 ... ScN to generate N × N fourth parts Residual candidates San11 ... San1N, ..., SanN1 ... SanNN, with the determined qb and qc as the selection signals of the multiplexer logic in the first multiplexer in block 420, from N × N fourth partial remainder candidates San11 ... San1N , ..., SanN1 ... SanNN selects one of the N × N q values corresponding to as the qan output. The embodiment of FIG. 4 performs the query operations of the three quotient tables of the time-consuming outputs qb, qc, and qan side by side so that they can be completed in the same round of calculations. Compared with the prior art, it must wait for the first round of table lookups to obtain the first After the second quotient value qb, the third quotient value Sc is calculated by the second quotient value qb for the second round of table lookup to obtain the third quotient value qc, and then the fourth quotient value San is calculated by the third quotient value qc. The third round of table lookup was qan, which greatly reduced the time consuming.

第5A、5B圖為流程圖,圖解第4圖浮點除法器400的操作方法,以提供一除法運算(w/d)。 5A and 5B are flowcharts illustrating the operation method of the floating-point divider 400 in FIG. 4 to provide a division operation (w / d).

步驟S502接收被除數w與除數d,據以查詢方塊208內的第二商值表格獲得第一商值qa。步驟S504操作該當輪部分餘數產生器202根據被除數w(作為第一輪結合商值Q運算的第一部分餘數Sa)、除數d以及第一商值qa產生第二部分餘數Sb。步驟S506操作該部分餘數模擬器410根據第二部分餘數Sb、除數d以及第二商值待測值qp1…qpN產生第三部分餘數候選Sc1…ScN。步驟S508再次操作該部分餘數模擬器410根據第三部分餘數候選Sc1…ScN、除數d以及第三商值待測值(此例同為qp1…qpN)產生第四部分餘數候選San11…San1N、…、SanN1…SanNN。步驟S510根據第二部分餘數Sb以及除數d,查詢方塊 420內的第一商值表格獲得第二商值qb。步驟S512根據第三部分餘數候選Sc1…ScN以及除數d,查詢方塊420內的第一商值表格獲得第三商值候選qc1…qcN,交由方塊420內的第一多工器根據步驟S510產生的第二商值qb從該等第三商值候選qc1…qcN中選擇對應該第二商值qb的一個輸出,作為第三商值qc。步驟S514根據第四部分餘數候選San11…San1N、…、SanN1…SanNN(N×N個)以及除數d,查詢方塊420內的第一商值表格獲得第四商值候選qan11…qan1N、…、qanN1…qanNN(N×N個),交由方塊420內的第一多工器選擇對應第二以及第三商值qb與qc者輸出,作為第四商值qan。步驟S516操作後續輪部分餘數產生器440根據第二部分餘數Sb、除數d以及第二商值qb產生第三部分餘數Sc(於方塊440內部),且更根據該第三部分餘數Sc、該除數d以及該第三商值qc,產生第四部分餘數San。步驟S518中,上述第四商值qan以及第四部分餘數San經方塊208內的該第二多工器交由該當輪部分餘數產生器202分別作為浮點除法器400新一輪運算所需的第一商值qa以及第一部分餘數Sa,據以產生該新一輪運算的第二部分餘數Sb,進而流程重回步驟S506。第5A、5B圖所示流程可循環運作直至部分餘數位元數不足。所揭露之除法流程將在各輪運算中取得第一商值qa、第二商值qb以及第三商值qc,操作商值轉換器430轉換結合為結合商值Q。不同輪運算獲得的所有結合商值Q將再結合成為除法運算w/d的結果。其他實施方式中,步驟S510與S512可微調至前或後步驟。 Step S502 receives the dividend w and the divisor d, and obtains the first quotient qa by querying the second quotient table in the block 208. Step S504 operates the current round partial remainder generator 202 to generate a second partial remainder Sb according to the dividend w (the first partial remainder Sa calculated as the first round combined quotient value Q), the divisor d, and the first quotient qa. Step S506 operates the partial remainder simulator 410 to generate a third partial remainder candidate Sc1 ... ScN according to the second partial remainder Sb, the divisor d, and the second quotient value to be measured qp1 ... qpN. Step S508 operates the partial remainder simulator 410 again to generate the fourth partial remainder candidates San11 ... San1N, based on the third partial remainder candidates Sc1 ... ScN, the divisor d, and the third quotient value to be measured (the same example is qp1 ... qpN). ..., SanN1 ... SanNN. Step S510: query the block based on the second part of the remainder Sb and the divisor d The first quotient table in 420 obtains the second quotient qb. Step S512 queries the first quotient table in block 420 to obtain the third quotient candidates qc1 ... qcN according to the third part of the remaining candidate Sc1 ... ScN and the divisor d, and passes it to the first multiplexer in block 420 according to step S510 The generated second quotient value qb selects an output corresponding to the second quotient value qb from the third quotient value candidates qc1 ... qcN as the third quotient value qc. In step S514, the fourth quotient candidates qan11 ... qan1N, ..., according to the fourth part of the remaining candidate candidates San11 ... San1N, ..., SanN1 ... SanNN (N × N) and the divisor d are searched for the first quotient value table in the block 420. qanN1... qanNN (N × N) are selected by the first multiplexer in block 420 and corresponding to the second and third quotients qb and qc are output as the fourth quotient qan. Step S516 operates the subsequent partial remainder generator 440 to generate a third partial remainder Sc (within block 440) based on the second partial remainder Sb, the divisor d, and the second quotient value qb, and further according to the third partial remainder Sc, the The divisor d and the third quotient qc produce a fourth partial remainder San. In step S518, the fourth quotient qan and the fourth partial remainder San are passed to the current round partial remainder generator 202 via the second multiplexer in block 208, respectively, and are used as the first round required by the new round of floating-point divider 400 operation. A quotient qa and the first part remainder Sa are used to generate the second part remainder Sb of the new round of operation, and the flow returns to step S506. The processes shown in Figures 5A and 5B can be cyclically operated until some of the remaining bits are insufficient. The disclosed division process will obtain the first quotient value qa, the second quotient value qb, and the third quotient value qc in each round of operation, and the operation quotient converter 430 converts and combines the combined quotient value Q. All the combined quotients Q obtained in different rounds of operation will be recombined into the result of the division operation w / d. In other embodiments, steps S510 and S512 can be fine-tuned to the front or back steps.

在其他實施方式中,部分餘數模擬器所可以模擬 的商值數量,可不只於第2圖所示之一個(qan)或第4圖所示之兩個(qc與qan)。依照上述同樣概念,部分餘數模擬器甚至可模擬多於兩個的商值。 In other embodiments, part of the remainder simulator can simulate The number of quotients can be more than one (qan) shown in Figure 2 or two (qc and qan) shown in Figure 4. Following the same concept as above, some remainder simulators can even simulate more than two quotients.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟悉此項技藝者,在不脫離本發明之精神和範圍內,當可做些許更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the preferred embodiment as above, it is not intended to limit the present invention. Anyone skilled in the art can make some modifications and retouching without departing from the spirit and scope of the present invention. The scope of protection shall be determined by the scope of the attached patent application.

200‧‧‧浮點除法器 200‧‧‧ floating-point divider

202‧‧‧當輪部分餘數產生器 202‧‧‧ Partial remainder generator

204‧‧‧部分餘數模擬器 204‧‧‧Partial Residual Simulator

206‧‧‧第一商值表格 206‧‧‧First Quotient Form

207‧‧‧第一多工器 207‧‧‧The first multiplexer

208‧‧‧第二商值表格以及第二多工器 208‧‧‧Second quotient form and second multiplexer

210‧‧‧商值轉換器 210‧‧‧Quotient Converter

212‧‧‧後續輪部分餘數產生器 212‧‧‧Partial remainder generator for subsequent rounds

d‧‧‧除數 d‧‧‧Divisor

Q‧‧‧結合商數 Q‧‧‧Combined Quotient

qa、qb、qan‧‧‧第一、第二、第三商值 qa, qb, qan‧‧‧‧ the first, second and third quotients

qp1…qpN‧‧‧第二商值待測值 qp1… qpN‧‧‧Second quotient value to be measured

qan1…qanN‧‧‧第三商值候選 qan1… qanN‧‧‧ third quotient candidate

Sa、Sb、San‧‧‧第一、第二、第三部分餘數 Sa, Sb, San‧‧‧‧ remainder of the first, second and third parts

San1…SanN‧‧‧第三部分餘數候選 San1 ... SanN‧‧‧ Part III Remaining Candidate

w‧‧‧被除數 w‧‧‧ dividend

Claims (16)

一種浮點除法器,包括:一當輪部分餘數產生器,根據一第一部分餘數、一除數以及一第一商值,產生一第二部分餘數;一部分餘數模擬器,根據該第二部分餘數、該除數以及複數個第二商值待測值,產生複數個第三部分餘數候選;以及一第一商值表格以及一第一多工器,其中:該第一商值表格經查詢,供應對應該第二部分餘數以及該除數的一第二商值;該第一商值表格更經查詢,供應對應該等第三部分餘數候選以及該除數的複數個第三商值候選;且該第一多工器自該等第三商值候選中選擇對應該第二商值者輸出,作為一第三商值。 A floating-point divider includes: a round partial remainder generator that generates a second partial remainder based on a first partial remainder, a divisor, and a first quotient; a partial remainder simulator based on the second partial remainder , The divisor and a plurality of second quotient values to be measured to generate a plurality of third partial remainder candidates; and a first quotient value table and a first multiplexer, wherein: the first quotient value table is queried, The supply corresponds to the second part of the remainder and a second quotient of the divisor; the first quotient table is further queried to supply the third part of the remainder candidates and the plurality of third quotient candidates of the divisor; And the first multiplexer selects the output corresponding to the second quotient from the third quotient candidates as a third quotient. 如申請專利範圍第1項所述之浮點除法器,其中該第一多工器選擇以該第二商值於上述複數個第二商值待測值之中對應者所對應的上述第三部分餘數候選所對應的上述第三商值候選作為上述第三商值。 The floating-point divider according to item 1 of the scope of patent application, wherein the first multiplexer selects the third corresponding to the third quotient among the plurality of second quotient values to be measured. The third quotient candidate corresponding to the partial remainder candidate is used as the third quotient. 如申請專利範圍第1項所述之浮點除法器,更包括一第二商值表格,其中:在該浮點除法器的一第一輪運算中,該第二商值表格經查詢,對應一被除數以及該除數供應上述第一商值;且上述第一輪運算中,該被除數係用作該第一部分餘數輸入該當輪部分餘數產生器。 The floating-point divider described in item 1 of the patent application scope further includes a second quotient table, in which, in a first round operation of the floating-point divider, the second quotient table is queried and corresponds to A dividend and the divisor supply the above-mentioned first quotient; and in the above-mentioned first round of operation, the dividend is used as the first-part remainder input to the current-part remainder generator. 如申請專利範圍第1項所述之浮點除法器,更包括:一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值以及該第二商值轉換結合成為2M個位元的商值,上述M為數值。 The floating-point divider described in item 1 of the scope of patent application, further includes: a quotient converter, which provides the first quotient value and the second quotient value of M bits of information in each round of operation. The combination is converted into a quotient of 2M bits, where M is a value. 如申請專利範圍第1項所述之浮點除法器,更包括:一後續輪部分餘數產生器,根據該第二部分餘數、該除數以及該第二商值,產生一第三部分餘數;以及一第二多工器,切換輸出該第三商值作為上述第一商值,並輸出該第三部分餘數為上述第一部分餘數。 The floating-point divider according to item 1 of the scope of patent application, further comprising: a subsequent round of partial remainder generators, which generates a third partial remainder based on the second partial remainder, the divisor, and the second quotient; And a second multiplexer, switching to output the third quotient value as the first quotient value, and outputting the third part remainder as the first part remainder. 如申請專利範圍第1項所述之浮點除法器,其中:該部分餘數模擬器更根據該等第三部分餘數候選中對應該第二商值者、該除數以及複數個第三商值待測值,產生複數個第四部分餘數候選;該第一商值表格更經查詢,供應對應該等第四部分餘數候選以及該除數的複數個第四商值候選;且該第一多工器更自該等第四商值候選中選擇對應該第三商值者輸出,作為一第四商值。 The floating-point divider according to item 1 of the scope of patent application, wherein: the remainder simulator of the part is further based on the third part of the remainder candidates corresponding to the second quotient, the divisor, and a plurality of third quotients The measured value generates a plurality of fourth-part remainder candidates; the first quotient value table is further queried to supply the plurality of fourth-part remainder candidates corresponding to the fourth-part remainder candidates and the divisor; and the first plurality The worker further selects the output corresponding to the third quotient from these fourth quotient candidates as a fourth quotient. 如申請專利範圍第1項所述之浮點除法器,更包括:一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值、該第二商值以及該第三商值轉換結合成為3M個位元的商值,上述M為數值。 The floating-point divider described in item 1 of the scope of patent application, further includes: a quotient converter, which provides the first quotient value and the second quotient value of M bits of information in each round of operation. And the third quotient conversion is combined into a quotient of 3M bits, where M is a numerical value. 如申請專利範圍第6項所述之浮點除法器,更包括:一後續輪部分餘數產生器,根據該第二部分餘數、該除數以及該第二商值產生一第三部分餘數,且更根據該第三部 分餘數、該除數以及該第三商值,產生一第四部分餘數;以及一第二多工器,切換輸出該第四商值作為上述第一商值,並輸出該第四部分餘數為上述第一部分餘數。 The floating-point divider according to item 6 of the scope of patent application, further comprising: a subsequent round of partial remainder generators, generating a third partial remainder based on the second partial remainder, the divisor, and the second quotient, and More according to the third part The remainder, the divisor, and the third quotient value generate a fourth partial remainder; and a second multiplexer switches the fourth quotient value as the first quotient and outputs the fourth partial remainder as The remainder of the first part above. 一種浮點除法器操作方法,用以操作包括一第一商值表格的一浮點除法器,包括:根據一第一部分餘數、一除數以及一第一商值,產生一第二部分餘數;根據該第二部分餘數、該除數以及複數個第二商值待測值,產生複數個第三部分餘數候選;查詢該第一商值表格,供應對應該第二部分餘數以及該除數的一第二商值;查詢該第一商值表格,供應對應該等第三部分餘數候選以及該除數的複數個第三商值候選;以及提供一第一多工器,自該等第三商值候選中選擇對應該第二商值者輸出,作為一第三商值。 A floating-point divider operation method for operating a floating-point divider including a first quotient table, comprising: generating a second partial remainder according to a first partial remainder, a divisor, and a first quotient; According to the second part remainder, the divisor, and a plurality of second quotient values to be measured, a plurality of third part remainder candidates are queried; the first quotient table is queried to supply the corresponding second part remainder and the divisor. A second quotient value; querying the first quotient value table, supplying a plurality of third quotient value candidates corresponding to the third partial remainder candidates and the divisor; and providing a first multiplexer from the third Among the quotient candidates, the output corresponding to the second quotient is selected as a third quotient. 如申請專利範圍第9項所述之浮點除法器操作方法,其中操作該第一多工器選擇以該第二商值於上述複數個第二商值待測值之中對應者所對應的上述第三部分餘數候選所對應的上述第三商值候選作為上述第三商值。 The method of operating a floating-point divider as described in item 9 of the scope of patent application, wherein operating the first multiplexer selects the corresponding one of the second quotient values among the plurality of second quotient values to be measured corresponding to the second quotient value. The third quotient candidate corresponding to the third partial remainder candidate is used as the third quotient. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:提供一第二商值表格;在該浮點除法器的一各輪運算中,查詢該第二商值表格, 對應一被除數以及該除數供應上述第一商值;以及在上述第一輪運算中,將該被除數作為該第一部分餘數。 The method for operating a floating-point divider as described in item 9 of the scope of the patent application, further includes: providing a second quotient table; in each round of operations of the floating-point divider, querying the second quotient table, The first quotient is supplied corresponding to a dividend and the divisor; and in the first round of operation, the dividend is used as the first partial remainder. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:提供一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值以及該第二商值轉換結合成為2M個位元的商值,上述M為數值。 The method for operating a floating-point divider as described in item 9 of the scope of the patent application, further includes: providing a quotient converter, in each round of operation, each of the first quotient and the first quotient of M bits of information are provided. The two quotient value conversions are combined into a quotient value of 2M bits, where M is a numerical value. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:根據該第二部分餘數、該除數以及該第二商值,產生一第三部分餘數;以及提供一第二多工器,切換輸出該第三商值作為上述第一商值,並輸出該第三部分餘數為上述第一部分餘數。 The method of operating a floating-point divider as described in item 9 of the scope of patent application, further comprising: generating a third partial remainder according to the second partial remainder, the divisor, and the second quotient; and providing a second multiple And the switch switches and outputs the third quotient value as the first quotient value, and outputs the third part remainder as the first part remainder. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:根據該等第三部分餘數候選中對應該第二商值者、該除數以及複數個第三商值待測值,產生複數個第四部分餘數候選;查詢該第一商值表格,供應對應該等第四部分餘數候選以及該除數的複數個第四商值候選;以及以該第一多工器自該等第四商值候選中選擇對應該第三商值者輸出,作為一第四商值。 The method of operating a floating-point divider as described in item 9 of the scope of the patent application, further includes: according to the third part of the remainder candidates corresponding to the second quotient value, the divisor and a plurality of third quotient values to be measured , Generating a plurality of fourth part remainder candidates; querying the first quotient value table to supply a plurality of fourth quotient candidates corresponding to the fourth part remainder candidates and the divisor; and using the first multiplexer from the After the fourth quotient candidate is selected, the output corresponding to the third quotient is selected as a fourth quotient. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括: 提供一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值、該第二商值以及該第三商值轉換結合成為3M個位元的商值,上述M為數值。 The method of operating a floating-point divider as described in item 9 of the scope of patent application, further includes: A quotient converter is provided. In each round of operation, the first quotient value, the second quotient value, and the third quotient value that each provide M bit information are combined into a 3M bit quotient value. The M is a numerical value. 如申請專利範圍第14項所述之浮點除法器操作方法,更包括:根據該第二部分餘數、該除數以及該第二商值產生一第三部分餘數,且更根據該第三部分餘數、該除數以及該第三商值,產生一第四部分餘數;以及提供一第二多工器,切換輸出該第四商值作為上述第一商值,並輸出該第四部分餘數為上述第一部分餘數。 The method for operating a floating-point divider according to item 14 of the scope of patent application, further comprising: generating a third part remainder according to the second part remainder, the divisor, and the second quotient value, and further according to the third part The remainder, the divisor, and the third quotient to generate a fourth partial remainder; and providing a second multiplexer to switch the fourth quotient as the first quotient and output the fourth partial remainder as The remainder of the first part above.
TW105138802A 2016-06-22 2016-11-25 Floating-point divider and method for operating floating-point divider TWI606391B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
??201610459035.0 2016-06-22
CN201610459035.0A CN106020769B (en) 2016-06-22 2016-06-22 Floating-point divider and Floating-point divider operating method

Publications (2)

Publication Number Publication Date
TWI606391B TWI606391B (en) 2017-11-21
TW201810019A true TW201810019A (en) 2018-03-16

Family

ID=57085933

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105138802A TWI606391B (en) 2016-06-22 2016-11-25 Floating-point divider and method for operating floating-point divider

Country Status (2)

Country Link
CN (1) CN106020769B (en)
TW (1) TWI606391B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08147146A (en) * 1994-11-24 1996-06-07 Fujitsu Ltd Division arithmetic unit
TW329485B (en) * 1994-12-31 1998-04-11 Holtek Microelectronics Inc Fast division calculation method and apparatus
US6594681B1 (en) * 1998-11-04 2003-07-15 Sun Microsystems, Inc. Quotient digit selection logic for floating point division/square root
US7660941B2 (en) * 2003-09-10 2010-02-09 Super Talent Electronics, Inc. Two-level RAM lookup table for block and page allocation and wear-leveling in limited-write flash-memories
KR100433131B1 (en) * 2002-07-31 2004-05-28 학교법인연세대학교 A pipelined divider with small lookup table and a method for dividing the same
TW200834411A (en) * 2007-02-06 2008-08-16 Univ Nat Chiao Tung Method of accomplishing finite field divider structure
US20140195581A1 (en) * 2013-01-08 2014-07-10 Analog Devices, Inc. Fixed point division circuit utilizing floating point architecture
CN103135960A (en) * 2013-02-28 2013-06-05 浪潮集团有限公司 Design method of integrated floating point unit based on FPGA (field programmable gate array)
CN103809930B (en) * 2014-01-24 2017-05-03 天津大学 Design method of double-precision floating-point divider and divider
CN104133656A (en) * 2014-07-25 2014-11-05 国家电网公司 Floating point number divider adopting shift and subtraction operation by tail codes and floating point number division operation method adopting shift and subtraction operation by tail codes

Also Published As

Publication number Publication date
TWI606391B (en) 2017-11-21
CN106020769A (en) 2016-10-12
CN106020769B (en) 2018-09-14

Similar Documents

Publication Publication Date Title
US4722069A (en) Nonrestoring divider
CA2631924A1 (en) Extending a repetition period of a random sequence
Zhang et al. A low-error energy-efficient fixed-width booth multiplier with sign-digit-based conditional probability estimation
CN103809930B (en) Design method of double-precision floating-point divider and divider
US8229993B2 (en) Method for performing decimal division
KR102399200B1 (en) System and method for long addition and long multiplication in associative memory
KR0165719B1 (en) Multiplication device using semiconductor memory
US20040267853A1 (en) Method and apparatus for implementing power of two floating point estimation
TW201104663A (en) Circuit of performing dithering on pixels of a display and method thereof
JP4273071B2 (en) Divide and square root calculator
TW201810019A (en) Floating-point divider and method for operating floating-point divider
TWI269222B (en) Random number generating method and its equipment with a multiple polynomial
US20240394018A1 (en) Dot Product Pipeline for Floating Point and Shared Exponent Floating Point Data Types
JP2019121171A5 (en)
US6317772B1 (en) Split remainder divider
CN103856211A (en) Counter, counting method and frequency divider
US11042359B2 (en) Semiconductor device including an adder
CN101090449A (en) Color space changover method and its device
JP2001134556A (en) Repetitive multiplier and array multiplier
Arthireena et al. Efficient sign detection using parallel prefix adder
JP2991788B2 (en) Decoder
Bello et al. A MRC Based RNS to binary converter using the moduli set {22n+ 1-1, 2n-1, 22n-1}
Mahima et al. Reconfigurable Rounding based Approximate Multiplier for Floating Point Numbers
JP3017203B1 (en) Binary-decimal conversion circuit and method
Bader et al. A binary to residue conversion using new proposed non-coprime moduli set