Jump to content

Tanja

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Tanja

  1. Tanja

    events

    Hi Ralph, version 3 worked fine. Thank you vry much
  2. Hello, I am facing a similar problem. This is why i don't create a new thread. i hope this is fine with you. I am working on Windows 7, 64Bit operating system. I want to be able to call Matlab from my systemC TLM Model in Microsoft Visual Studio 2012. So I did the following settings: 1.- Set Path variable in Advanced System Settings-> environment variables: C:\Program Files\MATLAB\R2010a\bin\win64 (or the path where libeng.dll is located) 2.- In project properties of VisualStudio, link in Additional Include directories of C++->General:"C:\Program Files\MATLAB\R2010a\extern\include" 3.- In project properties, linker->general, Additional Library Directories: "C:\Program Files\MATLAB\R2010a\extern\lib\win64\microsoft" 4.- Add the following libraries in Linker->Additional Dependencies: libeng.lib libmx.lib 5.- Change the Active Solution Platform to x64 (Because my Matlab intallation is x64) Now i am getting the following error when I compile my code: error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' Datei: \systemc.lib(sc_time.obj) I was able to build and execute a simple c++ program calling MATLAB in MVS2012. So the problem must be coming from Systemc. Any ideas on how I can fix this? Thank you.
  3. Tanja

    events

    1. I do not delete the allocated events! Should i? i need them till the end of the simulation 2. no assignment to the pointers 3. as same as i did for the first pointer
  4. Tanja

    events

    Hi Ralph, 3. it had tried it already. it does't work. sc_event cannot acces the private member of sc_event! 1. I implemented it. it works for the first array. I added a second one, now i got an exception: one heap has been corrupted! The code stops by the fonction void free(pblock) What i am doing wrong? std::vector< sc_core::sc_event* > ev_vector ; for (int i = 1; i<=n; i++) { std::string str = std::to_string((unsigned long long)i); str = "event_nr" + str; ev_vector.push_back(new sc_core::sc_event(str.c_str())); } in P1: ev_vector.at(pos)->notify(); in P2: wait( *ev_vector.at(pos) ) Greetings
  5. Tanja

    events

    Thanks Ralph. But the event lists won't help! I am looking for a way to generate a certain number of events depending on the number of modules i have. Let's assume, i have a top-module T1 with two modules: M1 with a thread process P1 and another one with a thread process P2. Process P2 is dynamically sensitive to an event ev1. P1 notify ev1 when it is executed. I want to instantiate another top-module T2 with the same modules and processes but here i need a different event as ev1. so Process P2 in T2 should wait for ev2 to be resumed. How can i achieved this without writing the same code twice? (P1 and P2 have to be in different modules) Thank you very much in advance!
  6. Tanja

    events

    Hello, is there a way to create vectors of events (sc_event)?? Thank you
  7. Hello Alan, i'am using e2.notifiy() and there is only process P2 sensitive to that event ( dynamic sensitivity), but sometimes it misses that notification. Is it possible? Regards
  8. Hello Alan, 1. i need to use the immediate notification not the delta one. i want all three processes to be executed in the same delta cycle as the notifications happened and so on in each delta cycle until the quantum is reached. 2. i don't understand. Could you explain please? 3. yes i am using the quantum. Thank you
  9. Hello, i have 3 temporal decoupled processes P1, P2, P3, two events e2 and e3, which respectively belong to the dynamic sensitivity of P2 and P3. P1 / P2 performs the following actions - execute a transaction - e1.notify() / e2.notify() - wait(sc_zero_time) and P3 just generate a transactions P3 is always the first to synchronize. Then P2 and finally P1 follows. Is there a way to control the order in which this processes come back from synchronization? or Is there a way to ensure that the processes start running only after they are all back from synchronization?? because i have the following problem: Sometimes (in some quantums) P1 executes his transaction and notifies e1 before P2 is back from synchronization and P2 missed the notification of e2, which in turn causes that P3 is not executed after it got back from synchronization because e3 is never notifies. Thank you.
  10. Hi, i would like to draw the SysML diagramm of my implemented TL-Model. Which type of Diagramm should i use for representing: Components (Initiators, targets, interconnects) with the socket connections? : Block diagramm oder internal block diagramm? the behavior of a process: state machine diagramm? Are there any examples? Thank you so much for the help
  11. ok. My solution was to declare a member variable of type string, which i then initialize with the value of variable name (of type sc_module_name) in the conctructor of my module. std::string mod_name; mod_name = name;
  12. Hello, assume i have a module "mod" with the following constructor: mod(sc_module_name name, unsigned int id); How can i accessed the module name stored in the variable name to print it out? thanks.
  13. Hello, all of a sudden i can't build my projects in Microsoft Visual C++ 2010 anymore, even the examples 1>ManifestResourceCompile: 1> All outputs are up-to-date. 1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt 1> 1>Build FAILED. Any ideas about what happened? How can i solve this? i recently installed Microsoft Visual studio 2012. Could it have something to do with it? thank you!
  14. Hi Alan, now i have sc_vector<my_module> M; how do i push the new objects of type my_module into the vector? class my_module { my_module(sc_module_name, unsigned int nr); }; my_module my1("one", 2); my_module my2("two", 3); Thx
  15. Thank you very much Alan. i am just trying "sc_vector"
  16. Hi Alan, i have a component "interconnect1" which can have more than one sockets. The exact number of sockets is given every time an object of this component is instantiated. So i wrote following code in the header file for the socket: std::vector<tlm_utils::simple_target_socket_tagged<interconnect1>> sockets_array; In the implementation file (.cpp) the constructor looks like this: interconnect1::interconnect1( sc_module_name name, const unsigned int number ) : nr(number) { socket_array.resize(nr); for (int i=0; i<nr; i++) { socket_array[i].register_b_transport ( this, &interconnect1::b_transport , i); socket_array[i].register_get_direct_mem_ptr( this, &interconnect1::get_direct_mem_ptr , i); socket_array[i].register_nb_transport_fw ( this, &interconnect1::nb_transport_fw , i); socket_array[i].register_transport_dbg ( this, &interconnect1::transport_dbg , i); } } i get the following build errors: ClCompile: 1> interconnect1.cpp 1> Unknown compiler version - please run the configure tests and report the results 1>c:\users\...\desktop\systemc-2.3.0\src lm_utils\simple_target_socket.h(1126): error C2248: 'sc_core::sc_event::operator =' : cannot access private member declared in class 'sc_core::sc_event' 1> c:\users\...\desktop\systemc-2.3.0\src\sysc\kernel\sc_event.h(331) : see declaration of 'sc_core::sc_event::operator =' 1> c:\users\...\desktop\systemc-2.3.0\src\sysc\kernel\sc_event.h(250) : see declaration of 'sc_core::sc_event' 1> This diagnostic occurred in the compiler generated function 'tlm_utils::simple_target_socket_tagged<MODULE> &tlm_utils::simple_target_socket_tagged<MODULE>::operator =(const tlm_utils::simple_target_socket_tagged<MODULE> &)' 1> with 1> [ 1> MODULE=interconnect1 1> ] What am i doing wrong? Or is it possible to define vector of sockets? Arrays works just fine, but the number of socket is variable. thx for the help
  17. Hello, what is the meaning of these errors please? error C2248: 'sc_core::sc_module::operator =' : cannot access private member declared in class 'sc_core::sc_module' error C2248: 'sc_core::sc_module::operator =' : cannot access private member declared in class 'sc_core::sc_module_name' error C2248: 'tlm::tlm_generic_payload::operator =' : cannot access private member declared in class 'tlm::tlm_generic_payload' thank you
  18. Hi there, i would like declare an array of tagged target socket in the header file of my interconnect component. The size of the array will then be determine in constructor (.cpp file) using the initial values of one of the member variables. I tried it with the std::vector<> file.h std::vector<tlm_utils::simple_target_socket_tagged<interconnect1>> sockets_array file.cpp - class constructor sockets_array.resize(number); It doesn't work. Why?
  19. I have a model with at least 15 components and i run out of memory at the instatiation of the 5th one! How can i gain memory or what can i do?
  20. hi, can someone pls tell me what does this error mean? Error: (E549) uncaught exception: bad allocation In file: c:\users\...\systemc-2.3.0\src\sysc\kernel\sc_except.cpp:98 thank you.
  21. Hi, let's assume: i have 4 initiators writing to differents parts of a memory(target) through 1 interconnect-component. i additionnaly have a 5th initiator, which is waiting for notifications from the other initiators to read the new entry in the memory and evaluates it. Can i pre-define in which order the 4 Writer-initiators are going to acces the memory? The Reader-initator only have one thread. Can i implement a queue of incoming event-notifications to make sure that he always completes his evaluation before jumping to the next one and to make sure that he acts by respecting the order of incoming notifications? If yes, which is the easiest way to do so? thank you very much
  22. Hi Alan, u are right, there is no wait()-statement in init1 thread. wait(t): does it matter how long init1 is suspended? i add it in init1 thread and init2 works. But not init3, which is also sensitive to the same event. Any ideas why? thanks a lot.
  23. Hi Alan, as advised i declared an event (init1_ev) in a file.h as extern, so that i could use in my files init1.cpp und init2.cpp. After init1 writes to the memory, it does init1_ev.notify() In init2 i have following sc_thread, which is sensitive to init1_ev; init2_thread { while (true) { wait(init1_ev); cout << "notification received"; } } init2_thread is never triggered. Why? Thank you.
×
×
  • Create New...