Jump to content

Eth11674

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Eth11674

    ]

    thank you for your time, i just changed the TUV library name to Header.h and Header.cpp . sorry for the ambiguity of my question. the program is worked just fine but as i mentioned before... after executing the project and enter the variables there no "tr.vcd" in project directory. I've searched all the sub-folders. Actually i write a simple SystemC project and i have same problem(No VCD file). then i tested an example from internet it worked all good (with VCD) This my systemC code: #include <systemc.h> //using namespace sc_core; class XORgate : public sc_module { public: sc_in <sc_logic> i1, i2; sc_out <sc_logic> o1; SC_CTOR(XORgate) { SC_METHOD(evl); sensitive << i1, i2; } void evl() { if (i1->read() == i2->read()) o1->write(SC_LOGIC_1); else o1->write(SC_LOGIC_0); } }; class AO2gate : public sc_module { public: sc_in<bool> i1, i2, i3, i4; sc_out <sc_logic> o1; SC_CTOR(AO2gate) { SC_METHOD(evl); sensitive << i1 << i2 << i3 << i4; } void evl() { if (((i1->read() & i2->read()) | (i3->read() & i4->read())) == '1') o1->write(SC_LOGIC_1); else o1->write(SC_LOGIC_0); } }; class oneBitAdder : public sc_module { public: sc_in < sc_logic > i1, i2, i3; sc_out <sc_logic > o1, o2; sc_signal <sc_logic> x1; XORgate * xor1; XORgate * xor2; AO2gate * AO2a; SC_HAS_PROCESS(oneBitAdder); oneBitAdder(sc_module_name); }; oneBitAdder::oneBitAdder(sc_module_name) { xor1 = new XORgate("xorA"); (*xor1)(i1, i2, x1); xor2 = new XORgate("xorB"); (*xor2)(x1, i3, o2); AO2a = new AO2gate("AO2_gate"); (*AO2a)(i1, i2, x1, i3, o1); } int sc_main(int argc, char **argv) { sc_signal <sc_logic> aData; sc_signal <sc_logic> bData; sc_signal <sc_logic> cData; sc_signal <sc_logic> cOut; sc_signal <sc_logic> sOut; oneBitAdder *FA1 = new oneBitAdder("FA_instance"); (*FA1) (aData, bData, cData, cOut, sOut); sc_trace_file *dummy = sc_create_vcd_trace_file("dummy_file"); sc_trace(dummy, aData, "Ain"); sc_trace(dummy, bData, "Bin"); sc_trace(dummy, cData, "Cin"); sc_trace(dummy, sOut, "SUMout"); sc_trace(dummy, cOut, "CarryOut"); sc_int <3> intData; sc_lv <3> abcData; sc_start(15, SC_NS); intData = 0; int ij = 0; do { abcData = intData; aData = abcData[2]; aData = abcData[1]; aData = abcData[0]; sc_start(15, SC_NS); intData = intData + 1; sc_start(50, SC_NS); } while (++ij < 40); sc_start(100, SC_NS); return 0; } Would you please tell me what is the problem ?? My main project is about systemc-ams, so please let me know if you figured out whats the problem of TUV examples Best regards, elyas
  2. hello everyone,I want to add and install systemc-ams library on visual studio 2013.could you please guide me how to download and install it on vs2013?or provide me some instructions.(what are the steps?)by the way i've already install systemc library. I know this is very elementary question but i'm very beginner in systemc and your help will greatly appreciated. Thanks a millionBest regards
×