SVF test vector injection - generating SVF files

J

Johann Klammer

Guest
Good morning,
I was trying to run some test vectors on an ATF1504ASVL_A44 CPLD.
Even found some BSDL files on the net(no Idea if they're correct, tho').

I have vectors like this:
V0001 NLLNLLNLNLL1NNNNNNNHNNNNNNNNNNNNNN0NNNNNNLLL*
V0002 NLLNLLNLNLL0NNNNNNNHNNNNNNNNNNNNNN0NNNNNNLLL*
V0003 NLLNLLNLNLL0NNNNNNNLNNNNNNNNNNNNNN1NNNNNNHLL*
[...]

They are generated from a verilog sim.

From those I tried generating SVF files like this:
[...]
SIR 10 TDI (055);
SDR 192 TDI (0000000000000000840101510401415145c1401045400411);
SIR 10 TDI (000);
RUNTEST 1.000000E-05 SEC;
SIR 10 TDI (055);
SDR 192 TDI (000000000000000044010151040141514541401045400411)
TDO (000000080000000044010151040141514541401045400411)
MASK (000000080185709400000000000000000000000000000000);
SIR 10 TDI (055);
SDR 192 TDI (000000000000000084010151040141514581401045400411);
SIR 10 TDI (000);
RUNTEST 1.000000E-05 SEC;
SIR 10 TDI (055);
SDR 192 TDI (000000000000000044010151040141514541401045400411)
TDO (000000080000000044010151040141514541401045400411)
MASK (000000080185709400000000000000000000000000000000);
[...]
using sample/preload runtest and extest states.
When playing, it failed at the first vector.
There was an IDCODE check before that, and that worked, so the
communication seems ok.

Then I tried this:
[...]
SIR 10 TDI (000);
SDR 192 TDI (0000000000000000840101510401415145c1401045400411);
SIR 10 TDI (000);
SDR 192 TDI (000000000000000084010151040141d1458280208a800822)
TDO (000000000000000044010151040141d1454280208a800822)
MASK (000000000000000000000000000000c00003c030cfc00c33);
SIR 10 TDI (000);
SDR 192 TDI (0000000000000000c4010151040141d1458280208a800822)
TDO (000000000000000044010151040141d1454280208a800822)
MASK (000000000000000000000000000000c00003c030cfc00c33);
SIR 10 TDI (000);
SDR 192 TDI (00000000000000008401015104014191458280208a800823)
TDO (00000000000000004401015104014191454280208a800823)
MASK (000000000000000000000000000000c00003c030cfc00c33);
[...]
...extest only...
It also failed at the first vector (with the same bitpattern read back)...

The program for generating the svf files is there:
<https://github.com/klammerj/vec2svf>

What am I doing wrong?
(/Is/ there a way of doing it right?)
 
Can you share the error message if any and the tool environment?
 
On 06/28/2015 06:25 AM, Sharad wrote:
Can you share the error message if any and the tool environment?

using urjtag,
I got:
[...]
svf.c:473 urj_svf_compare_tdo(): Error svf: mismatch at position 49 for TDO
svf.c:479 urj_svf_compare_tdo(): in input file between line 22 col 1 and line 24 col 58
debug: svf.c:482 urj_svf_compare_tdo(): Expected : 00000000000000000000000000001
00000000000000000000000000000000000010001000000000100000001010100010000010000000
00101000001010100010100010101000001010000000001000001000101010000000000010000010001
debug: svf.c:483 urj_svf_compare_tdo(): Mask : 000000000000000000000000000010000
00000011000010101110000100101000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
debug: svf.c:484 urj_svf_compare_tdo(): TDO data : 010001000001000000000001010
110011000011000000001010000100000000000000011000000000000000000000010000000000
000001000000000000000101101011011110001010111100111111111011110111000111011110
110001000
error: svf_bison.y:451 urj_svf_error(): Error occurred for SVF command, line 21, column 0-57:
SDR.
[...]

on the first try (sample, extest, sample from scan inputs)
and
[...]
debug: state.c:66 urj_tap_state_dump_2(): tap_state: UPDATE_DR =(tms:0)=> RUN_TEST_IDLE
svf.c:473 urj_svf_compare_tdo(): Error svf: mismatch at position 190 for TDO
svf.c:479 urj_svf_compare_tdo(): in input file between line 20 col 1 and line 22 col 58
debug: svf.c:482 urj_svf_compare_tdo(): Expected : 00000000000000000000000000000
00000000000000000000000000000000000010001000000000100000001010100010000010000000
00101000001110100010100010101000010100000000010000010001010100000000000100000100
010
debug: svf.c:483 urj_svf_compare_tdo(): Mask : 00000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000001100000000000000000000111100000000110000110011111100000000001100001100
11
debug: svf.c:484 urj_svf_compare_tdo(): TDO data : 010001000001000000000001010
110011000011000000001010000100000000000000011000000000000000000000010000000000
000001000000000000000101101011011110001010111100111111111011110111000111011110
110001000
error: svf_bison.y:451 urj_svf_error(): Error occurred for SVF command, line 19, column 0-57:
SDR.
[...]

(extest only, testing internal bits and enables...)
 
Nevermind.. looks like I got the endianness wrong(again)...
 

Welcome to EDABoard.com

Sponsor

Back
Top