1 if { [info exists CPUTAPID] } {
2 set _CPUTAPID $CPUTAPID
4 set _CPUTAPID 0x38289013
7 jtag newtap quark_d20xx quark -irlen 8 -irmask 0xff -expected-id $_CPUTAPID -disable
8 jtag newtap quark_d20xx cltap -irlen 8 -irmask 0xff -expected-id 0x0e786013 -enable
10 proc quark_d20xx_tapenable {} {
11 echo "enabling quark core tap"
12 irscan quark_d20xx.cltap 0x11
13 drscan quark_d20xx.cltap 12 1
17 proc quark_d20xx_tapdisable {} {
18 echo "disabling quark core tap"
19 irscan quark_d20xx.cltap 0x11
20 drscan quark_d20xx.cltap 12 0
24 proc quark_d20xx_setup {} {
25 jtag tapenable quark_d20xx.quark
28 jtag configure quark_d20xx.quark -event tap-enable \
29 "quark_d20xx_tapenable"
31 jtag configure quark_d20xx.quark -event tap-disable \
32 "quark_d20xx_tapdisable"
34 target create quark_d20xx.quark quark_d20xx -endian little -chain-position quark_d20xx.quark
36 quark_d20xx.quark configure -event reset-start {
37 # need to halt the target to write to memory
38 if {[quark_d20xx.quark curstate] ne "halted"} { halt }
39 # set resetbreak via the core tap
40 irscan quark_d20xx.quark 0x35 ; drscan quark_d20xx.quark 1 0x1
41 # trigger a warm reset
44 irscan quark_d20xx.quark 0x35 ; drscan quark_d20xx.quark 1 0x0
47 jtag configure quark_d20xx.quark -event setup \