ModelSimでtcl（.do）ファイルからWaveformを生成する

# はじめに
ModelSimでシミュレーションするとき、GUI上で波形を追加、名前の編集をするよりtcl（.do）スクリプトで実行したほうが楽だったので共有します。
tcl（.do）ファイルを使えば、いつでも同じWaveformを生成することができます。

# Waveformを保存する
tcl（.do）ファイルを1から記述するより、適当なひな形から修正したほうが楽です。
ModelSimでWave画面がアクティブの状態で、「File」－「Save Format」を選択し、波形表示するdoファイルを保存します。

# wave.doの中身
ModelSimに対し、表示波形を追加するtclコマンドが並んでいます。
```
onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate /tb_sim/m1_n
add wave -noupdate /tb_sim/mreq_n
add wave -noupdate /tb_sim/iorq_n
add wave -noupdate /tb_sim/rd_n
add wave -noupdate /tb_sim/wr_n
```
# Waveformを呼び出す
Transcript画面で、.doファイルを実行します。
```
> do wave.do
```

# 信号名を設定する
ラベルを設定していない状態では、波形ウィンドウに信号のフルパスが表示され見づらいです。
このため、ラベルを設定し、わかりやすい信号表示しにします。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/330042/70f44489-85b5-b9c6-97e5-7dfea73b0f08.png)
```
add wave -noupdate -label m1_n /tb_sim/m1_n
add wave -noupdate -label mreq_n /tb_sim/mreq_n
add wave -noupdate -label iorq_n /tb_sim/iorq_n
add wave -noupdate -label rd_n /tb_sim/rd_n
add wave -noupdate -label wr_n /tb_sim/wr_n
```

# 基数を設定する
指定しないとbit表示で見づらいため、とりあえず16進にしておきます。
```
add wave -noupdate -radix hexadecimal -label m1_n /tb_sim/m1_n
add wave -noupdate -radix hexadecimal -label mreq_n /tb_sim/mreq_n
add wave -noupdate -radix hexadecimal -label iorq_n /tb_sim/iorq_n
add wave -noupdate -radix hexadecimal -label rd_n /tb_sim/rd_n
add wave -noupdate -radix hexadecimal -label wr_n /tb_sim/wr_n
```

# グループをつくる
階層構造で見やすくするためにグループを作成します。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/330042/8db1b3af-a412-f08d-f1e4-01e5e4955d7b.png)

```
add wave -noupdate -group {BUS} -radix hexadecimal -label m1_n /tb_sim/m1_n
add wave -noupdate -group {BUS} -radix hexadecimal -label mreq_n /tb_sim/mreq_n
add wave -noupdate -group {BUS} -radix hexadecimal -label iorq_n /tb_sim/iorq_n
add wave -noupdate -group {BUS} -radix hexadecimal -label rd_n /tb_sim/rd_n
add wave -noupdate -group {BUS} -radix hexadecimal -label wr_n /tb_sim/wr_n
```

# グループをネストする
グループはネストすることができます
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/330042/a125838b-59a0-d738-25a9-8d323767d87b.png)
```add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label MCycles /tb_sim/z80_core/i_tv80_core/i_mcode/MCycles
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label TStates /tb_sim/z80_core/i_tv80_core/i_mcode/TStates
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Prefix /tb_sim/z80_core/i_tv80_core/i_mcode/Prefix
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Inc_PC /tb_sim/z80_core/i_tv80_core/i_mcode/Inc_PC
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Inc_WZ /tb_sim/z80_core/i_tv80_core/i_mcode/Inc_WZ
```

# シミュレーションを実行する
以下のコマンドを実行します。
```
restart
add wave -r *
run -all
```
```restart```は、シミュレーションをリセットします。
```add wave -r *```はシミュレーション波形にすべての信号を追加します。必要に応じて実行します。

# おわりに
今回作成したtclコマンドは以下の通りです。
<details><summary>wave.do</summary>

```
onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate -group {BUS} -radix hexadecimal -label busak_n /tb_sim/busak_n
add wave -noupdate -group {BUS} -radix hexadecimal -label busrq_n /tb_sim/busrq_n
add wave -noupdate -group {BUS} -radix hexadecimal -label clk_i /tb_sim/clk_i
add wave -noupdate -group {BUS} -radix hexadecimal -label halt_n /tb_sim/halt_n
add wave -noupdate -group {BUS} -radix hexadecimal -label int_n /tb_sim/int_n
add wave -noupdate -group {BUS} -radix hexadecimal -label iorq_n /tb_sim/iorq_n
add wave -noupdate -group {BUS} -radix hexadecimal -label m1_n /tb_sim/m1_n
add wave -noupdate -group {BUS} -radix hexadecimal -label mreq_n /tb_sim/mreq_n
add wave -noupdate -group {BUS} -radix hexadecimal -label nmi_n /tb_sim/nmi_n
add wave -noupdate -group {BUS} -radix hexadecimal -label nrst_i /tb_sim/nrst_i
add wave -noupdate -group {BUS} -radix hexadecimal -label rd_n /tb_sim/rd_n
add wave -noupdate -group {BUS} -radix hexadecimal -label rfsh_n /tb_sim/rfsh_n
add wave -noupdate -group {BUS} -radix hexadecimal -label tv80_adr /tb_sim/tv80_adr
add wave -noupdate -group {BUS} -radix hexadecimal -label tv80_dat_i /tb_sim/tv80_dat_i
add wave -noupdate -group {BUS} -radix hexadecimal -label tv80_dat_o /tb_sim/tv80_dat_o
add wave -noupdate -group {BUS} -radix hexadecimal -label wait_n /tb_sim/wait_n
add wave -noupdate -group {BUS} -radix hexadecimal -label wr_n /tb_sim/wr_n
add wave -noupdate -group {CORE} -radix hexadecimal -label A /tb_sim/z80_core/i_tv80_core/A
add wave -noupdate -group {CORE} -radix hexadecimal -label ACC /tb_sim/z80_core/i_tv80_core/ACC
add wave -noupdate -group {CORE} -radix hexadecimal -label Alternate /tb_sim/z80_core/i_tv80_core/Alternate
add wave -noupdate -group {CORE} -radix hexadecimal -label ALU_Op /tb_sim/z80_core/i_tv80_core/ALU_Op
add wave -noupdate -group {CORE} -radix hexadecimal -label ALU_Op_r /tb_sim/z80_core/i_tv80_core/ALU_Op_r
add wave -noupdate -group {CORE} -radix hexadecimal -label ALU_Q /tb_sim/z80_core/i_tv80_core/ALU_Q
add wave -noupdate -group {CORE} -radix hexadecimal -label Ap /tb_sim/z80_core/i_tv80_core/Ap
add wave -noupdate -group {CORE} -radix hexadecimal -label Arith16 /tb_sim/z80_core/i_tv80_core/Arith16
add wave -noupdate -group {CORE} -radix hexadecimal -label Arith16_r /tb_sim/z80_core/i_tv80_core/Arith16_r
add wave -noupdate -group {CORE} -radix hexadecimal -label Auto_Wait /tb_sim/z80_core/i_tv80_core/Auto_Wait
add wave -noupdate -group {CORE} -radix hexadecimal -label Auto_Wait_t1 /tb_sim/z80_core/i_tv80_core/Auto_Wait_t1
add wave -noupdate -group {CORE} -radix hexadecimal -label Auto_Wait_t2 /tb_sim/z80_core/i_tv80_core/Auto_Wait_t2
add wave -noupdate -group {CORE} -radix hexadecimal -label BTR_r /tb_sim/z80_core/i_tv80_core/BTR_r
add wave -noupdate -group {CORE} -radix hexadecimal -label BusA /tb_sim/z80_core/i_tv80_core/BusA
add wave -noupdate -group {CORE} -radix hexadecimal -label BusAck /tb_sim/z80_core/i_tv80_core/BusAck
add wave -noupdate -group {CORE} -radix hexadecimal -label busak_n /tb_sim/z80_core/i_tv80_core/busak_n
add wave -noupdate -group {CORE} -radix hexadecimal -label BusB /tb_sim/z80_core/i_tv80_core/BusB
add wave -noupdate -group {CORE} -radix hexadecimal -label BusReq_s /tb_sim/z80_core/i_tv80_core/BusReq_s
add wave -noupdate -group {CORE} -radix hexadecimal -label busrq_n /tb_sim/z80_core/i_tv80_core/busrq_n
add wave -noupdate -group {CORE} -radix hexadecimal -label Call /tb_sim/z80_core/i_tv80_core/Call
add wave -noupdate -group {CORE} -radix hexadecimal -label cen /tb_sim/z80_core/i_tv80_core/cen
add wave -noupdate -group {CORE} -radix hexadecimal -label clk /tb_sim/z80_core/i_tv80_core/clk
add wave -noupdate -group {CORE} -radix hexadecimal -label ClkEn /tb_sim/z80_core/i_tv80_core/ClkEn
add wave -noupdate -group {CORE} -radix hexadecimal -label di /tb_sim/z80_core/i_tv80_core/di
add wave -noupdate -group {CORE} -radix hexadecimal -label DI_Reg /tb_sim/z80_core/i_tv80_core/DI_Reg
add wave -noupdate -group {CORE} -radix hexadecimal -label dinst /tb_sim/z80_core/i_tv80_core/dinst
add wave -noupdate -group {CORE} -radix hexadecimal -label dout /tb_sim/z80_core/i_tv80_core/dout
add wave -noupdate -group {CORE} -radix hexadecimal -label ExchangeAF /tb_sim/z80_core/i_tv80_core/ExchangeAF
add wave -noupdate -group {CORE} -radix hexadecimal -label ExchangeDH /tb_sim/z80_core/i_tv80_core/ExchangeDH
add wave -noupdate -group {CORE} -radix hexadecimal -label ExchangeRp /tb_sim/z80_core/i_tv80_core/ExchangeRp
add wave -noupdate -group {CORE} -radix hexadecimal -label ExchangeRS /tb_sim/z80_core/i_tv80_core/ExchangeRS
add wave -noupdate -group {CORE} -radix hexadecimal -label F /tb_sim/z80_core/i_tv80_core/F
add wave -noupdate -group {CORE} -radix hexadecimal -label F_Out /tb_sim/z80_core/i_tv80_core/F_Out
add wave -noupdate -group {CORE} -radix hexadecimal -label Fp /tb_sim/z80_core/i_tv80_core/Fp
add wave -noupdate -group {CORE} -radix hexadecimal -label Halt /tb_sim/z80_core/i_tv80_core/Halt
add wave -noupdate -group {CORE} -radix hexadecimal -label Halt_FF /tb_sim/z80_core/i_tv80_core/Halt_FF
add wave -noupdate -group {CORE} -radix hexadecimal -label halt_n /tb_sim/z80_core/i_tv80_core/halt_n
add wave -noupdate -group {CORE} -radix hexadecimal -label I /tb_sim/z80_core/i_tv80_core/I
add wave -noupdate -group {CORE} -radix hexadecimal -label I_BC /tb_sim/z80_core/i_tv80_core/I_BC
add wave -noupdate -group {CORE} -radix hexadecimal -label I_BT /tb_sim/z80_core/i_tv80_core/I_BT
add wave -noupdate -group {CORE} -radix hexadecimal -label I_BTR /tb_sim/z80_core/i_tv80_core/I_BTR
add wave -noupdate -group {CORE} -radix hexadecimal -label I_CCF /tb_sim/z80_core/i_tv80_core/I_CCF
add wave -noupdate -group {CORE} -radix hexadecimal -label I_CPL /tb_sim/z80_core/i_tv80_core/I_CPL
add wave -noupdate -group {CORE} -radix hexadecimal -label I_DJNZ /tb_sim/z80_core/i_tv80_core/I_DJNZ
add wave -noupdate -group {CORE} -radix hexadecimal -label I_INRC /tb_sim/z80_core/i_tv80_core/I_INRC
add wave -noupdate -group {CORE} -radix hexadecimal -label I_RETN /tb_sim/z80_core/i_tv80_core/I_RETN
add wave -noupdate -group {CORE} -radix hexadecimal -label I_RLD /tb_sim/z80_core/i_tv80_core/I_RLD
add wave -noupdate -group {CORE} -radix hexadecimal -label I_RRD /tb_sim/z80_core/i_tv80_core/I_RRD
add wave -noupdate -group {CORE} -radix hexadecimal -label I_SCF /tb_sim/z80_core/i_tv80_core/I_SCF
add wave -noupdate -group {CORE} -radix hexadecimal -label ID16 /tb_sim/z80_core/i_tv80_core/ID16
add wave -noupdate -group {CORE} -radix hexadecimal -label ID16_B /tb_sim/z80_core/i_tv80_core/ID16_B
add wave -noupdate -group {CORE} -radix hexadecimal -label IMode /tb_sim/z80_core/i_tv80_core/IMode
add wave -noupdate -group {CORE} -radix hexadecimal -label Inc_PC /tb_sim/z80_core/i_tv80_core/Inc_PC
add wave -noupdate -group {CORE} -radix hexadecimal -label Inc_WZ /tb_sim/z80_core/i_tv80_core/Inc_WZ
add wave -noupdate -group {CORE} -radix hexadecimal -label IncDec_16 /tb_sim/z80_core/i_tv80_core/IncDec_16
add wave -noupdate -group {CORE} -radix hexadecimal -label IncDecZ /tb_sim/z80_core/i_tv80_core/IncDecZ
add wave -noupdate -group {CORE} -radix hexadecimal -label int_n /tb_sim/z80_core/i_tv80_core/int_n
add wave -noupdate -group {CORE} -radix hexadecimal -label INT_s /tb_sim/z80_core/i_tv80_core/INT_s
add wave -noupdate -group {CORE} -radix hexadecimal -label IntCycle /tb_sim/z80_core/i_tv80_core/IntCycle
add wave -noupdate -group {CORE} -radix hexadecimal -label intcycle_n /tb_sim/z80_core/i_tv80_core/intcycle_n
add wave -noupdate -group {CORE} -radix hexadecimal -label IntE /tb_sim/z80_core/i_tv80_core/IntE
add wave -noupdate -group {CORE} -radix hexadecimal -label IntE_FF1 /tb_sim/z80_core/i_tv80_core/IntE_FF1
add wave -noupdate -group {CORE} -radix hexadecimal -label IntE_FF2 /tb_sim/z80_core/i_tv80_core/IntE_FF2
add wave -noupdate -group {CORE} -radix hexadecimal -label iorq /tb_sim/z80_core/i_tv80_core/iorq
add wave -noupdate -group {CORE} -radix hexadecimal -label iorq_i /tb_sim/z80_core/i_tv80_core/iorq_i
add wave -noupdate -group {CORE} -radix hexadecimal -label IR /tb_sim/z80_core/i_tv80_core/IR
add wave -noupdate -group {CORE} -radix hexadecimal -label ISet /tb_sim/z80_core/i_tv80_core/ISet
add wave -noupdate -group {CORE} -radix hexadecimal -label IStatus /tb_sim/z80_core/i_tv80_core/IStatus
add wave -noupdate -group {CORE} -radix hexadecimal -label Jump /tb_sim/z80_core/i_tv80_core/Jump
add wave -noupdate -group {CORE} -radix hexadecimal -label JumpE /tb_sim/z80_core/i_tv80_core/JumpE
add wave -noupdate -group {CORE} -radix hexadecimal -label JumpXY /tb_sim/z80_core/i_tv80_core/JumpXY
add wave -noupdate -group {CORE} -radix hexadecimal -label last_mcycle /tb_sim/z80_core/i_tv80_core/last_mcycle
add wave -noupdate -group {CORE} -radix hexadecimal -label last_tstate /tb_sim/z80_core/i_tv80_core/last_tstate
add wave -noupdate -group {CORE} -radix hexadecimal -label LDSPHL /tb_sim/z80_core/i_tv80_core/LDSPHL
add wave -noupdate -group {CORE} -radix hexadecimal -label LDW /tb_sim/z80_core/i_tv80_core/LDW
add wave -noupdate -group {CORE} -radix hexadecimal -label LDZ /tb_sim/z80_core/i_tv80_core/LDZ
add wave -noupdate -group {CORE} -radix hexadecimal -label m1_n /tb_sim/z80_core/i_tv80_core/m1_n
add wave -noupdate -group {CORE} -radix hexadecimal -label mc /tb_sim/z80_core/i_tv80_core/mc
add wave -noupdate -group {CORE} -radix hexadecimal -label mcycle /tb_sim/z80_core/i_tv80_core/mcycle
add wave -noupdate -group {CORE} -radix hexadecimal -label mcycles /tb_sim/z80_core/i_tv80_core/mcycles
add wave -noupdate -group {CORE} -radix hexadecimal -label mcycles_d /tb_sim/z80_core/i_tv80_core/mcycles_d
add wave -noupdate -group {CORE} -radix hexadecimal -label NextIs_XY_Fetch /tb_sim/z80_core/i_tv80_core/NextIs_XY_Fetch
add wave -noupdate -group {CORE} -radix hexadecimal -label nmi_n /tb_sim/z80_core/i_tv80_core/nmi_n
add wave -noupdate -group {CORE} -radix hexadecimal -label NMI_s /tb_sim/z80_core/i_tv80_core/NMI_s
add wave -noupdate -group {CORE} -radix hexadecimal -label NMICycle /tb_sim/z80_core/i_tv80_core/NMICycle
add wave -noupdate -group {CORE} -radix hexadecimal -label No_BTR /tb_sim/z80_core/i_tv80_core/No_BTR
add wave -noupdate -group {CORE} -radix hexadecimal -label no_read /tb_sim/z80_core/i_tv80_core/no_read
add wave -noupdate -group {CORE} -radix hexadecimal -label Oldnmi_n /tb_sim/z80_core/i_tv80_core/Oldnmi_n
add wave -noupdate -group {CORE} -radix hexadecimal -label PC /tb_sim/z80_core/i_tv80_core/PC
add wave -noupdate -group {CORE} -radix hexadecimal -label PC16 /tb_sim/z80_core/i_tv80_core/PC16
add wave -noupdate -group {CORE} -radix hexadecimal -label PC16_B /tb_sim/z80_core/i_tv80_core/PC16_B
add wave -noupdate -group {CORE} -radix hexadecimal -label Pre_XY_F_M /tb_sim/z80_core/i_tv80_core/Pre_XY_F_M
add wave -noupdate -group {CORE} -radix hexadecimal -label Prefix /tb_sim/z80_core/i_tv80_core/Prefix
add wave -noupdate -group {CORE} -radix hexadecimal -label PreserveC /tb_sim/z80_core/i_tv80_core/PreserveC
add wave -noupdate -group {CORE} -radix hexadecimal -label PreserveC_r /tb_sim/z80_core/i_tv80_core/PreserveC_r
add wave -noupdate -group {CORE} -radix hexadecimal -label Read_To_Acc /tb_sim/z80_core/i_tv80_core/Read_To_Acc
add wave -noupdate -group {CORE} -radix hexadecimal -label Read_To_Reg /tb_sim/z80_core/i_tv80_core/Read_To_Reg
add wave -noupdate -group {CORE} -radix hexadecimal -label Read_To_Reg_r /tb_sim/z80_core/i_tv80_core/Read_To_Reg_r
add wave -noupdate -group {CORE} -radix hexadecimal -label RegAddrA /tb_sim/z80_core/i_tv80_core/RegAddrA
add wave -noupdate -group {CORE} -radix hexadecimal -label RegAddrA_r /tb_sim/z80_core/i_tv80_core/RegAddrA_r
add wave -noupdate -group {CORE} -radix hexadecimal -label RegAddrB /tb_sim/z80_core/i_tv80_core/RegAddrB
add wave -noupdate -group {CORE} -radix hexadecimal -label RegAddrB_r /tb_sim/z80_core/i_tv80_core/RegAddrB_r
add wave -noupdate -group {CORE} -radix hexadecimal -label RegAddrC /tb_sim/z80_core/i_tv80_core/RegAddrC
add wave -noupdate -group {CORE} -radix hexadecimal -label RegBusA /tb_sim/z80_core/i_tv80_core/RegBusA
add wave -noupdate -group {CORE} -radix hexadecimal -label RegBusA_r /tb_sim/z80_core/i_tv80_core/RegBusA_r
add wave -noupdate -group {CORE} -radix hexadecimal -label RegBusB /tb_sim/z80_core/i_tv80_core/RegBusB
add wave -noupdate -group {CORE} -radix hexadecimal -label RegBusC /tb_sim/z80_core/i_tv80_core/RegBusC
add wave -noupdate -group {CORE} -radix hexadecimal -label RegDIH /tb_sim/z80_core/i_tv80_core/RegDIH
add wave -noupdate -group {CORE} -radix hexadecimal -label RegDIL /tb_sim/z80_core/i_tv80_core/RegDIL
add wave -noupdate -group {CORE} -radix hexadecimal -label RegWEH /tb_sim/z80_core/i_tv80_core/RegWEH
add wave -noupdate -group {CORE} -radix hexadecimal -label RegWEL /tb_sim/z80_core/i_tv80_core/RegWEL
add wave -noupdate -group {CORE} -radix hexadecimal -label reset_n /tb_sim/z80_core/i_tv80_core/reset_n
add wave -noupdate -group {CORE} -radix hexadecimal -label rfsh_n /tb_sim/z80_core/i_tv80_core/rfsh_n
add wave -noupdate -group {CORE} -radix hexadecimal -label RstP /tb_sim/z80_core/i_tv80_core/RstP
add wave -noupdate -group {CORE} -radix hexadecimal -label Save_ALU /tb_sim/z80_core/i_tv80_core/Save_ALU
add wave -noupdate -group {CORE} -radix hexadecimal -label Save_ALU_r /tb_sim/z80_core/i_tv80_core/Save_ALU_r
add wave -noupdate -group {CORE} -radix hexadecimal -label Save_Mux /tb_sim/z80_core/i_tv80_core/Save_Mux
add wave -noupdate -group {CORE} -radix hexadecimal -label Set_Addr_To /tb_sim/z80_core/i_tv80_core/Set_Addr_To
add wave -noupdate -group {CORE} -radix hexadecimal -label Set_BusA_To /tb_sim/z80_core/i_tv80_core/Set_BusA_To
add wave -noupdate -group {CORE} -radix hexadecimal -label Set_BusB_To /tb_sim/z80_core/i_tv80_core/Set_BusB_To
add wave -noupdate -group {CORE} -radix hexadecimal -label SetDI /tb_sim/z80_core/i_tv80_core/SetDI
add wave -noupdate -group {CORE} -radix hexadecimal -label SetEI /tb_sim/z80_core/i_tv80_core/SetEI
add wave -noupdate -group {CORE} -radix hexadecimal -label SP /tb_sim/z80_core/i_tv80_core/SP
add wave -noupdate -group {CORE} -radix hexadecimal -label SP16 /tb_sim/z80_core/i_tv80_core/SP16
add wave -noupdate -group {CORE} -radix hexadecimal -label SP16_A /tb_sim/z80_core/i_tv80_core/SP16_A
add wave -noupdate -group {CORE} -radix hexadecimal -label SP16_B /tb_sim/z80_core/i_tv80_core/SP16_B
add wave -noupdate -group {CORE} -radix hexadecimal -label Special_LD /tb_sim/z80_core/i_tv80_core/Special_LD
add wave -noupdate -group {CORE} -radix hexadecimal -label stop /tb_sim/z80_core/i_tv80_core/stop
add wave -noupdate -group {CORE} -radix hexadecimal -label T_Res /tb_sim/z80_core/i_tv80_core/T_Res
add wave -noupdate -group {CORE} -radix hexadecimal -label TmpAddr /tb_sim/z80_core/i_tv80_core/TmpAddr
add wave -noupdate -group {CORE} -radix hexadecimal -label ts /tb_sim/z80_core/i_tv80_core/ts
add wave -noupdate -group {CORE} -radix hexadecimal -label tstate /tb_sim/z80_core/i_tv80_core/tstate
add wave -noupdate -group {CORE} -radix hexadecimal -label tstates /tb_sim/z80_core/i_tv80_core/tstates
add wave -noupdate -group {CORE} -radix hexadecimal -label wait_n /tb_sim/z80_core/i_tv80_core/wait_n
add wave -noupdate -group {CORE} -radix hexadecimal -label write /tb_sim/z80_core/i_tv80_core/write
add wave -noupdate -group {CORE} -radix hexadecimal -label XY_Ind /tb_sim/z80_core/i_tv80_core/XY_Ind
add wave -noupdate -group {CORE} -radix hexadecimal -label XY_State /tb_sim/z80_core/i_tv80_core/XY_State
add wave -noupdate -group {CORE} -radix hexadecimal -label Z16_r /tb_sim/z80_core/i_tv80_core/Z16_r
add wave -noupdate -group {i_mcode} -group {|199|} -radix hexadecimal -label DDD /tb_sim/z80_core/i_tv80_core/i_mcode/DDD
add wave -noupdate -group {i_mcode} -group {|199|} -radix hexadecimal -label SSS /tb_sim/z80_core/i_tv80_core/i_mcode/SSS
add wave -noupdate -group {i_mcode} -group {|199|} -radix hexadecimal -label DPAIR /tb_sim/z80_core/i_tv80_core/i_mcode/DPAIR
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -radix hexadecimal -label MCycle /tb_sim/z80_core/i_tv80_core/i_mcode/MCycle
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -radix hexadecimal -label IR /tb_sim/z80_core/i_tv80_core/i_mcode/IR
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -radix hexadecimal -label ISet /tb_sim/z80_core/i_tv80_core/i_mcode/ISet
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -radix hexadecimal -label F /tb_sim/z80_core/i_tv80_core/i_mcode/F
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_C {/tb_sim/z80_core/i_tv80_core/i_mcode/F[0]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_H {/tb_sim/z80_core/i_tv80_core/i_mcode/F[4]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_N {/tb_sim/z80_core/i_tv80_core/i_mcode/F[1]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_P {/tb_sim/z80_core/i_tv80_core/i_mcode/F[2]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_S {/tb_sim/z80_core/i_tv80_core/i_mcode/F[7]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_X {/tb_sim/z80_core/i_tv80_core/i_mcode/F[3]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_Y {/tb_sim/z80_core/i_tv80_core/i_mcode/F[5]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -group {FLAG} -radix hexadecimal -label Flag_Z {/tb_sim/z80_core/i_tv80_core/i_mcode/F[6]}
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -radix hexadecimal -label IntCycle /tb_sim/z80_core/i_tv80_core/i_mcode/IntCycle
add wave -noupdate -group {i_mcode} -group {|199|} -group {input} -radix hexadecimal -label NMICycle /tb_sim/z80_core/i_tv80_core/i_mcode/NMICycle
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label MCycles /tb_sim/z80_core/i_tv80_core/i_mcode/MCycles
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label TStates /tb_sim/z80_core/i_tv80_core/i_mcode/TStates
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Prefix /tb_sim/z80_core/i_tv80_core/i_mcode/Prefix
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Inc_PC /tb_sim/z80_core/i_tv80_core/i_mcode/Inc_PC
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Inc_WZ /tb_sim/z80_core/i_tv80_core/i_mcode/Inc_WZ
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label IncDec_16 /tb_sim/z80_core/i_tv80_core/i_mcode/IncDec_16
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Read_To_Acc /tb_sim/z80_core/i_tv80_core/i_mcode/Read_To_Acc
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Read_To_Reg /tb_sim/z80_core/i_tv80_core/i_mcode/Read_To_Reg
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Set_BusB_To /tb_sim/z80_core/i_tv80_core/i_mcode/Set_BusB_To
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Set_BusA_To /tb_sim/z80_core/i_tv80_core/i_mcode/Set_BusA_To
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label ALU_Op /tb_sim/z80_core/i_tv80_core/i_mcode/ALU_Op
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Save_ALU /tb_sim/z80_core/i_tv80_core/i_mcode/Save_ALU
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label PreserveC /tb_sim/z80_core/i_tv80_core/i_mcode/PreserveC
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Arith16 /tb_sim/z80_core/i_tv80_core/i_mcode/Arith16
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label IORQ /tb_sim/z80_core/i_tv80_core/i_mcode/IORQ
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Set_Addr_To /tb_sim/z80_core/i_tv80_core/i_mcode/Set_Addr_To
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Jump /tb_sim/z80_core/i_tv80_core/i_mcode/Jump
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label JumpE /tb_sim/z80_core/i_tv80_core/i_mcode/JumpE
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label JumpXY /tb_sim/z80_core/i_tv80_core/i_mcode/JumpXY
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Call /tb_sim/z80_core/i_tv80_core/i_mcode/Call
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label RstP /tb_sim/z80_core/i_tv80_core/i_mcode/RstP
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label LDZ /tb_sim/z80_core/i_tv80_core/i_mcode/LDZ
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label LDW /tb_sim/z80_core/i_tv80_core/i_mcode/LDW
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label LDSPHL /tb_sim/z80_core/i_tv80_core/i_mcode/LDSPHL
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Special_LD /tb_sim/z80_core/i_tv80_core/i_mcode/Special_LD
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label ExchangeDH /tb_sim/z80_core/i_tv80_core/i_mcode/ExchangeDH
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label ExchangeRp /tb_sim/z80_core/i_tv80_core/i_mcode/ExchangeRp
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label ExchangeAF /tb_sim/z80_core/i_tv80_core/i_mcode/ExchangeAF
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label ExchangeRS /tb_sim/z80_core/i_tv80_core/i_mcode/ExchangeRS
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_DJNZ /tb_sim/z80_core/i_tv80_core/i_mcode/I_DJNZ
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_CPL /tb_sim/z80_core/i_tv80_core/i_mcode/I_CPL
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_CCF /tb_sim/z80_core/i_tv80_core/i_mcode/I_CCF
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_SCF /tb_sim/z80_core/i_tv80_core/i_mcode/I_SCF
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_RETN /tb_sim/z80_core/i_tv80_core/i_mcode/I_RETN
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_BT /tb_sim/z80_core/i_tv80_core/i_mcode/I_BT
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_BC /tb_sim/z80_core/i_tv80_core/i_mcode/I_BC
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_BTR /tb_sim/z80_core/i_tv80_core/i_mcode/I_BTR
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_RLD /tb_sim/z80_core/i_tv80_core/i_mcode/I_RLD
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_RRD /tb_sim/z80_core/i_tv80_core/i_mcode/I_RRD
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label I_INRC /tb_sim/z80_core/i_tv80_core/i_mcode/I_INRC
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label SetDI /tb_sim/z80_core/i_tv80_core/i_mcode/SetDI
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label SetEI /tb_sim/z80_core/i_tv80_core/i_mcode/SetEI
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label IMode /tb_sim/z80_core/i_tv80_core/i_mcode/IMode
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Halt /tb_sim/z80_core/i_tv80_core/i_mcode/Halt
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label NoRead /tb_sim/z80_core/i_tv80_core/i_mcode/NoRead
add wave -noupdate -group {i_mcode} -group {|199|} -group {output} -radix hexadecimal -label Write /tb_sim/z80_core/i_tv80_core/i_mcode/Write
TreeUpdate [SetDefaultTree]
quietly wave cursor active 1
configure wave -namecolwidth 348
configure wave -valuecolwidth 100
configure wave -justifyvalue left
configure wave -signalnamewidth 0
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
```
</details>