Error in sc |
您所在的位置:网站首页 › sc_fifo_in › Error in sc |
Hi. I have taken this example from a book and tried to execute it,But i got few errors. I am not able to find a right solution for this one. Can someone please help聽me out with this. I have posted the code below Thank you. //main.cpp #include "systemc" #include "testbench.cpp" #include "adder.cpp" int sc_main(int argc, char *argv[]) { sc_core::sc_fifo fifo(10); testbench tb("test"); tb.TB_a(fifo); tb.TB_b(fifo); tb.TB_OUT(fifo); adder ad("adder"); ad.a(fifo); ad.b(fifo); ad.out(fifo); sc_start(60, sc_core::SC_NS); return 0; } //testbench.cpp #include "systemc" SC_MODULE(testbench) { sc_core::sc_fifo_out TB_a, TB_b; sc_core::sc_fifo_in TB_OUT; void adder() // Testbench { wait(0, sc_core::SC_NS); TB_a = 0; TB_b = 0; wait(5, sc_core::SC_NS); TB_a = 5; TB_b = 0; wait(3, sc_core::SC_NS); TB_a = 5; TB_b = 10; wait(7, sc_core::SC_NS); TB_a = 5; TB_b = 1; } void output() { std::cout |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |