The svf_compare_tdo function fails on a particular instruction in an Actel SVF file, although I think it should NOT.
SDR 32 TDI(00000000) TDO(03A121CF) MASK(06FFFFFF);
This should check the IDCODE, which is actually 02A121CF. The svf_compare_tdo reports a mismatch at position 31. The comparison seems to XOR a decimal value with a ASCII value, possibly?
Kolja
I suggest the following change:
--- svf.c (revision 1407)
+++ svf.c (working copy)
@@ -437,7 +437,7 @@
mismatch = -1;
for (pos = 0; pos < reg->len; pos++)
- if ((svf_hex2dec(tdo_bit[pos]) ^ reg->string[pos]) & svf_hex2dec(mask_bit[pos]))
+ if ((tdo_bit[pos] != reg->string[pos]) && (mask_bit[pos] == '1'))
mismatch = pos;
Whew, nasty bug. Wonder how that could slip through for such a long time.
Patch looks good BTW.
Arnim
Committed in 1410.