?? main.cpp
字號:
//By chenxi,all rights reserved
//main.h
#include <systemc.h>
#include "nand2.h"
#include "tb.h"
int sc_main(int, char**){
sc_signal<bool> a,b,f;
sc_clock clk("Clk",20,SC_NS);
nand2 N2("Nand2");
N2.A(a);
N2.B(b);
N2.F(f);
tb tb1("tb");
tb1.clk(clk);
tb1.a(a);
tb1.b(b);
tb1.f(f);
// trace file creation
sc_trace_file *tf = sc_create_vcd_trace_file("Nand2");
sc_trace(tf,N2.A, "A");
sc_trace(tf,N2.B, "B");
sc_trace(tf,N2.F, "F");
sc_start(200);
sc_close_vcd_trace_file(tf);
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -