sim_root_tb.do 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #transcript on
  2. if {[file exists rtl_work]} {
  3. vdel -lib rtl_work -all
  4. }
  5. set rootdir [pwd]
  6. puts "Root Directory $rootdir"
  7. vlib rtl_work
  8. vmap work rtl_work
  9. vlog -vlog01compat -work work +incdir+${rootdir}/src/blocks ${rootdir}/src/blocks/pll.v
  10. vlog -vlog01compat -work work +incdir+${rootdir}/db ${rootdir}/db/pll_altpll.v
  11. vlog -sv -work work +incdir+${rootdir}/src ${rootdir}/src/root.sv
  12. vsim -t 1ps -L altera_ver -L lpm_ver -L sgate_ver -L altera_mf_ver -L altera_lnsim_ver -L cycloneive_ver -L rtl_work -L work -voptargs="+acc" root_tb
  13. view structure
  14. view signals
  15. add wave -position end -label CLK50 sim:/root_tb/CLK50
  16. add wave -position end -label MCLK sim:/root_tb/de0nano_0/mclk
  17. add wave -position end -label RESET sim:/root_tb/de0nano_0/reset
  18. add wave -position end -label KEYS sim:/root_tb/KEYS
  19. add wave -position end -label LEDS sim:/root_tb/LEDS
  20. add wave -position end -label SWITCHES sim:/root_tb/SWITCHS
  21. TreeUpdate [SetDefaultTree]
  22. WaveRestoreCursors {{Cursor 1} {0 ps} 0}
  23. quietly wave cursor active 0
  24. configure wave -namecolwidth 150
  25. configure wave -valuecolwidth 100
  26. configure wave -justifyvalue left
  27. configure wave -signalnamewidth 0
  28. configure wave -snapdistance 10
  29. configure wave -datasetprefix 0
  30. configure wave -rowmargin 4
  31. configure wave -childrowmargin 2
  32. configure wave -gridoffset 0
  33. configure wave -gridperiod 1
  34. configure wave -griddelta 40
  35. configure wave -timeline 0
  36. configure wave -timelineunits ns
  37. update
  38. WaveRestoreZoom {0 ps} {1 ns}
  39. run 7000