Jump to content

NickIlieskou

Members
  • Content Count

    24
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by NickIlieskou

  1. Thank you for your elaborate response. Though I still have to ask a question regarding schedulers. I have a system with n independent DE clusters and one TDF cluster. The latter cluster is implemented inside an hierarchical SystemC module. This module is feeding the TDF cluster with values through DE->TDF input ports. Let's assume that at a time instant all the clusters (DE and TDF) have to execute. I noticed that the TDF cluster is executing first. Even before the SystemC hierarchical module gives an input. In other words the TDF cluster will execute with the old input values because the SystemC hierarhical module will run after the TDF modules. For this scenario can I assume that even if I had more than one TDF cluster, they would all execute before the DE clusters? Thank you in advance.
  2. Hello everybody, I would like to know if AMS and SystemC have two different schedulers. If yes then how do they interact? Moreover i would like to ask how many extensions does SystemC has? Thanks in advance
  3. @Alan I have one more naive question. I should use a channel if and only if I want to simulate the medium of data transmission. In case of an ideal medium, where no data are lost or I have no extra delays in the transmission there is no reason for a channel right?
  4. @Martin 1) I understand your point. However in my case it is important to know or to be able to manipulate the order of execution. That is because the TDF cluster and the the SystemC modules at some point they operate on the same global variables. I understand that this is out of the scope of SystemC however it would be really nice if I could change the execution order by using a functionality of SystemC like wait. In other words if I define a TDF cluster and an isolated SystemC module with the same time step the execution order will be as you said implementation defined. Can I do something to change this order? For instance use events or wait statements. Unfortunately I know that I cannot use wait statements with TDF modules but I ask just to be sure that I do not have any alternatives. 2) That was a very clear answer. Thanks for answering my questions @Alan I have thought about implementing a pure C++ communication in some parts of my system. However I haven't thought of making my own channels with immediate notify, which sounds a really nice idea. Thanks for sharing your thoughts.
  5. @Martin Barnasconi First of all thank you for your answer. Though I still have some questions: 1) Let's suppose I have three TDF modules connected to each other with a timestep=10ms. So module A is giving input to module B and module B output is module C input. Apart these modules I have 2 more isolated SystemC modules that are sensitive to a clock with a Period equal of 10ms as well. In such an example the SystemC scheduler will always execute the TDF modules first and then the two SystemC modules. I guess I cannot change this order of execution. For instance can I do something so that the SystemC modules are executed first and then the TDF modules? 2) I know that TDF modules update the values of their signals instantly. For instance if I have a TDF module A giving input to another TDF module B, then if A changes its output at time instant t then module B will see this change in time X. On the other hand in simple SystemC modules this is not the case. More specifically if A and B were SystemC modules, B would see the change in the signal at the time instant t+1. What can I do to make the SystemC signals behave like the AMS signals, except using zero_time notifications? @dakupoto, Martin Barnasconi I apologize for the insufficient description of my problem in my previous post. It is quite difficult to explain exactly what I am trying to do. Probably it would take some A4 pages to explain, so maybe it is much better if I try to ask precise questions. Thanks both of you for posting an answer.
  6. I have a question which probably is quite stupid. I developed a Software in the Loop framework in SytemC. This framework is supposed to call in specific discrete time instants some modules to execute. For instance suppose we have module A and B. Module A has to be executed every 10 ms and Module B every 20 ms. The execution order has to be first A and then B when both modules have to be executed. I am able to do that by having a coordinator module triggered by a clock of 10 ms. Every module ( module A, B and scheduler) are related with an event. Module A and B they look like this: while(1){ Wait(ev_mod_i) { ... trigger_ev_coordinator }} The coordinator which knows the frequency of each module will notify the correct event to trigger the corresponding module. So for instance for t=10ms the coordinator will be triggered by the clock and it will trigger event_mod_A. Then for t=20ms it will trigger event_mod_A, after module A is finished coordinator will trigger event_mod_B. After module B is also finished, the coordinator will wait for the next clock tick e.t.c Now i would like to insert an AMS model into my system. The desired MoC is continuous TDF. However I can't use statements like event.notify(zerotime) or wait(ev_i) in TDF according to the AMS manual. Moreover TDF modules include a time step by which they are executed. This is something that is not fully desired because i can't find a way to control the TDF modules. Could you please give me any ideas on how I can embed a TDF model into a SystemC framework and at the same time to be able to control when the model has to be executed for a specific clock tick? Probably by doing this I am ruining the whole concept of continuous TDF MoC. If this is right do you have any alternative ideas? Thanks in advance.
  7. Hello to everyone, I would like to ask if it is possible to give a static order for a number of processes in the SystemC Scheduler. Suppose we have 4 processes a,b,c and d. I would like for each clock tick to trigger the processes in the following way: clock tick=1 a,b,c,a,b,c,a,b,c,d,d,d clock tick=2 a,b,c,a,b,c,a,b,c,d,d,d clock tick=3 a,b,c,a,b,c,a,b,c,d,d,d clock tick=4 a,b,c,a,b,c,a,b,c,d,d,d .... Thank you in advance
  8. Thanks both of you for your answers.
  9. Hello everyone, I have a folder with many modules. I want to create a configuration file specifying which of those modules to use in my simulation. In the sc_main.cpp, before the simulation starts I would like to open my configuration file, read which modules I would like to open and then create instances, connect their ports etc The configuration file contains all the necessary information as number of ports, type of each port , name of the module, name of the file etc. I can easily create the signals I need but I don't know how I can create the module instance. example of configuration file .... ex_name_module porta ; input ; double portb ; output ; double ...... In the sc_main I will read the file. I will create 2 signals of type double. But then i should do something like ex_name_module EX_NAME_MODULE("EX_NAME_MODULE"); EX_NAME_MODULE.input(sig1); EX_NAME_MODULE.output(sig2); One idea that I tried but it didn't work, was to create a .cpp file for each module. This file has a function containing the instance creation of the respective module. The arguments of the function were the signals created in sc_main. So any ideas of how I can create such an instance? Thank you in advance
  10. Hello everyone, I was wondering if I could run in parallel a number of processes from different modules using multi-threading in SystemC. Take into account that these processes make use of SystemC elements like signal.read etc, from the SystemC library . That means SystemC library should be multi-threading safe. The reason why i want to use multi-threading is to decrease the simulation time, i.e. increase the performance of the simulation. I found this link: http://www.accellera.org/activities/committees/systemc-language/ that states about recent activities on SystemC 2.3.0: " In addition, an improved simulation API and a new thread safety mechanism will allow much better interaction with external tools and support for multi-threading." Does it mean, I can parallelize the execution of processes? and if yes how can I do it? Thanks in advance Nick
  11. Thank you again for your answer Alan. Your idea about using events is nice. I hope it will work in my case. I can't put the whole code in a single module. I am trying to develop a simulation framework for different software applications. So in my application I have several dlls which have to execute at the same time depending on the scheduler, which I am trying to implement with SystemC. The problem is that I might need to execute dll n.1 first and then dll n.2 etc because these dlls they will change values of variables in the SystemC framework that will be read from other dlls at the same simulation time. However the order is not fixed. Thank you again!!! regards Nick
  12. Sorry for asking again, but I would like to know if there is any way for module 2 to read the latest value of the signal that module1 has written at the same time ( let's say at the same positive edge).
  13. Thank you for your answer. It's nice that you specify the difference between the signal and the variable. So if I want to be sure that module2 will read the latest value of something I should make sure that this will be a signal and not a global variable. Thank you again Alan.
  14. Hey to everybody, I would like to ask a very simple question just to clarify how the concurrency concept work in SystemC. Let's say that we have two modules. Both modules are sensitive to the positive edge of the simulation clock. module1 is changing the value of a signal (or of a global variable). At the same time module2 has to read the signal ( or the global variable ). So my main question is if in one cycle during which both modules are invoked at the same time module 2 will read the latest value that module1 will output. I think that SystemC has the notion of delta cycle by which before going to the next simulation step ( or clock cycle ) it will make sure that all processes read the latest values of signal/variables independently from which or how many modules have changed their value. Thank you in advance!!!
  15. Thanks for your answer. I was looking at sc_signal.h file.I understand that a signal in systemC is a class. As far as I understand there won't be any overhead as the simulation kernel will not insert any delays in the simulation. What I mean is that the time needed to run all these functions in the kernel files of systemC are not delaying the real simulation time. Consequently we do not have any overhead. Am I correct?
  16. Hello to everybody, I would like to know some more information about signals offered by SystemC. How does the signal's structure look like? Is it allocated as an array of data ? Is it just a variable? Do signals have any overhead? For instance what will happen if I use 5000 signals? Thank you in advance !!!!
  17. Ok i found the problem. 1) First mistake i made was that I was only building the program and not executing it. 2) If you execute the program from the .exe file the vcd file will apear in a different folder than the one that will apear if you run the program from the Visual studio. Thank you again Philipp!!! I know that my mistake was a little bit dummy but I am trying to learn.
  18. First of all thank you for the quick response. Yes I had added signals I am not sure what you mean but I have no errors during compilation and when I run the program everything works fine\ Yes I also run various examples from the internet using trace files but none of the worked. For example : #define _CRT_SECURE_NO_WARNINGS #include <systemc.h> #include "ror.h" int sc_main(int argc, char* argv[]) { // sc_signal<sc_lv<8> > din, dout1, dout2; sc_signal<sc_uint<8> > din, dout1, dout2; sc_clock clk("clk",10,SC_NS,0.5,10,SC_NS,false); // Create a clock signal ror DUT("ror"); // Instantiate Device Under Test DUT.din(din); DUT.dout1(dout1); DUT.dout2(dout2); DUT.clk(clk); sc_trace_file *fp; // Create VCD file fp=sc_create_vcd_trace_file("wave");// open(fp), create wave.vcd file fp->set_time_unit(100, SC_PS); // set tracing resolution to ns sc_trace(fp,clk,"clk"); // Add signals to trace file sc_trace(fp,din,"din"); sc_trace(fp,dout1,"dout1"); sc_trace(fp,dout2,"dout2"); din=0; sc_start(20, SC_NS); // Run simulation din=0x01; sc_start(20, SC_NS); // Run simulation din=0xC3; sc_start(20, SC_NS); // Run simulation din=0x0F; sc_start(20, SC_NS); // Run simulation sc_close_vcd_trace_file(fp); // close(fp) return 0; }
  19. Hi to everybody, I am new to the SystemC world and I have some difficulties. I am trying to create a vcd file where I can see all my signals. The program compiles without any errors however the vcd file is not created in the project folder or anywhere else. Any ideas? Thank you in advance.
  20. That worked !!! Finally I was able to build the systemc library. Thank you so much !!!!
  21. Thanks for your answer. Can you please guide me on how to install the patch?
  22. Dear all, I am new in the systemC world and I am trying to find a way through the set up. I would like to run systemC on Visual Studio 2013 Express. -Initially I download the systemc2.3.0 -Then I opened the ..\systemc-2.3.0\msvc80\SystemC.vcproj with Microsoft Visual Studio Express 2013 - At that point I got the following message: ---------------------------------------------------------------- "These projects are either not supported or need project behavior impacting modifications to open in this version of Visual Studio. Projects not displayed either require no changes or will automatically be modified such that behavior is not impacted. For details see: http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(VS.ReviewProjectAndSolutionChangesDialog.Upgrade)&rd=true One- way upgrade Visual studio will automatically make functional changes to the following projects in order to open them. You will not be able to open these projects in the version of Visual Studio in which they were originally created. " ---------------------------------------------------------------- - Then after pressing ok, I build the project and I get 12 Errors and 12 Warnings all stating the same thing: Warning C4005:'for': macro redefinition error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. Do anyone know how to solve this bug? I hope I can skip using Visual studio 2005. Thanks in advance!!!
×
×
  • Create New...