Line 51... |
Line 51... |
device_unlock
|
device_unlock
|
return $addr_mask
|
return $addr_mask
|
}
|
}
|
}
|
}
|
|
|
proc config_trig {{jtag_index_2 2} {trig 00000000000000}} {
|
proc config_trig {{jtag_index_2 2} {trig 00000000000000} {pnum 0}} {
|
global log
|
global log
|
set trig_leng [string length $trig]
|
set trig_leng [string length $trig]
|
if {$trig_leng!=14} {
|
if {$trig_leng!=14} {
|
$log insert end "\nError: Wrong trigger condition length: [expr $trig_leng-2]. Expects: 4+8.\n"
|
$log insert end "\nError: Wrong trigger condition length: [expr $trig_leng-2]. Expects: 4+8.\n"
|
} else {
|
} else {
|
device_lock -timeout 5
|
device_lock -timeout 5
|
device_virtual_ir_shift -instance_index $jtag_index_2 -ir_value 1 -no_captured_ir_value
|
device_virtual_ir_shift -instance_index $jtag_index_2 -ir_value 1 -no_captured_ir_value
|
set addr_trig [device_virtual_dr_shift -instance_index $jtag_index_2 -dr_value $trig -length 56 -value_in_hex]
|
set addr_trig [device_virtual_dr_shift -instance_index $jtag_index_2 -dr_value $trig -length 56 -value_in_hex]
|
|
device_virtual_ir_shift -instance_index $jtag_index_2 -ir_value 2 -no_captured_ir_value
|
|
set addr_trig [device_virtual_dr_shift -instance_index $jtag_index_2 -dr_value $pnum -length 10]
|
device_unlock
|
device_unlock
|
return $addr_trig
|
return $addr_trig
|
}
|
}
|
}
|
}
|
|
|
Line 183... |
Line 185... |
global address_span13
|
global address_span13
|
global address_span14
|
global address_span14
|
global address_span15
|
global address_span15
|
global address_span16
|
global address_span16
|
for {set i 1} {$i<=8} {incr i} {
|
for {set i 1} {$i<=8} {incr i} {
|
|
if {[set address_span$i]==""} {
|
set address_span$i ffff0000
|
set address_span$i ffff0000
|
}
|
}
|
|
}
|
for {set i 9} {$i<=16} {incr i} {
|
for {set i 9} {$i<=16} {incr i} {
|
|
if {[set address_span$i]==""} {
|
set address_span$i 00000000
|
set address_span$i 00000000
|
}
|
}
|
}
|
}
|
|
}
|
|
|
|
proc initTrigConfig {} {
|
|
global triggerAddr
|
|
global triggerData
|
|
global triggerPnum
|
|
if {[set triggerAddr]==""} {
|
|
set triggerAddr ffff
|
|
}
|
|
if {[set triggerData]==""} {
|
|
set triggerData a5a5a5a5
|
|
}
|
|
if {[set triggerPnum]==""} {
|
|
set triggerPnum 0
|
|
}
|
|
}
|
|
|
proc updateTrigger {{trigCmd 0}} {
|
proc updateTrigger {{trigCmd 0}} {
|
global triggerAddr
|
global triggerAddr
|
global triggerData
|
global triggerData
|
|
global triggerPnum
|
global trig_wren
|
global trig_wren
|
global trig_rden
|
global trig_rden
|
global trig_aden
|
global trig_aden
|
global trig_daen
|
global trig_daen
|
set triggerValue [format "%1X" [expr $trig_aden*8+$trig_daen*4+0]]
|
set triggerValue [format "%1X" [expr $trig_aden*8+$trig_daen*4+0]]
|
append triggerValue [format "%1X" [expr $trig_wren*8+$trig_rden*4+$trigCmd]]
|
append triggerValue [format "%1X" [expr $trig_wren*8+$trig_rden*4+$trigCmd]]
|
append triggerValue $triggerAddr
|
append triggerValue $triggerAddr
|
append triggerValue $triggerData
|
append triggerValue $triggerData
|
config_trig 2 $triggerValue
|
config_trig 2 $triggerValue $triggerPnum
|
}
|
}
|
|
|
proc startTrigger {} {
|
proc startTrigger {} {
|
global trig_wren
|
global trig_wren
|
global trig_rden
|
global trig_rden
|
Line 355... |
Line 377... |
.console.f2.address_span_en13 .console.f2.address_span13 \
|
.console.f2.address_span_en13 .console.f2.address_span13 \
|
.console.f2.address_span_en14 .console.f2.address_span14 \
|
.console.f2.address_span_en14 .console.f2.address_span14 \
|
.console.f2.address_span_en15 .console.f2.address_span15 \
|
.console.f2.address_span_en15 .console.f2.address_span15 \
|
.console.f2.address_span_en16 .console.f2.address_span16 \
|
.console.f2.address_span_en16 .console.f2.address_span16 \
|
-side left -ipadx 0
|
-side left -ipadx 0
|
|
|
initAddrConfig
|
initAddrConfig
|
|
|
# set the address configuration buttons
|
# set the address configuration buttons
|
frame .console.addr_cnfg -relief groove -borderwidth 5
|
frame .console.addr_cnfg -relief groove -borderwidth 5
|
pack .console.addr_cnfg
|
pack .console.addr_cnfg
|
Line 372... |
Line 393... |
# set the transaction trigger controls
|
# set the transaction trigger controls
|
frame .console.trig -relief groove -borderwidth 5
|
frame .console.trig -relief groove -borderwidth 5
|
pack .console.trig
|
pack .console.trig
|
button .console.trig.starttrig -text {Apply Trigger Condition} -command {startTrigger}
|
button .console.trig.starttrig -text {Apply Trigger Condition} -command {startTrigger}
|
entry .console.trig.trigvalue_addr -textvar triggerAddr -width 4
|
entry .console.trig.trigvalue_addr -textvar triggerAddr -width 4
|
set triggerAddr ffff
|
|
entry .console.trig.trigvalue_data -textvar triggerData -width 8
|
entry .console.trig.trigvalue_data -textvar triggerData -width 8
|
set triggerData a5a5a5a5
|
|
checkbutton .console.trig.trigaddr -text {@Addr:} -variable trig_aden
|
checkbutton .console.trig.trigaddr -text {@Addr:} -variable trig_aden
|
checkbutton .console.trig.trigdata -text {@Data:} -variable trig_daen
|
checkbutton .console.trig.trigdata -text {@Data:} -variable trig_daen
|
checkbutton .console.trig.wren -text {@WR} -variable trig_wren
|
checkbutton .console.trig.wren -text {@WR} -variable trig_wren
|
checkbutton .console.trig.rden -text {@RD} -variable trig_rden
|
checkbutton .console.trig.rden -text {@RD} -variable trig_rden
|
pack .console.trig.wren .console.trig.rden \
|
label .console.trig.pnum -text {Pre-Capture:}
|
|
entry .console.trig.trigvalue_pnum -textvar triggerPnum -width 4
|
|
pack .console.trig.pnum .console.trig.trigvalue_pnum \
|
|
.console.trig.wren .console.trig.rden \
|
.console.trig.trigaddr .console.trig.trigvalue_addr \
|
.console.trig.trigaddr .console.trig.trigvalue_addr \
|
.console.trig.trigdata .console.trig.trigvalue_data \
|
.console.trig.trigdata .console.trig.trigvalue_data \
|
.console.trig.starttrig \
|
.console.trig.starttrig \
|
-side left -ipadx 0
|
-side left -ipadx 0
|
|
initTrigConfig
|
|
|
# set the control buttons
|
# set the control buttons
|
frame .console.fifo -relief groove -borderwidth 5
|
frame .console.fifo -relief groove -borderwidth 5
|
pack .console.fifo
|
pack .console.fifo
|
button .console.fifo.reset -text {Reset FIFO} -command {reset_fifo_ptr}
|
button .console.fifo.reset -text {Reset FIFO} -command {reset_fifo_ptr}
|