Skip to content

Commit

Permalink
sim(wave): Update wave scripts of testbenches with new TCL procs
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Jan 16, 2024
1 parent 91df104 commit e96eec5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 276 deletions.
67 changes: 6 additions & 61 deletions hw/tb/wave/tb_floo_axi_chimney.wave.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,14 @@
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51

onerror {resume}
quietly WaveActivateNextPane {} 0
source hw/tb/wave/wave.tcl

delete wave *

set num_phys_channels [expr [llength [find instances -bydu floo_wormhole_arbiter]] / 2 / 2]
set normal_rob [expr [llength [find instances -bydu floo_rob]] / 2 == 2]
set simple_rob [expr [llength [find instances -bydu floo_simple_rob]] / 2 == 2]
floo_wave_init

for {set i 0} {$i < 2} {incr i} {
set group_name "Adapter $i"

add wave -noupdate -expand -group $group_name -ports tb_floo_axi_chimney/i_floo_axi_chimney_${i}/*

add wave -noupdate -expand -group $group_name -group Arbiter -group ArbiterReq -ports tb_floo_axi_chimney/i_floo_axi_chimney_${i}/i_req_wormhole_arbiter/*
add wave -noupdate -expand -group $group_name -group Arbiter -group ArbiterRsp -ports tb_floo_axi_chimney/i_floo_axi_chimney_${i}/i_rsp_wormhole_arbiter/*

add wave -noupdate -expand -group $group_name -group Arbiter tb_floo_axi_chimney/i_floo_axi_chimney_${i}/aw_w_sel_q
add wave -noupdate -expand -group $group_name -group Arbiter tb_floo_axi_chimney/i_floo_axi_chimney_${i}/aw_w_sel_d

add wave -noupdate -expand -group $group_name -group Packer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/floo_axi_aw
add wave -noupdate -expand -group $group_name -group Packer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/floo_axi_w
add wave -noupdate -expand -group $group_name -group Packer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/floo_axi_b
add wave -noupdate -expand -group $group_name -group Packer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/floo_axi_ar
add wave -noupdate -expand -group $group_name -group Packer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/floo_axi_r

add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_axi_chimney/i_floo_axi_chimney_${i}/axi_unpack_aw
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_axi_chimney/i_floo_axi_chimney_${i}/axi_unpack_w
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_axi_chimney/i_floo_axi_chimney_${i}/axi_unpack_ar
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_axi_chimney/i_floo_axi_chimney_${i}/axi_unpack_b
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_axi_chimney/i_floo_axi_chimney_${i}/axi_unpack_r

add wave -noupdate -expand -group $group_name -group MetaBuffer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/gen_mgr_port/i_floo_meta_buffer/*
try {
add wave -noupdate -expand -group $group_name -group MetaBuffer tb_floo_axi_chimney/i_floo_axi_chimney_${i}/gen_mgr_port/i_floo_meta_buffer/gen_atop_support/*
}

if {$normal_rob} {
add wave -noupdate -expand -group $group_name -group R_RoB -group StatusTable tb_floo_axi_chimney/i_floo_axi_chimney_${i}/gen_rob/i_r_rob/i_floo_rob_status_table/*
add wave -noupdate -expand -group $group_name -group R_RoB tb_floo_axi_chimney/i_floo_axi_chimney_${i}/gen_rob/i_r_rob/*
} elseif {$simple_rob} {
add wave -noupdate -expand -group $group_name -group R_RoB tb_floo_axi_chimney/i_floo_axi_chimney_${i}/gen_simple_rob/i_r_rob/*
} else {
add wave -noupdate -expand -group $group_name -group R_RoB tb_floo_axi_chimney/i_floo_axi_chimney_${i}/i_r_rob/*
}

add wave -noupdate -expand -group $group_name -group B_RoB tb_floo_axi_chimney/i_floo_axi_chimney_${i}/i_b_rob/*

set name [list "Chimney ${i}"]
set dut tb_floo_axi_chimney/i_floo_axi_chimney_${i}
floo_axi_chimney_wave $dut $name
}

TreeUpdate [SetDefaultTree]
quietly wave cursor active 1
configure wave -namecolwidth 220
configure wave -valuecolwidth 110
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 1
configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
floo_wave_style
41 changes: 12 additions & 29 deletions hw/tb/wave/tb_floo_dma_mesh.wave.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51

onerror {resume}
quietly WaveActivateNextPane {} 0
source hw/tb/wave/wave.tcl

delete wave *
floo_wave_init

set tb_name tb_floo_dma_mesh

Expand All @@ -15,44 +14,28 @@ set num_x [regexp -all {y\[0\]} $routers]

for {set y 0} {$y < $num_y} {incr y} {
for {set x 0} {$x < $num_x} {incr x} {
add wave -noupdate -expand -group "Node" -group "X=${x}" -group "Y=${y}" -expand -group Chimney -ports $tb_name/gen_x[$x]/gen_y[$y]/i_dma_chimney/*
add wave -noupdate -expand -group "Node" -group "X=${x}" -group "Y=${y}" -expand -group Router -ports $tb_name/gen_x[$x]/gen_y[$y]/i_router/*
set groups [list Node X=${x} Y=${y}]
floo_narrow_wide_chimney_wave $tb_name/gen_x[$x]/gen_y[$y]/i_dma_chimney [concat $groups [list Chimney]]
floo_router_wave $tb_name/gen_x[$x]/gen_y[$y]/i_router [concat $groups [list Router]]

add wave -noupdate -expand -group "Node" -group "X=${x}" -group "Y=${y}" $tb_name/gen_x[$x]/gen_y[$y]/i_axi_narrow_bw_monitor/ar_in_flight_o
add wave -noupdate -expand -group "Node" -group "X=${x}" -group "Y=${y}" $tb_name/gen_x[$x]/gen_y[$y]/i_axi_wide_bw_monitor/ar_in_flight_o
add wave -noupdate -expand -group "Node" -group "X=${x}" -group "Y=${y}" $tb_name/gen_x[$x]/gen_y[$y]/i_axi_narrow_bw_monitor/aw_in_flight_o
add wave -noupdate -expand -group "Node" -group "X=${x}" -group "Y=${y}" $tb_name/gen_x[$x]/gen_y[$y]/i_axi_wide_bw_monitor/aw_in_flight_o
floo_add_wave $tb_name/gen_x[$x]/gen_y[$y]/i_axi_narrow_bw_monitor/*in_flight_o $groups 1
floo_add_wave $tb_name/gen_x[$x]/gen_y[$y]/i_axi_wide_bw_monitor/*in_flight_o $groups 1
}
}

for {set y 0} {$y < $num_y} {incr y} {
# East
add wave -noupdate -expand -group HBM -group East -group "Channel ${y}" -ports $tb_name/gen_hbm_chimneys[2]/i_hbm_chimney[$y]/*
floo_narrow_wide_chimney_wave $tb_name/gen_hbm_chimneys[2]/i_hbm_chimney[$y] [list HBM East "Channel ${y}" Chimney] 1
# West
add wave -noupdate -expand -group HBM -group West -group "Channel ${y}" -ports $tb_name/gen_hbm_chimneys[4]/i_hbm_chimney[$y]/*
floo_narrow_wide_chimney_wave $tb_name/gen_hbm_chimneys[4]/i_hbm_chimney[$y] [list HBM West "Channel ${y}" Chimney] 1

}

for {set x 0} {$x < $num_x} {incr x} {
# North
add wave -noupdate -expand -group HBM -group North -group "Channel ${x}" -ports $tb_name/gen_hbm_chimneys[1]/i_hbm_chimney[$x]/*
floo_narrow_wide_chimney_wave $tb_name/gen_hbm_chimneys[1]/i_hbm_chimney[$x] [list HBM North "Channel ${x}" Chimney] 1
# South
add wave -noupdate -expand -group HBM -group South -group "Channel ${x}" -ports $tb_name/gen_hbm_chimneys[3]/i_hbm_chimney[$x]/*
floo_narrow_wide_chimney_wave $tb_name/gen_hbm_chimneys[3]/i_hbm_chimney[$x] [list HBM South "Channel ${x}" Chimney] 1
}

TreeUpdate [SetDefaultTree]
quietly wave cursor active 1
configure wave -namecolwidth 220
configure wave -valuecolwidth 110
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 1
configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
floo_wave_style
32 changes: 8 additions & 24 deletions hw/tb/wave/tb_floo_dma_nw_chimney.wave.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,14 @@
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51

onerror {resume}
quietly WaveActivateNextPane {} 0
source hw/tb/wave/wave.tcl

delete wave *
floo_wave_init

add wave -noupdate -expand -group {DMA 0} -expand -group {WIDE} tb_floo_dma_nw_chimney/i_wide_dma_node_0/*
add wave -noupdate -expand -group {DMA 0} -expand -group {NARROW} tb_floo_dma_nw_chimney/i_narrow_dma_node_0/*
add wave -noupdate -expand -group {DMA 1} -expand -group {WIDE} tb_floo_dma_nw_chimney/i_wide_dma_node_1/*
add wave -noupdate -expand -group {DMA 1} -expand -group {NARROW} tb_floo_dma_nw_chimney/i_narrow_dma_node_1/*
for {set i 0} {$i < 2} {incr i} {
set name [list "Chimney $i"]
set dut tb_floo_dma_nw_chimney/i_floo_narrow_wide_chimney_${i}
floo_narrow_wide_chimney_wave $dut $name
}


TreeUpdate [SetDefaultTree]
quietly wave cursor active 1
configure wave -namecolwidth 220
configure wave -valuecolwidth 110
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 1
configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
floo_wave_style
85 changes: 5 additions & 80 deletions hw/tb/wave/tb_floo_narrow_wide_chimney.wave.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,88 +2,13 @@
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51

onerror {resume}
quietly WaveActivateNextPane {} 0
source hw/tb/wave/wave.tcl

delete wave *

set num_phys_channels [expr [llength [find instances -bydu floo_wormhole_arbiter]] / 2 / 2]
set normal_rob [expr [llength [find instances -bydu floo_rob]] / 2 == 4]
set simple_rob [expr [llength [find instances -bydu floo_simple_rob]] / 2 == 4]
floo_wave_init

for {set i 0} {$i < 2} {incr i} {
set group_name "Adapter $i"

add wave -noupdate -expand -group $group_name -ports tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/*

add wave -noupdate -expand -group $group_name -group Arbiter -group ArbiterNarrowReq -ports tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_req_wormhole_arbiter/*
add wave -noupdate -expand -group $group_name -group Arbiter -group ArbiterNarrowRsp -ports tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_rsp_wormhole_arbiter/*
add wave -noupdate -expand -group $group_name -group Arbiter -group ArbiterWideReq -ports tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_wide_wormhole_arbiter/*

add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_narrow_aw
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_narrow_w
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_narrow_b
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_narrow_ar
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_narrow_r
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_wide_aw
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_wide_w
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_wide_b
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_wide_ar
add wave -noupdate -expand -group $group_name -group Packer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/floo_wide_r

add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_valid_in
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_ready_out
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_narrow_unpack_aw
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_narrow_unpack_w
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_narrow_unpack_ar
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_narrow_unpack_b
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_narrow_unpack_r
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_wide_unpack_aw
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_wide_unpack_w
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_wide_unpack_ar
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_wide_unpack_b
add wave -noupdate -expand -group $group_name -group Unpacker tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/axi_wide_unpack_r

if {$normal_rob} {
add wave -noupdate -expand -group $group_name -group NarrowR_RoB -group StatusTable tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_narrow_rob/i_narrow_r_rob/i_floo_rob_status_table/*
add wave -noupdate -expand -group $group_name -group NarrowR_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_narrow_rob/i_narrow_r_rob/*
add wave -noupdate -expand -group $group_name -group WideR_RoB -group StatusTable tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_wide_rob/i_wide_r_rob/i_floo_rob_status_table/*
add wave -noupdate -expand -group $group_name -group WideR_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_wide_rob/i_wide_r_rob/*
} elseif {$simple_rob} {
add wave -noupdate -expand -group $group_name -group NarrowR_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_simple_rob/i_narrow_r_rob/*
add wave -noupdate -expand -group $group_name -group WideR_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_simple_rob/i_wide_r_rob/*
} else {
add wave -noupdate -expand -group $group_name -group NarrowR_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_narrow_r_rob/*
add wave -noupdate -expand -group $group_name -group WideR_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_wide_r_rob/*
}

add wave -noupdate -expand -group $group_name -group NarrowB_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_narrow_b_rob/*
add wave -noupdate -expand -group $group_name -group WideB_RoB tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/i_wide_b_rob/*

add wave -noupdate -expand -group $group_name -group NarrowMetaBuffer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_narrow_mgr_port/i_narrow_meta_buffer/*
try {
add wave -noupdate -expand -group $group_name -group NarrowMetaBuffer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_narrow_mgr_port/i_narrow_meta_buffer/gen_atop_support/*
}
add wave -noupdate -expand -group $group_name -group WideMetaBuffer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_wide_mgr_port/i_wide_meta_buffer/*
try {
add wave -noupdate -expand -group $group_name -group WideMetaBuffer tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i}/gen_wide_mgr_port/i_wide_meta_buffer/gen_atop_support/*
}

set name [list "Chimney $i"]
floo_narrow_wide_chimney_wave tb_floo_narrow_wide_chimney/i_floo_narrow_wide_chimney_${i} $name
}

TreeUpdate [SetDefaultTree]
quietly wave cursor active 1
configure wave -namecolwidth 220
configure wave -valuecolwidth 110
configure wave -justifyvalue left
configure wave -signalnamewidth 1
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 1
configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
floo_wave_style
Loading

0 comments on commit e96eec5

Please sign in to comment.