WO2011161859A1 - 半導体集積回路及び指数算出方法 - Google Patents
半導体集積回路及び指数算出方法 Download PDFInfo
- Publication number
- WO2011161859A1 WO2011161859A1 PCT/JP2011/002148 JP2011002148W WO2011161859A1 WO 2011161859 A1 WO2011161859 A1 WO 2011161859A1 JP 2011002148 W JP2011002148 W JP 2011002148W WO 2011161859 A1 WO2011161859 A1 WO 2011161859A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bit
- circuit
- data
- value
- bit string
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/14—Conversion to or from non-weighted codes
- H03M7/24—Conversion to or from floating-point codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/499—Denomination or exception handling, e.g. rounding or overflow
- G06F7/49905—Exception handling
- G06F7/4991—Overflow or underflow
- G06F7/49915—Mantissa overflow or underflow in handling floating-point numbers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/499—Denomination or exception handling, e.g. rounding or overflow
- G06F7/49942—Significance control
Definitions
- the present invention relates to a semiconductor integrated circuit and an index calculation method, and more particularly to an arithmetic processing technique in digital signal processing.
- floating-point arithmetic In digital signal processing, floating-point arithmetic has the advantage of being able to calculate with high accuracy even when the range of signal data to be handled is wide, but it requires a complicated circuit, so the circuit scale and power consumption are large. There's a problem.
- fixed point arithmetic has the advantage that the circuit is simple and the circuit scale and power consumption are small, but there is a problem that the arithmetic accuracy is low.
- block floating point normalization processing is performed in the next step.
- the maximum index of all data in the block is obtained.
- the entire block is shifted (normalized) by the determined maximum exponent.
- the maximum exponent indicates the maximum exponent that does not cause overflow of all data in the block.
- the maximum exponent is equal to the exponent value of the data having the maximum absolute value among all data in the block.
- the following method is known as a method for efficiently obtaining the maximum index (for example, Patent Document 1).
- (1) The absolute value of each data in the block is calculated.
- (2) The logical sum of the absolute values of the calculated data is calculated.
- (3) The bit position on the MSB (Most Significant Bit) side of the calculated logical sum is detected, and the maximum exponent is obtained.
- a block to be normalized a block composed of eight data of input data 1 to input data 8 which are the following 8-bit input data is considered.
- each data value is shown in two's complement notation.
- the leftmost bit is the MSB and the rightmost bit is the LSB.
- MSB is a sign bit.
- Input data 1 00001111 Input data 2: 00110001 Input data 3: 00000100 Input data 4: 11110011 Input data 5: 11111000 Input data 6: 00000100 Input data 7: 00001011 Input data 8: 00011011
- the absolute value of each data (input data 1 to 8) in the block is calculated.
- absolute values of the input data 1 to 8 are shown as absolute values 1 to 8.
- the absolute value of the input data k is shown as an absolute value k (k is a positive integer from 1 to 8).
- the fifth bit is detected as the bit position where the bit value first becomes 1 when viewed from the MSB (Most Significant Bit) side of the calculated logical sum.
- the MSB is the 7th bit
- the LSB Large (Significant Bit) is the 0th bit.
- the maximum exponent is -1.
- normalized data 1 to 8 all data in the group (input data 1 to 8) is normalized based on the maximum index obtained to obtain normalized data (normalized data 1 to 8). Specifically, when the maximum exponent is -1, the bit is shifted to the left by 1 bit. The data after normalization of the input data 1 to 8 is shown as normalized data 1 to 8 below. Data after normalization of the input data k is indicated as normalized data k (k is a positive integer from 1 to 8).
- the maximum exponent is -1
- the actual values of the normalized data 1 to 8 are values obtained by multiplying each data by 2 to the power of -1.
- Normalized data 1 00101110 Normalized data 2: 01100010 Normalized data 3: 00001100 Normalized data 4: 11100110 Normalized data 5: 11110000 Normalized data 6: 00001100 Normalized data 7: 00010110 Normalized data 8: 00110110
- the normalization process as described above it is necessary to calculate the absolute value by repeating a plurality of times as many as the number of data constituting the block. Therefore, in the normalization process as described above, the processing time for repeating the calculation of the absolute value, which takes time, is drastically increased. As described above, the normalization process as described above has a problem that the maximum exponent cannot be calculated at high speed, and the circuit scale and power consumption are large.
- Patent Document 2 one-position detection for obtaining the value of each bit in order using mask data for extracting data for determining the value per bit of the data indicating the position where the bit is 1 in the input data A method is disclosed.
- Patent Document 2 in order to determine the value per bit of the data at the position where the bit is 1, only one mask process and one comparison are required. It is described that the processing time for detecting the position where the bit becomes 1 can be shortened.
- Patent Document 3 detects the bit position where the first bit of the input data and a bit having a different logical state first appear, and based on the information indicating the distance from the position of the decimal point of the input data to the detected bit position, A normalized data generation circuit for shifting input data is disclosed. Patent Document 3 describes that, according to the normalized data generation circuit, most of the shift operation can be performed in hardware, so that the generation time of normalized data can be shortened.
- Patent Documents 2 and 3 as in the present invention, a bit indicating whether or not the values of adjacent bits are different from each other for each set of adjacent bits from a bit string constituting data to be normalized It does not disclose a technique for generating a bit string including.
- the present invention is to solve such a problem, and when normalizing a plurality of data with a common index, the calculation of the index can be speeded up, and the circuit scale and consumption for that purpose can be increased.
- An object of the present invention is to provide a semiconductor integrated circuit and an index calculation method capable of reducing power.
- a semiconductor integrated circuit is a semiconductor integrated circuit that calculates an index of a plurality of data when the plurality of data is normalized by a common index, and is a first circuit that constitutes the data. For each pair of adjacent bits in one bit string, a bit having a transition value indicating that the values of the adjacent bits are different or a non-transition value indicating that the values of the adjacent bits are not different And a bit string generation circuit that generates a second bit string including the bits of the transition values of the plurality of second bit strings generated from the plurality of first bit strings that constitute each of the plurality of data by the bit string generation circuit And an exponent calculation circuit for calculating the exponents of the plurality of data based on the positions.
- An index calculation method is an index calculation method for calculating an index of a plurality of data when the plurality of data is normalized by a common index, and includes a first index that configures the data. For each pair of adjacent bits in one bit string, a bit having a transition value indicating that the values of the adjacent bits are different or a non-transition value indicating that the values of the adjacent bits are not different And a plurality of second bit strings generated from a plurality of first bit strings that constitute each of the plurality of data, based on the bit positions of the transition values. Calculating an index of data.
- the index calculation can be speeded up, and the circuit scale and power consumption can be reduced. It is possible to provide a semiconductor integrated circuit and an index calculation method that can be used.
- FIG. 1 is a block diagram showing a configuration of a semiconductor integrated circuit according to a first exemplary embodiment of the present invention. It is a block diagram which shows the structure of the maximum index calculation circuit concerning Embodiment 1 of this invention. It is a block diagram which shows the structure of the edge detection circuit concerning Embodiment 1 of this invention.
- FIG. 5 is a timing diagram showing an operation of the maximum exponent calculation circuit according to the first exemplary embodiment of the present invention. It is a block diagram which shows the structure of the normalization circuit concerning Embodiment 2 of this invention. It is a timing diagram which shows operation
- FIG. 1 is a block diagram showing a configuration of a semiconductor integrated circuit according to the first embodiment of the present invention.
- the semiconductor integrated circuit 50 includes a bit string generation circuit 51 and an exponent calculation circuit 52.
- the semiconductor integrated circuit 50 calculates an index of a plurality of data when normalizing the plurality of data by a common index.
- the bit string generation circuit 51 does not change the transition value indicating that the values of the bits adjacent to each other in the pair of bits adjacent to each other in the first bit string constituting the data or the values of the bits adjacent to each other.
- the exponent calculation circuit 52 generates a plurality of pieces of data based on the positions of the bits of the transition values of the plurality of second bit strings generated from the plurality of first bit strings constituting each of the plurality of data by the bit string generation circuit 51. Calculate the index.
- the bit string generation circuit 51 receives a plurality of data to be normalized by a common index.
- the bit string generation circuit 51 does not change the transition value indicating that the values of the bits adjacent to each other in the set of adjacent bits of the first bit string constituting the data are different, or the values of the bits adjacent to each other.
- the bit string generation circuit 51 outputs a plurality of second bit strings generated from a plurality of first bit strings constituting each of the plurality of data to the exponent calculation circuit 52.
- the exponent calculation circuit 52 calculates the exponents of the plurality of data based on the bit positions of the transition values of the plurality of second bit strings output from the bit string generation circuit 51.
- the exponent calculation circuit 52 outputs the calculated exponent.
- the values of the bits adjacent to each other for each set of bits adjacent to each other in the first bit string constituting the data to be normalized are as follows.
- a second bit string including bits indicating whether or not they are different is generated.
- the second bit string it can be determined whether or not the values of the bits adjacent to each other are different for each set of bits adjacent to each other in the first bit string. Therefore, it is possible to specify the shift amount in which the normalized value is correctly expressed without any change in the data sign. That is, the maximum index can be calculated.
- the semiconductor integrated circuit 50 According to the semiconductor integrated circuit 50 according to the first embodiment, it is possible only to perform a logical operation on whether or not the values of adjacent bits are different from each other. And the circuit scale and power consumption for that purpose can be reduced.
- FIG. 2 is a block diagram showing a configuration of the maximum exponent calculation circuit 100 according to the first embodiment of the present invention.
- the maximum exponent calculation circuit 100 is a circuit that calculates the maximum exponent of all data in a block with respect to a block composed of a plurality of input data.
- the maximum exponent calculation circuit 100 sequentially inputs all the data in the block based on the input clock signal, and calculates the maximum exponent of all the data in the block.
- the maximum exponent calculation circuit 100 outputs the maximum exponent calculated for each block.
- the maximum exponent calculation circuit 100 identifies the end of the block with reference to the input block end signal.
- the input data is input to the maximum exponent calculation circuit 100 from an external circuit (not shown), for example.
- the external circuit outputs the asserted block end signal to the maximum exponent calculation circuit 100 in a cycle in which the last input data in the block is output to the maximum exponent calculation circuit 100.
- the maximum exponent calculation circuit 100 includes an edge detection circuit 101, a logical sum circuit 102, a register 103, and an MSB side bit position detection circuit 104 as main circuits.
- the edge detection circuit 101 is a circuit that detects a transition (edge) of a value of a bit string that constitutes input data.
- the edge detection circuit 101 detects a transition (edge) of the value of the bit string constituting the input data.
- the edge detection circuit 101 outputs the detection result as an edge detection result 105 to the logical sum circuit 102.
- the edge detection circuit 101 calculates a value indicating whether or not the values of the nth bit and the (n + 1) th bit are different from the MSB of the bit string constituting the input data (n is an integer of 0 or more). .
- the edge detection circuit 101 arranges the calculated values at the nth bit from the MSB.
- the edge detection circuit 101 generates a bit string in which the values calculated in this way are arranged as a detection result.
- the 0th bit is said from the MSB, it is assumed to be the MSB.
- the value indicating whether or not the bit value is different is 1 (transition value) when the bit value is different, and is 0 (non-transition value) when the bit value is not different.
- Embodiment 1 exemplifies a case where the value indicating whether or not the bit values are different is 0 when the bit values are equal.
- the edge detection circuit 101 functions as the bit string generation circuit 51.
- the OR circuit 102 calculates a logical sum of the edge detection result 105 output from the edge detection circuit 101 and the register value 107 output from the register 103.
- the logical sum circuit 102 outputs the calculated logical sum to the register 103 as the logical sum value 106.
- the register 103 is a circuit that holds the logical sum value 106 output from the logical sum circuit 102 for each operation cycle based on the input clock signal.
- the register 103 outputs the held logical sum value to the logical sum circuit 102 and the MSB side bit position detection circuit 104 as a register value 107 for each operation cycle. Further, the register 103 recognizes the last operation cycle in which the final logical sum value 106 based on the last input data of the block is input from the logical sum circuit 102 with reference to the block end signal.
- the register 103 resets the logical sum value held for each block to 0, which is an initial value, in the cycle following the last operation cycle of each block.
- the register 103 outputs the final logical sum value 106 to the MSB side bit position detection circuit 104 and then resets the held logical sum value.
- the MSB side bit position detection circuit 104 detects the bit position of the transition value on the MSB side of the bit string constituting the register value 107 for the register value 107 output from the register 103.
- the MSB side bit position detection circuit 104 is a circuit that calculates and outputs the maximum exponent from the detected bit position. Specifically, the MSB side bit position detection circuit 104 is the case where the position where the bit value of the register value 107 output from the register 103 is 1 is the Mth bit from the MSB side (M is 0 or more). Integer), and outputs ⁇ 1 ⁇ M as the maximum exponent.
- the register 103 outputs the register value 107 for each operation cycle, but the MSB side bit position detection circuit 104 calculates the maximum exponent based on the register value 107 indicating the final logical sum value as a block.
- the MSB side bit position detection circuit 104 refers to the block end signal and recognizes a cycle in which the register value 107 indicating the final logical sum value as a block is output from the register 103.
- the MSB side bit position detection circuit 104 detects the bit position on the MSB side of the bit string constituting the register value 107 indicating the final logical sum value.
- the MSB side bit position detection circuit 104 calculates the maximum exponent from the detected bit position.
- the MSB side bit position detection circuit 104 outputs the calculated maximum exponent.
- the OR circuit 102, the register 103, and the MSB side bit position detection circuit 104 function as the exponent calculation circuit 52.
- the edge detection circuit 101 includes a plurality of exclusive OR (XOR) circuits 110.
- the edge detection circuit 101 calculates and outputs an exclusive OR between adjacent bits of a bit string constituting input data. That is, when the input data is composed of a bit string of Y bits, the edge detection circuit 101 is composed of Y ⁇ 1 XOR circuits 110 (Y is a positive integer).
- FIG. 3 shows a configuration example of the edge detection circuit 101 when the input data is composed of an 8-bit bit string of b7 to b0.
- the edge detection circuit 101 calculates an exclusive OR between adjacent bits of a bit string constituting input data.
- the edge detection circuit 101 outputs the calculated exclusive OR as the edge detection results e7 to e1 to the OR circuit 102.
- bit b7 of the input data and bit e7 of the edge detection result are the MSB.
- FIG. 4 is a timing diagram showing an operation of the maximum exponent calculation circuit 100 according to the first exemplary embodiment of the present invention.
- the maximum exponent calculation circuit 100 operates based on the input clock signal.
- a block to be normalized As an example of a block to be normalized, consider a block consisting of the following eight data of input data 1 to input data 8. Each input data is 8 bits. In the following, each data value is shown in two's complement notation. In the following data bit strings, the leftmost bit is the MSB and the rightmost bit is the LSB. MSB is a sign bit.
- Input data 1 00001111 Input data 2: 00110001 Input data 3: 00000100 Input data 4: 11110011 Input data 5: 11111000 Input data 6: 00000100 Input data 7: 00001011 Input data 8: 00011011
- the edge detection circuit 101 detects the transition (edge) of the value of the bit string constituting the input data 1.
- the edge detection circuit 101 outputs the detection result as the edge detection result 1 to the logical sum circuit 102. More specifically, the edge detection circuit 101 calculates and outputs an exclusive OR between adjacent bits of the bit string constituting the input data 1.
- the logical sum circuit 102 calculates the logical sum of the edge detection result 1 output from the edge detection circuit 101 and the register value 1 output from the register 103.
- the logical sum circuit 102 outputs the calculated logical sum as a logical sum value 1 to the register 103.
- the value of the register value 1 in the cycle 1 is the initial value 0.
- the register 103 holds the logical sum value 1 output from the logical sum circuit 102 in cycle 1.
- the register 103 outputs the held logical sum value 1 as the register value 2 in cycle 2 which is the next operation cycle.
- the input data 2 is input to the maximum exponent calculation circuit 100.
- the edge detection circuit 101 detects a transition (edge) of the value of the bit string constituting the input data 2.
- the edge detection circuit 101 outputs the detected result as the edge detection result 2 to the logical sum circuit 102. More specifically, the edge detection circuit 101 calculates and outputs an exclusive OR between adjacent bits of the bit string constituting the input data of the input data 2.
- the logical sum circuit 102 calculates the logical sum of the edge detection result 2 output from the edge detection circuit 101 and the register value 2 output from the register 103.
- the logical sum circuit 102 outputs the calculated logical sum as a logical sum value 2 to the register 103.
- the value of the register value 2 which is the output of the register 103 in the cycle 2 is the logical sum value 1 held in the cycle 1.
- the register 103 holds the logical sum value 2 output from the logical sum circuit 102 in cycle 2.
- the register 103 outputs the held logical sum value 2 as the register value 3 in cycle 3 which is the next operation cycle.
- maximum exponent calculation circuit 100 inputs input data 3 to 8 in each operation cycle.
- the edge detection circuit 101 detects transitions (edges) of the values of the bit strings constituting the input data 3 to 8, respectively.
- the edge detection circuit 101 outputs each of the detection results as edge detection results 3 to 8.
- Edge detection result 3 0000101
- Edge detection result 4 0101010
- Edge detection result 5 0000100
- Edge detection result 6 0000101
- Edge detection result 7 0001110
- Edge detection result 8 0010110
- the logical sum circuit 102 calculates the logical sum of each of the edge detection results 3 to 8 output from the edge detection circuit 101 and each of the register values output from the register 103 in each cycle.
- the logical sum circuit 102 outputs each of the calculated logical sums to the register 103 as logical sum values 3 to 8.
- the values of the register values 3 to 8, which are the outputs of the register 103 in each of the cycles 3 to 8, are the logical sum values 2 to 7 held in the cycles 2 to 7, respectively.
- the MSB side bit position detection circuit 104 changes the MSB side transition of the bit string constituting the logical sum 8 with respect to the final logical sum 8 as the block. Detect the bit position of the value.
- the MSB side bit position detection circuit 104 calculates the maximum exponent from the detected bit position.
- the register 103 resets the logical sum value held for the block to 0, which is the initial value. As a result, the register 103 outputs an initial value 0 in the next cycle.
- the MSB side bit position detection circuit 104 and the register 103 identify the last operation cycle of each block as a cycle in which the value of the input block end signal becomes 1. In FIG. 4, since the value of the block end signal is 1 in cycle 8, it indicates that cycle 8 is the last operation cycle of the block.
- the edge detection result of this input data is 1000000. Accordingly, since the MSB of the final logical sum value as a block becomes the value 1, the maximum exponent of the block whose input data includes the negative maximum value is calculated as 0. That is, according to the first embodiment, the correct maximum exponent can be calculated even when the negative value is included in the input data.
- the first embodiment is characterized in that the maximum exponent is calculated using the edge detection circuit 101 in the block floating point normalization process. Since the edge detection circuit 101 only needs to calculate the exclusive OR between adjacent bits of the bit string constituting the input data, the edge detection circuit 101 is realized by a circuit having a simple configuration in which the number of logical stages including a plurality of XOR circuits is one. can do.
- the maximum exponent calculation circuit can calculate the maximum exponent at a high speed as compared with the normalization process that calculates the absolute value of the input data.
- the circuit scale and power consumption can be reduced.
- the maximum exponent calculation circuit according to the first embodiment can correctly process even when the negative value is included in the input data. Therefore, according to the maximum exponent calculation circuit according to the first embodiment, even when the data value is the negative maximum value, it is necessary to specially process the data, or to avoid using the negative maximum value. There is a feature that there is no need to do.
- FIG. 5 is a block diagram showing a configuration of a block floating point normalization circuit (hereinafter referred to as a normalization circuit) according to the second exemplary embodiment of the present invention.
- a normalization circuit a block floating point normalization circuit
- the normalization circuit performs normalization processing in block floating point for each input data constituting the block.
- the normalization circuit outputs data obtained by normalizing input data as normalized data.
- the normalization circuit according to the second embodiment includes a memory 120, a maximum exponent calculation circuit 100 according to the first embodiment, and a shift circuit 130.
- the maximum exponent calculation circuit 100 calculates the maximum exponent for the input data that has been input.
- the maximum exponent calculation circuit 100 outputs the calculated maximum exponent as the maximum exponent 108 to the shift circuit 130.
- the memory 120 holds the input data while the maximum exponent calculation circuit 100 calculates the maximum exponent of the input data.
- the input data is sequentially input from the external device (not shown) to the memory 120 and the maximum exponent calculation circuit 100, for example.
- the memory 120 sequentially holds input data input from an external device.
- the memory 120 sequentially outputs the held input data as the input data 121 to the shift circuit 130 after the maximum exponent calculation circuit 100 completes the calculation of the maximum exponent.
- the shift circuit 130 performs normalization processing by shifting the input data output from the memory 120 based on the maximum exponent 108 calculated by the maximum exponent calculation circuit 100.
- FIG. 6 is a timing diagram showing the operation of the normalization circuit according to the second exemplary embodiment of the present invention.
- the normalization circuit according to the second exemplary embodiment of the present invention operates based on the input clock signal.
- a block composed of the following eight data of input data 1 to input data 8 is considered as in the first embodiment.
- Each input data is 8 bits.
- each data value is shown in two's complement notation.
- Input data 1 00001111 Input data 2: 00110001 Input data 3: 00000100 Input data 4: 11110011 Input data 5: 11111000 Input data 6: 00000100 Input data 7: 00001011 Input data 8: 00011011
- FIG. 6 shows operations in cycle 1 ′ to cycle 8 ′ after the maximum exponent calculation circuit 100 calculates the maximum exponent of input data in cycles 1 to 8 shown in FIG.
- the operations in cycles 1 to 7 are the same as those shown in FIG. 4, and the illustration is omitted.
- cycle 9 and cycle 1 ′ indicate the same operation cycle.
- the memory 120 holds the input data while the maximum exponent calculation circuit 100 calculates the maximum exponent of the input data in cycles 1 to 8. Next, after the maximum exponent calculation circuit 100 completes the calculation of the maximum exponent, the memory 120 sequentially outputs the held input data to the shift circuit 130 in cycles 1 ′ to 8 ′.
- the memory 120 identifies the timing at which the maximum exponent calculation circuit 100 completes the calculation of the maximum exponent with reference to the block end signal. Specifically, the memory 120 starts outputting the input data 1 to 8 held from the cycle 9 following the cycle 8 in which the value of the block end signal becomes 1.
- the memory 120 refers to the block end signal and identifies the timing to end the output of input data. Specifically, the memory 120 ends the output of the input data at cycle 8 ′ when the value of the block end signal becomes 1 again.
- the external device outputs a block end signal having a value of 1 in cycle 8 ′ when a cycle corresponding to the number of data of input data 1 to 8 has passed since cycle 8 in which output of input data has been completed.
- the maximum exponent calculation circuit 100 calculates the maximum exponent of the input data input in cycles 1 to 8. Next, the maximum exponent calculation circuit 100 outputs ⁇ 1 as the calculated maximum exponent to the shift circuit 130 in cycle 9. The maximum exponent calculation circuit 100 continues the output of ⁇ 1 which is the maximum exponent until cycle 8 ′, which completes the output of the input data held in the memory 120.
- the maximum exponent calculation circuit 100 refers to the block end signal and identifies the timing to end the output of the maximum exponent. Specifically, the maximum exponent calculation circuit 100 ends the output of the maximum exponent at cycle 8 ′ when the value of the block end signal becomes 1 again.
- the shift circuit 130 sequentially shifts the input data 1 to 8 output from the memory 120 based on ⁇ 1 which is the maximum index calculated and output by the maximum index calculation circuit 100 in cycles 1 ′ to 8 ′. Perform normalization.
- the shift circuit 130 outputs data obtained by normalizing the input data 1 to 8 as normalized data 1 to 8.
- the shift circuit 130 normalizes the input data 1 to 8 by shifting the input data 1 to 8 to the left by m bits. (M is an integer of 0 or more).
- the normalized data 1 to 8 output from the shift circuit 130 have the following values, and the normalization process is completed correctly.
- Data after normalization of the input data k is indicated as normalized data k (k is a positive integer from 1 to 8).
- Normalized data 1 00101110 Normalized data 2: 01100010 Normalized data 3: 00001100 Normalized data 4: 11100110 Normalized data 5: 11110000 Normalized data 6: 00001100 Normalized data 7: 00010110 Normalized data 8: 00110110
- the normalization circuit 100 according to the first embodiment since the maximum exponent calculation circuit 100 according to the first embodiment is used to calculate the maximum exponent with a large calculation processing amount in the normalization processing of the block floating point, it is necessary for the calculation processing of the maximum exponent. The circuit scale and power consumption can be reduced. Furthermore, the normalization circuit according to the second embodiment includes the maximum exponent calculation circuit 100 that can calculate the maximum exponent at high speed and can reduce the circuit scale and power consumption. Then, the normalization circuit performs block floating point normalization processing based on the maximum exponent calculated by the maximum exponent calculation circuit 100. As a result, according to the second embodiment, block floating point normalization processing can be executed at high speed, and the circuit scale and power consumption can be reduced.
- FIG. 7 is a block diagram showing the configuration of the maximum exponent calculation circuit 150 according to the third embodiment of the present invention.
- the maximum exponent calculation circuit 150 is a circuit that calculates the maximum exponent of all data in a block with respect to a block composed of a plurality of input data.
- the maximum exponent calculation circuit 150 calculates the maximum exponent at high speed by performing edge detection in parallel.
- the same components as those in the maximum exponent calculation circuit 100 according to the first embodiment of the present invention are denoted by the same reference numerals.
- the maximum exponent calculation circuit 150 sequentially inputs all four data in the block based on the input clock signal, and calculates the maximum exponent of all the data in the block.
- the maximum exponent calculation circuit 150 outputs the maximum exponent calculated for each block. At this time, the maximum exponent calculation circuit 150 identifies the end of the block with reference to the input block end signal.
- the maximum exponent calculation circuit 150 includes four edge detection circuits 101, a logical sum circuit 152, a register 103, and an MSB side bit position detection circuit 104 as main circuits.
- the edge detection circuit 101 is a circuit that detects a transition (edge) of a value of a bit string that constitutes input data.
- the four edge detection circuits 101 receive input data a to d, respectively.
- the four edge detection circuits 101 detect transitions (edges) of the values of the bit strings constituting the respective input data.
- the four edge detection circuits 101 output the detection results to the OR circuit 152 as edge detection results 155a to 155d, respectively.
- the OR circuit 152 is a five-input circuit, to which the edge detection results 155a to 155d output from the four edge detection circuits 101 and the register value 107 output from the register 103 are input.
- the logical sum circuit 152 calculates the logical sum of the input edge detection results 155a to 155d and the register value 107.
- the logical sum circuit 152 outputs the calculated logical sum as a logical sum value 156 to the register 103.
- the register 103 is a circuit that holds the logical sum value 156 output from the logical sum circuit 152 for each operation cycle based on the input clock signal.
- the register 103 outputs the held logical sum value to the logical sum circuit 152 and the MSB side bit position detection circuit 104 as the register value 107 for each operation cycle.
- the register 103 recognizes the last operation cycle with reference to the block end signal.
- the register 103 resets the logical sum value held for the block to 0, which is the initial value, in the last operation cycle of the block.
- the MSB side bit position detection circuit 104 detects the bit position of the transition value on the MSB side of the bit string constituting the register value 107 for the register value 107 output from the register 103.
- the MSB side bit position detection circuit 104 is a circuit that calculates and outputs the maximum exponent from the detected bit position. Specifically, the MSB side bit position detection circuit 104 is the case where the position where the bit value of the register value 107 output from the register 103 is 1 is the Mth bit from the MSB side (M is 0 or more). Integer), and outputs ⁇ 1 ⁇ M as the maximum exponent.
- the register 103 outputs the register value 107 for each operation cycle, but the MSB side bit position detection circuit 104 calculates the maximum exponent based on the final register value 107 as a block.
- the MSB side bit position detection circuit 104 refers to the block end signal and recognizes a cycle in which the register value 107 indicating the final logical sum value as a block is output from the register 103.
- the MSB side bit position detection circuit 104 detects the bit position of the transition value on the MSB side of the bit string constituting the register value 107 indicating the final logical sum value, and calculates the maximum exponent.
- the MSB side bit position detection circuit 104 outputs the maximum exponent.
- FIG. 8 is a timing chart showing the operation of the maximum exponent calculation circuit 150 according to the third embodiment of the present invention.
- the maximum exponent calculation circuit 150 operates based on the input clock signal.
- Input data 1 00001111 Input data 2: 00110001 Input data 3: 00000100 Input data 4: 11110011 Input data 5: 11111000 Input data 6: 00000100 Input data 7: 00001011 Input data 8: 00011011
- the maximum exponent calculation circuit 150 receives four pieces of input data 1 to 4.
- Each of the four edge detection circuits 101 detects each transition (edge) of the value of the bit string constituting the input data 1 to 4.
- the four edge detection circuits 101 output the detection results as edge detection results 1a to 1d to the OR circuit 152. More specifically, each of the edge detection circuits 101 calculates and outputs an exclusive OR between adjacent bits for each of the bit strings constituting the input data 1a to 1d.
- the detection result of the input data 1 is the edge detection result 1a
- the detection result of the input data 2 is the edge detection result 1b
- the detection result of the input data 3 is the edge detection result 1c
- the detection of the input data 4 is detected.
- the result is the edge detection result 1d.
- Edge detection result 1a 0011100
- Edge detection result 1b 0101001
- Edge detection result 1c 0000101
- Edge detection result 1d 0101010
- the logical sum circuit 152 calculates the logical sum of the edge detection results 1a to 1d output from the four edge detection circuits 101 and the register value 1 output from the register 103, respectively.
- the logical sum circuit 152 outputs the calculated logical sum as the logical sum value 1 to the register 103.
- the value of the register value 1 in the cycle 1 is the initial value 0.
- the register 103 holds the logical sum value 1 output from the logical sum circuit 152 in cycle 1.
- the register 103 outputs the held logical sum value 1 as the register value 2 in cycle 2 which is the next operation cycle.
- the maximum exponent calculation circuit 150 receives four pieces of input data 5-8.
- Each of the four edge detection circuits 101 detects each transition (edge) of the value of the bit string constituting the input data 5 to 8.
- the edge detection circuit 101 outputs each detection result to the OR circuit 152 as edge detection results 2a to 2d. More specifically, each of the edge detection circuits 101 calculates and outputs an exclusive OR between adjacent bits for each of the bit strings constituting the input data 2a to 2d.
- the detection result of the input data 5 is the edge detection result 2a
- the detection result of the input data 6 is the edge detection result 2b
- the detection result of the input data 7 is the edge detection result 2c
- the detection of the input data 8 is detected.
- the result is the edge detection result 2d.
- Edge detection result 2a 0000100
- Edge detection result 2b 0000101
- Edge detection result 2c 0001110
- Edge detection result 2d 0010110
- the logical sum circuit 152 calculates the logical sum of the edge detection results 2a to 2d output from the four edge detection circuits 101 and the register value 2 output from the register 103, respectively.
- the logical sum circuit 102 outputs the calculated logical sum as a logical sum value 2 to the register 103.
- the value of the register value 2 which is the output of the register 103 in the cycle 2 is the logical sum value 1 held in the cycle 1.
- the MSB side bit position detection circuit 104 Since cycle 3 is the cycle following the last operation cycle of the block, the MSB side bit position detection circuit 104 performs transition on the MSB side of the bit string constituting the logical sum value for the final logical sum value 2 as the block. Detect the bit position of the value. The MSB side bit position detection circuit 104 calculates the maximum exponent from the detected bit position. The MSB side bit position detection circuit 104 outputs the calculated maximum exponent. Specifically, since the bit position where the bit value of the logical sum value 2 is 1 is the second bit counted from the MSB side, the MSB side bit position detection circuit 104 outputs ⁇ 1 as the maximum exponent. .
- cycle 3 is the cycle following the last operation cycle of the block
- the register 103 resets the logical sum held for the block to 0, which is the initial value.
- the register 103 outputs an initial value 0 in the next cycle.
- the MSB side bit position detection circuit 104 and the register 103 identify the last operation cycle of each block as a cycle in which the value of the input block end signal becomes 1. In FIG. 8, since the value of the block end signal is 1 in cycle 2, it indicates that cycle 2 is the last operation cycle of the block.
- the edge detection result of this input data is 1000000. Therefore, since the MSB of the final logical sum value as a block becomes the value 1, the maximum exponent of the block whose input data includes the negative maximum value is calculated as 0. That is, also in the third embodiment, the correct maximum exponent can be calculated even when the negative maximum value is included in the input data.
- the third embodiment is characterized in that the maximum exponent is calculated using the edge detection circuit 101 in the block floating point normalization process. Since the edge detection circuit 101 only needs to calculate the exclusive OR between adjacent bits of the bit string constituting the input data, the edge detection circuit 101 is realized by a circuit having a simple configuration in which the number of logical stages including a plurality of XOR circuits is one. can do.
- the maximum exponent calculation circuit calculates the maximum exponent at a higher speed than the normalization process that requires the absolute value circuit for calculating the absolute value of the input data.
- the circuit scale and power consumption can be reduced.
- the maximum exponent calculation circuit according to the third embodiment can correctly process even when the negative maximum value is included in the input data. Therefore, according to the maximum exponent calculation circuit according to the third embodiment, even when the data value is the negative maximum value, it is necessary to specially process the data, or to avoid using the negative maximum value. There is a feature that there is no need to do.
- the maximum exponent calculation circuit according to the third embodiment includes the four edge detection circuits 101 and executes the edge detection processing in parallel, so that the maximum exponent can be calculated at high speed. .
- FIG. 9 shows a configuration example of a maximum exponent calculation circuit 160 that includes N edge detection circuits 101 and executes edge detection processing in N parallel (where N is an integer of 2 or more).
- N is an integer of 2 or more.
- the N + 1 input OR circuit 162 included in the maximum exponent calculation circuit 160 calculates the logical sum of the N edge detection results output from the N edge detection circuits 101 and the register value 107 output from the register 103. calculate.
- FIG. 10 is a block diagram showing a configuration of a block floating point normalization circuit (hereinafter referred to as a normalization circuit) according to the fourth embodiment of the present invention.
- the normalization circuit according to the fourth embodiment performs normalization processing in block floating point for each input data constituting the block.
- the normalization circuit outputs data obtained by normalizing input data as normalized data.
- the normalization circuit according to the fourth embodiment receives four input data at the same time, and simultaneously outputs four normalized data obtained by normalizing the four input data inputted at the same time.
- the normalization circuit according to the fourth embodiment includes four memories 120, a maximum exponent calculation circuit 150 according to the third embodiment, and four shift circuits 130.
- the maximum exponent calculation circuit 150 calculates the maximum exponent for the input data “a” to “d”.
- the maximum exponent calculation circuit 150 outputs the calculated maximum exponent as the maximum exponent 158 to the four shift circuits 130.
- Each of the four memories 120 holds the input data a to d while the maximum exponent calculation circuit 150 calculates the maximum exponent of the input data. For example, four pieces of input data are sequentially input from an external device (not shown) to each of the four memories 120 and the maximum exponent calculation circuit 100. Each of the four memories 120 sequentially holds input data input from an external device. Each of the four memories 120 sequentially outputs the stored input data a to d as input data 121a to d to the shift circuit 130 after the maximum exponent calculation circuit 150 completes the calculation of the maximum exponent. To do.
- Each of the four shift circuits 130 shifts each of the input data 121a to 121d output from the four memories 120 based on the maximum index 158 calculated by the maximum index calculation circuit 150 with respect to the input data. Perform normalization processing with.
- FIG. 11 is a timing chart showing the operation of the normalization circuit according to the fourth exemplary embodiment of the present invention.
- the normalization circuit according to the fourth exemplary embodiment of the present invention operates based on the input clock signal.
- a block composed of the following eight data of input data 1 to input data 8 is considered as in the third embodiment.
- Each input data is 8 bits.
- each data value is shown in two's complement notation.
- Input data 1 00001111 Input data 2: 00110001 Input data 3: 00000100 Input data 4: 11110011 Input data 5: 11111000 Input data 6: 00000100 Input data 7: 00001011 Input data 8: 00011011
- FIG. 11 shows operations in cycle 1 ′ to cycle 2 ′ after the maximum exponent calculation circuit 150 calculates the maximum exponent of input data in cycles 1 to 2 shown in FIG.
- cycle 1 since the operation of cycle 1 is the same as that shown in FIG. 8, illustration thereof is omitted.
- Cycle 3 and cycle 1 ′ indicate the same operation cycle.
- Each of the four memories 120 holds the input data while calculating the maximum exponent of the input data input by the maximum exponent calculation circuit 150 in cycles 1 and 2. Next, each of the four memories 120 sequentially outputs the held input data to the shift circuit 130 in cycles 1 ′ to 2 ′ after the maximum exponent calculation circuit 150 completes the calculation of the maximum exponent.
- the memory 120 identifies the timing at which the maximum exponent calculation circuit 150 completes the calculation of the maximum exponent with reference to the block end signal.
- the maximum exponent calculation circuit 150 calculates the maximum exponent of input data that is input four times per cycle in cycles 1 and 2. Next, the maximum exponent calculation circuit 150 outputs ⁇ 1 as the calculated maximum exponent to the shift circuit 130 in cycle 3. The maximum exponent calculation circuit 150 continues the output of ⁇ 1 which is the maximum exponent until cycle 2 ′ where the output of the input data held in the memory 120 is completed.
- the four shift circuits 130 in cycles 1 ′ to 3 ′, input data 1 to 8 output from the memory 120 into one cycle based on ⁇ 1, which is the maximum exponent calculated and output by the maximum exponent calculation circuit 150. Normalization processing is performed by sequentially shifting four by four.
- the shift circuit 130 outputs data obtained by normalizing the input data 1 to 8 as normalized data 1 to 8.
- the normalized data 1 to 8 output from the shift circuit 130 have the following values, and the normalization process is completed correctly.
- Data after normalization of the input data k is indicated as normalized data k (k is a positive integer from 1 to 8).
- Normalized data 1 00101110 Normalized data 2: 01100010 Normalized data 3: 00001100 Normalized data 4: 11100110 Normalized data 5: 11110000 Normalized data 6: 00001100 Normalized data 7: 00010110 Normalized data 8: 00110110
- the normalization circuit 150 according to the third embodiment since the maximum exponent calculation circuit 150 according to the third embodiment is used to calculate the maximum exponent with a large calculation processing amount in the block floating point normalization processing, it is necessary for the calculation processing of the maximum exponent. The circuit scale and power consumption can be reduced. Furthermore, the normalization circuit according to the fourth embodiment includes a maximum exponent calculation circuit 150 that can calculate the maximum exponent at high speed and can reduce the circuit scale and power consumption. Then, the normalization circuit performs block floating point normalization processing based on the maximum exponent calculated by the maximum exponent calculation circuit 150. As a result, according to the fourth embodiment, block floating point normalization processing can be executed at high speed, and the circuit scale and power consumption can be reduced.
- the block floating point normalization circuit according to the fourth embodiment includes four memories 120 and four shift circuits 130, and includes a maximum exponent calculation circuit 150 that calculates a maximum exponent in four parallel, the block The floating point maximum exponent calculation process and the normalization process can be executed in parallel. As a result, the block floating point normalization process can be executed at high speed.
- the edge detection circuit sets a value (transition value) indicating that the values of adjacent bits are different from each other in the bit string constituting the input data to 1 so that the values of the adjacent bits are not different.
- a value indicating that the values of adjacent bits are different from each other is set to 0 and a value indicating that the values of adjacent bits are not different from each other is set to 1. That is, the edge detection circuit may have an XNOR circuit instead of an XOR circuit, for example.
- a logical product circuit that calculates the logical product of the data output from the edge detection circuit is provided. Then, the MSB side bit position detection circuit calculates the maximum exponent based on the bit position where the bit value of the logical product value output from the logical product circuit is 0.
- the bit string generated by the edge detection circuit and the OR circuit is arranged by arranging the XOR result of the nth bit and n + 1th bit from the MSB of the bit string constituting the input data as the nth bit from the MSB.
- n is an integer of 0 or more.
- the edge detection circuit and the OR circuit calculate the XOR result of the nth bit and the (n + 1) th bit from the MSB of the bit string constituting the input data from the MSB (7 ⁇ n ) You may make it arrange as a bit.
- the edge detection circuit and the logical sum circuit may arrange the XOR result of the n-th bit and the (n + 1) -th bit from the MSB of the bit string constituting the input data as the n-th bit from the LSB.
- the edge detection circuit and the logical sum circuit may arrange the XOR result of the n-th bit and the (n + 1) -th bit from the MSB of the bit string constituting the input data as the n-th bit from the LSB.
- the edge detection circuit and the logical sum circuit may arrange the XOR result of the n-th bit and the (n + 1) -th bit from the MSB of the bit string constituting the input data as the n-th bit from the LSB.
- the logical sum of the bit strings generated by the edge detection circuit is calculated, and the maximum exponent is calculated based on the calculated logical sum.
- the bit string generated by the edge detection circuit may be output directly to the MSB side bit position detection circuit without providing the OR circuit and the register.
- the MSB side bit position detection circuit calculates an index for each bit string sequentially output from the edge detection circuit. Then, the MSB side bit position detection circuit may set the index having the largest value among all the data in the block as the maximum index.
- the absolute value of each input data in the block is calculated sequentially, the index is calculated for each of the calculated absolute values, and the index with the largest value among all the data in the block is set as the maximum index. It is possible to calculate the maximum exponent at a higher speed than in the case of doing so.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Computing Systems (AREA)
- Computational Mathematics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Manipulation Of Pulses (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Design And Manufacture Of Integrated Circuits (AREA)
Abstract
Description
(1)ブロック内の全データの最大指数を求める。
(2)求めた最大指数によりブロック全体をシフト(正規化)する。
ここで最大指数とは、ブロック内の全てのデータが桁あふれを起こさない最大の指数を示す。最大指数はブロック内の全データのうち、絶対値が最大のデータの指数値に等しい。
(1)ブロック内の各データの絶対値を算出する。
(2)算出した各データの絶対値の論理和を算出する。
(3)算出した論理和のMSB(Most Significant Bit)側のビット位置を検出し、最大指数を求める。
まず、正規化対象のブロックとして、次に示す8ビットの入力データである入力データ1~入力データ8の8つのデータからなるブロックを考える。下記では各データの値を2の補数表現で示している。なお、以降に示すデータのビット列は、最も左のビットがMSBであり、最も右のビットがLSBであるものとして示す。なお、MSBは、符号ビットとなる。
入力データ2: 00110001
入力データ3: 00000110
入力データ4: 11110011
入力データ5: 11111000
入力データ6: 00000110
入力データ7: 00001011
入力データ8: 00011011
絶対値2: 00110001
絶対値3: 00000110
絶対値4: 00001101
絶対値5: 00001000
絶対値6: 00000110
絶対値7: 00001011
絶対値8: 00011011
正規化データ2: 01100010
正規化データ3: 00001100
正規化データ4: 11100110
正規化データ5: 11110000
正規化データ6: 00001100
正規化データ7: 00010110
正規化データ8: 00110110
以上に説明したように、上述したような正規化処理では、最大指数の算出を高速に行えず、また回路規模及び消費電力が大きいという問題がある。
[第1の実施の形態]
まず、図1を参照して、本発明の実施の形態1にかかる最大指数算出回路の概要となる半導体集積回路50について説明する。図1は、本発明の実施の形態1にかかる半導体集積回路の構成を示すブロック図である。
ビット列生成回路51は、データを構成する第1のビット列の互いに隣接するビットの組のそれぞれについて、互いに隣接するビットの値が異なることを示す遷移値、又は、互いに隣接するビットの値が異ならないことを示す非遷移値をとるビットを含む第2のビット列を生成する。
指数算出回路52は、ビット列生成回路51によって複数のデータのそれぞれを構成する複数の第1のビット列から生成された複数の第2のビット列の遷移値のビットの位置に基づいて、複数のデータの指数を算出する。
指数算出回路52は、ビット列生成回路51から出力された複数の第2のビット列の遷移値のビットの位置に基づいて、複数のデータの指数を算出する。指数算出回路52は、算出した指数を出力する。
図2は、本発明の第1の実施の形態にかかる最大指数算出回路100の構成を示すブロック図である。最大指数算出回路100は、複数の入力データからなるブロックに関して、ブロック内の全データの最大指数を算出する回路である。
論理和回路102、レジスタ103及びMSB側ビット位置検出回路104は、指数算出回路52として機能する。
次に、図4を参照して、本発明の実施の形態1にかかる最大指数算出回路の動作について説明する。図4は、本発明の実施の形態1にかかる最大指数算出回路100の動作を示すタイミング図である。最大指数算出回路100は、入力されたクロック信号に基づいて動作を行う。
入力データ2: 00110001
入力データ3: 00000110
入力データ4: 11110011
入力データ5: 11111000
入力データ6: 00000110
入力データ7: 00001011
入力データ8: 00011011
まず、動作サイクルの1サイクル目(サイクル1)で、最大指数算出回路100は、入力データ1が入力される。エッジ検出回路101は、入力データ1を構成するビット列の値の遷移(エッジ)を検出する。エッジ検出回路101は、検出した結果をエッジ検出結果1として論理和回路102に出力する。より詳細には、エッジ検出回路101は、入力データ1を構成するビット列の隣接するビット間の排他的論理和をそれぞれ算出して出力する。
つぎに、動作サイクルの2サイクル目(サイクル2)では、最大指数算出回路100は、入力データ2が入力される。エッジ検出回路101は、入力データ2を構成するビット列の値の遷移(エッジ)を検出する。エッジ検出回路101は、検出した結果をエッジ検出結果2として論理和回路102に出力する。より詳細には、エッジ検出回路101は、入力データ2の入力データを構成するビット列の隣接するビット間の排他的論理和をそれぞれ算出して出力する。
サイクル3~8においても同様にして、最大指数算出回路100は、入力データ3~8を各動作サイクルにおいて入力する。エッジ検出回路101は、入力データ3~8を構成するビット列の値の遷移(エッジ)をそれぞれ検出する。エッジ検出回路101は、検出した結果のそれぞれをエッジ検出結果3~8として出力する。
エッジ検出結果4: 0001010
エッジ検出結果5: 0000100
エッジ検出結果6: 0000101
エッジ検出結果7: 0001110
エッジ検出結果8: 0010110
論理和値4: 0111111
論理和値5: 0111111
論理和値6: 0111111
論理和値7: 0111111
論理和値8: 0111111
本実施の形態1では、ブロック浮動小数点の正規化処理において、エッジ検出回路101を使用して最大指数を算出する、ことを特徴としている。エッジ検出回路101は、入力データを構成するビット列の隣接するビット間の排他的論理和をそれぞれ算出するだけでよいので、複数のXOR回路からなる論理段数が1段の単純な構成の回路で実現することができる。
次に、図5を参照して、本発明の実施の形態2にかかるブロック浮動小数点正規化回路について説明する。本発明の実施の形態2では、実施の形態1にかかる最大指数算出回路を使用したブロック浮動小数点正規化回路の具体例について説明する。
次に、図6を参照して、本発明の実施の形態2にかかる正規化回路の動作について説明する。図6は、本発明の実施の形態2にかかる正規化回路の動作を示すタイミング図である。本発明の実施の形態2にかかる正規化回路は、入力されたクロック信号に基づいて動作を行う。
入力データ2: 00110001
入力データ3: 00000110
入力データ4: 11110011
入力データ5: 11111000
入力データ6: 00000110
入力データ7: 00001011
入力データ8: 00011011
正規化データ2: 01100010
正規化データ3: 00001100
正規化データ4: 11100110
正規化データ5: 11110000
正規化データ6: 00001100
正規化データ7: 00010110
正規化データ8: 00110110
本実施の形態2では、ブロック浮動小数点の正規化処理において、演算処理量の大きい最大指数の算出に、実施の形態1による最大指数算出回路100を使用するので、最大指数の算出処理に必要な回路規模や消費電力を小さくすることができる。さらに、本実施の形態2にかかる正規化回路は、最大指数を高速に算出することが可能であり、かつ回路規模や消費電力を小さくすることができる最大指数算出回路100を有する。そして、正規化回路は、最大指数算出回路100が算出した最大指数に基づいて、ブロック浮動小数点の正規化処理を実行している。その結果、本実施の形態2によれば、ブロック浮動小数点の正規化処理を高速に実行することが可能であり、かつ、回路規模や消費電力を小さくすることができる。
つぎに、図面を参照して本発明の実施の形態3について説明する。
次に、図8を参照して、本発明の実施の形態3にかかる最大指数算出回路の動作について説明する。図8は、本発明の実施の形態3にかかる最大指数算出回路150の動作を示すタイミング図である。最大指数算出回路150は、入力されたクロック信号に基づいて動作を行う。
入力データ2: 00110001
入力データ3: 00000110
入力データ4: 11110011
入力データ5: 11111000
入力データ6: 00000110
入力データ7: 00001011
入力データ8: 00011011
まず、動作サイクルの1サイクル目(サイクル1)で、最大指数算出回路150は、4つの入力データ1~4が入力される。4つのエッジ検出回路101のそれぞれは、入力データ1~4を構成するビット列の値のそれぞれの遷移(エッジ)を検出する。4つのエッジ検出回路101は、検出結果のそれぞれをエッジ検出結果1a~1dとして論理和回路152に出力する。より詳細には、エッジ検出回路101のそれぞれは、入力データ1a~1dを構成するビット列のそれぞれについて、隣接するビット間の排他的論理和を算出して出力する。ここで、入力データ1の検出結果はエッジ検出結果1aであり、入力データ2の検出結果はエッジ検出結果1bであり、入力データ3の検出結果はエッジ検出結果1cであり、入力データ4の検出結果はエッジ検出結果1dである。
エッジ検出結果1b: 0101001
エッジ検出結果1c: 0000101
エッジ検出結果1d: 0001010
つぎに、動作サイクルの2サイクル目(サイクル2)では、最大指数算出回路150は、4つの入力データ5~8が入力される。4つのエッジ検出回路101のそれぞれは、入力データ5~8を構成するビット列の値のそれぞれの遷移(エッジ)を検出する。エッジ検出回路101は、検出結果のそれぞれをエッジ検出結果2a~2dとして論理和回路152に出力する。より詳細には、エッジ検出回路101のそれぞれは、入力データ2a~2dを構成するビット列のそれぞれについて、隣接するビット間の排他的論理和を算出して出力する。ここで、入力データ5の検出結果はエッジ検出結果2aであり、入力データ6の検出結果はエッジ検出結果2bであり、入力データ7の検出結果はエッジ検出結果2cであり、入力データ8の検出結果はエッジ検出結果2dである。
エッジ検出結果2b: 0000101
エッジ検出結果2c: 0001110
エッジ検出結果2d: 0010110
本実施の形態3では、ブロック浮動小数点の正規化処理において、エッジ検出回路101を使用して最大指数を算出する、ことを特徴としている。エッジ検出回路101は、入力データを構成するビット列の隣接するビット間の排他的論理和をそれぞれ算出するだけでよいので、複数のXOR回路からなる論理段数が1段の単純な構成の回路で実現することができる。
図9において、最大指数算出回路160が備えるN+1入力の論理和回路162は、 N個のエッジ検出回路101が出力するN個のエッジ検出結果と、レジスタ103が出力するレジスタ値107の論理和を算出する。
次に、図10を参照して、本発明の実施の形態4にかかるブロック浮動小数点正規化回路について説明する。本発明の実施の形態4では、実施の形態3にかかる最大指数算出回路を使用したブロック浮動小数点正規化回路の具体例について説明する。
次に、図11を参照して、本発明の実施の形態4にかかる正規化回路の動作について説明する。図11は、本発明の実施の形態4にかかる正規化回路の動作を示すタイミングチャートである。本発明の実施の形態4にかかる正規化回路は、入力されたクロック信号に基づいて動作を行う。
入力データ2: 00110001
入力データ3: 00000110
入力データ4: 11110011
入力データ5: 11111000
入力データ6: 00000110
入力データ7: 00001011
入力データ8: 00011011
正規化データ2: 01100010
正規化データ3: 00001100
正規化データ4: 11100110
正規化データ5: 11110000
正規化データ6: 00001100
正規化データ7: 00010110
正規化データ8: 00110110
本実施の形態4では、ブロック浮動小数点の正規化処理において、演算処理量の大きい最大指数の算出に、実施の形態3による最大指数算出回路150を使用するので、最大指数の算出処理に必要な回路規模や消費電力を小さくすることができる。さらに、本実施の形態4にかかる正規化回路は、最大指数を高速に算出することが可能であり、かつ回路規模や消費電力を小さくすることができる最大指数算出回路150を有する。そして、正規化回路は、最大指数算出回路150が算出した最大指数に基づいて、ブロック浮動小数点の正規化処理を実行している。その結果、本実施の形態4によれば、ブロック浮動小数点の正規化処理を高速に実行することが可能であり、かつ、回路規模や消費電力を小さくすることができる。
51 ビット列生成回路
52 指数算出回路
100 最大指数算出回路
101 エッジ検出回路
102 論理和回路
103 レジスタ
104 MSB側ビット位置検出回路
105 エッジ検出結果
106 論理和値
107 レジスタ値
110 排他的論理和回路
120 メモリ
130 シフト回路
150 最大指数算出回路
152 論理和回路
160 最大指数算出回路
162 論理和回路
Claims (10)
- 複数のデータを共通の指数によって正規化する場合に、当該複数のデータの指数を算出する半導体集積回路であって、
前記データを構成する第1のビット列の互いに隣接するビットの組のそれぞれについて、当該互いに隣接するビットの値が異なることを示す遷移値、又は、当該互いに隣接するビットの値が異ならないことを示す非遷移値をとるビットを含む第2のビット列を生成するビット列生成回路と、
前記ビット列生成回路によって前記複数のデータのそれぞれを構成する複数の第1のビット列から生成された複数の第2のビット列の前記遷移値のビットの位置に基づいて、前記複数のデータの指数を算出する指数算出回路と、
を備えたことを特徴とする半導体集積回路。 - 前記指数算出回路は、
前記複数の第2のビット列に基づいて、前記複数の第2のビット列の少なくとも1つで、同一位置におけるビットが前記遷移値である場合、当該位置に対応するビットを第1の値とし、前記複数の第2のビット列の全てで、同一位置におけるビットが前記非遷移値である場合、当該位置に対応するビットを第2の値とした第3のビット列を生成するビット列合成回路と、
前記ビット列合成回路が生成した第3のビット列における前記第1の値のビットの位置に基づいて、前記指数を算出するビット位置検出回路と、を有することを特徴とする請求項1に記載の半導体集積回路。 - 前記第2のビット列は、前記第1のビット列の最上位ビットからn(nは、0以上の整数)ビット目及びn+1ビット目の組に対応するビットを、最上位ビットからnビット目として配列し、
前記第3のビット列は、前記第2のビット列の最上位ビットからnビット目に対応するビットを、最上位ビットからnビット目として配列し、
前記ビット位置検出回路は、前記第3のビット列のうち、前記第1の値のビットの最上位ビットからの位置に基づいて、前記指数を算出することを特徴とする請求項2に記載の半導体集積回路。 - 前記ビット列合成回路は、前記複数の第2のビット列の論理和となる第3のビット列を生成することを特徴とする請求項2又は3に記載の半導体集積回路。
- 前記ビット列生成回路は、前記データを構成する第1のビット列に含まれ、互いに隣接するビットの排他的論理和を示すビットを含む第2のビット列を生成することを特徴とする請求項4に記載の半導体集積回路。
- 前記半導体集積回路は、前記第3のビット列を格納するビット列記憶手段をさらに備え、
前記半導体集積回路は、前記ビット列生成回路を複数備え、
前記複数のビット列生成回路は、前記複数のデータから当該複数のビット列生成回路の数ずつ前記第2のビット列を生成し、
前記ビット列合成回路は、前記複数のビット列生成回路によって複数の第2のビット列が生成される毎に、当該複数の第2のビット列と前記ビット列記憶手段に格納された第3のビット列とに基づいて、前記第3のビット列を生成して前記ビット列記憶手段に格納された第3のビット列を更新するとともに、前記複数の第2のビット列及び前記第3のビット列の少なくとも1つで、同一位置におけるビットが前記遷移値である場合、当該位置に対応するビットを前記第1の値とし、前記複数の第2のビット列及び前記第3のビット列の全てで、同一位置におけるビット列が前記非遷移値である場合、当該位置に対応するビットを前記第2の値とした第3のビット列を生成することを特徴とする請求項2乃至5のいずれか1項に記載の半導体集積回路。 - 前記半導体集積回路は、前記指数算出回路が算出した指数に基づいて、前記第1のビット列をシフトすることによって前記データを正規化するシフト回路をさらに備えたことを特徴とする請求項1乃至6のいずれか1項に記載の半導体集積回路。
- 前記半導体集積回路は、前記シフト回路を複数備え、
前記複数のシフト回路は、前記複数のデータを当該複数のシフト回路の数ずつ正規化することを特徴とする請求項7に記載の半導体集積回路。 - 前記複数のデータは、ブロック浮動小数点において同一のブロックに含まれるデータであり、
前記指数算出回路は、前記ブロックにおける最大指数を算出することを特徴とする請求項1乃至8のいずれか1項に記載の半導体集積回路。 - 複数のデータを共通の指数によって正規化する場合に、当該複数のデータの指数を算出する指数算出方法であって、
前記データを構成する第1のビット列の互いに隣接するビットの組のそれぞれについて、当該互いに隣接するビットの値が異なることを示す遷移値、又は、当該互いに隣接するビットの値が異ならないことを示す非遷移値をとるビットを含む第2のビット列を生成し、
前記複数のデータのそれぞれを構成する複数の第1のビット列から生成された複数の第2のビット列の前記遷移値のビットの位置に基づいて、前記複数のデータの指数を算出する、
指数算出方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP11760675.6A EP2431865B1 (en) | 2010-06-22 | 2011-04-12 | Semiconductor integrated circuit and index calculation method |
CN201180001677.1A CN102378960B (zh) | 2010-06-22 | 2011-04-12 | 半导体集成电路和指数计算方法 |
JP2011539841A JP4883251B1 (ja) | 2010-06-22 | 2011-04-12 | 半導体集積回路及び指数算出方法 |
US13/262,748 US8862647B2 (en) | 2010-06-22 | 2011-04-12 | Semiconductor integrated circuit and exponent calculation method |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010-141765 | 2010-06-22 | ||
JP2010141765 | 2010-06-22 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011161859A1 true WO2011161859A1 (ja) | 2011-12-29 |
Family
ID=45371067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2011/002148 WO2011161859A1 (ja) | 2010-06-22 | 2011-04-12 | 半導体集積回路及び指数算出方法 |
Country Status (5)
Country | Link |
---|---|
US (1) | US8862647B2 (ja) |
EP (1) | EP2431865B1 (ja) |
JP (1) | JP4883251B1 (ja) |
CN (1) | CN102378960B (ja) |
WO (1) | WO2011161859A1 (ja) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2431865B1 (en) * | 2010-06-22 | 2018-05-23 | Nec Corporation | Semiconductor integrated circuit and index calculation method |
JP6216123B2 (ja) * | 2013-01-30 | 2017-10-18 | ブラザー工業株式会社 | 画像形成装置 |
US9577672B2 (en) * | 2014-07-18 | 2017-02-21 | Storart Technology Co., Ltd. | Low density parity-check code decoder and decoding method thereof |
US10528321B2 (en) * | 2016-12-07 | 2020-01-07 | Microsoft Technology Licensing, Llc | Block floating point for neural network implementations |
DE102020104594B4 (de) * | 2020-02-21 | 2024-01-25 | Infineon Technologies Ag | Verarbeitung von Radarsignalen |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0675746A (ja) | 1992-08-27 | 1994-03-18 | Matsushita Electric Ind Co Ltd | 1位置検出方法及び演算器 |
JPH08212052A (ja) | 1995-02-03 | 1996-08-20 | Fujitsu Ltd | 正規化データ生成回路 |
JPH09128213A (ja) | 1995-10-31 | 1997-05-16 | Hitachi Ltd | ブロックフローティング処理システムおよび方法 |
JPH1040073A (ja) * | 1996-07-24 | 1998-02-13 | Matsushita Electric Ind Co Ltd | ディジタル信号処理装置 |
JP2002318792A (ja) * | 2001-04-24 | 2002-10-31 | Asahi Kasei Corp | データ演算処理装置及びデータ演算処理プログラム |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3127600B2 (ja) * | 1992-09-11 | 2001-01-29 | ソニー株式会社 | ディジタル信号復号化装置及び方法 |
JP3313560B2 (ja) * | 1996-01-31 | 2002-08-12 | 株式会社日立製作所 | 浮動小数点演算処理装置 |
JP3642053B2 (ja) * | 2002-02-25 | 2005-04-27 | 日本電気株式会社 | シンボルデータ変換回路 |
JP4413198B2 (ja) * | 2006-03-23 | 2010-02-10 | 富士通株式会社 | 浮動小数点データの総和演算処理方法及びコンピュータシステム |
US7917567B1 (en) * | 2007-06-07 | 2011-03-29 | Xilinx, Inc. | Floating-point processing unit for successive floating-point operations |
US8631056B2 (en) * | 2008-01-09 | 2014-01-14 | Qualcomm Incorporated | Processor and method of determining a normalization count |
EP2431865B1 (en) * | 2010-06-22 | 2018-05-23 | Nec Corporation | Semiconductor integrated circuit and index calculation method |
WO2012157132A1 (ja) * | 2011-05-16 | 2012-11-22 | 日本電気株式会社 | 演算処理装置及び演算処理方法 |
-
2011
- 2011-04-12 EP EP11760675.6A patent/EP2431865B1/en active Active
- 2011-04-12 JP JP2011539841A patent/JP4883251B1/ja active Active
- 2011-04-12 US US13/262,748 patent/US8862647B2/en not_active Expired - Fee Related
- 2011-04-12 WO PCT/JP2011/002148 patent/WO2011161859A1/ja active Application Filing
- 2011-04-12 CN CN201180001677.1A patent/CN102378960B/zh not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0675746A (ja) | 1992-08-27 | 1994-03-18 | Matsushita Electric Ind Co Ltd | 1位置検出方法及び演算器 |
JPH08212052A (ja) | 1995-02-03 | 1996-08-20 | Fujitsu Ltd | 正規化データ生成回路 |
JPH09128213A (ja) | 1995-10-31 | 1997-05-16 | Hitachi Ltd | ブロックフローティング処理システムおよび方法 |
JPH1040073A (ja) * | 1996-07-24 | 1998-02-13 | Matsushita Electric Ind Co Ltd | ディジタル信号処理装置 |
JP2002318792A (ja) * | 2001-04-24 | 2002-10-31 | Asahi Kasei Corp | データ演算処理装置及びデータ演算処理プログラム |
Also Published As
Publication number | Publication date |
---|---|
US20120117337A1 (en) | 2012-05-10 |
US8862647B2 (en) | 2014-10-14 |
EP2431865A4 (en) | 2017-04-19 |
EP2431865B1 (en) | 2018-05-23 |
JPWO2011161859A1 (ja) | 2013-08-19 |
EP2431865A1 (en) | 2012-03-21 |
CN102378960B (zh) | 2014-07-30 |
JP4883251B1 (ja) | 2012-02-22 |
CN102378960A (zh) | 2012-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tenca et al. | High-radix design of a scalable modular multiplier | |
CN105468331B (zh) | 独立的浮点转换单元 | |
JP4883251B1 (ja) | 半導体集積回路及び指数算出方法 | |
JP5640081B2 (ja) | 飽和を伴う整数乗算および乗算加算演算 | |
US9519457B2 (en) | Arithmetic processing apparatus and an arithmetic processing method | |
JP2585649B2 (ja) | 除算回路 | |
CN111936965A (zh) | 随机舍入逻辑 | |
WO2016119547A1 (en) | Method and apparatus for converting from integer to floating point representation | |
JP2013210838A (ja) | 演算回路及び演算方法 | |
Zarandi et al. | An Efficient Component for Designing Signed Reverse Converters for a Class of RNS Moduli Sets of Composite Form $\{2^{k}, 2^{P}-1\} $ | |
RU2696223C1 (ru) | Арифметико-логическое устройство для формирования остатка по произвольному модулю от числа | |
US7401107B2 (en) | Data processing apparatus and method for converting a fixed point number to a floating point number | |
JP7044528B2 (ja) | リーディングゼロ予想 | |
CN113672196B (zh) | 一种基于单数字信号处理单元的双乘法计算装置和方法 | |
CN115268832A (zh) | 浮点数取整的方法、装置以及电子设备 | |
JP4290203B2 (ja) | リダクションアレイの装置および方法 | |
RU2562411C1 (ru) | Устройство для вычисления модуля комплексного числа | |
JP4109181B2 (ja) | 論理回路、および、それを使用した浮動小数点演算回路とマイクロプロセッサ | |
US20080307032A1 (en) | Divider Circuit | |
JP2009245407A (ja) | 複素数の積和演算装置および積和演算方法 | |
JP2009267606A (ja) | 演算器 | |
JP3613466B2 (ja) | データ演算処理装置及びデータ演算処理プログラム | |
EP3289445B1 (en) | Floating point computation apparatus and method | |
JP3198868B2 (ja) | 乗算処理装置 | |
KR20230015844A (ko) | 극소 검출 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 201180001677.1 Country of ref document: CN |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2011539841 Country of ref document: JP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2011760675 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 13262748 Country of ref document: US |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11760675 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |