[Libre-soc-bugs] [Bug 511] Add a test of IO pins to debug/test/test_jtag_tap.py

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Oct 21 22:43:01 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=511

--- Comment #16 from Cole Poirier <colepoirier at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #15)
> (In reply to Cole Poirier from comment #14)
> 
> > Did you forget to push your commit? 
> 
> evidently yes :)

Glad to have the commit now as now we can do yet more debugging!

I'm a bit confused by your commit. It looks like you're changing the values,
for the print statements from ("pad.i", yield xxx.pad.i) to ("pad.i", yield
xxx.core.i)... How is it that the value of pad.i is actually that of core.i?

Also, it looks like we need some more help from Cesar as the tests still fail.

```
python3 test_jtag_tap.py 
idcode 0x18ff
        dmi wen, addr 0 0
        read ctrl reg 4
dmi ctrl status 0x4
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 4
dmi ctrl status 0x4
        dmi wen, addr 1 0
        write ctrl reg 5 6
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 6
dmi ctrl status 0x6
Traceback (most recent call last):
[snip]
  File "test_jtag_tap.py", line 118, in jtag_sim
    assert status == 0
AssertionError
```

```
python3 test_jtag_tap_srv.py server (talking to `python3 test_jtag_tap.py`)
running server only as requested, use openocd remote to test
        dmi wen, addr 0 0
        read ctrl reg 4
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 4
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 4
        dmi wen, addr 1 0
        write ctrl reg 3 6
        dmi wen, addr 0 1
        dmi wen, addr 0 1
        dmi wen, addr 0 2
        dmi wen, addr 0 0
        read ctrl reg 6
        dmi wen, addr 1 0
        write ctrl reg 4 6
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 6
        dmi wen, addr 1 0
        write ctrl reg 16 0
        dmi wen, addr 0 1
        dmi wen, addr 0 1
        dmi wen, addr 0 2
        dmi wen, addr 0 1
        dmi wen, addr 0 2
        dmi wen, addr 0 1
        dmi wen, addr 0 2
        dmi wen, addr 0 1
        dmi wen, addr 0 2
Traceback (most recent call last):
  [snip]
  File "/home/colepoirier/src/soc/src/soc/debug/jtagutils.py", line 98, in
jtag_srv
    data = dut.s.jtagremote_server_recv(tdo)
  File "/home/colepoirier/src/soc/src/soc/debug/jtagutils.py", line 169, in
jtagremote_server_recv
    data = ord(data) - ord('0')
TypeError: ord() expected a character, but string of length 0 found
```


```
./debug/test/openocd_test.sh
Open On-Chip Debugger 0.10.0+dev-01423-g3ffa14b04-dirty (2020-10-11-15:19)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter driver' not 'interface'
Info : only one transport option; autoselect 'jtag'
Warn : libresoc.tap: nonstandard IR value
Info : Initializing remote_bitbang driver
Info : Connecting to localhost:44853
Info : remote_bitbang driver initialized
Info : This adapter doesn't support configurable speed
Info : JTAG tap: libresoc.tap tap/device found: 0x000018ff (mfg: 0x47f
(<invalid>), part: 0x0001, ver: 0x0)
Warn : gdb services need one or more targets defined
svf processing file: "debug/test/idcode_test2.svf"
STATE RESET IDLE;
TIR 0 ;
HIR 5 TDI (1f) SMASK (1f) ;
TDR 0 ;
SIR 4 TDI (1) SMASK (f) ;
SDR 32 TDI (00000000) SMASK (ffffffff) TDO (000018ff) MASK (ffffffff) ;
SIR 4 TDI (8) SMASK (f) ;
SDR 8 TDI (0) SMASK (ff) ;
SIR 4 TDI (9) SMASK (f) ;
SDR 64 TDI (0000000000000000) SMASK (0000000000000000) TDO (0000000000000004)
MASK (ffffffffffffffff) ;
SIR 4 TDI (8) SMASK (f) ;
SDR 8 TDI (0) SMASK (ff) ;
SIR 4 TDI (a) SMASK (f) ;
SDR 64 TDI (0000000000000002) SMASK (ffffffffffffffff) TDO (0000000000000004)
MASK (ffffffffffffffff) ;
SIR 4 TDI (8) SMASK (f) ;
SDR 8 TDI (0) SMASK (ff) ;
SIR 4 TDI (9) SMASK (f) ;
SDR 64 TDI (0000000000000000) SMASK (0000000000000000) TDO (0000000000000002)
MASK (ffffffffffffffff) ;
SIR 4 TDI (8) SMASK (f) ;
SDR 8 TDI (3) SMASK (ff) ;
SIR 4 TDI (9) SMASK (f) ;
SDR 64 TDI (0000000000000000) SMASK (0000000000000000) TDO (00000000deadbeef)
MASK (ffffffffffffffff) ;
Error: tdo check error at line 37
Error:     READ = 0x000000000000004
Error:     WANT = 0x000000000000002
Error:     MASK = 0xffffffffffffffff
Time used: 0m0s348ms 
svf file programmed failed
Info : remote_bitbang interface quit
```


```
python3 test_jtag_tap_srv.py server talking to `./debug/test/openocd_test.sh`
running server only as requested, use openocd remote to test
        dmi wen, addr 0 0
        read ctrl reg 4
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 4
        dmi wen, addr 1 0
        write ctrl reg 2 4
        dmi wen, addr 0 1
        dmi wen, addr 0 0
        read ctrl reg 4
        dmi wen, addr 0 1
        dmi wen, addr 0 3
        read msr reg
Traceback (most recent call last):
  [snip]
  File "/home/colepoirier/src/soc/src/soc/debug/jtagutils.py", line 98, in
jtag_srv
    data = dut.s.jtagremote_server_recv(tdo)
  File "/home/colepoirier/src/soc/src/soc/debug/jtagutils.py", line 169, in
jtagremote_server_recv
    data = ord(data) - ord('0')
TypeError: ord() expected a character, but string of length 0 found
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list