Jump to content

mehmet37

Members
  • Content Count

    6
  • Joined

  • Last visited

Everything posted by mehmet37

  1. mehmet37

    TLM2.0 compiling error

    Thank you Philipp, I will turn to Imperas with my question. Greetings from Bochum, Mehmet
  2. Hi, I work on a simple System on Chip. I have a cpu, a bus and a ram. When I compile the following code I got a error message. The code is: #include <stdlib.h> #include <stdio.h> #include <string.h> #include "systemc.h" //Use an OVP Microblaze 8.2 processor model #include "xilinx.ovpworld.org/processor/microblaze/1.0/tlm2.0/microblaze_V8_20.igen.hpp" #include "ovpworld.org/modelSupport/tlmPlatform/1.0/tlm2.0/tlmPlatform.hpp" //Use Memory #include "ovpworld.org/memory/ram/1.0/tlm2.0/tlmMemory.hpp" //Use Bus #include "ovpworld.org/modelSupport/tlmDecoder/1.0/tlm2.0/tlmDecoder.hpp" icmAttrListObject *attrsForcpu1() { icmAttrListObject *userAttrs = new icmAttrListObject; return userAttrs; } int sc_main(int argc, char *argv[0]) { //Instantiate OVP platform icmTLMPlatform *platform = new icmTLMPlatform("icm", ICM_VERBOSE | ICM_STOP_ON_CTRLC| ICM_ENABLE_IMPERAS_INTERCEPTS); //Instantiate RAM ram *speicher = new ram("speicher","sp1", 0x100000); //Instantiate Bus decoder<NR_OF_INITIATORS,NR_OF_TARGETS> decoder<1,1> *bus = new decoder<1,1>("bus"); //Instantiate the processor microblaze_V8_20 *core = new microblaze_V8_20("core", 0, ICM_ATTR_DEFAULT, attrsForcpu1()); //Bind CPU with Bus core->INSTRUCTION.socket(bus->target_socket[0]); core->DATA.socket(bus->target_socket[1]); //Bind Bus with RAM bus->initiator_socket[1](speicher->sp1); bus->setDecode(1, 0x00200000, 0x002fffff); // Load application core->loadLocalMemory("application.MICROBLAZE.elf", 1, 1, 1); //Start and stop the simulation sc_core::sc_start(); sc_core::sc_stop(); //Deallocate objects delete core; delete platform; return 0; } The error message on the console is: make -f $IMPERAS_HOME/ImperasLib/so/buildutils/Makefile.TLM.platform PLATFORM=mb_tlm # Compiling Build/Linux32/usr/mb_tlm.o # Linking mb_tlm.Linux32.exe Build/Linux32/tlm/tlmSupport.a(tlmPlatform.o): In function `~sc_trace_file': /usr/local/systemc-2.3.0//include/sysc/tracing/sc_trace.h:168: undefined reference to `vtable for sc_core::sc_trace_file' Build/Linux32/tlm/tlmSupport.a(tlmPlatform.o): In function `time_advance': /Imperas.20130315//ImperasLib/source/ovpworld.org/modelSupport/tlmPlatform/1.0/tlm2.0/tlmPlatform.hpp:93: undefined reference to `sc_core::sc_trace_file::sc_trace_file()' Build/Linux32/tlm/tlmSupport.a(tlmPlatform.o).rodata._ZTV12time_advance[vtable for time_advance]+0x74): undefined reference to `sc_core::sc_trace_file::space(int)' Build/Linux32/tlm/tlmSupport.a(tlmPlatform.o).rodata._ZTI12time_advance[typeinfo for time_advance]+0x8): undefined reference to `typeinfo for sc_core::sc_trace_file' collect2: ld returned 1 exit status make: *** [mb_tlm.Linux32.exe] error 1 I don't know what is wrong with TLM. Could anybody help me? Thx
  3. mehmet37

    Pthread error

    Hi Philipp, I thank you a lot for your quickly answer. I configured my SystemC configure options by invoking ../configure --disable-async-updates --prefix=/usr/local/systemc-2.3.0. Now I don't have linking problems anymore. Actually I don't need the pthread functionality. But for the case I need it: Do I only have to write SYSTEMC_CXX_FLAGS=-pthread in my Makefile? Here are the error message I got before I disabled the "async_request_update" feature: make -f $IMPERAS_HOME/ImperasLib/source/buildutils/Makefile.TLM.platform Platform= PLATFORM=OVPsim_microblaze_tlm2.0 g++ -o platform.Linux32.exe Build/Linux32/usr/local/platform.o -L/Imperas.20130315/bin/Linux32 -lRuntimeLoader /usr/local/systemc-2.3.0/lib-linux/libsystemc.a -m32 Build/Linux32/tlm/tlmSupport.a /usr/local/systemc-2.3.0/lib-linux/libsystemc.a(sc_prim_channel.o): In function `sc_core::sc_host_mutex::trylock()': sc_prim_channel.cpp:(.text._ZN7sc_core13sc_host_mutex7trylockEv[sc_core::sc_host_mutex::trylock()]+0x1c): undefined reference to `pthread_mutex_trylock' collect2: ld return 1 make: *** [platform.Linux32.exe] Error 1 Thank you once again. Greetings from Bochum Mehmet
  4. mehmet37

    Pthread error

    Hi, I have same problem. I set SYSTEMC_CXX_FLAGS with export SYSTEMC_CXX_FLAGS=-pthread. After that I tried to compile it again and I got the same error. I don't know what I should do. Can you help me, please? By the way how can I add "--disable-async-updates" to my SystemC configure options. Thank you in advance.
  5. mehmet37

    Visual Studio 10 and systemc 2.3.0

    Hi, now it works. Thank you very much.
  6. Hello everyone, I’m new in systemc and in this forum. I successfully downloaded and installed systemc-2.3.0 on MSVC-2010 (Windows 7) I can compile and run the examples. BUT when I write an own program it doesn’t work. For example I wrote this simple program. #include "systemc.h"#define WIDTH 4 SC_MODULE(adder) { sc_in<sc_uint<WIDTH> > a, b; sc_out<sc_uint<WIDTH> > sum; void do_add() { sum.write(a.read() + b.read()) } SC_CTOR(adder) { SC_METHOD(do_add); sensitive << a << b; } }; systemc.lib(sc_main_main.obj) : error LNK2019: unresolved external symbol > _sc_main referenced in function _sc_elab_and_sim > Debug/addieren.exe : fatal error LNK1120: 1 unresolved externals It seems that the compiler can’t find systemc.lib, but I have add additional libraries in the properties and set the environment variable. I checked it many times but I always got the above-mentioned messages. Can you help me? Thanks in advance. Regards, Aydin Uni Bochum
×