Jump to content

Build Failed in Eclipse Windows with SystemC 2.3.3


omaima

Recommended Posts

Hi everyone 

I'm new in systemc ,I'm trying to design (and gate) and create vcd file for simulation 

and when build project I got on these error 

 

??:??:?? **** Incremental Build of configuration Debug for project and_get ****
make all 
Building file: ../and_test.cpp
Invoking: Cygwin C++ Compiler
g++ -I"C:\Users\ALTQNIA\Desktop\systemc-2.3.3\systemc-2.3.3\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"and_test.d" -MT"and_test.o" -o "and_test.o" "../and_test.cpp"
../and_test.cpp:2:9: fatal error: andh2.h: No such file or directory
    2 | #include<andh2.h>
      |         ^~~~~~~~~
compilation terminated.
make: *** [subdir.mk:20: and_test.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

??:??:?? Build Failed. 2 errors, 0 warnings. (took 10s.595ms)

 these is my code

///////////////////////////////////////////////////////////////////////////////

andh2.h

#include"systemc.h"
SC_MODULE(andh2){
    sc_in<bool> a;
    sc_in<bool> b;
    sc_out<bool> o;
    void and_process(){
        o.write(a.read()&&b.read());

    }
    SC_CTOR(andh2){
        SC_METHOD(and_process);
        sensitive<<a<<b;
    }

};
 

//////////////////////////////////////////////////////////////

and_test/cpp

#include<systemc.h>
#include<andh2.h>
void sc_main(int argc, char* argv[]) {
    andh2 and1("and1"),and2("and2"),and3("and3");

    sc_signal<bool> A,B,O;

    and1.a(A);
    and2.b(B);
    and1.o(O);

    sc_start(SC_ZERO_TIME);

    sc_trace_file *tf=sc_create_vcd_trace_file("trace");

    tf->set_time_unit(1,SC_NS);

    sc_trace(tf,A,"A");sc_trace(tf,B,"B");

    sc_trace(tf,O,"O");

    A=0;B=0;

    sc_start(10,SC_NS);

    for(int i=0;i<10;i++){
        A=((i& 0*1)!=0);
        B=((i& 0*2)!=0);
        sc_start(10,SC_NS);
    }

    sc_close_vcd_trace_file(tf);
    sc_start();

}
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...