Skip to content

Commit

Permalink
Merge pull request #172 from pulp-platform/sw_debug
Browse files Browse the repository at this point in the history
Software debugging improvements
  • Loading branch information
bluewww committed Sep 27, 2019
2 parents e9aecdf + 7c402a0 commit 983b043
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tb/core/software.tcl
@@ -0,0 +1,27 @@
# add fc execution trace
set rvcores [find instances -recursive -bydu riscv_core -nodu]
set fpuprivate [find instances -recursive -bydu fpu_private]

if {$rvcores ne ""} {

add wave -group "Software Debugging" $rvcores/clk_i
add wave -group "Software Debugging" -divider "Instructions at ID stage, sampled half a cycle later"
add wave -group "Software Debugging" $rvcores/riscv_tracer_i/insn_disas
add wave -group "Software Debugging" $rvcores/riscv_tracer_i/insn_pc
add wave -group "Software Debugging" $rvcores/riscv_tracer_i/insn_val
add wave -group "Software Debugging" -divider "Program counter at ID and IF stage"
add wave -group "Software Debugging" $rvcores/pc_id
add wave -group "Software Debugging" $rvcores/pc_if
add wave -group "Software Debugging" -divider "Register File contents"
add wave -group "Software Debugging" $rvcores/id_stage_i/registers_i/riscv_register_file_i/mem
if {$fpuprivate ne ""} {
add wave -group "Software Debugging" $rvcores/id_stage_i/registers_i/riscv_register_file_i/mem_fp
}

}

configure wave -namecolwidth 250
configure wave -valuecolwidth 100
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -timelineunits ns
1 change: 1 addition & 0 deletions tb/core/vsim.tcl
Expand Up @@ -12,5 +12,6 @@
# Description: TCL scripts to facilitate simulations

set NoQuitOnFinish 1
source software.tcl
source waves.tcl
run -all
File renamed without changes.

0 comments on commit 983b043

Please sign in to comment.