jmoore180
Junior Member level 1
Hi.
I am trying to design a “vote of eight” which is proving to be changing and wanted to know if any one may have some out their may have some insight on how bet to do this.
I have eight sets of 16 lines which i need to find which 16 bit values occurs most often in the eight sets of lines. A guy I work with called this the statical mode operation.
So far the algorithm I have is :
step 1:
XOR each bit of a 16 bit word with the corresponding bit from the 16 bit words.
step 2:
or the results so that we have a zero if two words are the same 1 if they differ
step 3:
count the number of zeros produced for each and or compare them to
the others in a chain fashion (see picture below for better explanation) if
the next one has fewer zeros use current command decoders output if not
move to next command decoder and repeat.
comparison chain for ored xor output:
format: 16 bit word #- comp with 16bit word #
level of chain
1 2 3 4 5 6 7
1-2 2-3 3-4 4-5 5-6 6-7 7-8
1-3 2-4 3-5 4-6 5-7 6-8
1-4 2-5 3-6 4-7 5-8
1-5 2-6 3-7 4-8
1-6 2-7 3-8
1-7 2-8
1-8
To day I realized in testing it is not sufficient to just compare level 1 and 2 in the above table to determine if 1 has the most same results but you must compare 1 with 2 3 4 5 6 7 and then if one has more 0's than 2 then you must compare it 3 and so forth. If one does not have more 0's than 2 then you must repeat testing 2 against 3 4 5 6 7 etc.
Another complicating factor is i am trying to do this asynchronously because this vote of 8 is part of a redundancy system/address decoder.
Any ideas? been done before?
Thanks in advance Jason
I am trying to design a “vote of eight” which is proving to be changing and wanted to know if any one may have some out their may have some insight on how bet to do this.
I have eight sets of 16 lines which i need to find which 16 bit values occurs most often in the eight sets of lines. A guy I work with called this the statical mode operation.
So far the algorithm I have is :
step 1:
XOR each bit of a 16 bit word with the corresponding bit from the 16 bit words.
step 2:
or the results so that we have a zero if two words are the same 1 if they differ
step 3:
count the number of zeros produced for each and or compare them to
the others in a chain fashion (see picture below for better explanation) if
the next one has fewer zeros use current command decoders output if not
move to next command decoder and repeat.
comparison chain for ored xor output:
format: 16 bit word #- comp with 16bit word #
level of chain
1 2 3 4 5 6 7
1-2 2-3 3-4 4-5 5-6 6-7 7-8
1-3 2-4 3-5 4-6 5-7 6-8
1-4 2-5 3-6 4-7 5-8
1-5 2-6 3-7 4-8
1-6 2-7 3-8
1-7 2-8
1-8
To day I realized in testing it is not sufficient to just compare level 1 and 2 in the above table to determine if 1 has the most same results but you must compare 1 with 2 3 4 5 6 7 and then if one has more 0's than 2 then you must compare it 3 and so forth. If one does not have more 0's than 2 then you must repeat testing 2 against 3 4 5 6 7 etc.
Another complicating factor is i am trying to do this asynchronously because this vote of 8 is part of a redundancy system/address decoder.
Any ideas? been done before?
Thanks in advance Jason