Method for determining a random permutation of variables by applying a test function6292762Abstract A method determines a random permutation of input lines that produced a permuted set of bits in a bitstream. In a source design, the method replaces a logic element whose input lines are permutable with a test function. The source design is processed by a design tool to generate the bitstream including the permuted set of bits. The test function is probed with test values, and the probe results are compared with the permuted set of bits to discover the permutation of the set of bits. The test values can include a message. Claims We claim: Description FIELD OF THE INVENTION
TABLE A
Nb classes/ Message size (log.sub.2 Theoretical bound:
n max message of previous) log.sub.2 (n!)
2 4 2 2
3 16 4 5.42
4 1792 10.81 11.42
5 34339072 25.03 25.09
For n=6, the search space is 2.sup.64, which is way too big to be computed. The procedure described above is usable, however, it requires the building of a very large table, which can be time and space consuming for the case where n.ltoreq.4, almost impossible for n=5, and practically impossible when n.gtoreq.6. The search through the table is equally hard. The exhaustive solution is optimal but hard to use in practice. For n=4, it requires the storing of 1792 canonical members, each of which is 16 bits long. II--Simple Solution for any n For n inputs (where n is a power of 2), the preferred procedures require at most n.log.sub.2 (n) bits in the truth table, and n.log.sub.2 (n) probes of the test function. The case where n is not a power of 2 can also be handled. A summary for solution of the problem for a set of test functions and discovery procedures for all the possible element sizes is now presented, details and practical examples are given below. For n source inputs of, for example, an FPGA a look-up table, the inputs can be labeled 0 to n-1. Similarly, the internal inputs of the LUT, after configuration can also be labeled 0 to n-1. The key to the present invention is to discover the actual permutation applied by the design tools in a bit-by-bit manner. The discovery process can be partitioned into a number of phases. In each phase, for each source input i, the mapping of one additional bit is determined for one of the internal inputs j by making one probe with the test function. In total, n probes are used during each phase, with a total of log.sub.2 (n) phases. Hence, n.log.sub.2 (n) probes are required, and the same number bits in the truth table. As shown in FIG. 1, a look-up table (LUT) 112 of an FPGA device has a set of n inputs, for example, x.sub.0, x.sub.1, x.sub.2, x.sub.3, each capable of receiving one bit of input data. The FPGA design tools permute the source inputs to a set of internal inputs in some unknown manner. Some test function of {0, 1} is applied to the input of the FPGA, processed by the LUT, and evaluated at the output of the FPGA to determine the permutation from the source input to the LUT to permuted internal input to the LUT. One way to describe this problem is as follows. Functionsfand g are chosen from {0,1}.sup.n to {0, 1}. The functions f and g are related by g(x)=f(.pi.(x)), where x is an n-dimensional {0, 1} vector, and .pi. is a permutation of the entries of this vector. The function g expresses what is seen on the output when the function is applied at the input. For specific inputs x, values for f(x) are stored in a truth table of the FPGA memory, i.e., a look-up table. The goal is to find .pi.. A primary consideration is to minimize the number of truth table entries that need to be stored for the function As a secondary consideration, it is also desired to minimize the number of evaluations (probes) for the function g. In other words, space is at a premium, probes are relatively cheap because probes can be done with a small number of software instructions by the discovery software 350 of FIG. 3. For convenience, .pi. expresses the permutation on the numbers (positions) 0 to n-1. Described is a procedure that only stores n.log.sub.2 n values of .function. in the truth table, and the function g is evaluated only n.log.sub.2 n times when n=2.sup.r. If there are n=2.sup.r input positions, then it is possible to discover the permutation .pi. after r rounds. In each round, n new positions are set in the truth table, for a total of n.log.sub.2 n values of f that need to be stored. The following invariant is maintained: after round k, for each position i, the least significant k bits in the binary representation of .pi.(i) are known. Note, this invariant is trivially true during the initial round. For the first round, g(x) is determined for all unit vectors x; that is, determined are g(x) for all x with a single logical "1" entry. The truth table stores values of f(x) for all unit vectors x. Values f(x) are set to 1 for all unit vectors that have a 1 in an odd position, and 0 for all unit vectors that have a 1 in an even position. As g(x)=f(.pi.(x)), this yields the first bit of .pi.(i) from the right for all i. For all subsequent rounds, g(x) is determined for all vectors x of the following form: x has a 1 in all positions j for which the first k-1 bits of .pi.(j) from the right are known to be z.sub.1, z.sub.2, . . . , z.sub.{k-1}, and x has a single additional 1 entry in some position i such that the first k-1 bits of .pi.(j) from the right are known to be z.sub.1, z.sub.2, . . . , z.sub.{k-1}. The truth table stores values of f(x) for all x which have a 1 in the positions where the first k-1 bits from the right are z.sub.1, z.sub.2, . . . z.sub.{k-1} and have a 1 in a single position where the first k-1 bits from the right are z.sub.1, z.sub.2, . . . , z.sub.{k-1}. Note that there are n such vectors x, and they distinct from those x from previous rounds. The function f(x) is set to be 1 if the single position where the first k-1 bits from the right are z.sub.1, z.sub.2, . . . , z.sub.{k-1} is such that the kth bit from the right is 1, and 0 otherwise. Again, as g(x)=f(.pi.(x)), evaluating g at these x yields the kth bit from the right of .pi.(i) for all i. As the invariant is maintained, it can be shown that there is a need to store the results for n.r=n.log.sub.2 n values of f in the truth table. Next, consider when n=2.sup.r +a, where 0<a<2.sup.r. In this case, use an (r+1)th round for positions which are not determined by the first r bits from the right. The same argument shows that the total number of truth table entries and evaluations of g required is n.r+2a=n..left brkt-bot.log.sub.2 n.right brkt-bot.+2a. III--Particular solutions for n=4 Here, sixteen very simple examples are given with different performance. The examples can be combined to give a solution that reaches the optimal message size metric. The solutions for four-input LUTs is particularly interesting because this is the elementary building block that is used by the most popular FPGAs. In describing these examples, the following notation will be used. The FPGA look-up table, or ROM has n inputs, and therefore, there are 2.sup.n memory locations or bits in its truth table. A message M has l bits m.sub.0, . . . , m.sub.l-1. The test function is f, and f(a.sub.0 a.sub.1 a.sub.2 a.sub.3) is a memory location of f that stores either zero or one bits. The function g is the permuted function. The solutions have been "named" to somewhat reflect the test pattern. For example, 4-2 means that out of the six bit values f(0011), f(0101), f(0110), f(1001), f(1010), and f(1100), either there are four 0 and two 1 or four 1 and two 0. FIG. 7 gives the steps for the first example solution. It should be apparent that figures for the other examples would be similar. Solution 4-2 with Overlapping This example is the simplest and best one. Here, the eight initial values 701 submitted are f(1100)=m.sub.0, f(0110)=m.sub.0,f(1010)=.about.m.sub.0,f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0,f(0011)=.about.m.sub.0,f(1000)=1, and f(9910)=0. The other eight values for f m.sub.1, . . . , m.sub.8, along m.sub.0 are the message 702. Permutation and Message Discovery Procedure In step 710, probe the values stored in any one of the six memory locations g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five, two are set to a value (0 or 1) and the others are set to the opposite value. The value for the set of two is m.sub.0. If g(a.sub.0 a.sub.1 a.sub.2 a.sub.3)=g(b.sub.0 b.sub.1 b.sub.2 b.sub.3)=m.sub.0, where (a.sub.0 a.sub.1 a.sub.2 a.sub.3) and (b.sub.0 b.sub.1 b.sub.2 b.sub.3) are different, the i for which a.sub.i =b.sub.i =0 is unique and correspond to the input which used to be in address position 3. The i for which a.sub.i =b.sub.i =1 is unique and correspond to the input which used to be in address position 1 (step 720). For i: (a.sub.i =1 and b.sub.i =0) and j: (a.sub.j =0 and b.sub.j =1), there is still an indetermination. Therefore, probe g(c.sub.0 c.sub.1 c.sub.2 c.sub.3) where c.sub.i =1 and c.sub.k!=i =0. If g(c.sub.0 c.sub.1 c.sub.2 c.sub.3)=1, then input i used to be in address position 0 and line j in position 2. If g(c.sub.0 c.sub.1 c.sub.2 c.sub.3)=0, then input i used to be in position 2 and line j in address position 0 (step 730). Now that the permutation is discovered, it is possible to retrieve the message m.sub.1 . . . m.sub.8 from the other location in step 740. Overall, this method uses at most six probes, and can send a message of nine bits. Solution 4-2 with Overlapping and Constant Secondary Here, initial values are f(1100)=m.sub.0, f(0110)=m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(0011)=.about.m.sub.0, f(1000)=m.sub.1, f(0010)=m.sub.1, f(0111)=1, and f(1101)=0. The other 6 values for f are set to m.sub.2, . . . , m.sub.7. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six, two are set to a value (0 or 1) and the other 4 are set to the opposite value. The value for the set of two is m.sub.0. If g(a.sub.0 a.sub.1 a.sub.2 a.sub.3)=g(b.sub.0 b.sub.1 b.sub.2 b.sub.3)=m.sub.0, where (a.sub.0 a.sub.1 a.sub.2 a.sub.3) and (b.sub.0 b.sub.1 b.sub.2 b.sub.3) are different, then the i for which a.sub.i =b.sub.i =0 is unique and correspond to the address line which used to be in position 3. The i for which a.sub.i =b.sub.i =1 is unique and correspond to the address line which used to be in position 1. For i: (a.sub.i =1 and b.sub.i =0) and j: (a.sub.j =0 and b.sub.j =1), there is still an indetermination. Therefore, probe g(c.sub.0 c.sub.1 c.sub.2 c.sub.3) where c.sub.i =0 and c.sub.k!=i =1. If g(c.sub.0 c.sub.1 c.sub.2 c.sub.3)=1, then address line i used to be in address position 0, and line j in address position 2. If g(c.sub.0 c.sub.1 c.sub.2 c.sub.3)=0, then address line i used to be in position 2 and line j in position 1. The probe of g() is done at the input with a single one placed in the new position of address line 0. This value is m.sub.1. Now that the permutation is discovered, it is possible to obtain the rest of the message m.sub.2 . . . m.sub.7 from the other location. Overall, this method uses at most seven probes and can send a message of eight bits. Solution 4-2 without Overlapping and 3-1 Secondary The initial twelve values are f(1100)=m.sub.0, f(0011)=m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=m.sub.1, f(0100)=.about.m.sub.1, f(0010)=.about.m.sub.1, f(0001)=.about.m.sub.1, f(1101)=1, and f(1110)=0, and the other four values for f are set to m.sub.2, . . . , m.sub.5. Permutation and Message Discovery Procedure Probe the values for g(1000), g(0100), g(0010). The probe of g(0001) is trivially the opposite of the exclusive OR of these 3 values. One of these for value is set to the opposite of the other three. The position on the 1 in the writing of the input of this value is the new position of input 0. The value itself is m.sub.1. Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six, two are set to a value (0 or 1) and the other four are set to the opposite value. The value for the set of two is m.sub.0. This has helped separating the problem in two as the two inputs that give m.sub.0. Have two disjuncted sets of two 1s. Because the new position of input 0 is known, it is possible to determined the new position of input 1 because it is in the same equivalence class of two ones as input 0. Additionally, the new positions of inputs 2 and 3 are known, but it is not possible to distinguish between the two. Now if i is one of the two new positions of input 3, probe g(a.sub.0 a.sub.1 a.sub.2 a.sub.3) where a.sub.i =0 and a.sub.k!=i =1. If this value is 1 then i is the new position of input 3, else i is the new position of input 4. The new position of the input is the remaining one. Now that the permutation is discovered, the rest of the message m.sub.2, . . . , m.sub.5 can be retrieved from the other location. Overall, this method uses at most nine probes and can send a message of six bits. Solution 4-2 without Overlapping and 2-2 Secondary Initial values are f(1100)=m.sub.0,f(0011)=m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=1, f(0100)=0, f(0010)=1, f(0001)=0, f(0111)=1, and f(1101)=0. The other four values for f are set to m.sub.1, . . . , m.sub.4. Permutation and Message Discovery Procedure Probe for the values of g(1000), g(0100), g(0010). The probe for g(0001) is trivially the exclusive OR of the three values. Two values are set to 1 and two values are set to 0. The positions of the 1 in the writing of the inputs for the value 1 are the new positions of inputs 0 and 2. Take i as one of these new two positions. To differentiate between inputs 0 and 2, probe g(a.sub.0 a.sub.1 a.sub.2 a.sub.3) where a.sub.i =0 and a.sub.k!=i =1. If this value is 1, then i is the new position of input 0, else i is the new position of input 2. The position of the other one (resp. 2 and 0) is trivially the other one. To differentiate between positions 1 and 3, probe the values of f(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six, two are set to a value (0 or 1) and the other four are set to the opposite value. The value for the set of two is m.sub.0. This helped separating the problem in two as the two inputs that give m.sub.0. Have two disjuncted sets of two 1s. Because the new position of input 0 is known, the new position of input 1 is in the same set of two ones as the input 0. The same technique can be used for inputs 2 and 3. Now that the permutation is discovered, the rest of the message m.sub.1 . . . m.sub.4 can be obtained from the other location. Overall, this method uses at most nine probes, and can send a message of five bits. Solution 4-2 without Overlapping and 2-2 Secondary and Constant Tertiary The initial values are f(1100)=m.sub.0, f(0011)=m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=1, f(0100)=0, f(0010)=1, f(0001)=0, f(0111)=m.sub.1, f(1101)=m.sub.1, f(1011)=1, and f(1110)=0. The other 2 values for f are set to m.sub.2, . . . , m.sub.3 Permutation and Message Discovery Procedure Probe the values for g(1000), g(0100), g(0010). The probe for g(0001) is trivially the exclusive OR of these 3 values. Two values are set to 1 and two values are set to 0. The positions of the 1 in the writing of the inputs for the value 1 are the new positions of address lines 0 and 2. The others are the new positions for address lines 1 and 3. If i is one of these new two positions, then to differentiate between address lines 1 and 3, probe g(a.sub.0 a.sub.1 a.sub.2 a.sub.3) where a.sub.i =0 and a.sub.k!=i =1. If this value is 1, then i is the new position of line 1, else i is the new position of line 3. The position of the other one, respectively 3 and 1, is trivially the other one. To differentiate between 0 and 2, probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six, two are set to a value (0 or 1) and the other four are set to the opposite value. The value for the set of two is m.sub.0. This has helped separating the problem in two as the two inputs that give m.sub.0. Now there are two disjuncted sets of two 1s. Because the new position of address line 0 is known, it is possible to determine the new position of 0, as it is in the same set of two ones as the address line 1. Likewise for positions 3 and 2 can be determined. The probe of g() is done with an input with a single 0 at the new position of 0. This is m.sub.1. Now that the permutation is discovered, the rest of the message, m.sub.2, . . . , m.sub.3, can be obtained from the other location. Overall, this method uses at most ten probes and can send a message of four bits. Solution 4-2 without Overlapping and Separating Secondary The initial values are f(1100)=m.sub.0, f(0011)=m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=1, f(0100)=1, f(0010)=0, f(0001)=0, f(0111)=1, f(1011)=0, f(1101)=1, and f(1110)=0. The other two values for f are set to m.sub.1 . . . m.sub.2. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six, two are set to a value (0 or 1) and the other 4 are set to the opposite value. The value for the set of two is m.sub.0. Probe the value of g(1000), g(0100) and g(0010). The probe for g(0001) is the exclusive OR of the other three. Of these four values, two are set to 1 and two are set to 0. The position of the input lines set to 1 for the value of one are the new positions of address lines 0 and 1. The other two positions are the new position of address lines 2 and 3. Probe of the value of g(0111), g(1011), g(1101), and g(1110). The probe of g(0111) is the exclusive OR of the other three. Looking at the inputs where there is a single 0 at the new positions for address lines 0 and 1, the new position of address line 0 is the position of the single 0 for a value of 1. The same is done to differentiate between address lines 2 and 3. Now that the permutation is discovered, the rest of the message m.sub.2 . . . m.sub.2 is obtained from the other location. Overall, this method uses at most eleven probes and can send a message of three bits. Solution 3-3 "Triangle" Initial values are f(1100)=1, f(1010)=1, f(1001)=1, f(0110)=0, f(0101)=0, f(0011)=0, f(0100)=m.sub.0, f(0010)=.about.m.sub.0, f(0001)=.about.m.sub.0, f(1101)=1, and f(1110)=0, and the other five values for f are set to m.sub.1 . . . m.sub.5. Permutation and Message Discovery Procedure Probe the values of f(1100), f(1010), f(1001), f(0110), f(0101). The probe for f(0011) is trivially the exclusive OR of the other five of these six. Three values are 1, while the other three are 0. For the three at 1, one of the input bits is set to 1 all the time. This is the new position of address line 0. Probe three f() where only one input bit is set to 1. There are four of them, but do not probe the one where the 1 is in the new position of input 0. One value is the opposite of the other two. The position of the 1 in input for this value is the new position of input 1. The value is m.sub.0. Only the new positions of inputs 2 and 3 are unknown now, but they are constrained in two positions. To differentiate between positions 2 and 3, probe a single value with only one input bit set to 0, at one of the two possible new positions for input 2. If the value is 1, then this is the correct position, else it is the other one. The new position of the remaining input is obvious. Now that the permutation is discovered, we can also get the rest of the message m.sub.1 . . . m.sub.5 from the other location. Overall, this method uses at most nine probes and can send a message of six bits. Solution 3-3 "Z" Initial values are f(1100)=1, f(0110)=1, f(0011)=1, f(1010)=0, f(1001)=0, f(0101)=0, f(1000)=1, and f(0001)=0, the other eight values for f are set to m.sub.0 . . . m.sub.7. Permutation and Message Discovery Procedure Probe the values of f(1100), f(1010), f(1001), f(0110), f(0101). The probe for f(0011) is trivially the exclusive OR of the other five of these six. Three values are 1, while the other three are 0. If we count the number of occurrences of 1s in each of the inputs giving a value of 1, two positions have a single 1 and two positions have 1s. The single 1 positions are the new positions of inputs 0 and 3. To differentiate between input positions 0 and 3, probe f() with an input containing a single 1 at one of the two possible new positions for input 0. If the value is 1, then this is indeed the new positions for input 0, if not, it is the new position for input 3. We can then easily deduce the new position for the other input. Once the new position of input 0 is known, we go back to the first set of six values. There is a single input giving out a value of 0 for which input 0 is set to 1. The other bit set to one in this input is the new position of input 1. We can easily deduce the position of input 2. Now that the permutation is discovered, we can also get the rest of the message m.sub.1 . . . m.sub.7 from the other location. Overall, this method uses at most six probes and can send a message of eight bits. Solution 3-3 "Z" Constant Secondary The initial values are f(1100)=1, f(0110)=1, f(0011)=1, f(1010)=0, f(1001)=0, f(0101)=0, f(1000)=m.sub.0, f(0001)=m.sub.0, f(0100)=1, and f(0010)=0. The other 6 values for f are set to m.sub.1 . . . m.sub.6. Permutation and Message Discovery Algorithm: Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six. Three values are 1, while the other three are 0. If the number of occurrences of 1s in each of the inputs giving a value of 1 are counted, then two positions have a single 1 and two positions have 1s. The single 1 positions are the new positions of address lines 0 and 3. The new positions of address lines 1 and 2 are the other two. To differentiate between 1 and 2, probe g() with an input containing a single 1 at one of the two possible new positions for address line 1. If the value is 1, then this is indeed the new position for address line 1, if not, it is the new position for address line 2. It is possible to deduce the new position for the other address line. Once the new position of address lines 1 and 2 are known, the first set of six values can be used. There is a single input giving out a value of 1 for which address line 1 is set to 1. The other bit set to 1 in this input is the new position of address line 0, and the position of address line 3 can be deduced. Probe g() with an input with a single 1 at the new position of address line 0. This value is m.sub.0. Now that the permutation is discovered, the rest of the message m.sub.1 . . . m.sub.6 can be obtained from the other location. Overall, this method uses at most seven probes and can send a message of seven bits. Solution 3-3 "Z" Constant Secondary and Tertiary The initial value are f(1100)=1, f(0110)=1, f(0011)=1, f(1010)=0, f(1001)=0, f(0101)=0, f(1000)=m.sub.0, f(0001)=m.sub.0, f(0100)=m.sub.1, f(0010)=m.sub.1, f(0111)=1, and f(1110)=0. The other four values for f are set to m.sub.2 . . . m.sub.5. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six. Three values are 1, while the other three are 0. Count the number of occurrences of 1s in each of the inputs giving a value of 1, two positions have a single 1 and two positions have 1s. The single 1 positions are the new positions of address lines 0 and 3. To differentiate between 0 and 3, probe g() with an input containing a single 0 at one of the two possible new positions for address line 0. If the value is 1, 10 then this is indeed the new position for address line 0, if not, it is the new position for address line 3. The new position for the other address line can be deduced. Once we know the new position of address lines 0 and 3, go back to the first set of six values. There is a single input giving out a value of 1 for which address line 0 is set to 1. The other bit set to one in this input is the new position of address line 1, and the position of address line 2 can be determined. The function g() is probed with an input with a single 1 at the new position of address line 0. This value is m.sub.0. Probe g() with an input with a single 1 at the new position of address line 1. This value is m.sub.1. Now that the permutation is discovered, the rest of the message m.sub.2 . . . m.sub.5 is obtained from the other location. Overall, this method uses at most eight probes, and can send a message of six bits. Solution 3-3 "Z" Constant Secondary, Tertiary and Quaternary The initial values are f(1100)=1, f(0110)=1, f(0011)=1, f(1010)=0, f(1001)=0, f(0101)=0, f(1000)=m.sub.0, f(0001)=m.sub.0, f(0100)=m.sub.1, f(0010)=m.sub.1, f(0111)=m.sub.2, f(1110)=m.sub.2, f(1011)=1, and f(1101)=0. The other 2 values for f are set to m.sub.3 . . . m.sub.4. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the exclusive OR of the other five of these six. Three values are 1, while the other three are 0. Count the number of occurrences of 1s in each of the inputs giving a value of 1, two positions have a single 1 and two positions have 1s. The single 1 positions are the new positions of address lines 0 and 3. The new positions of address lines 1 and 2 are the other two. To differentiate between 1 and 2, probe g() with an input containing a single 0 at one of the two possible new positions for address line 1. If the value is 1, then this is indeed the new position for address line 1 if not, it is the new position for address line 2. The new position for the other address line can be deduced. Once the new position of address lines 1 and 2 are known, go back to the first set of six values. There is a single input giving out a value of 1 for which address line 1 is set to 1. The other bit set to 1 in this input is the new position of address line 0, and the position of address line 3 can be deduced. Probe g() with an input with a single 1 at the new position of address line 0. This value is m.sub.0. We probe g() with an input with a single 1 at the new position of address line 1. This value is m.sub.1. Probe g() with an input with a single 0 at the new position of address line 0. This value is m.sub.2. Now that the permutation is discovered, we can also get the rest of the message m.sub.3 . . . m.sub.4 from the other location. Overall, this method uses at most nine probes and can send a message of five bits. Solution for 5-1 Direct The initial values are f(1100)=m.sub.0, f(0110)=.about.m.sub.0, f(0011)=.about.m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=1, f(0100)=0, f(0010)=1, and f(0001)=0. The other 6 values for f are set to m.sub.1 . . . m.sub.6. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the opposite of the exclusive OR of the other five of these six. One value is the opposite of the other five. This value is m.sub.0. The input for this value has two bits set to 1. These two bits are the new positions of the address lines 0 and 1. To differentiate between address lines 0 and 1, probe go with an input with a single bit set to 1, at one of the two possible new positions for address line 0. If the probe returns a 1, then this is the correct new position for address line 0. If it returns a 0, then it is the new position for address line 1. The new position for the other address line is easy to find. We now need to differentiate between the new positions of address lines 2 and 3. We use the same mechanism as the previous step. Now that the permutation is discovered, we can also get the rest of the message m.sub.1 . . . m.sub.6 from the other locations. Overall, this method uses at most 7 probes and can send a message of 7 bits. Solution 5-1 Constant Tertiary The initial values are f(1100)=m.sub.0, f(0110)=.about.m.sub.0, f(0011)=.about.m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=1, f(0100)=0, f(0010)=m.sub.1, f(001)=m.sub.1, f(1101)=1, and f(1110)=0. The other 4 values for f are set to m.sub.2 . . . m.sub.5. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the opposite of the exclusive OR of the other five of these six. One value is the opposite of the other five. This value is M. The input for this value has two bits set to 1. These two bits are the new positions of the address lines 0 and 1. To differentiate between address lines 0 and 1, we probe g() with an input with a single bit set to 1, at one of the two possible new positions for address line 0. If the probe returns a 1, then this is the correct new position for address line 0. If it returns a 0, then it is the new position for address line 1. The new position for the other address line is easy to find. 3. Probe g() with an input with a single bit set to 1, at one of the two possible new positions for address line 2. This value is m.sub.1. Now, the new positions of address lines 2 and 3 need to be differentiated. Probe g() with an input with a single bit set to 0 at, at one of the two possible new positions for address line 2. If the probe returns a 1, then this is the correct new position for address line 2. If it returns a 0, then it is the new position for address line 3. The new position for the other address line is easy to find. Now that the permutation is discovered, we can also get the rest of the message m.sub.2 . . . m.sub.5 from the other locations. Overall, this method uses at most eight probes and can send a message of six bits. Solution 5-1 Constant Secondary The initial values are f(1100)=m.sub.0, f(0110)=.about.m.sub.0, f(0011)=.about.m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=m.sub.1, f(0100)=m.sub.1, f(0010)=1, f(0001)=0, f(0111)=1, and f(1011)=0. The other four values for f are set to m.sub.2 . . . m.sub.5. Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the opposite of the exclusive OR of the other five of these six. One value is the opposite of the other five. This value is m.sub.0. The input for this value has two bits set to 1. These two bits are the new positions of the address lines 0 and 1. Probe go with an input with a single bit set to 1, at one of the two possible new positions for address line 0. This value is m.sub.1. To differentiate between address lines 2 and 3, we probe g() with an input with a single bit set to 1, at one of the two possible new positions for address line 2. If the probe returns a 1, then this is the correct new position for address line 2. If it returns a 0, then it is the new position for address line 3. The new position for the other address line is easy to find. We now need to differentiate between the new positions of address lines 0 and 1. The function g() is probed with an input with a single bit set to 0 at, at one of the two possible new positions for address line 0. If the probe returns a 1, then this is the correct new position for address line 0. If it returns a 0, then it is the new position for address line 1. The new position for the other address line is easy to find. Now that the permutation is discovered, the rest of the message m.sub.2 . . . m.sub.5 can be obtained from the other locations. Overall, this method uses at most eight probes and can send a message of six bits. Solution 5-1 Constant Secondary and Tertiary The initial values are f(1100)=m.sub.0, f(0110)=.about.m.sub.0, f(0011)=.about.m.sub.0, f(1010)=.about.m.sub.0, f(1001)=.about.m.sub.0, f(0101)=.about.m.sub.0, f(1000)=m.sub.1, f(0100)=m.sub.1, f(1010)=.about.m.sub.2, f(0001)=m.sub.2, f(0111)=1, f(1011)=0, f(1101)=1, and f(1110)=0. The other two values for f are set to m.sub.3 . . . m.sub.4 Permutation and Message Discovery Procedure Probe the values of g(1100), g(1010), g(1001), g(0110), g(0101). The probe of g(0011) is trivially the opposite of the exclusive OR of the other five of these six. One value is the opposite of the other five. This value is M. The input for this value has two bits set to 1. These two bits are the new positions of the address lines 0 and 1. To differentiate between address lines 0 and 1, we probe go with an input with a single bit set to 0, at one of the two possible new positions for address line 0. If the probe returns a 1, then this is the correct new position for address line 0. If it returns a 0, then it is the new position for address line 1. The new position for the other address line is easy to find. To differentiate between the new positions of address lines 2 and 3, probe g() with an input with a single bit set to 1 at one of the two possible new positions for address line 2. If the probe returns a 1, then this is the correct new position for address line 2. If it returns a 0, then it is the new position for address line 3. The new position for the other address line is easy to find. Probe g() with an input with a single bit set to 1, at the new position for address line 0. This value is m.sub.1. Probe g() with an input with a single bit set to 1, at the new position for address line 2. This value is m.sub.2. Now that the permutation is discovered, we can also get the rest of the message m.sub.2 . . . m.sub.5 from the other locations. Overall, this method uses at most nine probes and can send a message of five bits. Solution 6-0 Initial values are f(1100)=m.sub.0, f(0011)=m.sub.0, f(1010)=m.sub.0, f(1001)=m.sub.0, f(0101)=m.sub.0, f(0110)=m.sub.0, f(1000)=1, f(0100)=1, f(0010)=0, f(0001)=0, f(0111)=1, f(1011),=0, f(1101)=1, and f(1110)=0, while the other three values for f are set to m.sub.0 . . . m.sub.2. Permutation and Message Discovery Procedure Probe g(1100). The value is m.sub.0. Probe g(1000), g(0100) and g(0010) and find g(0001) which is the exclusive OR of the other ones. Deduce the two possible new positions of inputs 0 and 1. Probe f(0111), f(1011) and f(1101) and find g(1110) which is the exclusive OR of the other ones. Deduce the exact new positions of inputs 0, then 2. The new positions for 1 and 3 are then obvious. Now that the permutation is discovered, we can also get the rest of the message m.sub.1 . . . m.sub.2 from the other location. This method uses at most seven probes and can send a message of three bits. IV--Combination of Solutions As shown in FIGS. 8A-8D, the length of the message can be increased by combining the above solutions. Here, the principle is that each solution has a different "signature." Probes 801 on the six values g(1100), g(1010), g(1001), g(0110), g(0101) and g(0011) 802 easily reveal the 3-3 (803), 4-2 (804), 5-1 (805) and 6-0 (506) solutions, as they have a different number of values set to 1, hence their naming. Within each type, the presented solutions can easily be recognized: 4-2 (804) with overlapping 8421, and without overlapping 8422. The two inputs that give m.sub.0, the "with overlapping" has an input bit set to 1 in the two inputs (842). The "without overlapping" version 8422 has disjuncted sets of 1s. In the 4-2 no-overlap solution, the disjunct sets differ on their secondary choice: on g(1000), g(0100), g(0010) and g(0001) (8423) in the 3-1 case (84231), three values are the same, in the 2-2 case, 2 values are the same. 4-2 without overlapping and separating secondary: this special case has a useless configuration for g(1000), g(0100), g(0010) and g(0001), but is a recognizable configuration (due to this useless configuration), and thus brings more message bits to the combination. The names for the 3-3 "triangle" and "Z" solutions come from the tetrahedron view of the problem. On probing the values g(1100), g(1010), g(1001), g(0110), g(0101) and g(0011), three are set to 1. If on the three inputs for these values, one of the bits has always the same value, then it is a "triangle," otherwise, it is a "Z". For the direct/constant secondary (K 2.degree.)/constant tertiary (3.degree.)/constant secondary and tertiary, these solutions differ by the value of the pairs g(1000)-g(0100), g(0010)-g(0001). The four variants come from the four different possibilities where the elements of the pairs are either identical or different. Likewise for the other solutions, use a difference in pairs where the two elements of the pair can be either equal or different. The other solutions can similarly be probed and discovered as shown in FIGS. 8A-8D and described above. Each of these solutions is capable of encoding messages of a certain number of bits, indicated as "[nb]" in the bottom of the solution boxes of FIGS. 8A-8D. When encoding a message by first choosing a solution and then using the solution to encode the message, the capabilities of all of the solutions can be combined. The receiving side just has to recognize the particular solution by using the criteria defined above, then proceed normally. It is important to note that the test functions for each of the solutions are distinct from each other. This property ensures the unicity of the solution for a given test function. Each solution uses a subset of the exhaustive set of useful classes as described above. The intent is that the entire solution space can be covered with disjoint and recognizable solutions. EXAMPLE The 4-2 with overlapping solution can encode nine bit messages, which means a message M: 0<=M<2.sup.9 =512. The 3-3 "Z" solution can encode eight bit messages, which means a message M: 0<=M<2.sup.8 =256. The solutions can be combined to allow a message of 9.5 bits: M: 0<=M<2.sup.9.5 =512+256=768 as follows. If M<=2.sup.9, then encode M using the 4-2 with overlapping solution. If M>=2.sup.9, then encode M-2.sup.9 using 3-3 "Z" solution. The combined solution as shown in FIG. 8 can be reached by the steps shown in FIG. 9. In step 910, the sender partitions the message space between the different solutions. In step 920, the sender selects a solution according to the position of the message in the partitioned space. In step 930, the message is scaled down into the solution space. In step 940, the receiver walks the tree of FIG. 8 until the selected solution is found. In step 950, discover the permutation and extract the message according to the selected solution. In step 960, scales up the message according to the position of the solution in the partitioned message space. The maximum combined capabilities of all the preceding algorithms is: M<2.sup.9 +2.sup.8 +2.sup.6 +2.sup.5 +2.sup.4 +2.sup.3 +2.sup.7 +2.sup.8 +2.sup.7 +2.sup.6 +2.sup.5 +2.sup.7 +2.sup.6 +2.sup.6 2.sup.5 +2.sup.3 =1792=2.sup.10.81. Therefore, it is possible to encode 10.81 bits with the combined solution. Note that the number of probes is at least six to recognize the first level of solutions, but then can vary. The complexity is just the maximum complexity of the individual solutions, which is not very large. The combined solution reaches the theoretical bound, and is therefore optimal. Finding all the sub-solutions of the combination is straightforward in most cases. If it becomes difficult to find additional solutions, then the coverage of solution can be mapped to the exhaustive list of the classes to determine what patterns are missing. The same basic technique can be used in the case where n=5, although this will take more time. Although the example embodiments given here are for determining the permutation of address lines in a FPGA, the same technique can be used in a larger setting to identify for example, telephone cabling in a building, or any other type of large scale cabling where the internal routing information is no longer available. The foregoing description has been directed to specific embodiments of this invention. It will be apparent, however, that variations and modifications may be made to the described embodiments, with the attainment of all or some of the advantages. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the spirit and scope of the invention.
|
Same subclass Same class Consider this |
||||||||||
