For Spartan-6 devices, there are two command line options to read the device DNA - 'readdna' and 'readeffuse -dna'.
These do not produce consistent results.
Which one is correct?
The "readdna" option should be used and is correct.
The GUI also uses this option when you right click on the device icon and then select "Read Device DNA".
The DNA value readback using the 'readefuse -dna' option is incorrect.
The issue with 'readefuse -dna' is in how the data is processed and displayed rather than the read operation itself.
Below is an example showing the discrepancy:
100011110100010110100001011001000010101011010100111000111 -- readefuse dna
000000001110000101000111101000101101000010110010000101010 -- readdna