[go: up one dir, main page]

TWI606391B - 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
TWI606391B
TWI606391B TW105138802A TW105138802A TWI606391B TW I606391 B TWI606391 B TW I606391B TW 105138802 A TW105138802 A TW 105138802A TW 105138802 A TW105138802 A TW 105138802A TW I606391 B TWI606391 B TW I606391B
Authority
TW
Taiwan
Prior art keywords
quotient
remainder
value
partial remainder
divisor
Prior art date
Application number
TW105138802A
Other languages
Chinese (zh)
Other versions
TW201810019A (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; CALCULATING OR 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)

Description

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

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

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

本案提出一種浮點除法器,將多次查表獲得的短位元量商值在一輪運算中組合在一起,呈長位元量的結合商值輸出,其中各輪運算更包括預測下一輪運算所得的結合商值的部分位元。 In this case, a floating-point divider is proposed. The short-order quotient quotient obtained by multiple look-up tables is combined in one round operation, and the combined quotient value of the long-order quantity is output, wherein each round of operations includes prediction of the next round of operations. Part of the resulting combined quotient value.

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

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

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

下文特舉實施例,並配合所附圖示,詳細說明本發明內容。 The invention is described in detail below with reference to the accompanying drawings.

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

202‧‧‧當輪部分餘數產生器 202‧‧‧When part of the wheel remainder generator

204‧‧‧部分餘數模擬器 204‧‧‧Partial remainder simulator

206‧‧‧第一商值表格 206‧‧‧First Business Value Form

207‧‧‧第一多工器 207‧‧‧First multiplexer

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

210‧‧‧商值轉換器 210‧‧‧Commerce value converter

212‧‧‧後續輪部分餘數產生器 212‧‧‧Subsequent round part remainder generator

400‧‧‧浮點除法器 400‧‧‧Floating point divider

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

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

430‧‧‧商值轉換器 430‧‧‧Commerce value converter

440‧‧‧後續輪部分餘數產生器 440‧‧‧Subsequent round part remainder generator

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 candidate

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

w‧‧‧被除數 w‧‧‧Divisor

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 the division operation; FIG. 1B and FIG. 1C show the quotient value table in two-dimensional coordinates; FIG. 2 illustrates a floating-point divider 200 according to an embodiment of the present invention; The operation method of the floating-point divider 200 of FIG. 2 is illustrated to provide a division operation (w/d); FIG. 4 illustrates a floating-point divider 400 according to another embodiment of the present invention; and the processes of FIGS. 5A and 5B are processes. FIG. 4 illustrates the operation of the floating point divider 400 to provide a division operation (w/d).

以下敘述列舉本發明的多種實施例。以下敘述介紹本發明的基本概念,且並非意圖限制本發明內容。實際發明範圍應依照申請專利範圍界定之。 The following description sets forth various embodiments of the invention. The following description sets forth the basic concepts of the invention and is not intended to limit the invention. The scope of the actual invention shall 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 an operation unit of a division operation including a dividend w and a divisor d, and sequentially obtains quotient values q0, q1, q2, and q3 in the operation. It should be noted that the operation of the four quotient values q0~q3 is only an example, and the present invention is not limited thereto. The number of quotient values is determined by when the divisor w is divided by the divisor d or converged, so the division operation is likely The number of other quotients obtained is not limited to four. In this embodiment, the radix 4 is used, that is, a quotient of 2 bits is generated per clock cycle. During the calculation of the quotient q0, q1, q2, q3, the decimal point of the intermediate remainder wi is shifted to the right by 2 bits (ie 4×wi), and i is the number. In this case, the values wi and 4×wi are referred to as partial remainders, and the label S(i+1). The quotient 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 value table in two-dimensional coordinates. A method of table lookup is to use a partial remainder 4×wi (ie S(i+1)) lookup table to compare the partial remainder 4×wi (ie S(i+1)) with various multiples of the divisor d. Corresponding quotient q(i+1) line. On the quotient q(i+1) line, the partial remainder 4×wi, which is a certain multiple of the divisor d, is the same, and the quotient q(i+1) within a certain range is the same, as shown in Figure 1B, [- d, The partial remainder 4 × wi in the d] interval corresponds to the quotient q(i+1)=0. In the following, in conjunction with FIG. 1A, how to query the quotient value table to obtain the corresponding quotient value, for example, the partial remainder 4×w0=1.110101B 1.75D (where B represents a binary number, D represents a decimal number), and divisor d=1.101B 1.625D, the partial remainder 4×w0 is represented as approximately 1.08 times the divisor d, so the quotient value table in the 1B graph can be queried to know that the corresponding quotient q1=1. On the partial remainder 4×wi (ie S(i+1)) axis, more critical values can be designed, so that the partial remainder 4×wi corresponding to multiple quotient q(i+1) lines can be correctly derived from the quotient The q(i+1) line selects the correct counterpart. Figure 1C shows a quotient value table in another two-dimensional coordinate, where wi is the partial remainder, that is, the value of the value system wi on the S(i+1) axis, and the partial remainder wi is used to look up the table, and the partial remainder wi Corresponding quotient q(i+1) lines are obtained by comparison with various multiples of the divisor d. The quotient value table of Fig. 1B or 1C is used to obtain the quotient value q(i+1) based on the partial remainder S(i+1) and the divisor d table. The above quotient table concept can be used in floating point divider applications of various cardinalities. In this embodiment, the radix 4 is obtained, that is, the quotient value of 2 bits is generated every clock cycle. If the quotient value table can be queried only once per clock cycle, the quotient value ranges from {-2, -1. 0,1,2}. In other embodiments using other cardinalities, for example, a base number of 16, a quotient of 4 bits is generated per clock cycle. If the quotient value table can only be queried once per clock cycle, the quotient value ranges from {-15 ,-14,-13,-12,...-1,0,1,...12,13,14,15}, ie [-15,15], but the invention is not limited thereto, taking different When the quotient encoding method is used, the range of quotient values will vary. It is time-consuming to query the quotient value table in floating-point division operation, and the more quotient bits obtained by each table lookup, the greater the hardware overhead. Therefore, the present invention proposes a floating-point divider for performing a multi-quota table query with one round of operations, even if a quotient value table with a small hardware overhead is used, for example, even if a table is used, only a 2-bit quotient can be obtained. A table of values (for example, querying the quotient value table of Figure 1B), a round of arithmetic queries can also get a 4-bit quotient, that is, the implementation base 16, such as SRT-16, without having to use a quotient with a large hardware overhead. A quotient value table with a value range of [-15, 15].

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

第2圖根據本案一種實施方式圖解一浮點除法器200,包括一當輪部分餘數產生器202、一部分餘數模擬器204、一第一商值表格206以及一第一多工器207、一第二商值表格以及一第二多工器(結合以方塊208表示)、一商值轉換器210、以及一後續輪部分餘數產生器212。 2 illustrates a floating point divider 200 according to an embodiment of the present invention, including a wheel portion remainder generator 202, a portion of the remainder simulator 204, a first quotient table 206, and a first multiplexer 207, a first The second quotient table and a second multiplexer (indicated by block 208), a quotient converter 210, and a subsequent wheel partial remainder 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 wheel partial remainder generator 202 generates a second partial remainder Sb based on a first partial remainder Sa, a divisor d, and a first quotient value qa. The partial remainder simulator 204 is based on the second partial remainder Sb, the divisor d, and a plurality of The second quotient value to be measured qp1...qpN generates a plurality of third partial remainder candidates San1...SanN. The second quotient value to be measured qp1...qpN may be all possible values of the second quotient value qb. For example, qp1...qpN takes values of all possible quotient values in the quotient value table of FIG. 1B or FIG. 1C. The first quotient value table 206 is queried to supply a second quotient value qb corresponding to the second part remainder Sb and the divisor d. The first quotient value table 206 is further used to query the supply of the third partial remainder candidates San1...SanN and the plurality of third quotient candidates qan1...qanN of the divisor d, and the first multiplexer 207 is based on the first multiplexer 207. The second quotient value qb selects an output corresponding to the second quotient value qb from the third quotient value candidates qan1...qanN as a third quotient value qan, that is, selects the second quotient value 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 taken as the third quotient value qan. In particular, the second quotient table and the second multiplexer (208) are used in a first round of operation of the floating point divider 200, corresponding to a dividend w and the divisor d to supply the first The quotient value qa and the first portion remainder Sa are to the wheel portion remainder generator 202. As shown in the figure, the quotient converter 210 combines the first quotient value qa and the second quotient value qb for providing M-bit information into a combined quotient value Q of 2M bits in each round of operation. M is a numerical value. As for the third quotient qan, this embodiment uses it as a partial bit of the next round of quotient Q. The third quotient value qan will be switched via the second multiplexer in block 208 as the first quotient value qa used in the next round of operations. The first partial remainder Sa required for the next round of combined quotient Q operations is provided by the subsequent round partial remainder generator 212. The subsequent round part remainder generator 212 generates a third partial remainder San according to the second partial remainder Sb, the divisor d and the second quotient value qb. The second multiplexer within block 208 switches the supply of the first partial remainder Sa required for the next round of operations. As described above, the second quotient table and the second multiplexer (208) are only used in the first round of the floating-point divider 200 for the divisor w and the divisor d to obtain the first partial remainder Sa and A quotient value qa is used; and in the subsequent round of operations, the second quotient value in block 208 is not needed, but the second multiplexer in block 208 directly selects the third quotient obtained from the previous round of operations. Qan is used as the first quotient value qa of the current round operation, and the third partial remainder San obtained from the previous round operation is selected as the first partial remainder Sa of the current round operation.

在一實施例中,該當輪部分餘數產生器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 an embodiment, the wheel portion remainder generator 202, the partial remainder simulator 204, and the subsequent wheel portion remainder generator 212 are all based on r x wi-q(i+1) x d=w(i+ 1) Designed by operation, where r is the intermediate remainder wi shift bit amount. For example, in the embodiment of FIG. 1A, r takes a value of 4, w(i+1)=4×wi-q(i+1)×d, and a partial remainder S(i+1)=4×wi, specifically For example, d=1.101B, and q1=1 according to the first partial remainder S1=4×w0=1.110101B query quotient value table; 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 definition of the partial remainder S(i+1) (eg, S(i+1)=r×wi or S(i+1)=wi), the wheel partial remainder generator 202, the partial remainder simulator The logic circuit design of 204 and the subsequent wheel portion remainder generator 212 will be adjusted accordingly. The wheel partial remainder generator 202, the partial remainder simulator 204, and the subsequent wheel partial remainder generator 212 can implement the above r×wi-q(i) using logical arithmetic elements such as a serial adder, an adder, and a multiplier. +1)×d=w(i+1) operation, such that the partial remainder S is output according to the partial remainder S(i+1) (ie r×wi or wi), the divisor d, and the quotient q(i+1) i+2) (ie r×w(i+1) or w(i+1)). First quotient form 206 It is also based on the definition of the partial remainder.

以基數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 the floating-point divider 200 should output is 8 bits, wherein the upper 4 bits are provided by the first quotient value qa, and the lower 4 bits are represented by the second quotient value. Qb is provided. The 4-bit quotient operation is much smaller and simpler than the 8-bit hardware. The displacement of the intermediate remainder wi is only 24 bits, which is much lower than the 28 bits required by the traditional floating-point divider architecture. In addition, with regard to the floating point divider 200 architecture of base 256, the second quotient value to be measured qp1...qpN can be set to {-15,-14,-13,-12,...-1,0,1,. ..12,13,14,15} 31 values to estimate 31 third-part remainder candidates. Of course, the present invention is not limited to the quotient range of radix 256 [-15, 15]. When different quotient coding methods are adopted, the range of quotient values will be different, which is [-N, N]. 2N+1 values, where N {8,9,10,11,12,13,14,15}.

第3圖為流程圖,圖解第2圖浮點除法器200的操作方法,以提供一除法運算(w/d)。 Fig. 3 is a flow chart illustrating the operation 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 value qa according to the second quotient value table in the query block 208. Step S304 operates the wheel partial remainder generator 202 to generate a second partial remainder Sb based on the dividend w (the first partial remainder Sa calculated as the first round combined quotient Q), the divisor d, and the first quotient qa. Step S306 operates the partial remainder simulator 204 to generate third partial remainder candidates San1...SanN based on the second partial remainder Sb, the divisor d, and the second quotient value to be measured qp1...qpN. Step S308 queries the first quotient value table 206 according to the second partial remainder Sb and the divisor d to obtain the second quotient value qb. Step S310, according to the third partial remainder candidate San1...SanN and the divisor d, the first quotient value table 206 is obtained to obtain the third quotient candidate qan1...qanN, which is sent to the first multiplexer 207 according to step S308. The second quotient value qb selects an output corresponding to the second quotient value qb from the third quotient candidate qan1...qanN as the third quotient value qan. Step S312 operates the subsequent wheel 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 value qan and the third partial remainder San are passed by the second multiplexer in block 208 to the wheel portion remainder generator 202 as a new round of operations required by the floating point divider 200. A quotient value qa and a first partial remainder Sa, that is, the third quotient value qan generated by the previous round operation is used as the first quotient value qa required for the new round of operation, and the third partial remainder San generated by the previous round operation is taken as a new round. The first partial remainder Sa required for the operation is generated to generate the second partial remainder Sb of the new round of operations, and the flow returns to step S306. The process shown in Figure 3 can be cycled until the number of remaining remainders is insufficient. The disclosed division process will obtain the first quotient value qa and the second quotient value qb in each round of operations, and the conversion is combined into the combined quotient value Q. All the combined quotient values Q obtained by the different round operations will be combined into the result of the division operation w/d. In other embodiments, step S308 may be arranged before step S306 or in step S310, that is, step S306 and step S308 are in no particular order.

第4圖根據本案另一種實施方式圖解一浮點除法器400,相較於浮點除法器200對應修正提供部分餘數模擬器410、第一商值表格以及第一多工器(結合以方塊420表示)、商值轉換器430、以及後續輪部分餘數產生器440,使每輪運算所獲得的結合商值Q是由三個商值qa、qb以及qc結合轉換成。 4 illustrates a floating point divider 400 according to another embodiment of the present invention, which provides a partial remainder simulator 410, a first quotient table, and a first multiplexer (in combination with block 420) as compared to the floating point divider 200. The representation, the quotient converter 430, and the subsequent wheel partial remainder generator 440 are such that the combined quotient value Q obtained for each round of operations is converted from a combination of 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 according to the second partial remainder Sb, the divisor d, and the plurality of second quotient value to be measured qp1...qpN, and further according to the third portion Residual candidate Sc1...ScN, the divisor d, and a plurality of third quotient value to be tested (this example is also qp1...qpN) yield a plurality of fourth partial remainder candidates San11...San1N, ..., SanN1...SanNN. The first quotient value table in block 420 is queried to supply a second quotient value qb corresponding to the second partial remainder Sb and the divisor d; the first quotient value table in block 420 is further queried, corresponding to And the third partial remainder candidate Sc1...ScN and the divisor d supply a plurality of third quotient candidate qc1...qcN (not shown) to the first multiplexer in block 420 from the second quotient qb An output of the third quotient candidate qc1...qcN 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 A third quotient candidate (one of qc1...qcN) corresponding to the third partial remainder candidate (one of Sc1...ScN) corresponding to one of qpN is taken as the third quotient value qc. In addition, the first quotient table in block 420 is further queried, and a plurality of fourth quotients are supplied according to the (N x N) fourth partial remainder candidates San11...San1N, ..., SanN1...SanNN and the divisor d. Value candidates qan11...qan1N,...,qanN1...qanNN (not shown), the first multiplexer in block 420 corresponds to the second quotient value qb and the third quotient value qc is selected as a fourth quotient The value qan is output. 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 by looking up the table. The third part of the remainder candidate (one of Sc1...ScN) corresponds to the N fourth partial remainder candidates (a group of San11...San1N, ..., SanN1...SanNN, for example, Sani1...SaniN); The third quotient value qc selects the third quotient value qc from the N selected fourth partial remainder candidates (formerly Sani1...SaniN) (as a plurality of third quotient values to be measured, also qp1 ...qpN one) corresponding to the fourth 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 such that the partial remainder simulator 410 is no longer redundantly providing the third partial remainder candidates Sc1...ScN and the fourth portion The remainder candidate San11...San1N, ..., SanN1...SanNN does 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結合轉換而得。 The quotient converter 430 is designed in each round of operations, and combines the first quotient value qa, the second quotient value qb, and the third quotient value qc that provide M-bit information into 3M bits. The combined quotient value Q, the above M is a numerical value. Taking the base 2 9 as an example, the floating point divider 400 can generate a combined quotient Q of 9 bits in each round of operations, which is a first quotient value qa of 3 bits, a second quotient value qb of 3 bits, and The 3-bit third quotient qc is obtained by combining 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 subsequent round portion remainder generator 440 operates 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 (within block 440, not shown), and further The third partial remainder Sc (not shown), the divisor d, and the third quotient value qc produces 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 the block 208 after the first round operation of the floating point divider 400, and the output is switched to the next round of operations. The above-mentioned first quotient value qa and the first part remainder Sa are required. Compared with the floating point divider 200, the third quotient value qc generated by the floating point divider 400 is used as a partial bit of the combined quotient 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 are based on qc). Compared with the floating point divider 200, the floating point divider 400 performs the third quotient table query in parallel in the same round operation. For example, the partial remainder simulator 410 performs operations to generate N third partial remainder candidates Sc1...ScN, and then performs nesting operations according to the generated N third partial remainder candidates Sc1...ScN to generate N×N fourth portions. The remainder candidates San11...San1N, ..., SanN1...SanNN, from the determined qb and qc as the selection signals of the multiplexer logic in the first multiplexer in block 420, from N x N fourth partial remainder candidates San11...San1N The selected one of N × N q values corresponding to , ..., SanN1 ... SanNN is output as qan. The embodiment of Fig. 4 compares the time-consuming output quotient qb, qc and qan three quotient table query operations side by side, so that it can be completed in the same round of operations, and must wait for the first round of lookup table than the prior art. After the second quotient value qb, the third part residual value Sc is calculated by the second quotient value qb to perform the second round of lookup table by the third quotient value qc, and then the third part quotient qc is used to calculate the fourth part remainder San. The third round of checklists has qan, which is greatly reduced in time.

第5A、5B圖為流程圖,圖解第4圖浮點除法器400的操作方法,以提供一除法運算(w/d)。 5A and 5B are flowcharts illustrating the operation of the floating point divider 400 of 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 value qa according to the second quotient value table in the query block 208. Step S504 operates the wheel partial remainder generator 202 to generate the second partial remainder Sb based on the dividend w (the first partial remainder Sa calculated as the first round combined quotient Q), the divisor d, and the first quotient qa. Step S506 operates the partial remainder simulator 410 to generate the third partial remainder candidates Sc1...ScN based on the second partial remainder Sb, the divisor d, and the second quotient value to be measured qp1...qpN. Step S508 again operates the partial remainder simulator 410 to generate the fourth partial remainder candidate San11...San1N according to the third partial remainder candidate Sc1...ScN, the divisor d, and the third quotient value to be measured (this example is also qp1...qpN). ..., SanN1...SanNN. Step S510, according to the second part remainder Sb and the divisor d, the query block The first quotient value table in 420 obtains the second quotient value qb. Step S512 obtains the third quotient candidate qc1...qcN according to the third partial remainder candidate Sc1...ScN and the divisor d, and the first quotient table in the query block 420 is passed to the first multiplexer in the 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. Step S514 obtains fourth quotient candidate qan11...qan1N,... according to the fourth partial remainder candidates San11...San1N, ..., SanN1...SanNN (N×N) and the divisor d, in the first quotient table in the query block 420. qanN1...qanNN (N×N), the first multiplexer in block 420 selects the output corresponding to the second and third quotient values qb and qc as the fourth quotient value qan. Step S516 operates the subsequent wheel partial remainder generator 440 to generate a third partial remainder Sc (inside of block 440) based on the second partial remainder Sb, the divisor d, and the second quotient qb, and further based on the third partial remainder Sc, The divisor d and the third quotient value qc produce a fourth partial remainder San. In step S518, the fourth quotient value qan and the fourth partial remainder San are passed by the second multiplexer in the block 208 to the wheel portion remainder generator 202 as a new round of operations required by the floating point divider 400. A quotient value qa and a first partial remainder Sa are generated to generate a second partial remainder Sb of the new round of operations, and the flow returns to step S506. The flow shown in Figures 5A and 5B can be cycled until the number of remaining remainder bits is 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 operations, and the operator quotient converter 430 converts the combination into the combined quotient value Q. All the combined quotient values Q obtained by the different round operations will be combined into the result of the division operation w/d. In other embodiments, steps S510 and S512 can be fine-tuned to the previous or subsequent steps.

在其他實施方式中,部分餘數模擬器所可以模擬 的商值數量,可不只於第2圖所示之一個(qan)或第4圖所示之兩個(qc與qan)。依照上述同樣概念,部分餘數模擬器甚至可模擬多於兩個的商值。 In other embodiments, a partial 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. According to the same concept described above, the partial remainder simulator can even simulate more than two quotient values.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟悉此項技藝者,在不脫離本發明之精神和範圍內,當可做些許更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the present invention has been described in its preferred embodiments, the present invention is not intended to limit the invention, and the present invention may be modified and modified without departing from the spirit and scope of the invention. The scope of protection is subject to the definition of the scope of the patent application.

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

202‧‧‧當輪部分餘數產生器 202‧‧‧When part of the wheel remainder generator

204‧‧‧部分餘數模擬器 204‧‧‧Partial remainder simulator

206‧‧‧第一商值表格 206‧‧‧First Business Value Form

207‧‧‧第一多工器 207‧‧‧First multiplexer

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

210‧‧‧商值轉換器 210‧‧‧Commerce value converter

212‧‧‧後續輪部分餘數產生器 212‧‧‧Subsequent round part remainder generator

d‧‧‧除數 D‧‧‧Divisor

Q‧‧‧結合商數 Q‧‧‧Combined quotient

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

qp1…qpN‧‧‧第二商值待測值 Qp1...qpN‧‧‧second quotient value to be measured

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

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

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

w‧‧‧被除數 w‧‧‧Divisor

Claims (16)

一種浮點除法器,包括:一當輪部分餘數產生器,根據一第一部分餘數、一除數以及一第一商值,產生一第二部分餘數;一部分餘數模擬器,根據該第二部分餘數、該除數以及複數個第二商值待測值,產生複數個第三部分餘數候選;一第一商值表格以及一第一多工器;以及一後續輪部分餘數產生器,其中:該第一商值表格經查詢,供應對應該第二部分餘數以及該除數的一第二商值;該第一商值表格更經查詢,供應對應該等第三部分餘數候選以及該除數的複數個第三商值候選;該第一多工器自該等第三商值候選中選擇對應該第二商值者輸出,作為一第三商值;該後續輪部分餘數產生器係根據該第二部分餘數、該除數以及該第二商值,產生一第三部分餘數;在該浮點除法器的一第一輪運算中,上述第一商值係基於一被除數以及該除數而獲得,且該被除數係用作該第一部分餘數;在該浮點除法器接續該第一輪運算的後續輪運算中,上述第一商值係基於該第三商值而獲得,且該第一部份餘數係基於該第三部分餘數而獲得;且該等第二商值待測值係包含於該第一商值表格。 A floating point divider comprising: a wheel part remainder generator, generating a second partial remainder according to a first partial remainder, a divisor and a first quotient; a part of the remainder simulator, according to the second part remainder And the divisor and the plurality of second quotient values to be tested, generating a plurality of third partial remainder candidates; a first quotient value table and a first multiplexer; and a subsequent round partial remainder generator, wherein: The first quotient table is queried, and supplies a second part of the remainder and a second quotient of the divisor; the first quotient table is further queried, and the supply corresponds to the third part of the remainder candidate and the divisor a plurality of third quotient candidate; the first multiplexer selects a output corresponding to the second quotient from the third quotient candidates as a third quotient; the subsequent round partial remainder generator is based on the a second partial remainder, the divisor, and the second quotient, generating a third partial remainder; in a first round of the floating point divider, the first quotient is based on a dividend and the division Obtained by number, and the Used as the first partial remainder; in the subsequent round operation of the floating-point divider following the first round of operations, the first quotient is obtained based on the third quotient, and the first partial remainder is based on The third part of the remainder is obtained; and the second quotient value to be measured is included in the first quotient value table. 如申請專利範圍第1項所述之浮點除法器,其中該第一多工器選擇以該第二商值於上述複數個第二商值待測值之中對應者所對應的上述第三部分餘數候選所對應的上述第三商值候選作為上述第三商值。 The floating-point divider according to claim 1, wherein the first multiplexer selects the third corresponding to the corresponding one of the plurality of second quotient values to be measured by the second quotient value The third quotient candidate corresponding to the partial remainder candidate is used as the third quotient. 如申請專利範圍第1項所述之浮點除法器,更包括一第二商值表格,其中:在該浮點除法器的該第一輪運算中,該第二商值表格經查詢,對應該被除數以及該除數供應上述第一商值;且上述第一輪運算中,該被除數係用作該第一部分餘數輸入該當輪部分餘數產生器。 The floating point divider according to claim 1, further comprising a second quotient value table, wherein: in the first round of operation of the floating point divider, the second quotient table is queried, The divisor and the divisor should be supplied with the first quotient value; and in the first round of operation, the dividend is used as the first partial remainder input to the current wheel portion remainder generator. 如申請專利範圍第1項所述之浮點除法器,更包括:一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值以及該第二商值轉換結合成為2M個位元的商值,上述M為正整數。 The floating point divider according to claim 1, further comprising: a quotient converter, wherein each of the rounds of operations provides the first quotient of the M bit information and the second quotient The conversion is combined into a quotient of 2M bits, and the above M is a positive integer. 如申請專利範圍第1項所述之浮點除法器,更包括:一第二多工器,在該浮點除法器接續該第一輪運算的後續輪運算中,切換輸出該第三商值作為上述第一商值,並輸出該第三部分餘數為上述第一部分餘數。 The floating-point divider as described in claim 1, further comprising: a second multiplexer, switching the output of the third quotient in the subsequent round operation of the floating-point divider following the first round of operations As the first quotient value, and outputting the remainder of the third part as the remainder of the first part. 如申請專利範圍第1項所述之浮點除法器,其中:該部分餘數模擬器更根據該等第三部分餘數候選中對應該第二商值者、該除數以及複數個第三商值待測值,產生複數個第四部分餘數候選;該第一商值表格更經查詢,供應對應該等第四部分餘數候選以及該除數的複數個第四商值候選; 該第一多工器更自該等第四商值候選中選擇對應該第三商值者輸出,作為一第四商值;且該等第三商值待測值係包含於該第一商值表格。 The floating-point divider as claimed in claim 1, wherein: the partial remainder simulator further determines, according to the third-part remainder candidate, the second quotient, the divisor, and the plurality of third quotient values. a plurality of fourth partial remainder candidates are generated; the first quotient table is further queried, and the fourth partial remainder candidate corresponding to the fourth remainder and the plurality of fourth quotient candidates of the divisor are supplied; The first multiplexer further selects a third quotient value output from the fourth quotient candidate as a fourth quotient value; and the third quotient value to be measured is included in the first quotient Value table. 如申請專利範圍第1項所述之浮點除法器,更包括:一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值、該第二商值以及該第三商值轉換結合成為3M個位元的商值,上述M為正整數。 The floating point divider as described in claim 1, further comprising: a quotient converter, wherein the first quotient value and the second quotient value of each of the M bit information are provided in each round of operations And the third quotient conversion is combined into a quotient of 3M bits, and the above M is a positive integer. 如申請專利範圍第6項所述之浮點除法器,其中:該後續輪部分餘數產生器更根據該第三部分餘數、該除數以及該第三商值,產生一第四部分餘數;且該浮點除法器更包括一第二多工器,在該浮點除法器接續該第一輪運算的後續輪運算中,切換輸出該第四商值作為上述第一商值,並輸出該第四部分餘數為上述第一部分餘數。 The floating-point divider of claim 6, wherein: the subsequent-round partial remainder generator further generates a fourth partial remainder according to the third partial remainder, the divisor and the third quotient; The floating point divider further includes a second multiplexer, wherein the floating point divider continues to output the fourth quotient value as the first quotient value in the subsequent round operation of the first round operation, and outputs the first The four-part remainder is the remainder of the first part above. 一種浮點除法器操作方法,用以操作包括一第一商值表格的一浮點除法器,包括:根據一第一部分餘數、一除數以及一第一商值,產生一第二部分餘數;根據該第二部分餘數、該除數以及複數個第二商值待測值,產生複數個第三部分餘數候選;查詢該第一商值表格,供應對應該第二部分餘數以及該除數的一第二商值;查詢該第一商值表格,供應對應該等第三部分餘數候選以及該除數的複數個第三商值候選; 提供一第一多工器,自該等第三商值候選中選擇對應該第二商值者輸出,作為一第三商值;以及根據該第二部分餘數、該除數以及該第二商值,產生一第三部分餘數,其中:在該浮點除法器的一第一輪運算中,上述第一商值係基於一被除數以及該除數而獲得,且該被除數係用作該第一部分餘數;在該浮點除法器接續該第一輪運算的後續輪運算中,上述第一商值係基於該第三商值而獲得,且該第一部份餘數係基於該第三部分餘數而獲得;且該等第二商值待測值係包含於該第一商值表格。 A floating point divider operation method for operating a floating point divider including a first quotient value table, comprising: generating a second partial remainder according to a first partial remainder, a divisor, and a first quotient; Generating a plurality of third partial remainder candidates according to the second partial remainder, the divisor and the plurality of second quotient value to be tested; querying the first quotient value table, supplying the second partial remainder and the divisor a second quotient value; querying the first quotient value table, supplying a third-part remainder candidate corresponding to the third part, and a plurality of third quotient candidate of the divisor; Providing a first multiplexer, selecting, from the third quotient candidate, a output corresponding to the second quotient as a third quotient; and according to the second part remainder, the divisor, and the second quotient a value, generating a third partial remainder, wherein: in a first round of the floating-point divider, the first quotient is obtained based on a dividend and the divisor, and the dividend is used Making the first partial remainder; in the subsequent round operation of the floating-point divider following the first round of operations, the first quotient is obtained based on the third quotient, and the first partial remainder is based on the first Obtained from the three-part remainder; and the second quotient values to be measured are included in the first quotient value table. 如申請專利範圍第9項所述之浮點除法器操作方法,其中操作該第一多工器選擇以該第二商值於上述複數個第二商值待測值之中對應者所對應的上述第三部分餘數候選所對應的上述第三商值候選作為上述第三商值。 The method for operating a floating-point divider according to claim 9, wherein the first multiplexer is operated to select the second quotient corresponding to the corresponding one of the plurality of second quotient values to be measured. The third quotient candidate corresponding to the third partial remainder candidate is used as the third quotient. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:提供一第二商值表格;且在該浮點除法器的該第一輪運算中,查詢該第二商值表格,對應該被除數以及該除數供應上述第一商值。 The floating point divider operation method of claim 9, further comprising: providing a second quotient value table; and querying the second quotient value table in the first round operation of the floating point divider The first quotient value is supplied to the divisor and the divisor. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:提供一商值轉換器,於各輪運算中,將各提供M個位元資訊 的該第一商值以及該第二商值轉換結合成為2M個位元的商值,上述M為正整數。 The method for operating a floating point divider according to claim 9 of the patent application, further comprising: providing a quotient value converter, and providing each of the M bit information in each round of operations The first quotient value and the second quotient value conversion are combined into a quotient value of 2M bits, and the above M is a positive integer. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:提供一第二多工器,在該浮點除法器接續該第一輪運算的後續輪運算中,切換輸出該第三商值作為上述第一商值,並輸出該第三部分餘數為上述第一部分餘數。 The method for operating a floating point divider according to claim 9, further comprising: providing a second multiplexer, switching the output of the first multiplexer in the subsequent round operation of the first round of the floating point divider The third quotient is used as the first quotient value, and the remainder of the third part is output as the remainder of the first part. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:根據該等第三部分餘數候選中對應該第二商值者、該除數以及複數個第三商值待測值,產生複數個第四部分餘數候選;查詢該第一商值表格,供應對應該等第四部分餘數候選以及該除數的複數個第四商值候選;以及以該第一多工器自該等第四商值候選中選擇對應該第三商值者輸出,作為一第四商值,其中,該等第三商值待測值係包含於該第一商值表格。 The method for operating a floating-point divider as described in claim 9 further includes: determining, according to the third-part remainder candidate, the second quotient, the divisor, and the plurality of third quotient values to be measured Generating a plurality of fourth partial remainder candidates; querying the first quotient value table, supplying a fourth partial remainder candidate corresponding to the fourth remainder candidate and the divisor of the fourth quotient candidate; and using the first multiplexer And selecting a fourth quotient candidate to output the third quotient value as a fourth quotient value, wherein the third quotient value to be measured is included in the first quotient value table. 如申請專利範圍第9項所述之浮點除法器操作方法,更包括:提供一商值轉換器,於各輪運算中,將各提供M個位元資訊的該第一商值、該第二商值以及該第三商值轉換結合成為3M個位元的商值,上述M為正整數。 The method for operating a floating-point divider as described in claim 9 further includes: providing a quotient converter, wherein each of the rounds of operations provides the first quotient of the M-bit information, the first The two quotient values and the third quotient value conversion are combined into a quotient of 3M bits, and the above M is a positive integer. 如申請專利範圍第14項所述之浮點除法器操作方法,更包括: 根據該第三部分餘數、該除數以及該第三商值,產生一第四部分餘數;以及提供一第二多工器,在該浮點除法器接續該第一輪運算的後續輪運算中,切換輸出該第四商值作為上述第一商值,並輸出該第四部分餘數為上述第一部分餘數。 The method for operating the floating point divider as described in claim 14 of the patent application further includes: Generating a fourth partial remainder according to the third partial remainder, the divisor, and the third quotient value; and providing a second multiplexer in the subsequent round operation of the floating point divider following the first round of operations And switching the fourth quotient value as the first quotient value, and outputting the fourth part remainder as the first part remainder.
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
CN201610459035.0A CN106020769B (en) 2016-06-22 2016-06-22 Floating-point divider and Floating-point divider operating method
??201610459035.0 2016-06-22

Publications (2)

Publication Number Publication Date
TWI606391B true TWI606391B (en) 2017-11-21
TW201810019A 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)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW329485B (en) * 1994-12-31 1998-04-11 Holtek Microelectronics Inc Fast division calculation method and apparatus
US7194499B2 (en) * 2002-07-31 2007-03-20 Yonsei University Pipelined divider and dividing method with small lookup table
TW200834411A (en) * 2007-02-06 2008-08-16 Univ Nat Chiao Tung Method of accomplishing finite field divider structure
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

Family Cites Families (6)

* 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
US6594681B1 (en) * 1998-11-04 2003-07-15 Sun Microsystems, Inc. Quotient digit selection logic for floating point division/square root
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW329485B (en) * 1994-12-31 1998-04-11 Holtek Microelectronics Inc Fast division calculation method and apparatus
US7194499B2 (en) * 2002-07-31 2007-03-20 Yonsei University Pipelined divider and dividing method with small lookup table
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
TW200834411A (en) * 2007-02-06 2008-08-16 Univ Nat Chiao Tung Method of accomplishing finite field divider structure

Also Published As

Publication number Publication date
TW201810019A (en) 2018-03-16
CN106020769B (en) 2018-09-14
CN106020769A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
Uguen et al. Evaluating the hardware cost of the posit number system
CN103809930B (en) Design method of double-precision floating-point divider and divider
KR20120053343A (en) Apparatus for multiply add fused unit of floating point number, and method thereof
JP2005250481A (en) Extended Montgomery Modular Multiplier Supporting Multiple Precision
KR0165719B1 (en) Multiplication device using semiconductor memory
US9785407B2 (en) Data processing apparatus having combined divide-square root circuitry
US7143126B2 (en) Method and apparatus for implementing power of two floating point estimation
KR20040092376A (en) Montgomery modular multiplier and method thereof using carry save addition
Piestrak A note on RNS architectures for the implementation of the diagonal function
Pasca et al. Activation function architectures for FPGAs
GB2582146A (en) Execution unit
CN102231101A (en) Divider and division processing method
TWI606391B (en) Floating-point divider and method for operating floating-point divider
JP4273071B2 (en) Divide and square root calculator
CN110119265A (en) Multiplication implementation method, device, computer storage medium and electronic equipment
CN105573712B (en) Apparatus, method and storage medium for calculating results of iterative sums
US6317772B1 (en) Split remainder divider
US20060143260A1 (en) Low-power booth array multiplier with bypass circuits
US20240394018A1 (en) Dot Product Pipeline for Floating Point and Shared Exponent Floating Point Data Types
KR100853787B1 (en) Variable base division operator
KR101753162B1 (en) Method for calculating of leading zero, apparatus thereof
JP3028165B2 (en) High radix division control method and high radix divider
US20140115023A1 (en) Bid to bcd/dpd converters
TWI780796B (en) Converting digital image data
Mahima et al. Reconfigurable Rounding based Approximate Multiplier for Floating Point Numbers