怎麼 Dinotrace 的 widgets 是如此的醜陋,如果你習慣了Debussy/Verdi 的介面,建議還是用 GTKwave 比較好看的多...不過基於研究的出發點,底下我們就針對幾個topics來討論.
1.VCD format:
//定義 create date or modify date
$date
Mon Jun 15 17:13:54 1998
$end
//定義 VCD Version
$version
Chronologic Simulation VCS version 4.0.3
$end
//定義 timescale (時間的刻度)
$timescale
1ns
$end
//定義 Port range && key map
//ex: $var reg 1 ! clk $end
//代表 signal name (clk), range 1 bit, key value "!"
$scope module benchx $end
$var reg 1 ! clk $end
$var reg 11 " count [10:0] $end
$var reg 1 # toggle_01 $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
x! //clk =x @0
x# //toggle_01=x @0
bxxxxxxxxxxx " //count =bxxxxxxxxxxx @0
$end
#5
0! //clk =0 @5
#10
1! //clk =1 @10
z#
#15
0!
#20
1!
#25
0!
b00000000000 "
0#
//ps: 如果沒有定義,就接續上個定義的data.
2. widgets :
這邊用 GTK 當sample...
GtkWidget *window;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); //建立window
gtk_widget_set_usize (GTK_WIDGET (window), 200, 100);//設定大小
gtk_window_set_title (GTK_WINDOW (window), "GTK Menu Test");//name
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) gtk_main_quit, NULL); //關閉鈕
....
gtk_widget_show (window); //show window
Menu Widget
了解VCD file format and Widgets 之後,其實剩下的就只是GUI interface的建立.如button + event + menu + widgets + VCD file parser 的結合.
Refs:
VCD file format
Waveform_viewer
verdi tutorial
SpringSoft
沒有留言:
張貼留言