Menu

#81 SVF compare_tdo flaw?

0.10
closed-fixed
UrJTAG (101)
4
2008-12-22
2008-12-21
No

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

Discussion

  • Kolja Waschk

    Kolja Waschk - 2008-12-21

    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;

     
  • Kolja Waschk

    Kolja Waschk - 2008-12-21
    • assigned_to: nobody --> arniml
     
  • Kolja Waschk

    Kolja Waschk - 2008-12-21
     
  • Arnim Läuger

    Arnim Läuger - 2008-12-22

    Whew, nasty bug. Wonder how that could slip through for such a long time.
    Patch looks good BTW.

    Arnim

     
  • Arnim Läuger

    Arnim Läuger - 2008-12-22
    • assigned_to: arniml --> kawk
    • status: open --> open-accepted
     
  • Kolja Waschk

    Kolja Waschk - 2008-12-22

    Committed in 1410.

     
  • Kolja Waschk

    Kolja Waschk - 2008-12-22
    • status: open-accepted --> closed-fixed
     
  • Kolja Waschk

    Kolja Waschk - 2017-02-12
    • Group: 0.x --> 0.10
     

Log in to post a comment.