Jump to content

Ronex

Members
  • Posts

    9
  • Joined

  • Last visited

Ronex's Achievements

Member

Member (1/2)

0

Reputation

  1. I am trying to get an interface binded with a vector of port declared as sc_vector<sc_in<bool> > : std::vector<sc_object*> children = get_child_objects(); sc_signal<bool> *s = NULL; const char *tmp = "sc_vector"; for (unsigned i = 0; i < children.size(); i++) { if (strcmp(nm, children->basename()) == 0) { if (strcmp(children->kind(), tmp) == 0) { sc_vector<sc_in<bool> > *v = dynamic_cast<sc_vector<sc_in<bool> > * > (children); if (v != 0) { s = dynamic_cast<sc_signal<bool> *> (&v->at(0)); } } } } In the above code, I got the value of s as NULL. I have binded a port with signal, but still it's unexpected behavior. Am I doing something wrong here ??
  2. What is SystemC ? Roughly I think it's a language or more specifically a library useful to create software representation (not synthesizable) of an hardware at an abstarction level higher than RTL (- which is synthesizable). Please correct me if I am wrong, Also help me with some standardize definition. What is architectural exploration ? And How SystemC and TLM is useful for it ? If someone working in a systemC domain, could they classify themselves as a software engineer ? Where does it classify ? Which is more appropriate semiconductor industory , EDA or ESL domain ? How someone working in systemC explains their Job to someone non-technical person ? PS: If this question is not appropriate for this forum, then please help me with some details where I could find my answers. I believe these questions must be answered before someone starts learning it.
  3. Hi Philipp, Thanks for the reply. Can you please look over simple example that Itried and suggest me where I am wrong: Example: HelloWorld.cpp #include "systemc.h" SC_MODULE(Hello_SystemC) { // declare module class void main_thread(void) { SC_REPORT_INFO("Temp", "Hello SystemC World!"); } SC_CTOR(Hello_SystemC) { // create a constructor SC_THREAD(main_thread);// register the process }//end constructor }; int sc_main(int sc_argc, char* sc_argv[]) { //create an instance of the SystemC module Hello_SystemC HelloWorld_i("HelloWorld_i"); sc_start(); // invoke the simulator return 0; } Command Line: cl /FoHelloWorld.obj /c HelloWorld.cpp /TP /nologo /EHsc /GR /vmg /I<path_of_systemc-2.3.1>\src link /nologo /OUT:helloworld.exe /LIBPATH:<path_of_systemc-2.3.1>\msvc80\SystemC\x64\Release systemc.lib HelloWorld.obj Now, this gives me the same error for different systemc module: (Previously I got error w.r.t. to my other project) systemc.lib<sc_simcontext.obj> : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' PS: 1) I am working on Visual C++ express 2010(windows 7 - 64 bit host) and To set 64 bit environment I have used: CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64" Surprisingly using "vcvarsall.bat x64" throws following error: The specified configuration type is missing. The tools for the configuration might not be installed. So, I preferred option (1). SystemC library is builded using the solution file present in the systemc-2.3.1 source zip file downloaded from official site. And while building the library In the configuration manager, I have changed the platform to 'x64'.
  4. Hello, I am using systemC-2.3.1 which I think has started supporting native windows(x64) build. I have build the library of systemC using the msvc solution file in visual C++ express 2010. The library is generated under x64/Release directory and I didn't get any build error. But while linking this library with my application it throws an error message as follow: systemc.lib<sc_time.obj> : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'. I am compiling my application with visual studio command prompt. Am I missing here something ?
  5. I agree on the stuff that in case of SC_METHOD we can't use any kind of blocking calls of systemC which affects simulation time, But We can use kernel blocking call which at all not related with systemC simulation time and here In my use case I am here uses kernel blocking call to remove systemc process from the execution and allow another kernel thread to execute by the cpu. I wants to confirm whether the approach is right or not ? Can you please elaborate why I can't use this ? And share necessary details. Ruffly I would say, "Of Course as it's matter of kernel scheduler which might also remove systemC process(even if systemc execution is inbetween SC_METHOD process ) if time slot for its execution is spend. And here it's similar to that except by using blocking we kind of instruct the kernel that even if time slot is not spend you allow other thread to execute and block me until I met some specific condition." whatever it get understand here. I have Check with a dummy small example which works fine and didn't get any error like normally the one we are getting when we use systemC blocking calls in SC_METHOD. Let me know whether It should be used or not ? Or better to go with SC_THREAD. ( That doesn't makes any sense to me why SC_METHOD shouldn't use ? )
  6. Can I use blocking system call of kernel, In systemC METHOD process, More specifically suppose I wanted to use mutex lock call on unix system. pthread_mutex_lock is a blocking call, and I am using it for some kind of synchronixation between kernel thread and systemC process(SC_METHOD). What should be a proper approach ?
  7. Hi Everyone, I am beginner in systems and implementing the model, how can we implement delay for more than 64 bits value, suppose val is uint64 max = -1; it need to multiplied with some time_interval(suppose 50 ns) How to use wait or notify to trigger a method after this much delay ? Is there any data structure in systemC which can hold more than 64 bits value result ? In my case there is also a possibility for delay value more than 64 bits, Anyone have idea to deal with this issue ?
×
×
  • Create New...