Jump to content

sonalidutta

Members
  • Content Count

    32
  • Joined

  • Last visited

  • Days Won

    2

sonalidutta last won the day on August 21 2013

sonalidutta had the most liked content!

About sonalidutta

  • Rank
    Advanced Member
  1. Hi, I want to access the unique process id of a SystemC process P inside process P. Can I do that? If yes, what is the API for that? The base class for all sc_process is class sc_process_b. sc_method_process and sc_thread_process are derived from it. sc_process class has a public member variable, called proc_id. This denotes the unique id of a process. My question is how to access this id inside the process itself. For example: Inside process P: std::cout << proc_id << std::endl; does not work! Thanks Sonali
  2. sonalidutta

    Dynamic Assertion-Based Verification for SystemC

    In http://www.cs.rice.edu/CS/Verification/Theses/Archive/dtabakov_dissertation2010.pdf: An assertion is an LTL formula with a set of sampling points that describes a formal property of your SystemC model under verification. In Assertion-based Dynamic Verification of SystemC models, each assertion is converted to a C++ monitor class. A C++ monitor class is just a C++ encoding of a deterministic finite automaton. The transition function of the DFA is encoded as a step() function in the monitor class. Now the question is when and how frequently to execute the step() function of a monitor class. This is where the sampling points come into the picture. You execute the step() function only when any of the specified set of sampling points occur during your simulation. In the above dissertation, it allows you to sample at different phases of the SystemC kernel, for example: when a new delta cycle begins, when a particular event is notified by the kernel or when a SystemC process suspends. This cannot be done with the unmodified version of the SystemC kernel since all these kernel informations are hidden from the user. So in the above work, the author puts a minimal patch on the SystemC kernel to expose the necessary kernel information. But this is not mandatory. You can also only sample at different points in your user model. For that you do not need to modify the SystemC kernel. But allowing sampling also at kernel phases adds to the monitoring power. So as a summary, it is not necessary to change the kernel to do assertion-based verification of SystemC. But since in SystemC (unlike SystemVerilog), the kernel plays a very important role in the simulation, if you change the kernel to expose certain information, it might be useful. Universal Verification Methodology (UVM) is a new "de-facto standard" for verification (based on Accellera's marketing materials) (Primer here: http://www.doulos.com/knowhow/sysverilog/uvm/tutorial_0/). UVM is a base class library for hooking up monitors and generating tests, but does not do anything about Kernel events or about generating monitors.
  3. sonalidutta

    SCV (SystemC Verification Library)

    Dear Alan, Thanks for you reply. I would like to see some example how to use SCV_EXTENSIONS_BASE_CLASS macro. The scv package or the manual doe not have any example. Also I want to do the following: 1. Define a base class A. 2. Define two classes B, C derived from A. 3. I want to track the value changes of the member variables of class B and C. - So I need to define scv_extensions for them. 4. Now I want to use polymorphism: use base class point A* to point derived class objects new B() and new C(). Also I want to define function f(A* a) that actually receives objects of type B and C and determines in the runtime what kind of object it is. It finally does type cast on a as: (B*)a or (C*)a to use methods defined in B or C. I wonder if this kind of polymorphism is doable with scv_smart_pointer<A>, scv_smart_pointer<B> , scv_smart_pointer<C>. It will be really helpful if I can see some example about the syntax and everything. The manual really doe snot show anything. I also have gone through all the example programs scv package provides. Can you let me know whom I can talk to regarding this in the developer's group? Regards Sonali
  4. sonalidutta

    School for SystemC, SoC Architecture in India

    Companies like Intel, TI, Cadence, Synopsys are working actively on different SystemC projects, mainly using it to build firmware, hardware system prototypes to develop the software etc. Also SystemC is still in research phase. The best deal is to work on some industrial project or in some research lab. Institutions having interesting SystemC projects to work on are hard to find, especially in India.
  5. sonalidutta

    SCV (SystemC Verification Library)

    Dear Alan, Thanks for the quick reply. I want to use SCV to call a callback function f() whenever any member variable of an object "a" of class A will be written a new value. Also f() will use the object "a" inside it. My guess is that I can take any of the following two approaches: Approach 1. - define SCV_EXTENSIONS(A). - instantiate a as: scv_smart_ptr<A> a; - define callback function f() as: void f(scv_extensions_if& a_ext, scv_extensions_if::callback_reason r) { if ( r == scv_extensions_if::VALUE_CHANGE) { //Use a_ext to do some operation } - register callback f() to a as a->register_cb(f) My question here is: 1. How can I get a from a_ext? I need the object of type A or something similar inside f(). Approach 2: - define each member variables "v" of A as scv_smart_ptr. - register callback f() with each of them in the constructor of A. The manual has an example on Page 46. My question here is: 1. I like this approach better. But is there any way to get hold of object "a" inside callback f(). The object which is passed to it is a->v, not a. I need a. Does it mean I need to use approach 1? Or is there any other way? Thanks Sonali
  6. sonalidutta

    SCV (SystemC Verification Library)

    Here is a few general questions about the limitations SCV might have: 1. Hierarchical Types: To use scv_smart_ptr of class A, I need to define SCV_EXTENSIONS(A). Now suppose, class A is a subclass of class B. For example: class B{ public: int attB1; protected: int attB2; ... }; class A: public class B{ public: int attA1; private: std::string attA2; ... }; Now how do I define SCV_EXTENSIONS(A)? Does SCV support this? Do I need to define SCV_EXTENSIONS( B ) too? 2. C++ library types: std::vector, std::list, std::map ... SCV has already defined SCV_EXTENSIONS template class for C++ built-in types like int, float etc and also some systemC built-in types. That means we can create variables of type scv_smart_ptr<int> or scv_smart_ptr<float> etc. But can I create variable of type scv_smart_ptr<std::map> or scv_smart_ptr<std::list> or scv_smart_ptr<std::vector> etc? Is SCV_EXTENSIONS template class already defined for them or do I need to define it as I did for class A? Thanks Sonali
  7. sonalidutta

    SCV (SystemC Verification Library)

    This is an empty post. Not able to delete it.
  8. sonalidutta

    School for SystemC, SoC Architecture in India

    I would suggest you to read the systemC manual A to Z. It is very well-written. It is more like a book than manual. I learned it in that way. Also http://emedia.art.sunysb.edu/debt/downloads/books/System%20Design%20with%20SystemC.pdf is a good book for the initial stage.
  9. sonalidutta

    use of events vs flags

    SystemC kernel simulates parallel execution of hardware. Processes suspends and resumes. A process can suspend itself and wait for an event to take place. When the event happens, that process resumes its execution. This is the most important power of SystemC. You cannot gain this advantage using flags, even inside the same module.
  10. sonalidutta

    Blocking call in SystemC METHOD kind process

    You cannot use blocking calls in SC_METHOD process. If you really need to use it, use SC_THREAD process instead. SC_THREAD has all the expressive powers that SC_METHOD has.
  11. Dear all, I have some questions about usage of SCV. Is it the right place to post them? Thanks Sonali
  12. Dear Alan, I installed fresh systemc-2.3.0 in /root/Desktop/systemc-2.3.0 [root@localhost systemc-2.3.0]# pwd /root/Desktop/systemc-2.3.0 In Desktop I have created hello_world.cpp Now I run: [root@localhost Desktop]# g++ -I /root/Desktop/systemc2.3.0/include/ -L /root/Desktop/systemc2.3.0/lib-linux64/ -Xlinker -rpath -Xlinker /root/Desktop/systemc2.3.0/lib-linux64/ hello_world.cpp -lsystemc hello_world.cpp:1:21: error: systemc.h: No such file or directory hello_world.cpp:3: error: expected constructor, destructor, or type conversion before ‘(’ token Wierd!!! But my adder model is running using it. The thing I observerd that the behavior of systemc-2.3.0 in terms of setting LD_LIBRARY_PATH automnatically is completely unpredictable. Sometimes it does, sometimes it does not. I installed the fresh systemc-2.3.0 1bout 8 times. Only 2 times it did not give the LD_LIBRARY_PATH issue and my systemc model ran fine. So it is not about my modification. As you pointed out correctly, there is some problem in systemc-2.3.0 itself. Can you report a bug? Also I am running as root. So it does not work for root user too! Regarding /etc/ld.so: There is a file called ld.so.conf and a directory callled ld.so.conf.d. But there is no file called ld.so And there is nothing added in any of these file. Thanks Sonali
  13. Alan, I changed the name from modified_systemc-2.3.0 to systemc-2.3.0 and reinstalled. But I still has the same issue. As you said I did: ldd addy and here is what I get: [root@localhost adders1]# ldd addy linux-vdso.so.1 => (0x00007fffefb72000) libsystemc-2.3.0.so => not found libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00000032b3600000) libm.so.6 => /lib64/libm.so.6 (0x00002b666f186000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000032aee00000) libc.so.6 => /lib64/libc.so.6 (0x00002b666f409000) /lib64/ld-linux-x86-64.so.2 (0x00002b666ef68000) This is my installation path: [root@localhost lib-linux64]# pwd /root/Desktop/CHIMP_ea/systemc-2.3.0/lib-linux64 [root@localhost lib-linux64]# ls libsystemc-2.3.0.so libsystemc.a libsystemc.la libsystemc.so [root@localhost lib-linux64]# As you can see, libsystemc-2.3.0.so exists!
  14. Here is my analysis: In you look at systemc-2.3.0/configure: you will see some variables are set in there: PACKAGE=systemc VERSION=2.3.0 And there are many others like this. Search configure file for "systemc" and you will find them. My guess is that these variables are being used to setup default LD_LIBRARY_PATH. Since I have changed the package name from systemc-2.3.0 to modified_systemc-2.3.0, the default path does not work for me anymore. I will run some experiments now to see if I am right. Regards Sonali
  15. Thank you for replying. If you look at the Makefile in my earlier post I do the same thing. This is what I do not want to do. Why do I need to export it explicitly? I do not need to do with systems-2.3.0. I only need it with my modified version modified_systemc-2.3.0.
×