Semiconductor device and correlation value calculation method and program
The semiconductor device with specialized processing units addresses the inefficiency in calculating correlation values by alternately arranging bit strings and counting bit values, achieving efficient processing times across varying bit lengths.
Patent Information
- Application Number
- JP2023034903
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing processors in global navigation satellite systems face challenges in efficiently calculating correlation values when the bit length of expected values is variable, requiring either dedicated hardware for efficiency or general CPUs for flexibility but at the cost of longer processing times.
A semiconductor device with specific processing units that alternately arrange input bit strings, convert data sets using arbitrary logic, and count bit values to efficiently calculate correlation values regardless of expected value bit length.
Enables efficient correlation value calculations in a short processing time by reducing the number of instructions required, even when the expected value bit length is variable.
Smart Images

Figure 2024126503000001
Abstract
Description
[Technical field]
[0001] The present invention relates to a semiconductor device, a correlation value calculation method, and a program. [Background technology]
[0002] Cited Document 1 describes a processor used in a Global Navigation Satellite System, such as the Global Positioning System. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2017-173332 A Summary of the Invention [Problem to be solved by the invention]
[0004] For example, in a processor or the like used in a global navigation satellite system, two bit strings, comparison value P and comparison value N, which are complementary to each other, are generated based on input from an analog radio signal, and these two bit strings, comparison value P and comparison value N, are compared with two bit strings, expected value P and expected value N, which are also complementary to each other, to calculate the correlation value of the comparison value with the expected value.
[0005] When correlation values are calculated using a dedicated processor, the processor is equipped with hardware processing functions that enable efficient calculation of correlation values, and therefore can process the values faster than when a general central processing unit (CPU) is used. However, since the bit length of the expected value is fixed, it is difficult to change functions such as changing the bit length of the expected value.
[0006] Conversely, if correlation value calculations are processed by a general CPU, function changes are easy, but since it does not have the hardware processing functions that can efficiently calculate correlation values, more instructions are required and longer processing times are required compared to processing by a dedicated processor.
[0007] In consideration of the above circumstances, an object of the present invention is to provide a semiconductor device, a correlation value calculation method, and a program that are capable of calculating a correlation value in a short processing time even when the bit length of an expected value is made variable. [Means for solving the problem]
[0008] The semiconductor device of the present invention comprises a first processing unit that alternates between two input bit strings and outputs them as a single bit string, a second processing unit that outputs two bits of data from each of the data sets of two bits from the beginning of each of the two input bit strings based on a set arbitrary logic, and a third processing unit that outputs the number of bit values of 1 in the single input bit string as a numerical value.
[0009] A correlation value calculation method of the present invention is a correlation value calculation method for calculating a correlation value of a comparison value against an expected value by using the semiconductor device of the first aspect, wherein the expected value has two bit strings of expected value P and expected value N which are complementary to each other, the comparison value has two bit strings of comparison value P and comparison value N which are complementary to each other, and when an arbitrary number n is set, in a first condition where two 2-bit data of bit value 01 and bit value 01 or two 2-bit data of bit value 10 and bit value 10 are input as a data set to the second processing unit, a bit value 01 is output, in a second condition where two 2-bit data of bit value 01 and bit value 10 or two 2-bit data of bit value 10 and bit value 01 are input as a data set, a bit value 10 is output, and in a third condition where two 2-bit data other than those under the first condition and the second condition are input as a data set, a bit value 10 is output. using the first processing unit to obtain an expected value PN of a 2n-bit length from an expected value P of an n-bit length and an expected value N of an n-bit length; using the first processing unit to obtain a comparison value PN of a 2n-bit length from a comparison value P of an n-bit length and a comparison value N of an n-bit length; using the second processing unit to obtain an output value of a 2n-bit length from the comparison value PN of a 2n-bit length and the expected value PN of a 2n-bit length; using the third processing unit to obtain the number of bit values 1 in odd-numbered bits from the beginning of a bit string of an output value as a first numerical value; using the third processing unit to obtain the number of bit values 1 in even-numbered bits from the beginning of a bit string of an output value as a second numerical value; and subtracting the second numerical value from the first numerical value to obtain a correlation value.
[0010] A program of the present invention is a program for calculating a correlation value of a comparison value with an expected value using the semiconductor device of the first aspect, the program comprising: an expected value having two bit strings, an expected value P and an expected value N, which are complementary to each other; a comparison value having two bit strings, a comparison value P and a comparison value N, which are complementary to each other; and, when an arbitrary number n is assumed, a bit value 01 is outputted under a first condition in which two 2-bit data, a bit value 01 and a bit value 01, or two 2-bit data, a bit value 10 and a bit value 10, are inputted as a data set to the second processing unit; a bit value 10 is outputted under a second condition in which two 2-bit data, a bit value 01 and a bit value 10, or two 2-bit data, a bit value 10 and a bit value 01, are inputted as a data set to the second processing unit; and a bit value 00 is outputted under a third condition in which two 2-bit data other than those under the first condition and the second condition are inputted as a data set. using the first processing unit to obtain an expected value PN of a length of 2n bits from an expected value P of an n bit length and an expected value N of an n bit length; using the first processing unit to obtain a comparison value PN of a length of 2n bits from a comparison value P of an n bit length and a comparison value N of an n bit length; using the second processing unit to obtain an output value of a length of 2n bits from the comparison value PN of a length of 2n bits and the expected value PN of a length of 2n bits; using the third processing unit to obtain the number of bit values 1 in odd-numbered bits from the beginning of a bit string of an output value as a first numerical value; using the third processing unit to obtain the number of bit values 1 in even-numbered bits from the beginning of a bit string of an output value as a second numerical value; and subtracting the second numerical value from the first numerical value to obtain a correlation value.
[0011] In this specification and the drawings, bit strings are expressed with the right hand side being the leading bit. Effect of the Invention
[0012] According to the semiconductor device, correlation value calculation method, and program of the present invention, it becomes possible to efficiently process the calculation of correlation values. [Brief description of the drawings]
[0013] [Figure 1] FIG. 2 is a block diagram showing the hardware configuration of a computer according to an embodiment of the present invention. [Diagram 2] FIG. 4 is a diagram for explaining the function of a first processing unit. [Diagram 3] FIG. 4 is a diagram for explaining the function of a second processing unit. [Figure 4] FIG. 4 is a diagram for explaining the function of a second processing unit. [Diagram 5] FIG. 11 is a diagram for explaining the function of a third processing unit. [Figure 6] 11 is a diagram for explaining a method for calculating a correlation value of a comparison value with an expected value using a CPU of the present embodiment. FIG. [Figure 7] 11 is a diagram for explaining a method for calculating a correlation value of a comparison value with an expected value using a CPU of the present embodiment. FIG. [Figure 8] 11 is a diagram for explaining a method for calculating a correlation value of a comparison value with an expected value using a CPU of the present embodiment. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Fig. 1 is a block diagram showing the hardware configuration of a computer 10 according to an embodiment of the present invention.
[0015] 1, a computer 10 of this embodiment includes a CPU 11, a memory 12, a storage device 13 such as a hard disk drive, and a communication interface (abbreviated as IF) 14 for transmitting and receiving data to and from an external device via a network. These components are connected to each other via a control bus (not shown).
[0016] The CPU 11 is an example of a semiconductor device in the technology of the present disclosure, and is a processor that executes a predetermined process based on a program stored in the memory 12 or the storage device 13 to control the operation of the computer 10. Note that, in the present embodiment, the CPU 11 has been described as reading and executing a program stored in the memory 12 or the storage device 13, but is not limited to this.
[0017] For example, the program may be provided in a form recorded on a computer-readable recording medium. For example, the program may be provided in a form recorded on an optical disk such as a CD (Compact Disc)-ROM (Read Only Memory) or a DVD (Digital Versatile Disc)-ROM, or in a form recorded on a semiconductor memory such as a USB (Universal Serial Bus) memory or a memory card. In addition, the program may be obtained from an external device via a communication line connected to the communication IF 14.
[0018] The CPU 11 includes a plurality of command processing modules including a first command processing module 11a, a second command processing module 11b, and a third command processing module 11c that perform specific processes by hardware.
[0019] The functions of the first command processing module 11a, the second command processing module 11b, and the third command processing module 11c will be described in detail below. In the following description and drawings, bit strings are represented with the right side as the leading bit.
[0020] The first command processing module 11a is an example of a first processing unit in the technology of the present disclosure, and outputs two input bit strings as one bit string by arranging them alternately bit by bit, as shown in Fig. 2. Note that there is no particular limit to the maximum bit length of the bit strings input to the first command processing module 11a, and any maximum bit length may be used.
[0021] In the example shown in FIG. 2, an 8-bit bit string from a7 to a0 is input A, an 8-bit bit string from b7 to b0 is input B, and the two bit strings are arranged alternately bit by bit to output one bit string consisting of b7, a7, b6, a6, . . . , b0, a0.
[0022] The second command processing module 11b is an example of a second processing unit in the technology of the present disclosure, and outputs two bits of data simultaneously and in parallel from each of two data sets of two bits from the beginning of each of the two input bit strings according to a set arbitrary logic, as shown in Fig. 3. Note that there is no particular limit to the maximum bit length of the bit strings input to the second command processing module 11b, and any maximum bit length may be used.
[0023] In the example shown in FIG. 3, an 8-bit bit string from a1_3 to a0_0 is input A, an 8-bit bit string from b1_3 to b0_0 is input B, and starting from the top, o1_0 and o0_0 are output from the data set of a1_0, a0_0, b1_0, and b0_0, o1_1 and o0_1 are output from the data set of a1_1, a0_1, b1_1, and b0_1, o1_2 and o0_2 are output from the data set of a1_2, a0_2, b1_2, and b0_2, and o1_3 and o0_3 are output from the data set of a1_3, a0_3, b1_3, and b0_3.
[0024] There is no particular restriction on the logic for outputting 2-bit data from a data set of 2 bits each, and any logic may be used.
[0025] For example, as shown in FIG. 4, in the case of a first condition in which two 2-bit data sets, bit value 01 and bit value 01, or two 2-bit data sets, bit value 10 and bit value 10, are input as a data set, a bit value 01 is output; in the case of a second condition in which two 2-bit data sets, bit value 01 and bit value 10, or two 2-bit data sets, bit value 10 and bit value 01, are input as a data set, a bit value 10 is output; and in the case of a third condition in which two 2-bit data sets other than those under the first and second conditions are input as a data set, a bit value 00 is output.
[0026] The third command processing module 11c is an example of a third processing unit in the technology of the present disclosure, and as shown in FIG. 5, outputs the number of bit values of 1 in one input bit string as a numerical value.
[0027] In the example shown in FIG. 5, an 8-bit bit string from a7 to a0 (01001101 in the example in FIG. 5) is used as input A, and the number n of bit values 1 in the bit string of input A (n=4 in the example in FIG. 5) is output.
[0028] Next, a method of calculating a correlation value between an expected value and a comparison value using the CPU 11 of this embodiment will be described.
[0029] In this embodiment, when the bit length of the expected value and the comparison value is n bits, the correlation value is displayed as correlation value = n when all bits of the expected value and the comparison value match, and correlation value = -n when all bits of the expected value and the comparison value do not match.
[0030] The expected value has two bit strings, expected value P and expected value N, which are complementary to each other. In this description, the expected value P and expected value N are, as an example, the following 8-bit bit strings. Note that the bit length of the expected value P and expected value N is not limited to 8 bits, and may be any bit length. Expected value P:01110101 Expected value N: 10001010
[0031] The comparison value is data generated based on an input from, for example, an analog radio signal, and has two bit strings, comparison value P and comparison value N, which are complementary to each other. Although comparison value P and comparison value N are usually complementary to each other, there may be cases where they are not complementary due to the influence of noise, etc. In this description, comparison value P and comparison value N are the following 8-bit bit strings, as an example. The bit length of comparison value P and comparison value N is not limited to 8 bits, and may be any bit length. Here, comparison value P and comparison value N and expected value P and expected value N have the same data content. Comparison value P:01110101 Comparison value N: 10001010
[0032] As a first step, as shown in FIG. 4, the CPU 11 sets the second instruction processing module 11b to output a bit value 01 in the case of a first condition in which two 2-bit data sets, bit value 01 and bit value 01, or two 2-bit data sets, bit value 10 and bit value 10, are input as a data set, to output a bit value 10 in the case of a second condition in which two 2-bit data sets, bit value 01 and bit value 10, or two 2-bit data sets, bit value 10 and bit value 01, are input as a data set, and to output a bit value 00 in the case of a third condition in which two 2-bit data sets other than those under the first and second conditions are input as a data set.
[0033] As a second step, the CPU 11 uses the first instruction processing module 11a to alternately arrange the two input bit strings of the 8-bit expected value P and the 8-bit expected value N, as shown in FIG. 6, to obtain one 16-bit expected value PN as follows: Expected PN: 1001010110011001
[0034] As a third step, the CPU 11 uses the first command processing module 11a to alternately arrange the two input bit strings of the 8-bit comparison value P and the 8-bit comparison value N, as shown in FIG. 7, to obtain one 16-bit comparison value PN as follows: Comparison value PN: 1001010110011001
[0035] As a fourth step, the CPU 11, as shown in FIG. 8, uses the second instruction processing module 11b to obtain a 16-bit output value from the 16-bit comparison value PN and the 16-bit expected value PN.
[0036] Specifically, a data set of 2 bits each is set from the beginning of each of the comparison value PN and the expected value PN, and the 2-bit data is output simultaneously in parallel according to the logic set in the first step.
[0037] In the example shown in Figure 8, starting from the top, 01 is output from the data set of 01,01, 01 is output from the data set of 10,10, 01 is output from the data set of 01,01, 01 is output from the data set of 10,10, 01 is output from the data set of 01,01, 01 is output from the data set of 01,01, 01 is output from the data set of 01,01, and 01 is output from the data set of 10,10, and as a result, the following output values are obtained. Output value: 0101010101010101
[0038] As a fifth step, the CPU 11 uses the third command processing module 11c to obtain, as a first numerical value, the number of odd-numbered bits from the beginning of the bit string of the output value that have a bit value of 1, as shown in FIG.
[0039] There is no particular restriction on the method of obtaining the number of bit values of 1 in odd-numbered bits from the beginning of the bit string of the output value, and any method may be used. For example, a logical AND operation may be performed on all bits of the output value with data in which odd-numbered bit values are 1 and even-numbered bit values are 0, and the number of bit values of 1 contained in the resulting bit string may be obtained. In this case, as an example, if the bit length of the output value is 16 bits, a logical AND operation may be performed on the data of the output value and the data of 0x5555. In addition to the above, only odd-numbered data may be extracted from the bit string of the output value, and the number of bit values of 1 in the extracted data may be obtained.
[0040] In the example shown in FIG. 8, all odd-numbered bits from the beginning of the bit string of the output value are 1, so "8" is obtained as the first numerical value. Output value (odd number): 11111111
[0041] In a sixth step, the CPU 11 uses the third command processing module 11c to obtain, as a second numerical value, the number of even-numbered bits counted from the beginning of the bit string of the output value that have a bit value of 1, as shown in FIG.
[0042] There is no particular restriction on the method of obtaining the number of bit values 1 in even-numbered bits from the beginning of the bit string of the output value, and any method may be used. For example, a logical AND operation may be performed on all bits of the output value with data in which odd-numbered bit values are 0 and even-numbered bit values are 1, and the number of bit values 1 contained in the resulting bit string may be obtained. In this case, as an example, if the bit length of the output value is 16 bits, a logical AND operation may be performed on the data of the output value and the data of 0xaaaa. In addition to the above, only even-numbered data may be extracted from the bit string of the output value, and the number of bit values 1 in the extracted data may be obtained.
[0043] In the example shown in FIG. 8, all even-numbered bits from the beginning of the bit string of the output value are 0, so "0" is obtained as the second numerical value. Output value (even number): 00000000
[0044] In a seventh step, the CPU 11 subtracts the second numerical value from the first numerical value to obtain a correlation value. In the example shown in Fig. 8, "8" is obtained as the first numerical value and "0" is obtained as the second numerical value, so that the correlation value is 8-0=8.
[0045] A typical CPU that does not have the first instruction processing module 11a, the second instruction processing module 11b, and the third instruction processing module 11c requires 10 or more instructions to obtain a 1-bit correlation value, and therefore requires 80 or more instructions to obtain an 8-bit correlation value, for example.
[0046] In contrast, by using the CPU 11 of this embodiment to calculate the correlation value of the comparison value against the expected value, as described above, the correlation value can be obtained by simply executing seven instructions regardless of the bit lengths of the expected value and the comparison value, making it possible to efficiently process the calculation of the correlation value.
[0047] Although the computer 10 according to one embodiment of the present invention has been described above, the present invention is not limited to the above embodiment.
[0048] For example, the order of steps when calculating the correlation value of the comparison value with the expected value using CPU 11 is not limited to the above order of the first to seventh steps, and may be changed as appropriate as long as the correlation value can be calculated.
[0049] In addition to the above, it goes without saying that unnecessary parts may be deleted, new elements may be added, or substitutions may be made to the contents described and illustrated above, without departing from the spirit of the technology of the present disclosure. [Explanation of symbols]
[0050] 10. Computers 11 CPU 11a First command processing module 11b Second command processing module 11c Third command processing module 12. Memory 13 Storage device 14 Communication Interface
Claims
1. a first processing unit that alternately arranges two input bit strings bit by bit and outputs one bit string; a second processing unit that outputs 2 bits of data from each of the data sets of 2 bits from the beginning of each of the two input bit strings according to a preset arbitrary logic; a third processing unit that outputs the number of bit values that are 1 in one input bit string as a numerical value; A semiconductor device comprising:
2. When calculating the correlation value of the comparison value against the expected value, The expected value has two bit strings, expected value P and expected value N, which are complementary to each other. The comparison value has two bit strings, a comparison value P and a comparison value N, which are complementary to each other; When n is an arbitrary number, a process of setting the second processing unit to output a bit value of 01 in a first condition where two 2-bit data sets of bit values 01 and 01, or two 2-bit data sets of bit values 10 and 10, are input as a data set, to output a bit value of 10 in a second condition where two 2-bit data sets of bit values 01 and 10, or two 2-bit data sets of bit values 10 and 01, are input as a data set, and to output a bit value of 00 in a third condition where two 2-bit data sets other than those in the first and second conditions are input as a data set; A process of obtaining an expected value P N having a length of 2n bits from an expected value P having a length of n bits and an expected value N having a length of n bits using the first processing unit; A process of obtaining a comparison value PN having a length of 2n bits from a comparison value P having a length of n bits and a comparison value N having a length of n bits using the first processing unit; A process of obtaining an output value having a length of 2n bits from a comparison value PN having a length of 2n bits and an expected value PN having a length of 2n bits using the second processing unit; obtaining, by using the third processing unit, the number of odd-numbered bits from the beginning of a bit string of an output value that have a bit value of 1 as a first numerical value; obtaining, using the third processing unit, the number of bits having a bit value of 1 in even-numbered bits from the beginning of a bit string of an output value as a second numerical value; and subtracting the second numerical value from the first numerical value to obtain a correlation value. The semiconductor device according to claim 1 .
3. 2. A correlation value calculation method for calculating a correlation value of a comparison value with an expected value, using the semiconductor device according to claim 1, comprising the steps of: The expected value has two bit strings, expected value P and expected value N, which are complementary to each other. The comparison value has two bit strings, a comparison value P and a comparison value N, which are complementary to each other; When n is an arbitrary number, a step of setting the second processing unit to output a bit value of 01 in a first condition where two 2-bit data sets of bit values 01 and 01, or two 2-bit data sets of bit values 10 and 10, are input as a data set, to output a bit value of 10 in a second condition where two 2-bit data sets of bit values 01 and 10, or two 2-bit data sets of bit values 10 and 01, are input as a data set, and to output a bit value of 00 in a third condition where two 2-bit data sets other than those in the first and second conditions are input as a data set; obtaining an expected value P N having a length of 2n bits from an expected value P having a length of n bits and an expected value N having a length of n bits using the first processing unit; obtaining a comparison value P N having a length of 2n bits from a comparison value P having a length of n bits and a comparison value N having a length of n bits using the first processing unit; obtaining an output value having a length of 2n bits from a comparison value PN having a length of 2n bits and an expected value PN having a length of 2n bits using the second processing unit; obtaining, as a first numerical value, the number of odd-numbered bits having a bit value of 1 from the beginning of a bit string of an output value, using the third processing unit; obtaining, as a second numerical value, the number of bits having a bit value of 1 in even-numbered bits from the beginning of a bit string of an output value, using the third processing unit; subtracting the second value from the first value to obtain a correlation value; The correlation value calculation method includes the steps of:
4. 2. A program for calculating a correlation value of a comparison value with an expected value by using the semiconductor device according to claim 1, comprising: The expected value has two bit strings, expected value P and expected value N, which are complementary to each other. The comparison value has two bit strings, a comparison value P and a comparison value N, which are complementary to each other; When n is an arbitrary number, a step of setting the second processing unit to output a bit value of 01 in a first condition where two 2-bit data sets of bit values 01 and 01, or two 2-bit data sets of bit values 10 and 10, are input as a data set, to output a bit value of 10 in a second condition where two 2-bit data sets of bit values 01 and 10, or two 2-bit data sets of bit values 10 and 01, are input as a data set, and to output a bit value of 00 in a third condition where two 2-bit data sets other than those in the first and second conditions are input as a data set; obtaining an expected value P N having a length of 2n bits from an expected value P having a length of n bits and an expected value N having a length of n bits using the first processing unit; obtaining a comparison value P N having a length of 2n bits from a comparison value P having a length of n bits and a comparison value N having a length of n bits using the first processing unit; obtaining an output value having a length of 2n bits from a comparison value PN having a length of 2n bits and an expected value PN having a length of 2n bits using the second processing unit; obtaining, as a first numerical value, the number of odd-numbered bits having a bit value of 1 from the beginning of a bit string of an output value, using the third processing unit; obtaining, as a second numerical value, the number of bits having a bit value of 1 in even-numbered bits from the beginning of a bit string of an output value, using the third processing unit; subtracting the second value from the first value to obtain a correlation value; A program for causing a computer to execute the following.
Citation Information
Patent Citations
GNSS signal processor
JP2017173332A
