WO2017126715A1 - 나눗셈 연산을 처리하는 방법, 장치 및 기록매체 - Google Patents

나눗셈 연산을 처리하는 방법, 장치 및 기록매체 Download PDF

Info

Publication number
WO2017126715A1
WO2017126715A1 PCT/KR2016/000598 KR2016000598W WO2017126715A1 WO 2017126715 A1 WO2017126715 A1 WO 2017126715A1 KR 2016000598 W KR2016000598 W KR 2016000598W WO 2017126715 A1 WO2017126715 A1 WO 2017126715A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
data
divisor
dividend
division
Prior art date
Application number
PCT/KR2016/000598
Other languages
English (en)
French (fr)
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 삼성전자 주식회사
Priority to US16/070,169 priority Critical patent/US10776077B2/en
Priority to KR1020187019708A priority patent/KR102528467B1/ko
Priority to PCT/KR2016/000598 priority patent/WO2017126715A1/ko
Priority to EP16886558.2A priority patent/EP3376369B1/en
Publication of WO2017126715A1 publication Critical patent/WO2017126715A1/ko

Links

Images

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

Definitions

  • the disclosed technical idea relates to a computer-readable recording medium having recorded thereon a program for causing a computer to execute a method for processing a division operation, an apparatus for processing a division operation, and a method for processing a division operation.
  • the disclosed embodiment selects an appropriate operator that can perform a division operation using input data to perform a division operation and a result of a division operation that has been previously performed, thereby performing a division operation that can handle the division operation more efficiently.
  • the number of data bits that can be processed by acquiring input data, detecting reference data which is data about a division operation corresponding to the obtained input data, from a cache memory in which data relating to at least one division operation is stored in advance; Selects one of the plurality of operators identified according to at least one of the types of operations based on the difference between the detected reference data and the input data, and processes a division operation of obtaining a division operation result of the input data from the selected operator.
  • a method is disclosed.
  • the division operation can be processed more efficiently by selecting an appropriate operator that can perform the division operation using the result of the division operation previously performed.
  • FIG. 1 is a diagram illustrating an apparatus for processing a division operation, according to an exemplary embodiment.
  • 2A and 2B are diagrams for describing a criterion for selecting a division operator when performing a division operation on input data according to an exemplary embodiment.
  • FIG. 3 is a flowchart illustrating a method of processing a division operation, according to an exemplary embodiment.
  • FIG. 4 is a flowchart illustrating a method of processing a division operation in detail according to an exemplary embodiment.
  • FIG. 5 is a diagram for describing a method of performing a division operation according to a first mode in a division operation processing apparatus according to an embodiment.
  • 6A and 6B are diagrams for describing a method of performing a division operation according to a second mode in a division operation processing apparatus according to an embodiment.
  • FIG. 7 is a diagram for describing a method of performing a division operation according to a third mode in a division operation processing apparatus according to an embodiment.
  • FIG. 8 is a block diagram illustrating in detail a division operation processing apparatus according to another embodiment.
  • FIG. 9 is a block diagram illustrating in detail a division operation processing apparatus according to another embodiment.
  • FIG. 10 is a flowchart for describing a method of determining, by a division processing apparatus, an index for detecting reference data corresponding to input data.
  • FIG. 11 is a diagram for describing a method of determining an index when a difference in an input divisor changed over time is a multiple of a size of a cache memory, according to an exemplary embodiment.
  • FIG. 12 is a diagram for describing a method of determining an index when an input divider is fixed and an input dividend changes with time according to an embodiment.
  • a method of processing a division operation includes: obtaining input data; Detecting reference data, which is data about a division operation corresponding to the input data, from the cache memory in which data regarding at least one division operation is pre-stored; Selecting one of the plurality of operators identified according to at least one of the number of processable data bits and the type of operation based on the difference between the detected reference data and the input data; And obtaining a division operation result of the input data from the selected operator.
  • the method for processing a division operation may further include determining whether to use the detected reference data based on a difference between an input divisor included in the input data and a reference divisor included in the reference data.
  • the obtaining may include calculating a difference value between an input dividend included in the input data and a reference dividend included in the reference data when the reference divisor and the input divisor are the same. ; Comparing the reference dividend and the input dividend when the calculated difference value is equal to or less than a preset threshold value and the input divisor; And as a result of the comparison, when the reference dividend exceeds the input dividend, a value obtained by subtracting 1 from the quotient included in the reference data is determined as the share of the input data, and when the reference dividend is less than or equal to the input dividend, the share of the reference data is determined by Determining by quoting.
  • the obtaining may include calculating a difference value between an input dividend included in the input data and a reference dividend included in the reference data when the reference divisor and the input divisor are the same. ; Calculating a quotient and a remainder obtained by dividing the difference between the input dividend and the referred divisor by the input divisor when the calculated difference value is less than the preset threshold and exceeds the input divisor; And when the calculated quotient is zero or more or the calculated remainder is zero, the quotient of the input data is determined by the sum of the calculated quotients to the quotient of the reference data, the calculated quotient is less than zero, and the calculated remainder is not zero. In this case, determining the quotient of the input data by subtracting 1 from the sum of the quotients calculated by the quotient of the reference data.
  • the obtaining may include in the input data when a reference divisor and an input divisor are different or a difference value between the input dividend and the reference dividend exceeds a preset threshold. And performing a division operation on the input dividend and the input dividend.
  • the plurality of calculators include a first division operator and a second division operator having a different number of data bits of the quotient of the divide operation that can be processed
  • the selecting may include: When the input divisor included in the data and the reference divisor included in the reference data are different, the first divider and the second divider are compared by comparing the number of data bits of the quotient of the division operation that can be processed by the first divider and the input divisor. Choose one.
  • the method for processing a division operation further includes determining an index indicating a location on the cache memory based on at least one of an input divisor, an input dividend, and a size of the cache memory included in the obtained input data.
  • the reference data is detected from the cache memory using the determined index.
  • the method for processing a division operation further includes storing the division operation result at a location on the cache memory indicated by the determined index.
  • an apparatus for processing a division operation may include: a cache memory in which data regarding at least one division operation is pre-stored; An input unit for obtaining input data; An arithmetic unit including a plurality of arithmetic units identified according to at least one of the number of data bits that can be processed and a type of arithmetic operation; A controller which detects, from the cache memory, reference data which is data relating to a division operation corresponding to the obtained input data, and selects one of a plurality of calculators based on a difference between the detected reference data and the input data; And an output unit for obtaining a division operation result of the input data from the selected operator.
  • the controller determines whether to use the detected reference data based on a difference between an input divisor included in the input data and a reference divisor included in the reference data.
  • the operation unit calculates a difference value between the input dividend included in the input data and the reference dividend included in the reference data, and is calculated. If the difference is less than or equal to the preset threshold and the input divisor, the reference dividend is compared with the input dividend.When the comparison results, if the reference dividend exceeds the input dividend, the value included in the reference data is subtracted from the quotient included in the reference data. If the reference dividend is less than or equal to the input dividend, the share of the reference data is determined as the share of the input data.
  • the operation unit calculates a difference value between the input dividend included in the input data and the reference dividend included in the reference data, and is calculated. If the difference is less than the preset threshold and exceeds the input divisor, the quotient and remainder obtained by dividing the difference between the input dividend and the referenced divisor by the input divisor is calculated, and the calculated quotient is zero or more, or the calculated remainder is zero. If the calculated share is less than zero and the calculated remainder is not zero, the sum of the calculated share is added to the share of the reference data. Minus 1 to determine the quotient of the input data.
  • the operation unit may include an input included in the input data when a reference divisor and an input divisor are different or a difference value between the input dividend and the reference dividend exceeds a preset threshold value. Divides the dividend and the input divisor.
  • the plurality of calculators include a first division operator and a second division operator having a different number of data bits of the quotient of the divide operation that can be processed, and the control unit is configured to input data.
  • the first divider and the second divider are compared by comparing the input divisor with a threshold value, which is the number of data bits of the quotient of the divide operation that can be processed by the first divider. Choose one.
  • the controller determines an index indicating a location on the cache memory based on at least one of an input divisor, an input dividend, and a size of the cache memory included in the obtained input data.
  • the reference data is detected from the cache memory using the determined index.
  • control unit stores the division operation result at a location on the cache memory indicated by the determined index.
  • FIG. 1 is a diagram illustrating an apparatus 100 for processing a division operation, according to an exemplary embodiment.
  • the division operation processing apparatus In the apparatus 100 for processing the division operation illustrated in FIG. 1 (hereinafter, the division operation processing apparatus), only components related to the present exemplary embodiment are illustrated. Accordingly, it will be understood by those skilled in the art that other general purpose components may be further included in addition to the components shown in FIG. 1.
  • the division operation processing apparatus 100 may include an input unit 110, a controller 120, a cache memory 130, a plurality of calculators 140, and an output unit 150.
  • the input unit 110 obtains input data.
  • the input unit 110 may obtain input data for performing a division operation from an external device connected to the division operation processing apparatus 100.
  • the external device may include at least one of a memory (not shown), another operator (not shown) that performs other operations than division operations, and a processor.
  • the input unit 110 may be configured with a plurality of slots to perform division operations on a plurality of input data in parallel.
  • Input data may be allocated to each of the plurality of slots constituting the input unit 110.
  • SIMD single instruction multiple data
  • the input unit 110 when performing a division operation in parallel, the input unit 110 may be configured of a plurality of slots.
  • the input unit 110 may not be configured with a plurality of slots.
  • the controller 120 detects reference data, which is data about a division operation corresponding to the obtained input data, from data about a previous division operation stored in the cache memory 130.
  • the input data may include an input dividend and an input divisor.
  • the reference data may include at least one of a quotient and a remainder which are the result of the division operation on the reference dividend, the reference dividend, the reference dividend, and the reference divisor.
  • the control unit 120 does not detect the reference data, the division operation for the input data using a plurality of calculators 140 can do.
  • the information about the result of the division operation and the input data may be stored in the cache memory 130.
  • the controller 120 may determine an index indicating a location on the cache memory 130 for detecting reference data, based on at least one of the input dividend, the input divider, and the size of the cache memory 130. .
  • the controller 120 may determine the remaining operation result value between the input divisor and the size of the cache memory 130 as an index. According to another example, the controller 120 may determine the index information by summing the division operation result between the input divisor and the size of the cache memory 130 and the remaining operation result between the input divisor and the size of the cache memory 130. According to another example, the controller 120 may determine index information by summing up the remaining calculation result between the input divisor and the size of the cache memory 130 and some data bits constituting the input dividend. The controller 120 may detect reference data from the cache memory 130 by using the determined index.
  • the controller 120 may compare the reference divisor, the reference dividend, and the input dividend and the input dividend included in the detected reference data, respectively. When the difference between the detected reference data and the input data is less than the preset value, the controller 120 may determine the division operation result of the reference data as the division operation result of the input data. For example, when the difference between the reference divisor and the input divisor and the difference between the input divisor and the input dividend are both less than a preset value, the controller 120 may divide the result of the division operation of the reference data into a circuit 145 connected to the output unit 150. Pass-through).
  • the controller 120 may perform a division operation on the input data based on the difference between the detected reference data and the input data. Select any one of 140.
  • the plurality of calculators 140 may be identified according to at least one of the number of data bits that can be processed and the type of operation.
  • the plurality of calculators 140 may include at least one subtraction operator and a plurality of division operators.
  • the plurality of division operators may be classified according to the number of data bits that can be processed.
  • the number of processable data bits may be the number of data bits of the quotient of the division operation result that can be calculated at the maximum.
  • the plurality of division operators may include a first division operator and a second division operator having a different number of data bits of the quotient of the division operation result that can be calculated at the maximum. The first division operator and the second division operator will be described below in more detail with reference to FIGS. 2A and 2B.
  • the controller 120 may select one of a plurality of calculators based on a difference between an input dividend and a reference dividend. For example, the controller 120 calculates a first value obtained by subtracting the remainder included in the reference data from the reference dividend, and compares the calculated second value with the input divisor to a result of comparing the second value with the input divisor. Any one of a plurality of calculators can be selected based on this. The controller 120 may select a subtraction operator when the second value is less than or equal to the input divisor and select one of the first division operator and the second division operator when the second value exceeds the input divisor.
  • the controller 120 determines whether the calculated second value is less than or equal to the number of data bits of the quotient (hereinafter, referred to as a threshold value) that can be calculated by the first division operator at a maximum, and whether the input divisor is less than or equal to the threshold value. Based on this, one of the first division operator and the second division operator may be selected. On the other hand, it is assumed that the number of data bits that can be processed by the first division operator is lower than that of the second division operator.
  • a threshold value the number of data bits of the quotient
  • the controller 120 may determine whether the input divisor and the reference divisor are the same and determine a condition for selecting any one of the plurality of calculators.
  • the controller 120 may first compare the calculated second value and the input divisor. The controller 120 may select a subtraction operator when the second value is less than or equal to the input divisor. If the second value exceeds the input divisor and the second value is less than the threshold value, the controller 120 may select the first division operator. When the second value exceeds the input divisor and the second value is equal to or greater than the threshold, the controller 120 may select one of the first division operator and the second division operator by comparing the input divisor with the threshold value. . In detail, the controller 120 may select the first division operator when the second value exceeds the input divisor, the second value is greater than or equal to the threshold, and the input divisor exceeds the threshold. The controller 120 may select the second division operator when the second value exceeds the input divisor, the second value is greater than or equal to the threshold, and the input divisor is less than or equal to the threshold.
  • the controller 120 may select one of the plurality of calculators by comparing the input divisor and the threshold value.
  • the controller 120 may select the first division operator when the input divisor exceeds a threshold value and select the second division operator when the input divisor is less than or equal to the threshold value.
  • the cache memory 130 may store data regarding at least one division operation performed before the division operation on the input data.
  • a division operation result for the input data may be stored on a position indicated by the index determined by the cache memory 130.
  • the plurality of calculators 140 includes n operators capable of performing a division operation on the input data.
  • the plurality of calculators 140 may include at least one subtraction operator, at least one first division operator, and at least one second division operator.
  • the output unit 150 obtains a division calculation result of the input data from the selected calculator.
  • the output unit 150 may be configured with a plurality of slots so as to obtain a result of a division operation performed in parallel on each of the plurality of input data.
  • the result of the division operation for each of the plurality of input data may be assigned to each of the plurality of slots constituting the output unit 150.
  • the output unit 150 may not be configured with a plurality of slots.
  • 2A and 2B are diagrams for describing a criterion for selecting a division operator when performing a division operation on input data according to an exemplary embodiment.
  • the division operation processing apparatus 100 may check a process of performing division by converting 249 and 13 into binary numbers. Meanwhile, it is assumed here that the first division operator can calculate the quotient, which is the result of the division operation, up to 4 bits. Accordingly, the threshold may be determined as four.
  • the division operation processing apparatus 100 may select a second division operator capable of calculating a quotient of the division operation up to 8 bits.
  • the second division operator may be composed of a plurality of first division operators.
  • the division operation processing apparatus 100 converts 15 and 13 into binary numbers to perform a division operation.
  • the division operation is performed by converting each of 15 and 13 into a binary number, the quotient has 4 bits, and thus the division operation may be performed using the first division operator.
  • the division operation processing apparatus 100 performs the division operation processing on the input data using the second division operation unit, more resources are used than the division operation processing on the input data using the first division operation unit. This can be consumed.
  • the division operation processing apparatus 100 selects an operator capable of performing a division operation on the input data based on the difference between the input data and the reference data, thereby efficiently using the resources required for the operation. have.
  • FIG. 3 is a flowchart illustrating a method of processing a division operation, according to an exemplary embodiment.
  • the division operation processing apparatus 100 obtains input data.
  • the division operation processing apparatus 100 may obtain input data for performing a division operation from an external device connected to the division operation processing apparatus 100.
  • the division operation processing apparatus 100 detects reference data that is data about division operations corresponding to the obtained input data, from a cache memory in which data regarding at least one division operation is pre-stored.
  • the division operation processing apparatus 100 may determine an index indicating a location on a cache memory for detecting reference data based on at least one of an input dividend, an input divisor, and a size of a cache memory. In addition, the division operation processing apparatus 100 may detect the reference data from the cache memory using the determined index.
  • the division operation processing apparatus 100 may generate an operator based on a difference between the detected reference data and the input data of any one of a plurality of operators identified according to at least one of the number of processable data bits and the type of operation. Choose.
  • a method of selecting an operator based on the difference between the reference data and the input data by the division operation processing apparatus 100 according to an embodiment will be described in detail later with reference to FIG. 4.
  • the division operation processing apparatus 100 obtains a division operation result of the input data from the selected calculator.
  • the division operation processing apparatus 100 may store the obtained division operation result in a location on a cache memory indicated by an index determined based on input data.
  • FIG. 4 is a flowchart illustrating a method of processing a division operation in detail according to an exemplary embodiment.
  • step S410 the division operation processing apparatus 100 may obtain input data. Meanwhile, step S410 may correspond to step S310 described above with reference to FIG. 3.
  • the division operation processing apparatus 100 may detect reference data that is data regarding division operations corresponding to input data obtained from a cache memory in which at least one division operation data is stored.
  • step S420 may correspond to step S320 described above with reference to FIG. 3.
  • the division operation processing apparatus 100 may determine whether the divisor of the input data and the divisor of the reference data are the same.
  • the division operation processing apparatus 100 may determine whether a difference between the dividend of the input data and the dividend of the reference data is equal to or less than a threshold.
  • the division operation processing apparatus 100 may determine whether a difference between the dividend of the input data and the dividend of the reference data is equal to or less than a threshold.
  • the division operation processing apparatus 100 may determine whether a difference between the dividend of the input data and the dividend of the reference data is equal to or less than the input dividend.
  • the division operation processing apparatus 100 may determine whether the difference between the dividend of the input data and the dividend of the reference data is equal to or less than the input divisor. Can be.
  • the division operation processing apparatus 100 may perform a division operation on the input data according to the first mode.
  • the division operation processing apparatus 100 may perform a division operation on the input data according to the first mode.
  • the division operation processing apparatus 100 may obtain a division operation result of the input data from the reference data without using the division operator or the addition operator. This will be described later in more detail with reference to FIG. 5.
  • the division operation processing apparatus 100 may perform a division operation on the input data according to the second mode.
  • the division operation processing apparatus 100 may perform a division operation on the input data according to the second mode.
  • the division operation processing apparatus 100 may perform a division operation based on the detected reference data to obtain a division operation result of the input data. This will be described later in more detail with reference to FIGS. 6A and 6B.
  • the division operation processing apparatus 100 may perform a division operation on the input data according to the third mode.
  • the division operation processing apparatus 100 may perform a division operation on the input data according to the third mode when the divisor of the input data is different. According to another embodiment, the division operation processing apparatus 100 may perform the division operation on the input data according to the third mode even when the difference between the dividend of the input data and the dividend of the reference data is equal to or less than a threshold. In the third mode, the division operation processing apparatus 100 may directly perform a division operation on the input data without using the reference data. This will be described later in more detail with reference to FIG. 7.
  • FIG. 5 is a diagram for describing a method of performing a division operation according to a first mode in a division operation processing apparatus according to an embodiment.
  • the division operation processing apparatus 500 may include an input unit 510, a controller 520, a cache memory 530, an operation unit 540, and an output unit 550.
  • the operation unit 540 may include a division operator 541, a multiplexer 543, an addition operator 545, a subtraction operator 547, and a demultiplexer 549.
  • the input unit 510 may obtain input data.
  • the input unit 510 may obtain input data having a dividend of 490 and a dividend of 33.
  • the controller 520 may determine the index of the obtained input data as 1 by performing the remaining operation of the divisor 33 to 32, which is the size of the cache memory 530. Accordingly, the controller 520 may detect reference data corresponding to the index 1 in the cache memory 530.
  • the dividend of the detected reference data is 495 and the divisor is 33.
  • the operation unit 540 determines whether a difference (hereinafter, referred to as a difference value) between the dividend 490 of the input data and the dividend 495 of the reference data is equal to or less than a threshold of 0xffff. can do.
  • the calculator 540 may compare the difference value and the divisor of the input data as the difference value is determined to be equal to or less than 0xffff.
  • the controller 520 may select the first mode among the plurality of modes since the difference value 5 calculated by the calculator 540 is less than 33, the divisor of the input data.
  • the calculator 540 may compare the reference dividend and the input dividend. As a result of the comparison, when the reference dividend exceeds the input dividend, the operation unit 540 may determine a value obtained by subtracting 1 from the share included in the reference data as the share of the input data. According to another example, when the reference dividend is less than or equal to the input dividend, the operation unit 540 may determine the share of the reference data as the share of the input data. For example, since the divider 490 of the input data is smaller than the dividend of the reference data 495, the operation unit 540 may perform a subtraction operation of subtracting 1 from 15, which is the quotient of the reference data, through the subtraction operator 547. The operation result may be transferred to the output unit 550 through the demultiplexer 549.
  • the output unit 550 may receive and output a calculation result of the calculator 540. Meanwhile, the operation unit 540 may transmit the operation result to the cache memory 530 so that the operation result may be updated in the cache memory 530.
  • the division operation processing apparatus 500 may perform the division operation on the input data without using the division operator 541.
  • 6A and 6B are diagrams for describing a method of performing a division operation according to a second mode in a division operation processing apparatus according to an embodiment.
  • the division operation processing apparatus 500 illustrated in FIGS. 6A and 6B may correspond to the division operation processing apparatus 500 described above with reference to FIG. 5.
  • the input unit 510 may obtain data having a dividend of 545 and a dividend of 33.
  • the controller 520 may determine the index of the obtained input data as 1 by performing the remaining operation of the divisor 33 to 32, which is the size of the cache memory 530. Accordingly, the controller 520 may detect reference data corresponding to the index 1 in the cache memory 530.
  • the dividend of the detected reference data is 495 and the divisor is 33.
  • the operation unit 540 determines whether a difference (hereinafter, referred to as a difference value) between the dividend of the input data 545 and the dividend of the reference data 495 is equal to or less than a threshold of 0xffff. can do.
  • the controller 520 may compare the difference value and the divisor of the input data as the difference value is determined to be equal to or less than the threshold value of 0xffff.
  • the controller 520 may select the second mode among the plurality of modes since the difference value 50 calculated by the calculator 540 exceeds 33, the divisor of the input data.
  • the calculator 540 may calculate a quotient and a remainder obtained by dividing the difference between the input dividend and the referred divisor by the input divisor.
  • the calculator 540 may determine the share of the input data based on the sum of the share of the reference data and the calculated share. According to another example, when the calculated quotient is less than 0 and the calculated remainder is not 0, the calculator 540 subtracts 1 from the sum of the calculated quotient and the quotient of the input data. The share can be determined.
  • the division operator 541 included in the calculator 540 may divide the difference 50 by the divisor 33 to calculate the quotient 1 and the remainder 17.
  • the addition operator 545 included in the calculator 540 may determine the quotient of the input data as 16 by adding the calculated quotient 1 to the quotient 15 of the reference data. The operation result may be transferred to the output unit 550 through the demultiplexer 549.
  • the output unit 550 may receive and output a calculation result of the calculator 540. Meanwhile, the operation unit 540 may transmit the operation result to the cache memory 530 so that the operation result may be updated in the cache memory 530.
  • the input unit 510 may obtain data having a dividend of 320 and a dividend of 33.
  • the controller 520 may determine the index of the obtained input data as 1 by performing the remaining operation of the divisor 33 to 32, which is the size of the cache memory 530. Accordingly, the controller 520 may detect reference data corresponding to the index 1 in the cache memory 530.
  • the dividend of the detected reference data is 495 and the divisor is 33.
  • the operation unit 540 determines whether a difference (hereinafter, referred to as a difference value) between the dividend of the input data 320 and the dividend of the reference data 495 is equal to or less than a threshold of 0xffff. can do.
  • the calculator 540 may compare the difference value and the divisor of the input data as the difference value is determined to be equal to or less than 0xffff.
  • the controller 520 may select the second mode among the plurality of modes since the difference value 175 exceeds 33, the divisor of the input data.
  • the calculator 540 may perform a division operation based on the reference data to determine the quotient of the input data.
  • the division operator 541 included in the calculator 540 may divide the difference value -175 by the divisor 33 and calculate the quotient -5 and the remainder -10.
  • the addition operator 545 included in the calculator 540 may add 15, which is the share of the reference data, to ⁇ 5, which is the calculated share.
  • the subtraction operator 547 included in the operation unit 540 subtracts 1 from the addition operation result of the addition operator 545.
  • the calculator 540 may determine the quotient calculated as the division operation of the input data as 9.
  • the operation result may be transferred to the output unit 550 through the demultiplexer 549.
  • the output unit 550 may receive and output a calculation result of the calculator 540. Meanwhile, the operation unit 540 may transmit the operation result to the cache memory 530 so that the operation result may be updated in the cache memory 530.
  • FIG. 7 is a diagram for describing a method of performing a division operation according to a third mode in the division operation processing apparatus 500, according to an exemplary embodiment.
  • the division operation processing apparatus 500 illustrated in FIG. 7 may correspond to the division operation processing apparatus 500 described above with reference to FIG. 5.
  • the input unit 510 may obtain input data.
  • the input unit 510 may obtain input data having a dividend of 131072 and a dividend of 33.
  • the controller 520 may determine the index of the obtained input data as 1 by performing the remaining operation of the divisor 33 to 32, which is the size of the cache memory 530. Accordingly, the controller 520 may detect reference data corresponding to the index 1 in the cache memory 530.
  • the dividend of the detected reference data is 495 and the divisor is 33.
  • the controller 520 determines whether a difference (hereinafter, referred to as a difference value) between the dividend of the input data 490 and the dividend of the reference data 495 is equal to or less than a threshold of 0xffff. can do.
  • the controller 520 may select the third mode as the difference value exceeds 0xfff, which is a threshold value.
  • the calculator 540 may perform a division operation on the input data using the division operator 541.
  • the quotient of the input data may be determined as 3971.
  • the operation result may be transferred to the output unit 550 through the demultiplexer 549.
  • the output unit 550 may receive and output a calculation result of the calculator 540. Meanwhile, the operation unit 540 may transmit the operation result to the cache memory 530 so that the operation result may be updated in the cache memory 530.
  • FIG. 8 is a block diagram illustrating in detail a division operation processing apparatus 800 according to another embodiment.
  • the division operation processing apparatus 800 may include an input unit 810, a controller 820, a cache memory 830, a plurality of calculators 840, and an output unit 850.
  • the input unit 810 may obtain input data for performing a division operation.
  • the input unit 810 may be configured with a plurality of slots in order to perform a division operation on a plurality of input data in parallel.
  • the controller 820 may detect, from the cache memory 830, reference data which is data about a division operation corresponding to the obtained input data. When the difference between the input data and the reference data is less than the preset value, the controller 820 may determine the division operation result of the reference data as the division operation result of the input data through the circuit 825 connected to the output unit 850. have. When the difference between the input data and the reference data is equal to or greater than a preset value, the controller 820 may select one of the plurality of calculators 840 based on the detected difference between the reference data and the input data.
  • the cache memory 830 may store data regarding at least one division operation result performed by the division operation processing apparatus 800.
  • the cache memory 830 may store data regarding the result of another division operation performed before the division operation on the input data.
  • the plurality of calculators 840 may include a subtraction operator 842 and a plurality of first division calculators 845 and 846. Meanwhile, the plurality of first division calculators 845 and 846 may be connected to each other to operate as the second division operator 844. For example, when the first division operator is selected by the controller 820, one of the first division operator 845 and the first division divider 846 may be selected. Meanwhile, when the second division operator is selected by the controller 320, the first division operator 845 and the first division divider 846 may be connected to each other to operate as the second division operator 844.
  • the output unit 850 obtains a division calculation result of the input data from the selected calculator.
  • the output unit 850 may be configured of a plurality of slots so as to obtain a result of a division operation performed in parallel on each of the plurality of input data.
  • FIG. 9 is a block diagram illustrating in detail a division operation processing apparatus 900 according to another embodiment.
  • the division operation processing apparatus 900 may include an input unit 910, a controller 920, a cache memory 930, a plurality of calculators 940, and an output unit 950.
  • the input unit 910, the control unit 920, the cache memory 930, and the output unit 950 may include the input unit 810, the control unit 820, the cache memory 830, and the output described with reference to FIG. 8. It may correspond to the unit 850.
  • the controller 920 divides the result of the division operation of the reference data into the input data through the circuit 925 connected to the output unit 950. Can be determined as the result of the operation. If the difference between the input data and the reference data is equal to or greater than a preset value, the controller 920 may calculate a division operation result for the input data using any one of the plurality of calculators 940.
  • the plurality of calculators 940 may include a second division calculator 942, a plurality of first division operators 944, and a subtraction operator 946.
  • the division operators 942 and 944 and the subtraction operator 946 included in the plurality of calculators 940 may be connected in parallel with each other.
  • the structure of the plurality of calculators 940 is not limited thereto.
  • FIG. 10 is a flowchart for describing a method of determining, by the division operation processing apparatus 100, an index for detecting reference data corresponding to input data.
  • the divide operation processing apparatus 100 may obtain input data.
  • step S1010 may correspond to step S510 described above with reference to FIG. 3.
  • the division operation processing apparatus 100 may determine an index indicating a location on the cache memory based on at least one of the input divisor, the input dividend, and the size of the cache memory included in the obtained input data.
  • the controller 120 may determine the remaining operation result value between the input divisor and the size of the cache memory 130 as an index. According to another example, the controller 120 may determine the index information by summing the division operation result between the input divisor and the size of the cache memory 130 and the remaining operation result between the input divisor and the size of the cache memory 130. According to another example, the controller 120 may determine index information by summing up the remaining calculation result between the input divisor and the size of the cache memory 130 and some data bits constituting the input dividend.
  • the division operation processing apparatus 100 may detect reference data that is data about division operations corresponding to the obtained input data, from a cache memory in which data regarding at least one division operation is pre-stored.
  • step S1030 may correspond to step S320 described above with reference to FIG. 3.
  • the division operation processing apparatus 100 may select one of the plurality of calculators based on the difference between the detected reference data and the input data.
  • step S1040 may correspond to step S330 described above with reference to FIG. 3.
  • the division operation processing apparatus 100 may obtain a division operation result of the input data from the selected calculator.
  • step S1050 may correspond to step S340 described above with reference to FIG. 3.
  • the division operation processing apparatus 100 may store the division operation result at a location on the cache memory indicated by the determined index.
  • FIG. 11 is a diagram for describing a method of determining an index when a difference in an input divisor changed over time is a multiple of a size of a cache memory, according to an exemplary embodiment.
  • the input divisor is changed to 32, 64, and 32, respectively.
  • 32, the difference between the input divisors may correspond to a multiple of 32, the size of the cache memory.
  • the division operation processing apparatus 100 may determine an index indicating a location on the cache memory based on at least one of the input divisor, the input dividend, and the size of the cache memory included in the obtained input data. For example, the division operation processing apparatus 100 may determine, as an index, a result value of a division operation for the input divisor and the size of the cache memory.
  • the difference in the input divisor changed over time is a multiple of the size of the cache memory
  • the index is determined as the result of the division operation on the input divisor and the size of the cache memory
  • the input is determined.
  • the divisor is 32 and the index value of 64 may be determined to be the same.
  • the division operation processing apparatus 100 may detect the reference divisor 32 using an index determined based on the input divisor. In this case, a difference between 64 and 32 corresponds to a relatively large difference in values, and thus, in performing a division operation on 64, it may be difficult to utilize a division operation result of reference data.
  • the division operation processing apparatus 100 adds the division result and the division operation result for the input divisor and the cache memory when the difference in the input divisor changed over time is a multiple of the size of the cache memory.
  • the index may be 1 plus 0 and 1.
  • the index when the input divisor is 64 and the size of the cache memory is 32 may be 2 plus 0 and 2.
  • the division operation processing apparatus 100 sets the indexes differently to prevent the result of the division operation for the different input divisors having a relatively large difference from being stored at the same location on the cache memory, thereby making the processing of the division operation more efficient. Can be done.
  • FIG. 12 is a diagram for describing a method of determining an index when an input divider is fixed and an input dividend changes with time according to an embodiment.
  • the input divisor is fixed to 0X5, and as time passes, the input dividend is changed to 0X10020, 0X10, and 0X10020, respectively.
  • the division operation processing apparatus 100 may determine an index indicating a location on the cache memory based on at least one of the input divisor, the input dividend, and the size of the cache memory included in the obtained input data. For example, the division operation processing apparatus 100 may determine, as an index, a result value of a division operation for the input divisor and the size of the cache memory.
  • the division operation processing apparatus 100 may include some of the bits constituting the input dividend at the low bit position of the index determined based on the result of the division operation on the input divisor and the size of the cache memory. Can be added to determine the index.
  • the division operation processing apparatus 100 may perform the division operation more efficiently by setting the indexes differently to prevent the division operation results for the input dividends having different differences from being stored at the same location on the cache memory. have.
  • the device comprises a processor, a memory for storing and executing program data, a permanent storage such as a disk drive, a communication port for communicating with an external device, a user interface such as a touch panel, a key, a button and the like.
  • a user interface such as a touch panel, a key, a button and the like.
  • Methods implemented by software modules or algorithms may be stored on a computer readable recording medium as computer readable codes or program instructions executable on the processor.
  • the computer-readable recording medium may be a magnetic storage medium (eg, read-only memory (ROM), random-access memory (RAM), floppy disk, hard disk, etc.) and an optical reading medium (eg, CD-ROM). ) And DVD (Digital Versatile Disc).
  • the computer readable recording medium can be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
  • the medium is readable by the computer, stored in the memory, and can be executed by the processor.
  • the invention can be represented by functional block configurations and various processing steps. Such functional blocks may be implemented in various numbers of hardware or / and software configurations that perform particular functions.
  • the present invention relates to integrated circuit configurations such as memory, processing, logic, look-up table, etc., which may execute various functions by the control of one or more microprocessors or other control devices. It can be adopted.
  • the present invention includes various algorithms implemented in data structures, processes, routines or other combinations of programming constructs, including C, C ++ It may be implemented in a programming or scripting language such as Java, an assembler, or the like.
  • the functional aspects may be implemented with an algorithm running on one or more processors.
  • the present invention may employ the prior art for electronic environment setting, signal processing, and / or data processing.
  • Terms such as “mechanism”, “element”, “means” and “configuration” can be used widely and are not limited to mechanical and physical configurations. The term may include the meaning of a series of routines of software in conjunction with a processor or the like.
  • connection or connection members of the lines between the components shown in the drawings by way of example shows a functional connection and / or physical or circuit connections, in the actual device replaceable or additional various functional connections, physical It may be represented as a connection, or circuit connections.
  • such as "essential”, “important” may not be a necessary component for the application of the present invention.

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)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

입력 데이터를 획득하고, 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터, 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출하여, 처리 가능한 데이터 비트(bit)의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기 중 어느 하나의 연산기를 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 선택하고, 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득하는 나눗셈 연산을 처리하는 방법이 개시된다.

Description

나눗셈 연산을 처리하는 방법, 장치 및 기록매체
개시된 기술적 사상은 나눗셈 연산을 처리하는 방법, 나눗셈 연산을 처리하는 장치 및 나눗셈 연산을 처리하는 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체에 관한 것이다.
화상 처리 기술 및 컴퓨터 비젼 기술이 발달함에 따라 복잡한 연산을 요구하는 응용 프로그램들이 많아지고 있다. 특히, CPU 및 GPU에서 처리되어야 하는 나눗셈의 연산량이 비약적으로 증가하고 있는 추세이다. 나눗셈 연산의 경우, 다른 연산에 비해 연산을 처리하는데 이용되는 자원이 크므로, 나눗셈 연산을 효율적으로 수행하는 알고리즘에 대한 개발이 지속적으로 이루어지고 있다.
다만, 현재 개발된 알고리즘은 나눗셈 연산을 효율적으로 수행하기 위해 룩업 테이블이나 장비를 추가적으로 구비해야 하고, 특정한 나눗셈 연산의 구조에만 부합되는 경우가 많아, 여전히 나눗셈 연산을 효율적으로 수행할 수 있는 기술에 대한 개발이 필요로 되고 있는 실정이다.
개시된 실시예는 나눗셈 연산을 수행하고자 하는 입력 데이터와 이전에 수행된 나눗셈 연산의 결과를 이용하여 나눗셈 연산을 수행할 수 있는 적절한 연산기를 선택함으로써, 나눗셈 연산을 보다 효율적으로 처리할 수 있는 나눗셈 연산을 처리하는 방법, 장치 및 기록매체에 관한 것이다.
입력 데이터를 획득하고, 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터, 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출하여, 처리 가능한 데이터 비트(bit)의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기 중 어느 하나의 연산기를 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 선택하고, 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득하는 나눗셈 연산을 처리하는 방법이 개시된다.
이전에 수행된 나눗셈 연산의 결과를 이용하여 나눗셈 연산을 수행할 수 있는 적절한 연산기를 선택함으로써, 나눗셈 연산을 보다 효율적으로 처리할 수 있다.
도 1은 일 실시예에 따른 나눗셈 연산을 처리하는 장치를 도시한 도면이다.
도 2A 및 도 2B는 일 실시예에 따라 입력 데이터에 나눗셈 연산을 수행하는 경우, 나눗셈 연산기를 선택하는 기준을 설명하기 위한 도면이다.
도 3은 일 실시예에 따라 나눗셈 연산을 처리하는 방법을 설명하기 위한 흐름도이다.
도 4는 일 실시예에 따라 나눗셈 연산을 처리하는 방법을 보다 구체적으로 설명하기 위한 흐름도이다.
도 5는 일 실시예에 따른 나눗셈 연산 처리 장치에서 제 1 모드에 따라 나눗셈 연산을 수행하는 방법을 설명하기 위한 도면이다.
도 6a 및 도 6b는 일 실시예에 따른 나눗셈 연산 처리 장치에서 제 2 모드에 따라 나눗셈 연산을 수행하는 방법을 설명하기 위한 도면이다.
도 7은 일 실시예에 따른 나눗셈 연산 처리 장치에서 제 3 모드에 따라 나눗셈 연산을 수행하는 방법을 설명하기 위한 도면이다.
도 8은 다른 실시예에 따른 나눗셈 연산 처리 장치를 보다 상세하게 설명하기 위한 블록도이다.
도 9는 또 다른 일 실시예에 따른 나눗셈 연산 처리 장치를 보다 상세하게 설명하기 위한 블록도이다.
도 10은 일 실시예에 따른 나눗셈 연산 처리 장치가 입력 데이터에 대응되는 참조 데이터를 검출하기 위해 인덱스를 결정하는 방법을 설명하기 위한 흐름도이다.
도 11은 일 실시예에 따라, 시간에 따라 변경되는 입력 제수의 차이가 캐쉬 메모리의 크기의 배수인 경우에 인덱스를 결정하는 방법을 설명하기 위한 도면이다.
도 12는 일 실시예에 따라, 입력 제수가 고정되고 입력 피제수가 시간에 따라 변경되는 경우, 인덱스를 결정하는 방법을 설명하기 위한 도면이다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법은, 입력 데이터를 획득하는 단계; 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터, 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출하는 단계; 처리 가능한 데이터 비트(bit)의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기 중 어느 하나의 연산기를 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 선택하는 단계; 및 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득하는 단계를 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법은, 입력 데이터에 포함된 입력 제수와 참조 데이터에 포함된 참조 제수의 차이에 기초하여, 검출된 참조 데이터의 이용 여부를 결정하는 단계를 더 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법에 있어서, 획득하는 단계는, 참조 제수와 입력 제수가 동일한 경우, 입력 데이터에 포함된 입력 피제수와 참조 데이터에 포함된 참조 피제수의 차이값을 산출하는 단계; 산출된 차이값이 기 설정된 임계값 및 입력 제수 이하인 경우, 참조 피제수와 입력 피제수를 비교하는 단계; 및 비교 결과, 참조 피제수가 입력 피제수를 초과하는 경우, 참조 데이터에 포함된 몫에서 1을 뺀 값을 입력 데이터의 몫으로 결정하고, 참조 피제수가 입력 피제수 이하인 경우, 참조 데이터의 몫을 입력 데이터의 몫으로 결정하는 단계를 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법에 있어서, 획득하는 단계는, 참조 제수와 입력 제수가 동일한 경우, 입력 데이터에 포함된 입력 피제수와 참조 데이터에 포함된 참조 피제수의 차이값을 산출하는 단계; 산출된 차이값이 기 설정된 임계값 미만이면서 입력 제수를 초과하는 경우, 입력 피제수와 피참조 제수 간의 차이를 입력 제수로 나눈 몫과 나머지를 산출하는 단계; 및 산출된 몫이 0 이상이거나 산출된 나머지가 0인 경우, 참조 데이터의 몫에 산출된 몫의 합으로 입력 데이터의 몫을 결정하고, 산출된 몫이 0 미만이고, 산출된 나머지가 0이 아닌 경우, 참조 데이터의 몫에 산출된 몫의 합을 더한 값에서 1을 뺀 값으로, 입력 데이터의 몫을 결정하는 단계를 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법에 있어서, 획득하는 단계는, 참조 제수와 입력 제수가 상이하거나, 입력 피제수와 참조 피제수 간의 차이값이 기 설정된 임계값을 초과하는 경우, 입력 데이터에 포함된 입력 피제수와 입력 제수에 대해 나눗셈 연산을 수행하는 단계를 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법에 있어서, 복수의 연산기는, 처리 가능한 나눗셈 연산의 몫의 데이터 비트 수가 서로 다른 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기를 포함하고, 선택하는 단계는, 입력 데이터에 포함된 입력 제수와 참조 데이터에 포함된 참조 제수가 상이한 경우, 제 1 나눗셈 연산기에서 처리 가능한 나눗셈 연산의 몫의 데이터 비트수와 입력 제수를 비교하여 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기 중 어느 하나를 선택한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법은, 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정하는 단계를 더 포함하고, 검출하는 단계는, 결정된 인덱스를 이용하여, 캐쉬 메모리로부터 참조 데이터를 검출한다.
일 실시예에 따른 나눗셈 연산을 처리하는 방법은, 결정된 인덱스가 나타내는 캐쉬 메모리 상의 위치에 나눗셈 연산 결과를 저장하는 단계를 더 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치는, 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리; 입력 데이터를 획득하는 입력부; 처리 가능한 데이터 비트의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기를 포함한 연산부; 캐쉬 메모리로부터, 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출하고, 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 복수의 연산기 중 어느 하나를 선택하는 제어부; 및 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득하는 출력부를 포함한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 제어부는, 입력 데이터에 포함된 입력 제수와 참조 데이터에 포함된 참조 제수의 차이에 기초하여, 검출된 참조 데이터의 이용 여부를 결정한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 연산부는, 참조 제수와 입력 제수가 동일한 경우, 입력 데이터에 포함된 입력 피제수와 참조 데이터에 포함된 참조 피제수의 차이값을 산출하고, 산출된 차이값이 기 설정된 임계값 및 입력 제수 이하인 경우, 참조 피제수와 입력 피제수를 비교하며, 비교 결과, 참조 피제수가 입력 피제수를 초과하는 경우, 참조 데이터에 포함된 몫에서 1을 뺀 값을 입력 데이터의 몫으로 결정하고, 참조 피제수가 입력 피제수 이하인 경우, 참조 데이터의 몫을 입력 데이터의 몫으로 결정한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 연산부는, 참조 제수와 입력 제수가 동일한 경우, 입력 데이터에 포함된 입력 피제수와 참조 데이터에 포함된 참조 피제수의 차이값을 산출하고, 산출된 차이값이 기 설정된 임계값 미만이면서 입력 제수를 초과하는 경우, 입력 피제수와 피참조 제수 간의 차이를 입력 제수로 나눈 몫과 나머지를 산출하며, 산출된 몫이 0 이상이거나 산출된 나머지가 0인 경우, 참조 데이터의 몫에 산출된 몫의 합으로 입력 데이터의 몫을 결정하고, 산출된 몫이 0 미만이고, 산출된 나머지가 0이 아닌 경우, 참조 데이터의 몫에 산출된 몫의 합을 더한 값에서 1을 뺀 값으로, 입력 데이터의 몫을 결정한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 연산부는, 참조 제수와 입력 제수가 상이하거나, 입력 피제수와 참조 피제수 간의 차이값이 기 설정된 임계값을 초과하는 경우, 입력 데이터에 포함된 입력 피제수와 입력 제수에 대해 나눗셈 연산을 수행한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 복수의 연산기는, 처리 가능한 나눗셈 연산의 몫의 데이터 비트 수가 서로 다른 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기를 포함하고, 제어부는, 입력 데이터에 포함된 입력 제수와 참조 데이터에 포함된 참조 제수가 상이한 경우, 제 1 나눗셈 연산기에서 처리 가능한 나눗셈 연산의 몫의 데이터 비트 수인 임계값과 입력 제수를 비교하여 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기 중 어느 하나를 선택한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 제어부는, 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정하고, 결정된 인덱스를 이용하여, 캐쉬 메모리로부터 참조 데이터를 검출한다.
일 실시예에 따른 나눗셈 연산을 처리하는 장치에 있어서, 제어부는, 결정된 인덱스가 나타내는 캐쉬 메모리 상의 위치에 나눗셈 연산 결과를 저장한다.
아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.
명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.
이하 첨부된 도면을 참고하여 개시된 실시예들을 상세히 설명하기로 한다.
도 1은 일 실시예에 따른 나눗셈 연산을 처리하는 장치(100)를 도시한 도면이다.
도 1에 도시된 나눗셈 연산을 처리하는 장치(100, 이하 나눗셈 연산 처리 장치)에는 본 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 1에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다.
도 1을 참고하면, 나눗셈 연산 처리 장치(100)는 입력부(110), 제어부(120), 캐쉬 메모리(130), 복수의 연산기(140) 및 출력부(150)를 포함할 수 있다.
입력부(110)는 입력 데이터를 획득한다. 일 실시예에 따른 입력부(110)는 나눗셈 연산 처리 장치(100)와 연결된 외부의 장치로부터 나눗셈 연산을 수행하고자 하는 입력 데이터를 획득할 수 있다. 여기에서, 외부의 장치는 메모리(미도시), 나눗셈 연산 이외의 다른 연산을 수행하는 다른 연산기(미도시) 및 프로세서 중 적어도 하나를 포함할 수 있다.
일 실시예에 따른 입력부(110)는 복수의 입력 데이터에 대한 나눗셈 연산을 병렬적으로 수행할 수 있도록 복수의 슬롯들로 구성될 수 있다. 입력부(110)를 구성하는 복수의 슬록들 각각에 입력 데이터가 할당될 수 있다. 예를 들어, SIMD(Single Instruction Multiple Data) 구조에 따라, 병렬적으로 나눗셈 연산을 수행하는 경우, 입력부(110)는 복수의 슬롯들로 구성될 수 있다.
다만, 이는 일 실시예일 뿐, 입력부(110)는 복수의 슬롯들로 구성되지 않을 수도 있다.
제어부(120)는 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 캐쉬 메모리(130)에 저장된 이전 나눗셈 연산에 관한 데이터로부터 검출한다. 입력 데이터는 입력 피제수 및 입력 제수를 포함할 수 있다. 또한, 참조 데이터는 참조 피제수, 참조 제수, 참조 피제수 및 참조 제수에 대한 나눗셈 연산 처리 결과인 몫 및 나머지 중 적어도 하나를 포함할 수 있다.
한편, 캐쉬 메모리(130)에 이전 나눗셈 연산에 관한 데이터가 저장되어 있지 않은 경우, 제어부(120)는 참조 데이터를 검출하지 않고, 복수의 연산기(140)를 이용하여 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다. 여기에서, 수행된 나눗셈 연산의 결과 및 입력 데이터에 관한 정보는 캐쉬 메모리(130)에 저장될 수 있다.
일 실시예에 따른 제어부(120)는 입력 피제수, 입력 제수 및 캐쉬 메모리(130)의 크기 중 적어도 하나에 기초하여, 참조 데이터를 검출하기 위한 캐쉬 메모리(130) 상의 위치를 나타내는 인덱스를 결정할 수 있다.
예를 들어, 제어부(120)는 입력 제수와 캐쉬 메모리(130)의 크기 간의 나머지 연산 결과값을 인덱스로 결정할 수 있다. 다른 예에 따라, 제어부(120)는 입력 제수와 캐쉬 메모리(130)의 크기 간의 나눗셈 연산 결과 및 입력 제수와 캐쉬 메모리(130)의 크기 간의 나머지 연산 결과를 합산하여 인덱스 정보를 결정할 수도 있다. 또 다른 예에 따라, 제어부(120)는 입력 제수와 캐쉬 메모리(130)의 크기 간의 나머지 연산 결과 및 입력 피제수를 구성하는 일부 데이터 비트를 합산하여, 인덱스 정보를 결정할 수도 있다. 제어부(120)는 결정된 인덱스를 이용하여, 캐쉬 메모리(130)로부터 참조 데이터를 검출할 수 있다.
일 실시예에 따른 제어부(120)는 검출된 참조 데이터에 포함된 참조 제수, 참조 피제수와 입력 데이터에 포함된 입력 제수 및 입력 피제수를 각각 비교할 수 있다. 제어부(120)는 검출된 참조 데이터와 입력 데이터 간의 차이가 기 설정된 값 미만인 경우에는, 참조 데이터의 나눗셈 연산 결과를 입력 데이터에 대한 나눗셈 연산 결과로 결정할 수 있다. 예를 들어, 참조 제수와 입력 제수의 차이 및 입력 제수 및 입력 피제수와의 차이가 모두 기 설정된 값 미만인 경우, 제어부(120)는 참조 데이터의 나눗셈 연산 결과를 출력부(150)와 연결된 회로(145)를 통해 전송(pass-through)할 수 있다.
한편, 검출된 참조 데이터와 입력 데이터 간의 차이가 기 설정된 값 이상인 경우, 제어부(120)는 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여, 입력 데이터에 대한 나눗셈 연산을 처리할 수 있는 복수의 연산기(140) 중 어느 하나를 선택한다.
여기에서, 복수의 연산기(140)는 처리 가능한 데이터 비트(bit)의 수 및 연산의 종류 중 적어도 하나에 따라 식별될 수 있다. 예를 들어, 복수의 연산기(140)은 적어도 하나의 뺄셈 연산기, 복수의 나눗셈 연산기를 포함할 수 있다. 또한, 복수의 나눗셈 연산기는 처리 가능한 데이터 비트의 수에 따라 분류될 수 있다. 여기에서, 처리 가능한 데이터 비트의 수는 최대 산출할 수 있는 나눗셈 연산 결과의 몫의 데이터 비트 수일 수 있다. 예를 들어, 복수의 나눗셈 연산기는 최대 산출할 수 있는 나눗셈 연산 결과의 몫의 데이터 비트 수가 서로 다른 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기를 포함할 수 있다. 제 1 나눗셈 연산기와 제 2 나눗셈 연산기에 대해서는 도 2A 및 도 2B를 참조하여 보다 구체적으로 후술하도록 한다.
한편, 일 실시예에 따른 제어부(120)는 입력 피제수와 참조 피제수의 차이에 기초하여 복수의 연산기 중 어느 하나를 선택할 수 있다. 예를 들어, 제어부(120)는 참조 피제수에서 참조 데이터에 포함된 나머지를 뺀 제 1 값을 산출하고, 산출된 제 1 값과 입력 피제수 간의 차이값인 제 2 값을 입력 제수와 비교한 결과에 기초하여 복수의 연산기 중 어느 하나를 선택할 수 있다. 제어부(120)는 제 2 값이 입력 제수 이하인 경우, 뺄셈 연산기를 선택하고, 제 2 값이 입력 제수를 초과하는 경우, 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기 중 어느 하나를 선택할 수 있다.
한편, 제어부(120)는 산출된 제 2 값이 제 1 나눗셈 연산기에서 최대 산출할 수 있는 몫의 데이터 비트 수(이하, 임계값) 미만인 지 여부 및 입력 제수가 임계값 미만인 지 여부 중 적어도 하나에 기초하여, 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기 중 어느 하나를 선택할 수 있다. 한편, 제 1 나눗셈 연산기가 제 2 나눗셈 연산기에 비해 처리 가능한 데이터 비트 수가 낮은 것으로 가정한다.
제어부(120)는 입력 제수와 참조 제수가 동일한 지 여부를 판단하여, 복수의 연산기 중 어느 하나를 선택하기 위한 조건을 결정할 수 있다.
예를 들어, 제어부(120)는 입력 제수와 참조 제수가 동일한 경우에는, 우선 산출된 제 2 값과 입력 제수를 비교할 수 있다. 제어부(120)는 제 2 값이 입력 제수 이하인 경우, 뺄셈 연산기를 선택할 수 있다. 한편, 제어부(120)는 제 2 값이 입력 제수를 초과하고, 제 2 값이 임계값 미만인 경우에는 제 1 나눗셈 연산기를 선택할 수 있다. 제어부(120)는 제 2 값이 입력 제수를 초과하고, 제 2 값이 임계값 이상인 경우에는, 입력 제수와 임계값을 비교하여, 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기 중 어느 하나를 선택할 수 있다. 구체적으로, 제어부(120)는 제 2 값이 입력 제수를 초과하고, 제 2 값이 임계값 이상이며, 입력 제수가 임계값을 초과하는 경우에는 제 1 나눗셈 연산기를 선택할 수 있다. 또한, 제어부(120)는 제 2 값이 입력 제수를 초과하고, 제 2 값이 임계값 이상이며, 입력 제수가 임계값 이하인 경우에는 제 2 나눗셈 연산기를 선택할 수 있다.
다른 예에 따라, 제어부(120)는 입력 제수와 참조 제수가 상이한 경우에는, 입력 제수와 임계값을 비교하여 복수의 연산기 중 어느 하나를 선택할 수 있다. 제어부(120)는 입력 제수가 임계값을 초과하는 경우에는, 제 1 나눗셈 연산기를 선택하고, 입력 제수가 임계값 이하인 경우에는, 제 2 나눗셈 연산기를 선택할 수 있다.
캐쉬 메모리(130)는 입력 데이터에 대한 나눗셈 연산 이전에 수행된 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된다. 또한, 캐쉬 메모리(130)에서 결정된 인덱스가 나타내는 위치 상에 입력 데이터에 대한 나눗셈 연산 결과가 저장될 수 있다.
복수의 연산기(140)는 입력 데이터에 대한 나눗셈 연산을 수행할 수 있는 n개의 연산기를 포함한다. 예를 들어, 복수의 연산기(140)은 적어도 하나의 뺄셈 연산기, 적어도 하나의 제 1 나눗셈 연산기 및 적어도 하나의 제 2 나눗셈 연산기를 포함할 수 있다.
출력부(150)는 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득한다. 일 실시예에 따른 출력부(150)는 복수의 입력 데이터 각각에 대해 병렬적으로 수행된 나눗셈 연산의 결과를 획득할 수 있도록 복수의 슬롯들로 구성될 수 있다. 출력부(150)를 구성하는 복수의 슬록들 각각에 복수의 입력 데이터 각각에 대한 나눗셈 연산의 결과가 할당될 수 있다.
다만, 이는 일 실시예일 뿐, 출력부(150)는 복수의 슬롯들로 구성되지 않을 수도 있다.
도 2A 및 도 2B는 일 실시예에 따라 입력 데이터에 나눗셈 연산을 수행하는 경우, 나눗셈 연산기를 선택하는 기준을 설명하기 위한 도면이다.
도 2A를 참고하면, 나눗셈 연산 처리 장치(100)가 249 및 13 각각을 이진수로 변환하여 나눗셈 연산을 수행하는 과정을 확인할 수 있다. 한편, 여기에서, 제 1 나눗셈 연산기는 나눗셈 연산 결과인 몫을 최대 4비트까지 산출할 수 있다고 가정한다. 이에 따라, 임계값은 4로 결정될 수 있다.
249 및 13 각각을 이진수로 변환하여, 나눗셈 연산이 수행 되면 몫은 8비트를 가지므로, 제 1 나눗셈 연산기로는 나눗셈 연산을 수행할 수 없다. 이러한 경우, 나눗셈 연산 처리 장치(100)는 나눗셈 연산 결과인 몫을 최대 8비트까지 산출할 수 있는 제 2 나눗셈 연산기를 선택할 수 있다. 다만, 이는 일 실시예일 뿐, 제 2 나눗셈 연산기가 산출할 수 있는 몫의 최대 비트수가 8비트에 한정되는 것은 아니다. 여기에서, 제 2 나눗셈 연산기는 복수의 제 1 나눗셈 연산기로 구성될 수도 있다.
도 2B를 참고하면, 나눗셈 연산 처리 장치(100)가 15 및 13 각각을 이진수로 변환하여 나눗셈 연산을 수행하는 과정을 확인할 수 있다. 15 및 13 각각을 이진수로 변환하여, 나눗셈 연산이 수행 되면 몫은 4 비트를 가지므로, 제 1 나눗셈 연산기를 이용하여 나눗셈 연산이 수행될 수 있다.
한편 나눗셈 연산 처리 장치(100)에서 제 2 나눗셈 연산기를 이용하여 입력 데이터에 대한 나눗셈 연산 처리를 수행하는 경우, 제 1 나눗셈 연산기를 이용하여 입력 데이터에 대한 나눗셈 연산 처리를 수행하는 것에 비해 더 많은 자원이 소모될 수 있다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 데이터와 참조 데이터의 차이에 기초하여, 입력 데이터에 대한 나눗셈 연산을 수행할 수 있는 연산기를 선택함으로써, 연산에 필요한 자원을 효울적으로 이용할 수 있다.
도 3은 일 실시예에 따라 나눗셈 연산을 처리하는 방법을 설명하기 위한 흐름도이다.
단계 S310에서, 나눗셈 연산 처리 장치(100)는 입력 데이터를 획득한다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 나눗셈 연산 처리 장치(100)와 연결된 외부의 장치로부터 나눗셈 연산을 수행하고자 하는 입력 데이터를 획득할 수 있다.
단계 S320에서, 나눗셈 연산 처리 장치(100)는 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터, 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출한다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 피제수, 입력 제수 및 캐쉬 메모리의 크기 중 적어도 하나에 기초하여, 참조 데이터를 검출하기 위한 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정할 수 있다. 또한, 나눗셈 연산 처리 장치(100)는 결정된 인덱스를 이용하여, 캐쉬 메모리로부터 참조 데이터를 검출할 수 있다.
단계 S330에서, 나눗셈 연산 처리 장치(100)는 처리 가능한 데이터 비트의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기 중 어느 하나의 연산기를 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 선택한다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)가 참조 데이터와 입력 데이터 간의 차이에 기초하여 연산기를 선택하는 구체적인 방법에 대해서는 도 4를 참고하여 보다 구체적으로 후술하도록 한다.
단계 S340에서, 나눗셈 연산 처리 장치(100)는 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득한다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 획득된 나눗셈 연산 결과를 입력 데이터를 기초로 결정된 인덱스가 나타내는 캐쉬 메모리 상의 위치에 저장할 수 있다.
도 4는 일 실시예에 따라 나눗셈 연산을 처리하는 방법을 보다 구체적으로 설명하기 위한 흐름도이다.
단계 S410에서, 나눗셈 연산 처리 장치(100)는 입력 데이터를 획득할 수 있다. 한편, 단계 S410은 도 3을 참고하여 전술한 단계 S310과 대응될 수 있다.
단계 S420에서, 나눗셈 연산 처리 장치(100)는 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출할 수 있다.
한편, 단계 S420은 도 3을 참고하여 전술한 단계 S320과 대응될 수 있다.
단계 S430에서, 나눗셈 연산 처리 장치(100)는 입력 데이터의 제수와 참조 데이터의 제수가 동일한지 여부를 판단할 수 있다.
단계 S440에서, 나눗셈 연산 처리 장치(100)는 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 임계값 이하인지 여부를 판단할 수 있다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 데이터의 제수와 참조 데이터의 제수가 동일한 경우, 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 임계값 이하인지 여부를 판단할 수 있다.
단계 S450에서, 나눗셈 연산 처리 장치(100)는 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 입력 제수 이하인지 여부를 판단할 수 있다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 임계값 이하인 경우, 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 입력 제수 이하인지 여부를 판단할 수 있다.
단계 S460에서, 나눗셈 연산 처리 장치(100)는 제 1 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 입력 제수 이하인 경우, 제 1 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다. 나눗셈 연산 처리 장치(100)는 제 1 모드에서, 나눗셈 연산기를 이용하지 않고, 뺄셈 연산기 또는 덧셈 연산기를 이용하여, 참조 데이터로부터 입력 데이터의 나눗셈 연산 결과를 획득할 수 있다. 이에 대해서는 도 5를 참고하여 보다 구체적으로 후술하도록 한다.
단계 S470에서, 나눗셈 연산 처리 장치(100)는 제 2 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 입력 제수를 초과하는 경우, 제 2 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다. 나눗셈 연산 처리 장치(100)는 제 2 모드에서, 검출된 참조 데이터를 기초로 나눗셈 연산을 수행하여, 입력 데이터의 나눗셈 연산 결과를 획득할 수 있다. 이에 대해서는 도 6a 및 도 6b를 참고하여 보다 구체적으로 후술하도록 한다.
단계 S480에서, 나눗셈 연산 처리 장치(100)는 제 3 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다.
일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 데이터의 제수가 참조 데이터의 제수가 서로 다른 경우 제 3 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다. 다른 실시예에 따라, 나눗셈 연산 처리 장치(100)는 입력 데이터의 피제수와 참조 데이터의 피제수 간의 차이가 임계값 이하인 경우에도 제 3 모드에 따라 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다. 나눗셈 연산 처리 장치(100)는 제 3 모드에서, 참조 데이터를 이용하지 않고, 입력 데이터에 대한 나눗셈 연산을 직접 수행할 수 있다. 이에 대해서는 도 7을 참고하여 보다 구체적으로 후술하도록 한다.
도 5는 일 실시예에 따른 나눗셈 연산 처리 장치에서 제 1 모드에 따라 나눗셈 연산을 수행하는 방법을 설명하기 위한 도면이다.
도 5에 도시된 나눗셈 연산 처리 장치(500)에는 본 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 5에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다.
도 5를 참고하면, 나눗셈 연산 처리 장치(500)는 입력부(510), 제어부(520), 캐쉬 메모리(530), 연산부(540) 및 출력부(550)를 포함할 수 있다. 또한, 연산부(540)에는 나눗셈 연산기(541), 멀티플렉서(543), 덧셈 연산기(545), 뺄셈 연산기(547) 및 디멀티플렉서(549)가 포함될 수 있다.
일 실시예에 따른 입력부(510)는 입력 데이터를 획득할 수 있다. 예를 들어, 입력부(510)는 피제수가 490이고 제수가 33인 입력 데이터를 획득할 수 있다. 제어부(520)는 제수인 33을 캐쉬 메모리(530)의 크기인 32로 나머지 연산을 수행하여, 획득된 입력 데이터에 대한 인덱스를 1로 결정할 수 있다. 이에 따라, 제어부(520)는 캐쉬 메모리(530) 내에서, 인덱스 1에 대응되는 참조 데이터를 검출할 수 있다. 여기에서, 검출된 참조 데이터의 피제수는 495이고 제수는 33인 것으로 가정한다.
연산부(540)는 입력 데이터의 제수와 참조 데이터의 제수가 동일함에 따라, 입력 데이터의 피제수인 490과 참조 데이터의 피제수인 495 간의 차이(이하, 차이값)가 임계값인 0xffff 이하인지 여부를 판단할 수 있다. 연산부(540)는 차이값이 임계값인 0xffff 이하로 결정됨에 따라, 차이값과 입력 데이터의 제수를 비교할 수 있다. 제어부(520)는 연산부(540)에서 산출된 차이값인 5가 입력 데이터의 제수인 33 미만이므로 복수의 모드들 중 제 1 모드를 선택할 수 있다.
연산부(540)는 제어부(520)에서 제 1 모드가 선택됨에 따라, 참조 피제수와 입력 피제수를 비교할 수 있다. 연산부(540)는 비교 결과, 참조 피제수가 상기 입력 피제수를 초과하는 경우, 참조 데이터에 포함된 몫에서 1을 뺀 값을 입력 데이터의 몫으로 결정할 수 있다. 다른 예에 따라, 연산부(540)는 참조 피제수가 입력 피제수 이하인 경우, 참조 데이터의 몫을 입력 데이터의 몫으로 결정할 수 있다. 예를 들어, 연산부(540)는 입력 데이터의 피제수인 490이 참조 데이터의 피제수인 495 보다 작으므로, 뺄셈 연산기(547)를 통해 참조 데이터의 몫인 15에서 1을 빼는 뺄셈 연산을 수행할 수 있다. 연산 결과는 디멀티플렉서(549)를 통해, 출력부(550)에 전달될 수 있다.
출력부(550)는 연산부(540)의 연산 결과를 수신하여 출력할 수 있다. 한편, 여기에서, 연산부(540)는 연산 결과가 캐쉬 메모리(530)에 업데이트 될 수 있도록 연산 결과를 캐쉬 메모리(530)에 전송할 수도 있다.
전술한 방법에 따라, 일 실시예에 따른 나눗셈 연산 처리 장치(500)는 제 1 모드인 경우, 나눗셈 연산기(541)를 이용하지 않고도, 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다.
도 6a 및 도 6b는 일 실시예에 따른 나눗셈 연산 처리 장치에서 제 2 모드에 따라 나눗셈 연산을 수행하는 방법을 설명하기 위한 도면이다.
여기에서, 도 6a 및 도 6b에 도시된 나눗셈 연산 처리 장치(500)는 도 5를 참고하여 전술한 나눗셈 연산 처리 장치(500)와 대응될 수 있다.
한편, 도 6a를 참고하면, 일 실시예에 따른 입력부(510)는 피제수가 545이고, 제수가 33인 데이터를 획득할 수 있다. 제어부(520)는 제수인 33을 캐쉬 메모리(530)의 크기인 32로 나머지 연산을 수행하여, 획득된 입력 데이터에 대한 인덱스를 1로 결정할 수 있다. 이에 따라, 제어부(520)는 캐쉬 메모리(530) 내에서, 인덱스 1에 대응되는 참조 데이터를 검출할 수 있다. 여기에서, 검출된 참조 데이터의 피제수는 495이고 제수는 33인 것으로 가정한다.
연산부(540)는 입력 데이터의 제수와 참조 데이터의 제수가 동일함에 따라, 입력 데이터의 피제수인 545와 참조 데이터의 피제수인 495 간의 차이(이하, 차이값)가 임계값인 0xffff 이하인지 여부를 판단할 수 있다. 제어부(520)는 차이값이 임계값인 0xffff 이하로 결정됨에 따라, 차이값과 입력 데이터의 제수를 비교할 수 있다. 제어부(520)는 연산부(540)에서 산출된 차이값인 50이 입력 데이터의 제수인 33을 초과하므로 복수의 모드들 중 제 2 모드를 선택할 수 있다.
연산부(540)는 제어부(520)에서 제 2 모드가 선택됨에 따라, 입력 피제수와 상기 피참조 제수 간의 차이를 상기 입력 제수로 나눈 몫과 나머지를 산출할 수 있다. 연산부(540)는 산출된 몫이 0 이상이거나 산출된 나머지가 0인 경우, 참조 데이터의 몫과 산출된 몫의 합으로 입력 데이터의 몫을 결정할 수 있다. 다른 예에 따라, 연산부(540)는 산출된 몫이 0 미만이고, 산출된 나머지가 0이 아닌 경우, 참조 데이터의 몫에 산출된 몫의 합을 더한 값에서 1을 뺀 값으로, 입력 데이터의 몫을 결정할 수 있다.
예를 들어, 연산부(540)에 포함된 나눗셈 연산기(541)는 차이값인 50을 제수인 33으로 나누어, 몫 1과 나머지 17을 산출할 수 있다. 또한, 연산부(540)에 포함된 덧셈 연산기(545)는 산출된 몫 1을 참조 데이터의 몫 15에 더하여, 입력 데이터의 몫을 16으로 결정할 수 있다. 연산 결과는 디멀티플렉서(549)를 통해, 출력부(550)에 전달될 수 있다.
출력부(550)는 연산부(540)의 연산 결과를 수신하여 출력할 수 있다. 한편, 여기에서, 연산부(540)는 연산 결과가 캐쉬 메모리(530)에 업데이트 될 수 있도록 연산 결과를 캐쉬 메모리(530)에 전송할 수도 있다.
한편, 도 6b를 참고하면, 일 실시예에 따른 입력부(510)는 피제수가 320이고, 제수가 33인 데이터를 획득할 수 있다. 제어부(520)는 제수인 33을 캐쉬 메모리(530)의 크기인 32로 나머지 연산을 수행하여, 획득된 입력 데이터에 대한 인덱스를 1로 결정할 수 있다. 이에 따라, 제어부(520)는 캐쉬 메모리(530) 내에서, 인덱스 1에 대응되는 참조 데이터를 검출할 수 있다. 여기에서, 검출된 참조 데이터의 피제수는 495이고 제수는 33인 것으로 가정한다.
연산부(540)는 입력 데이터의 제수와 참조 데이터의 제수가 동일함에 따라, 입력 데이터의 피제수인 320과 참조 데이터의 피제수인 495 간의 차이(이하, 차이값)가 임계값인 0xffff 이하인지 여부를 판단할 수 있다. 연산부(540)는 차이값이 임계값인 0xffff 이하로 결정됨에 따라, 차이값과 입력 데이터의 제수를 비교할 수 있다. 제어부(520)는 차이값인 175가 입력 데이터의 제수인 33을 초과하므로 복수의 모드들 중 제 2 모드를 선택할 수 있다.
연산부(540)는 제어부(520)에서 제 2 모드가 선택됨에 따라, 참조 데이터를 기초로 나눗셈 연산을 수행하여, 입력 데이터의 몫을 결정할 수 있다. 예를 들어, 연산부(540)에 포함된 나눗셈 연산기(541)는 차이값인 -175를 제수인 33으로 나누어, 몫 -5와 나머지 -10을 산출할 수 있다. 연산부(540)에 포함된 덧셈 연산기(545)는 산출된 몫인 -5에 참조 데이터의 몫인 15를 더할 수 있다. 한편, 차이값을 제수로 나눈 값이 0 보다 작고, 나머지 값이 0이 아닌 경우, 연산부(540)에 포함된 뺄셈 연산기(547)는 덧셈 연산기(545)의 덧셈 연산 결과에서 1을 빼는 뺄셈 연산을 수행할 수 있다. 이에 따라, 연산부(540)는 입력 데이터의 나눗셈 연산 결과 산출된 몫을 9로 결정할 수 있다. 연산 결과는 디멀티플렉서(549)를 통해, 출력부(550)에 전달될 수 있다.
출력부(550)는 연산부(540)의 연산 결과를 수신하여 출력할 수 있다. 한편, 여기에서, 연산부(540)는 연산 결과가 캐쉬 메모리(530)에 업데이트 될 수 있도록 연산 결과를 캐쉬 메모리(530)에 전송할 수도 있다.
도 7은 일 실시예에 따른 나눗셈 연산 처리 장치(500)에서 제 3 모드에 따라 나눗셈 연산을 수행하는 방법을 설명하기 위한 도면이다.
여기에서, 도 7에 도시된 나눗셈 연산 처리 장치(500)는 도 5를 참고하여 전술한 나눗셈 연산 처리 장치(500)와 대응될 수 있다.
일 실시예에 따른 입력부(510)는 입력 데이터를 획득할 수 있다. 예를 들어, 입력부(510)는 피제수가 131072이고 제수가 33인 입력 데이터를 획득할 수 있다. 제어부(520)는 제수인 33을 캐쉬 메모리(530)의 크기인 32로 나머지 연산을 수행하여, 획득된 입력 데이터에 대한 인덱스를 1로 결정할 수 있다. 이에 따라, 제어부(520)는 캐쉬 메모리(530) 내에서, 인덱스 1에 대응되는 참조 데이터를 검출할 수 있다. 여기에서, 검출된 참조 데이터의 피제수는 495이고 제수는 33인 것으로 가정한다.
제어부(520)는 입력 데이터의 제수와 참조 데이터의 제수가 동일함에 따라, 입력 데이터의 피제수인 490과 참조 데이터의 피제수인 495 간의 차이(이하, 차이값)가 임계값인 0xffff 이하인지 여부를 판단할 수 있다. 제어부(520)는 차이값이 임계값인 0xffff를 초과함에 따라 제 3 모드를 선택할 수 있다.
연산부(540)는 제어부(520)에서 제 3 모드가 선택됨에 따라, 나눗셈 연산기(541)를 이용하여, 입력 데이터에 대한 나눗셈 연산을 수행할 수 있다. 나눗셈 연산기(541)에서 입력 데이터에 대한 나눗셈 연산을 수행한 결과 입력 데이터에 대한 몫은 3971로 결정될 수 있다. 연산 결과는 디멀티플렉서(549)를 통해, 출력부(550)에 전달될 수 있다.
출력부(550)는 연산부(540)의 연산 결과를 수신하여 출력할 수 있다. 한편, 여기에서, 연산부(540)는 연산 결과가 캐쉬 메모리(530)에 업데이트 될 수 있도록 연산 결과를 캐쉬 메모리(530)에 전송할 수도 있다.
도 8은 다른 실시예에 따른 나눗셈 연산 처리 장치(800)를 보다 상세하게 설명하기 위한 블록도이다.
도 8에 도시된 나눗셈 연산 처리 장치(800)에는 본 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 8에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다.
도 8을 참고하면, 나눗셈 연산 처리 장치(800)는 입력부(810), 제어부(820), 캐쉬 메모리(830), 복수의 연산기(840) 및 출력부(850)를 포함할 수 있다.
일 실시예에 따른 입력부(810)는 나눗셈 연산을 수행하고자 하는 입력 데이터를 획득할 수 있다. 입력부(810)는 복수의 입력 데이터에 대한 나눗셈 연산을 병렬적으로 수행하기 위해, 복수의 슬롯들로 구성될 수 있다.
일 실시예에 따른 제어부(820)는 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 캐쉬 메모리(830)로부터 검출할 수 있다. 제어부(820)는 입력 데이터와 참조 데이터 간의 차이가 기 설정된 값 미만인 경우, 출력부(850)와 연결된 회로(825)를 통해, 참조 데이터의 나눗셈 연산 결과를 입력 데이터에 대한 나눗셈 연산 결과로서 결정할 수 있다. 한편, 제어부(820)는 입력 데이터와 참조 데이터 간의 차이가 기 설정된 값 이상이 경우, 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 복수의 연산기(840) 중 어느 하나를 선택할 수 있다.
일 실시예에 따른 캐쉬 메모리(830)는 나눗셈 연산 처리 장치(800)에서 수행된 적어도 하나의 나눗셈 연산 결과에 관한 데이터를 저장할 수 있다. 예를 들어, 캐쉬 메모리(830)에는 입력 데이터에 대한 나눗셈 연산이 수행되기 이전에 수행된 다른 나눗셈 연산의 결과에 관한 데이터가 저장될 수 있다.
일 실시예에 따른 복수의 연산기(840)는 뺄셈 연산기(842) 및 복수의 제 1 나눗셈 연산기(845, 846)를 포함할 수 있다. 한편, 여기에서, 복수의 제 1 나눗셈 연산기(845, 846)는 서로 연결되어 제 2 나눗셈 연산기(844)로 동작할 수 있다. 예를 들어, 제어부(820)에서 제 1 나눗셈 연산기를 선택한 경우, 제 1a 나눗셈 연산기(845) 및 제 1b 나눗셈 연산기(846) 중 어느 하나가 선택될 수 있다. 한편, 제어부(320)에서 제 2 나눗셈 연산기를 선택한 경우에는 제 1a 나눗셈 연산기(845) 및 제 1b 나눗셈 연산기(846)가 종속적으로 연결되어, 제 2 나눗셈 연산기(844)로 동작할 수 있다.
일 실시예에 따른 출력부(850)는 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득한다. 일 실시예에 따른 출력부(850)는 복수의 입력 데이터 각각에 대해 병렬적으로 수행된 나눗셈 연산의 결과를 획득할 수 있도록 복수의 슬롯들로 구성될 수 있다.
도 9는 또 다른 실시예에 따른 나눗셈 연산 처리 장치(900)를 보다 상세하게 설명하기 위한 블록도이다.
도 9에 도시된 나눗셈 연산 처리 장치(900)에는 본 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 9에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 본 실시예와 관련된 기술분야에서 통상의 지식을 가진 자라면 이해할 수 있다.
도 9를 참고하면, 나눗셈 연산 처리 장치(900)는 입력부(910), 제어부(920), 캐쉬 메모리(930), 복수의 연산기(940) 및 출력부(950)를 포함할 수 있다.
일 실시예에 따른 입력부(910), 제어부(920), 캐쉬 메모리(930) 및 출력부(950)는 도 8을 참고하여 설명한 입력부(810), 제어부(820), 캐쉬 메모리(830) 및 출력부(850)와 대응될 수 있다.
일 실시예에 따른 제어부(920)는 입력 데이터와 참조 데이터 간의 차이가 기 설정된 값 미만인 경우, 출력부(950)와 연결된 회로(925)를 통해, 참조 데이터의 나눗셈 연산 결과를 입력 데이터에 대한 나눗셈 연산 결과로서 결정할 수 있다. 한편, 제어부(920)는 입력 데이터와 참조 데이터 간의 차이가 기 설정된 값 이상이 경우, 복수의 연산기(940) 중 어느 하나를 이용하여, 입력 데이터에 대한 나눗셈 연산 결과를 산출할 수 있다.
한편, 일 실시예에 따른 복수의 연산기(940)는 제 2 나눗셈 연산기(942), 복수의 제 1 나눗셈 연산기(944) 및 뺄셈 연산기(946)를 포함할 수 있다.
도 4의 나눗셈 연산 처리 장치(900)에서는 복수의 연산기(940)에 포함된 나눗셈 연산기(942, 944) 및 뺄셈 연산기(946)가 각각 서로 병렬적으로 연결될 수 있다.
다만, 복수의 연산기(940)를 구성하는 일 예일 뿐, 복수의 연산기(940)의 구조가 이에 한정되는 것은 아니다.
도 10은 3일 실시예에 따른 나눗셈 연산 처리 장치(100)가 입력 데이터에 대응되는 참조 데이터를 검출하기 위해 인덱스를 결정하는 방법을 설명하기 위한 흐름도이다.
단계 S1010에서, 나눗셈 연산 처리 장치(100)는 입력 데이터를 획득할 수 있다.
한편, 단계 S1010은 도 3을 참고하여 전술한 단계 S510과 대응될 수 있다.
단계 S1020에서, 나눗셈 연산 처리 장치(100)는 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정할 수 있다.
예를 들어, 제어부(120)는 입력 제수와 캐쉬 메모리(130)의 크기 간의 나머지 연산 결과값을 인덱스로 결정할 수 있다. 다른 예에 따라, 제어부(120)는 입력 제수와 캐쉬 메모리(130)의 크기 간의 나눗셈 연산 결과 및 입력 제수와 캐쉬 메모리(130)의 크기 간의 나머지 연산 결과를 합산하여 인덱스 정보를 결정할 수도 있다. 또 다른 예에 따라, 제어부(120)는 입력 제수와 캐쉬 메모리(130)의 크기 간의 나머지 연산 결과 및 입력 피제수를 구성하는 일부 데이터 비트를 합산하여, 인덱스 정보를 결정할 수도 있다.
단계 S1030에서, 나눗셈 연산 처리 장치(100)는 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터, 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출할 수 있다.
한편, 단계 S1030은 도 3을 참고하여 전술한 단계 S320과 대응될 수 있다.
단계 S1040에서, 나눗셈 연산 처리 장치(100)는 복수의 연산기 중 어느 하나의 연산기를 검출된 참조 데이터와 입력 데이터 간의 차이에 기초하여 선택할 수 있다.
한편, 단계 S1040은 도 3을 참고하여 전술한 단계 S330과 대응될 수 있다.
단계 S1050에서, 나눗셈 연산 처리 장치(100)는 선택된 연산기로부터 입력 데이터의 나눗셈 연산 결과를 획득할 수 있다.
한편, 단계 S1050은 도 3을 참고하여 전술한 단계 S340과 대응될 수 있다.
단계 S1060에서, 나눗셈 연산 처리 장치(100)는 결정된 인덱스가 나타내는 캐쉬 메모리 상의 위치에 나눗셈 연산 결과를 저장할 수 있다.
도 11은 일 실시예에 따라, 시간에 따라 변경되는 입력 제수의 차이가 캐쉬 메모리의 크기의 배수인 경우에 인덱스를 결정하는 방법을 설명하기 위한 도면이다.
도 11을 참고하면, 시간이 지남에 따라 입력 제수가 각각 32, 64, 32로 변경되는 것을 확인할 수 있다. 또한, 변화되는 입력 제수간의 차이인 32는 캐쉬 메모리의 크기인 32 의 배수에 해당할 수 있다.
한편, 일 실시예에 따른 나눗셈 연산 처리 장치(100)는 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정할 수 있다. 예를 들어, 나눗셈 연산 처리 장치(100)는 입력 제수와 캐쉬 메모리의 크기에 대한 나누기 연산의 결과 값을 인덱스로 결정할 수 있다.
다만, 도 11에 도시된 바와 같이 시간에 따라 변경되는 입력 제수의 차이가 캐쉬 메모리의 크기의 배수인 경우, 인덱스를 입력 제수와 캐쉬 메모리의 크기에 대한 나누기 연산의 결과 값으로 결정하게 되면, 입력 제수가 32인 경우와 64인 경우의 인덱스 값이 동일하게 결정될 수 있다. 예를 들어, 64가 입력 제수인 경우, 나눗셈 연산 처리 장치(100)는 입력 제수를 기초로 결정된 인덱스를 이용하여 참조 제수인 32를 검출하게 될 수 있다. 이러한 경우, 64와 32의 차이는 서로 값의 차이가 비교적 큰 편에 해당하여, 64에 대한 나눗셈 연산을 수행함에 있어, 참조 데이터의 나눗셈 연산 결과를 활용하기 어려울 수 있다.
따라서, 일 실시예에 따른 나눗셈 연산 처리 장치(100)는 시간에 따라 변경되는 입력 제수의 차이가 캐쉬 메모리의 크기의 배수인 경우, 입력 제수와 캐쉬 메모리에 대한 나머지 연산 결과와 나눗셈 연산 결과를 합산하여 인덱스를 결정할 수 있다. 예를 들어, 입력 제수가 32이고, 캐쉬 메모리의 크기가 32인 경우의 인덱스는 0과 1을 합산한 1일 수 있다. 다른 예에 따라, 입력 제수가 64이고, 캐쉬 메모리의 크기가 32인 경우의 인덱스는 0과 2를 합산한 2일 수 있다.
나눗셈 연산 처리 장치(100)는 차이가 비교적 큰 서로 다른 입력 제수에 대한 나눗셈 연산의 결과가 캐쉬 메모리 상의 동일한 위치에 저장되는 것을 방지하기 위해 인덱스를 서로 다르게 설정함으로써, 나눗셈 연산의 처리를 보다 효율적으로 수행할 수 있다.
도 12는 일 실시예에 따라, 입력 제수가 고정되고 입력 피제수가 시간에 따라 변경되는 경우, 인덱스를 결정하는 방법을 설명하기 위한 도면이다.
도 12를 참고하면, 입력 제수는 0X5로 고정되고, 시간이 지남에 따라 입력 피제수가 각각 0X10020, 0X10, 0X10020으로 변경되는 것을 확인할 수 있다.
한편, 일 실시예에 따른 나눗셈 연산 처리 장치(100)는 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정할 수 있다. 예를 들어, 나눗셈 연산 처리 장치(100)는 입력 제수와 캐쉬 메모리의 크기에 대한 나누기 연산의 결과 값을 인덱스로 결정할 수 있다.
다만, 도 12에 도시된 바와 같이 입력 제수가 고정되고, 입력 피제수가 변하는 경우, 인덱스를 입력 제수와 캐쉬 메모리의 크기에 대한 나누기 연산의 결과 값으로 결정하게 되면, 서로 상이한 입력 피제수에 대한 인덱스 값이 동일하게 결정될 수 있다.
따라서, 일 실시예에 따른 나눗셈 연산 처리 장치(100)는 입력 제수와 캐쉬 메모리의 크기에 대한 나누기 연산의 결과를 기초로 결정된 인덱스의 로우(low) 비트 위치에 입력 피제수를 구성하는 비트들 중 일부를 추가하여, 인덱스를 결정할 수 있다.
나눗셈 연산 처리 장치(100)는 차이가 서로 다른 입력 피제수에 대한 나눗셈 연산 결과가 캐쉬 메모리 상의 동일한 위치에 저장되는 것을 방지하기 위해 인덱스를 서로 다르게 설정함으로써, 나눗셈 연산의 처리를 보다 효율적으로 수행할 수 있다.
본 발명에 따른 장치는 프로세서, 프로그램 데이터를 저장하고 실행하는 메모리, 디스크 드라이브와 같은 영구 저장부(permanent storage), 외부 장치와 통신하는 통신 포트, 터치 패널, 키(key), 버튼 등과 같은 사용자 인터페이스 장치 등을 포함할 수 있다.  소프트웨어 모듈 또는 알고리즘으로 구현되는 방법들은 상기 프로세서상에서 실행 가능한 컴퓨터가 읽을 수 있는 코드들 또는 프로그램 명령들로서 컴퓨터가 읽을 수 있는 기록 매체 상에 저장될 수 있다.  여기서 컴퓨터가 읽을 수 있는 기록 매체로 마그네틱 저장 매체(예컨대, ROM(read-only memory), RAM(random-access memory), 플로피 디스크, 하드 디스크 등) 및 광학적 판독 매체(예컨대, 시디롬(CD-ROM), 디브이디(DVD: Digital Versatile Disc)) 등이 있다.  컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템들에 분산되어, 분산 방식으로 컴퓨터가 판독 가능한 코드가 저장되고 실행될 수 있다.  매체는 컴퓨터에 의해 판독가능하며, 메모리에 저장되고, 프로세서에서 실행될 수 있다.
본 발명에서 인용하는 공개 문헌, 특허 출원, 특허 등을 포함하는 모든 문헌들은 각 인용 문헌이 개별적으로 및 구체적으로 병합하여 나타내는 것 또는 본 발명에서 전체적으로 병합하여 나타낸 것과 동일하게 본 발명에 병합될 수 있다.
본 발명의 이해를 위하여, 도면에 도시된 바람직한 실시 예들에서 참조 부호를 기재하였으며, 본 발명의 실시 예들을 설명하기 위하여 특정 용어들을 사용하였으나, 특정 용어에 의해 본 발명이 한정되는 것은 아니며, 본 발명은 당업자에 있어서 통상적으로 생각할 수 있는 모든 구성 요소들을 포함할 수 있다.
본 발명은 기능적인 블록 구성들 및 다양한 처리 단계들로 나타내어질 수 있다.  이러한 기능 블록들은 특정 기능들을 실행하는 다양한 개수의 하드웨어 또는/및 소프트웨어 구성들로 구현될 수 있다.  예를 들어, 본 발명은 하나 이상의 마이크로프로세서들의 제어 또는 다른 제어 장치들에 의해서 다양한 기능들을 실행할 수 있는, 메모리, 프로세싱, 로직(logic), 룩업 테이블(look-up table) 등과 같은 직접 회로 구성들을 채용할 수 있다.  본 발명에의 구성 요소들이 소프트웨어 프로그래밍 또는 소프트웨어 요소들로 실행될 수 있는 것과 유사하게, 본 발명은 데이터 구조, 프로세스들, 루틴들 또는 다른 프로그래밍 구성들의 조합으로 구현되는 다양한 알고리즘을 포함하여, C, C++, 자바(Java), 어셈블러(assembler) 등과 같은 프로그래밍 또는 스크립팅 언어로 구현될 수 있다.  기능적인 측면들은 하나 이상의 프로세서들에서 실행되는 알고리즘으로 구현될 수 있다.  또한, 본 발명은 전자적인 환경 설정, 신호 처리, 및/또는 데이터 처리 등을 위하여 종래 기술을 채용할 수 있다.  “매커니즘”, “요소”, “수단”, “구성”과 같은 용어는 넓게 사용될 수 있으며, 기계적이고 물리적인 구성들로서 한정되는 것은 아니다.  상기 용어는 프로세서 등과 연계하여 소프트웨어의 일련의 처리들(routines)의 의미를 포함할 수 있다.
본 발명에서 설명하는 특정 실행들은 일 실시 예들로서, 어떠한 방법으로도 본 발명의 범위를 한정하는 것은 아니다.  명세서의 간결함을 위하여, 종래 전자적인 구성들, 제어 시스템들, 소프트웨어, 상기 시스템들의 다른 기능적인 측면들의 기재는 생략될 수 있다.  또한, 도면에 도시된 구성 요소들 간의 선들의 연결 또는 연결 부재들은 기능적인 연결 및/또는 물리적 또는 회로적 연결들을 예시적으로 나타낸 것으로서, 실제 장치에서는 대체 가능하거나 추가의 다양한 기능적인 연결, 물리적인 연결, 또는 회로 연결들로서 나타내어질 수 있다.  또한, “필수적인”, “중요하게” 등과 같이 구체적인 언급이 없다면 본 발명의 적용을 위하여 반드시 필요한 구성 요소가 아닐 수 있다.

Claims (15)

  1. 입력 데이터를 획득하는 단계;
    적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리로부터, 상기 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출하는 단계;
    처리 가능한 데이터 비트(bit)의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기 중 어느 하나의 연산기를 상기 검출된 참조 데이터와 상기 입력 데이터 간의 차이에 기초하여 선택하는 단계; 및
    상기 선택된 연산기로부터 상기 입력 데이터의 나눗셈 연산 결과를 획득하는 단계를 포함하는 나눗셈 연산을 처리하는 방법.
  2. 제 1 항에 있어서,
    상기 입력 데이터에 포함된 입력 제수와 상기 참조 데이터에 포함된 참조 제수의 차이에 기초하여, 상기 검출된 참조 데이터의 이용 여부를 결정하는 단계를 더 포함하는 방법.
  3. 제 2 항에 있어서, 상기 획득하는 단계는,
    상기 참조 제수와 상기 입력 제수가 동일한 경우, 상기 입력 데이터에 포함된 입력 피제수와 상기 참조 데이터에 포함된 참조 피제수의 차이값을 산출하는 단계;
    상기 산출된 차이값이 기 설정된 임계값 및 상기 입력 제수 이하인 경우, 상기 참조 피제수와 상기 입력 피제수를 비교하는 단계; 및
    상기 비교 결과, 상기 참조 피제수가 상기 입력 피제수를 초과하는 경우, 상기 참조 데이터에 포함된 몫에서 1을 뺀 값을 상기 입력 데이터의 몫으로 결정하고, 상기 참조 피제수가 상기 입력 피제수 이하인 경우, 상기 참조 데이터의 몫을 상기 입력 데이터의 몫으로 결정하는 단계를 포함하는 방법.
  4. 제 2 항에 있어서, 상기 획득하는 단계는,
    상기 참조 제수와 상기 입력 제수가 동일한 경우, 상기 입력 데이터에 포함된 입력 피제수와 상기 참조 데이터에 포함된 참조 피제수의 차이값을 산출하는 단계;
    상기 산출된 차이값이 기 설정된 임계값 미만이면서 상기 입력 제수를 초과하는 경우, 상기 입력 피제수와 상기 피참조 제수 간의 차이를 상기 입력 제수로 나눈 몫과 나머지를 산출하는 단계; 및
    상기 산출된 몫이 0 이상이거나 상기 산출된 나머지가 0인 경우, 상기 참조 데이터의 몫에 상기 산출된 몫의 합으로 상기 입력 데이터의 몫을 결정하고, 상기 산출된 몫이 0 미만이고, 상기 산출된 나머지가 0이 아닌 경우, 상기 참조 데이터의 몫에 상기 산출된 몫의 합을 더한 값에서 1을 뺀 값으로, 상기 입력 데이터의 몫을 결정하는 단계를 포함하는 방법.
  5. 제 2 항에 있어서, 상기 획득하는 단계는,
    상기 참조 제수와 상기 입력 제수가 상이하거나, 상기 입력 피제수와 상기 참조 피제수 간의 차이값이 기 설정된 임계값을 초과하는 경우, 상기 입력 데이터에 포함된 입력 피제수와 입력 제수에 대해 나눗셈 연산을 수행하는 단계를 포함하는 방법.
  6. 제 1항에 있어서, 상기 복수의 연산기는,
    상기 처리 가능한 나눗셈 연산의 몫의 데이터 비트 수가 서로 다른 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기를 포함하고,
    상기 선택하는 단계는,
    상기 입력 데이터에 포함된 입력 제수와 상기 참조 데이터에 포함된 참조 제수가 상이한 경우, 상기 제 1 나눗셈 연산기에서 처리 가능한 나눗셈 연산의 몫의 데이터 비트수와 상기 입력 제수를 비교하여 상기 제 1 나눗셈 연산기 및 상기 제 2 나눗셈 연산기 중 어느 하나를 선택하는 나눗셈 연산을 처리하는 방법.
  7. 제 1항에 있어서,
    상기 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 상기 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 상기 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정하는 단계를 더 포함하고,
    상기 검출하는 단계는,
    상기 결정된 인덱스를 이용하여, 상기 캐쉬 메모리로부터 상기 참조 데이터를 검출하는 나눗셈 연산을 처리하는 방법.
  8. 적어도 하나의 나눗셈 연산에 관한 데이터가 기 저장된 캐쉬 메모리;
    입력 데이터를 획득하는 입력부;
    처리 가능한 데이터 비트의 수 및 연산의 종류 중 적어도 하나에 따라 식별되는 복수의 연산기를 포함한 연산부;
    상기 캐쉬 메모리로부터, 상기 획득된 입력 데이터와 대응되는 나눗셈 연산에 관한 데이터인 참조 데이터를 검출하고, 상기 검출된 참조 데이터와 상기 입력 데이터 간의 차이에 기초하여 상기 복수의 연산기 중 어느 하나를 선택하는 제어부; 및
    상기 선택된 연산기로부터 상기 입력 데이터의 나눗셈 연산 결과를 획득하는 출력부를 포함하는 나눗셈 연산을 처리하는 장치.
  9. 제 8 항에 있어서, 상기 제어부는,
    상기 입력 데이터에 포함된 입력 제수와 상기 참조 데이터에 포함된 참조 제수의 차이에 기초하여, 상기 검출된 참조 데이터의 이용 여부를 결정하는 나눗셈 연산을 처리하는 장치.
  10. 제 9 항에 있어서, 상기 연산부는,
    상기 참조 제수와 상기 입력 제수가 동일한 경우, 상기 입력 데이터에 포함된 입력 피제수와 상기 참조 데이터에 포함된 참조 피제수의 차이값을 산출하고, 상기 산출된 차이값이 기 설정된 임계값 및 상기 입력 제수 이하인 경우, 상기 참조 피제수와 상기 입력 피제수를 비교하며, 상기 비교 결과, 상기 참조 피제수가 상기 입력 피제수를 초과하는 경우, 상기 참조 데이터에 포함된 몫에서 1을 뺀 값을 상기 입력 데이터의 몫으로 결정하고, 상기 참조 피제수가 상기 입력 피제수 이하인 경우, 상기 참조 데이터의 몫을 상기 입력 데이터의 몫으로 결정하는 나눗셈 연산을 처리하는 장치.
  11. 제 9 항에 있어서, 상기 연산부는,
    상기 참조 제수와 상기 입력 제수가 동일한 경우, 상기 입력 데이터에 포함된 입력 피제수와 상기 참조 데이터에 포함된 참조 피제수의 차이값을 산출하고, 상기 산출된 차이값이 기 설정된 임계값 미만이면서 상기 입력 제수를 초과하는 경우, 상기 입력 피제수와 상기 피참조 제수 간의 차이를 상기 입력 제수로 나눈 몫과 나머지를 산출하며, 상기 산출된 몫이 0 이상이거나 상기 산출된 나머지가 0인 경우, 상기 참조 데이터의 몫에 상기 산출된 몫의 합으로 상기 입력 데이터의 몫을 결정하고, 상기 산출된 몫이 0 미만이고, 상기 산출된 나머지가 0이 아닌 경우, 상기 참조 데이터의 몫에 상기 산출된 몫의 합을 더한 값에서 1을 뺀 값으로, 상기 입력 데이터의 몫을 결정하는 나눗셈 연산을 처리하는 장치.
  12. 제 9 항에 있어서, 상기 연산부는,
    상기 참조 제수와 상기 입력 제수가 상이하거나, 상기 입력 피제수와 상기 참조 피제수 간의 차이값이 기 설정된 임계값을 초과하는 경우, 상기 입력 데이터에 포함된 입력 피제수와 입력 제수에 대해 나눗셈 연산을 수행하는 나눗셈 연산을 처리하는 장치.
  13. 제 8항에 있어서, 상기 복수의 연산기는,
    처리 가능한 나눗셈 연산의 몫의 데이터 비트 수가 서로 다른 제 1 나눗셈 연산기 및 제 2 나눗셈 연산기를 포함하고,
    상기 제어부는,
    상기 입력 데이터에 포함된 입력 제수와 상기 참조 데이터에 포함된 참조 제수가 상이한 경우, 상기 제 1 나눗셈 연산기에서 처리 가능한 나눗셈 연산의 몫의 데이터 비트 수인 임계값과 상기 입력 제수를 비교하여 상기 제 1 나눗셈 연산기 및 상기 제 2 나눗셈 연산기 중 어느 하나를 선택하는 나눗셈 연산을 처리하는 장치.
  14. 제 8항에 있어서, 상기 제어부는,
    상기 획득한 입력 데이터에 포함된 입력 제수, 입력 피제수 및 상기 캐쉬 메모리의 크기 중 적어도 하나에 기초하여 상기 캐쉬 메모리 상의 위치를 나타내는 인덱스를 결정하고, 상기 결정된 인덱스를 이용하여, 상기 캐쉬 메모리로부터 상기 참조 데이터를 검출하는 나눗셈 연산을 처리하는 장치.
  15. 제 1항의 방법을 수행하는 프로그램이 기록된 컴퓨터 판독이 가능한 기록매체.
PCT/KR2016/000598 2016-01-20 2016-01-20 나눗셈 연산을 처리하는 방법, 장치 및 기록매체 WO2017126715A1 (ko)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US16/070,169 US10776077B2 (en) 2016-01-20 2016-01-20 Method, apparatus and recording medium for processing division calculation
KR1020187019708A KR102528467B1 (ko) 2016-01-20 2016-01-20 나눗셈 연산을 처리하는 방법, 장치 및 기록매체
PCT/KR2016/000598 WO2017126715A1 (ko) 2016-01-20 2016-01-20 나눗셈 연산을 처리하는 방법, 장치 및 기록매체
EP16886558.2A EP3376369B1 (en) 2016-01-20 2016-01-20 Method, apparatus and recording medium for processing division calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2016/000598 WO2017126715A1 (ko) 2016-01-20 2016-01-20 나눗셈 연산을 처리하는 방법, 장치 및 기록매체

Publications (1)

Publication Number Publication Date
WO2017126715A1 true WO2017126715A1 (ko) 2017-07-27

Family

ID=59362473

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2016/000598 WO2017126715A1 (ko) 2016-01-20 2016-01-20 나눗셈 연산을 처리하는 방법, 장치 및 기록매체

Country Status (4)

Country Link
US (1) US10776077B2 (ko)
EP (1) EP3376369B1 (ko)
KR (1) KR102528467B1 (ko)
WO (1) WO2017126715A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943391A (zh) * 2017-11-15 2018-04-20 宁波麦博韦尔移动电话有限公司 一种长按快速计算方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102612588B1 (ko) * 2023-05-15 2023-12-12 메티스엑스 주식회사 프로그램가능 반도체 소자, 이를 포함하는 전자 장치, 및 프로그램가능 반도체 소자에 의해 연산을 수행하는 방법

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040011916A (ko) * 2002-07-31 2004-02-11 학교법인연세대학교 작은 사이즈의 룩업 테이블을 갖는 파이프라인 나눗셈연산기 및 연산방법
US20040249877A1 (en) * 2003-06-05 2004-12-09 International Business Machines Corporation Fast integer division with minimum number of iterations in substraction-based hardware divide processor
US20060129624A1 (en) * 2004-12-09 2006-06-15 Abdallah Mohammad A Method and apparatus for performing a divide instruction
US20060294177A1 (en) * 2005-06-27 2006-12-28 Simon Rubanovich Method, system and apparatus of performing division operations
WO2013044414A1 (en) * 2011-09-30 2013-04-04 Intel Corporation Apparatus and method for performing decimal division

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5272660A (en) 1992-06-01 1993-12-21 Motorola, Inc. Method and apparatus for performing integer and floating point division using a single SRT divider in a data processor
US5828591A (en) * 1992-11-02 1998-10-27 Intel Corporation Method and apparatus for using a cache memory to store and retrieve intermediate and final results
US6510493B1 (en) 1999-07-15 2003-01-21 International Business Machines Corporation Method and apparatus for managing cache line replacement within a computer system
US6832294B2 (en) * 2002-04-22 2004-12-14 Sun Microsystems, Inc. Interleaved n-way set-associative external cache
JP4594666B2 (ja) * 2004-07-12 2010-12-08 富士通株式会社 再構成可能な演算装置
US8700862B2 (en) 2008-12-03 2014-04-15 Nvidia Corporation Compression status bit cache and backing store
KR20100069240A (ko) * 2008-12-16 2010-06-24 삼성전자주식회사 캐시 컨트롤을 위한 장치 및 방법
US8271729B2 (en) 2009-09-18 2012-09-18 International Business Machines Corporation Read and write aware cache storing cache lines in a read-often portion and a write-often portion
KR101770122B1 (ko) 2010-12-30 2017-08-23 삼성전자주식회사 Simd 프로세서를 이용하는 갈로아 필드 이진 다항식 제산 장치 및 방법
US20160313976A1 (en) * 2015-04-21 2016-10-27 Qualcomm Incorporated High performance division and root computation unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040011916A (ko) * 2002-07-31 2004-02-11 학교법인연세대학교 작은 사이즈의 룩업 테이블을 갖는 파이프라인 나눗셈연산기 및 연산방법
US20040249877A1 (en) * 2003-06-05 2004-12-09 International Business Machines Corporation Fast integer division with minimum number of iterations in substraction-based hardware divide processor
US20060129624A1 (en) * 2004-12-09 2006-06-15 Abdallah Mohammad A Method and apparatus for performing a divide instruction
US20060294177A1 (en) * 2005-06-27 2006-12-28 Simon Rubanovich Method, system and apparatus of performing division operations
WO2013044414A1 (en) * 2011-09-30 2013-04-04 Intel Corporation Apparatus and method for performing decimal division

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943391A (zh) * 2017-11-15 2018-04-20 宁波麦博韦尔移动电话有限公司 一种长按快速计算方法及系统

Also Published As

Publication number Publication date
US10776077B2 (en) 2020-09-15
US20190018652A1 (en) 2019-01-17
EP3376369A4 (en) 2018-12-05
KR20180103885A (ko) 2018-09-19
KR102528467B1 (ko) 2023-05-04
EP3376369B1 (en) 2020-03-04
EP3376369A1 (en) 2018-09-19

Similar Documents

Publication Publication Date Title
WO2015009128A1 (en) Flexible device, method for controlling device, and method and apparatus for displaying object by flexible device
WO2021091022A1 (ko) 머신 러닝 시스템 및 머신 러닝 시스템의 동작 방법
WO2019164251A1 (en) Method of performing learning of deep neural network and apparatus thereof
WO2015041436A1 (en) Method of managing control right, client device therefor, and master device therefor
WO2016208841A1 (en) Node terminal apparatus, display apparatus, peripheral device management system including node terminal apparatus and display apparatus, and method thereof
WO2017126715A1 (ko) 나눗셈 연산을 처리하는 방법, 장치 및 기록매체
WO2016032291A1 (en) Method and apparatus for transmitting and receiving data cross-reference to related applications
WO2017148142A1 (zh) 桌面图标文件夹的名称切换方法、装置及电子设备
WO2019135553A1 (en) Electronic device, control method thereof, and computer readable recording medium
WO2017090931A1 (ko) 이벤트 관리 서비스를 제공하는 전자 장치 및 방법
WO2013191408A1 (en) Method for improving touch recognition and electronic device thereof
WO2020222347A1 (ko) 가상 머신 배치 방법 및 이를 구현하는 가상 머신 배치 장치
WO2014069767A1 (ko) 염기 서열 정렬 시스템 및 방법
WO2015080440A1 (en) Method and processor for executing instructions, method and apparatus for encoding instructions, and recording medium therefor
WO2020213885A1 (en) Server and control method thereof
WO2021085714A1 (ko) 블록체인 관리 시스템 및 그 방법
WO2018191889A1 (zh) 照片处理方法、装置及计算机设备
WO2018199444A1 (en) Apparatus and method for performing operation being secure against side channel attack
WO2019177265A1 (ko) 랜섬웨어 대응을 위한 데이터 처리 방법, 이를 실행시키는 프로그램 및 상기 프로그램을 기록한 컴퓨터 판독 가능한 기록매체
WO2023003246A1 (ko) 멀티레벨 룩업테이블을 이용한 함수근사 장치 및 방법
WO2016036049A1 (ko) 검색 서비스 제공 장치, 시스템, 방법 및 컴퓨터 프로그램
WO2023042989A1 (ko) 데이터 스케일을 고려한 덧셈 연산 방법 및 이를 위한 하드웨어 가속기, 이를 이용한 컴퓨팅 장치
WO2013115429A1 (en) Apparatus and method for generating interleaver index
WO2017030269A1 (ko) 판서 모드 자동 전환 방법 및 시스템
WO2015115866A1 (ko) 이미지의 색상 신호를 보간하는 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16886558

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20187019708

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE