All Activity

This stream auto-updates   

  1. Yesterday
  2. In general google test was not designed for hardware verification, probably you should better look on UVM-SystemC when it will be released.
  3. Do you create a separate executable for individual test? More related discussions here: https://stackoverflow.com/questions/43145530/does-systemc-unit-testing-need-forking https://stackoverflow.com/questions/4923292/using-existing-unit-test-frameworks-with-systemc
  4. I want to test the basic functionality of my design with gtest. It does not have yet the SystemC functionality, but heavily uses SystemC modules and data structures. I create a fresh copy of my top-level module for the individual gtests, and receive tons of warnings that I already defined an module with that name. It is harmless, but annoying. Any idea, how can I suppress it?
  5. Sorry for bothering you. I named it as MASK_WIDTH and set it as MASK_MAXIMUM_VALUE. Later I believed to myself that the definition was really a width.
  6. Last week
  7. regarding clause 7.1.1.c "state values are not supported. If 4-state values are passed into the PSS model via the procedural interface (PI) (see 17.2), any X or Z values are converted to 0." To my understanding PSS is meant for hardware verification. how can that be done without even the most basic x-propagation test options open?
  8. Thank you, I needed a UDP socket but I succeeded making an interface based on boost::thread and boost::mutex as described in the TCP serial model. It seems that it's not very fast, but it's much better and good enough for my needs. Regards, Mathieu
  9. Thanks for the reply. I see your point. Will look into namespacing the classes somehow Thanks, Olof
  10. I used before_end_of_elaboration to bind to a dummy: void before_end_of_elaboration(){ if ( my_initiator_socket.size() == 0 ) { target* dummy = new target("my_initiator_socket_name"); my_initiator_socket.bind(*dummy); } if ( my_target_socket.size() == 0 ) { initator* dummy = new target("my_target_socket_name"); my_target_socket.bind(*dummy); } }
  11. Hi, Based on Accellera's recently released standard, I am now developing a PSS front-end. While doing this, I came across several grammar problems, and also some typos in the example code given in the document. In this email, I have attached 2 text documents: (1) error_grammar.txt : a list of grammar problems, and their suggested fixes. (2) error_examples.txt : a list of typo mistakes in the examples. The page numbers mentioned are the pdf page numbers, NOT the printed page numbers. I would like to hear from the others if these mentioned fixes are good, or other changes are required. Regards.. Raj S Mitra, rsm@verikwest.com error_examples.txt error_grammar.txt
  12. I have a class that has two socket members (target and initator): // input (target) tlm_utils::simple_target_socket<class my_class> m_in; // output (initator) tlm_utils::simple_initiator_socket<class my_class> m_out; I wish to connect only one side each instance (m_in or m_out), how can I connect the other side to a NULL / EMPTY connection? Thanks
  13. Thanks for the prompt response. BR, Avihai
  14. Hi Avihai, I can confirm this behavior with the latest SystemC 2.3.2 pre-release and would classify this as a bug. As a short-term workaround, you can mark affected threads with dont_initialize(), which happens not to trigger this misbehavior: SC_THREAD(thread1); sensitive << thread1_event; async_reset_signal_is(reset_in,true); dont_initialize(); // avoid crash when starting in reset state I'll forward this issue to the Language Working Group for further analysis. Greetings from Duisburg, Phiipp
  15. Here is an example of connecting serial port model to TCP socket: https://git.greensocs.com/models/tcp_serial
  16. Hi, I need to make a connection between my SystemC design and an Ethernet socket (on Linux). It seems possible as described in this project : https://github.com/dcblack/technology_demonstrator from David Black which "ties a zedboard design to a SystemC ESL design". Unfortunately some files are missing in the previous repo (linked to a dropbox folder). Does anybody know how to do it ? David, I would really appreciate some help :) Thanks, Mathieu
  17. Hi, I'm getting segmentation fault when I set async_reset signal for a thread, and initialize this signal to be true at the beginning of the TB. I'm getting this segmentation fault only when set the signal to reset when "true". class main_module : sc_core::sc_module { public: // Signals and event declaration sc_in<bool> reset_in; sc_event thread1_event; SC_HAS_PROCESS(main_module); // Constructor main_module(sc_core::sc_module_name mn) : sc_core::sc_module(mn) ,reset_in("reset_in") { cout << "this is main_module constructor" << endl; SC_THREAD(thread1); sensitive << thread1_event; async_reset_signal_is(reset_in,true); }; // Thread void thread1() { while(1){ wait(); } } }; int sc_main(int argc, char* argv[]) { main_module *main_module_i = new main_module("main_module_i"); sc_signal<bool> reset_sig; reset_sig.write(true); // bind main_module_i->reset_in(reset_sig); cout << "before sc_start()" << endl; sc_start(100, SC_US); cout << "DONE!!! after sc_start()" << endl; return 0; } Is it forbidden to set async reset signal to be asserted at the beginning of simulation? Thanks! Avihai
  18. Can you please post a complete, self-contained example to demonstrate the issue? Reading your post, I still cannot infer what actual values, types, ... are involved and not even where you changed the "line" to sc_uint<5>. The following code works for me: #include <systemc> int sc_main (int, char *[]) { using namespace sc_dt; #define CORE_BUS_WIDTH 5 #define MASK_WIDTH 32 { sc_uint<CORE_BUS_WIDTH> id; sc_uint<MASK_WIDTH> mask(1 << id); std::cout << "id=" << id << "\t- mask=" << mask.to_string(SC_BIN) << std::endl; } { sc_uint<CORE_BUS_WIDTH> id(-1); sc_uint<MASK_WIDTH> mask(1 << id); std::cout << "id=" << id << "\t- mask=" << mask.to_string(SC_BIN) << std::endl; } return 0; } From your original error message, it looks more like an issue with MASK_WIDTH or CORE_BUS_WIDTH to me. Do you see any compiler warnings? Hope that helps, Philipp
  19. Hello, I have two objects. One is a memory, and the second one is a generator. They are connected via a TLM socket. At the same time, both objects have a method that is sensitive on the clock. The method prepares data for write transactions and it should also pick-up data from reading transactions (and vice versa). It should also check the status of the transactions. I'd like to use a TLM socket for data passing instead of a pin-accurate model of memory interfaces. See the picture in the attachments. The issue is a synchronization because there is a clock (one source of events) and PEQ for sockets (second source of events). Is there any recommended/standard solution for this? For more detailed description of the issue, let's imagine the following scenario. Clock cycles a) Generator's clock cycle method issues a write request to the memory (data is not passed yet) b) The memory accepts the write request via the forward path, stores it to PEQ. a) Generator's clock cycle method prepared data and updates the payload for the write request (already in memory's PEQ). b) Generator's clock cycle method would like to check the status of the write (so it can mark the write transaction as finished ok or not). The memory should handle the write request in PEQ now and use the backward path to signalize a response to the generator. I don't know how to do this (is the standard PEQ capable of this? Should I write my own PEQ?). c) Generator's clock cycle method issues a read request to the memory. d) The memory accepts the read request via the forward path, stores it to PEQ. a) Generator's clock cycle method would like to check the status of the read request. The memory should handle the read request in PEQ now, update the payload with data, and use the backward path to signalize a response to the generator. I don't know how to do this (is the standard PEQ capable of this? Should I write my own PEQ?). b) If the response is ok, then generator's clock cycle method picks-up data and move on. ... Any help would be appreciated. Thanks and best regards. -- Zdenek
  20. In a config file, I have #define CORE_BUS_WIDTH 5 In my SC_MODULE I have // sc_dt::sc_uint<CORE_BUS_WIDTH> int mID; ///< internal ID (sequence number) of the core Changing the data type from int to sc_unit provokes the error message, with all others unchanged. Works also with line sc_dt::sc_uint<5>
  21. Shifting by zero should of course be supported. Can you provide a self-contained example demonstrating the problem? Instead, the error message indicates, that you try to create an sc_uint<-2147483648> (or rather an sc_uint_base with the dynamic width of this value, e.g.), which is not allowed. What's the definition of MASK_WIDTH? What's the definition of ID? Hope that helps, Philipp
  22. In my program, I have a member variable sc_dt::sc_uint<MASK_WIDTH> mymask; ///< One-hot bitmask corresponding to ID In my constructor, I can initialize that variable like mymask(ID ? 1 << ID : 1) because using only mymask(1 << ID ) SC library results in Error: (E5) out of bounds: sc_uint[_base] initialization: length = -2147483648 violates 1 <= length <= 64 In file: ../../../../src/sysc/datatypes/int/sc_uint_base.cpp:342 I see nothing against shifting a value by zero position. Is there any deeper reason?
  23. Earlier
  24. Hello, In case of viewRef, it may be that the different definitions can be factored out into a single definition. I agree with you that it would have been cleaner to have a single definition rather than duplicating the same definition multiple times. However, for accessHandles and ports there are really different definitions. A port in an abstractionDefinition is different from a port in a component. Hence, your translation to Python classes should include some use of scopes or namespaces. Best regards, Erwin
  25. Well, I was sure the problem is in my code. I only was wondering that the warning repeats the same string, always one character shorter.
  26. The root for your problem is not in the implementation of SystemC, but in your code. You forgot that in C, you cannot simply concatenate C string (i.e., arrays of type char) by adding them. Instead of concatenating strings the addition of char(ID+'A') to the string "My_Name_" modified the pointer to the string to point ID+65 positions beyond the start of the original string. At that point in memory is probably only garbage, which was interpreted by the sc_object constructor as an object name thus causing the illegal characters warning. To properly concatenate strings in C, you need to reserve a big enough buffer to hold the concatenated result and then use strcpy(), strcat(), strncpy(), strncat() functions copying / concatenating strings. However, in C++, you can use std::string to simplify your task. The following code should work. Though, it may not be optimal in terms of performance (a std:: string gets temporarily constructed): scMod((std::string("My_Name_") + char(ID+'A')).c_str())
  27. I receive a kind of strange warning: the same runtime warning repeats, next time one character shorter, as long as the length of the path in message lasts. Like the fragment shown below. However, the test runs file. Since in the message only SystemC files are referred to, I have no idea what could be the reason. (Honestly, if it would be the task to program by intention something like this, I would be in serious trouble). Any idea, what and where to look for? The call scMod(/*"My_Name_"+ char(ID+'A')) results in what shown, (0<=ID<= 16) The call scMod("My_Name_") runs fine. (scMod is a SystemC module) Do I something illegal? Warning: (W506) illegal characters: include/sysc/communication/sc_port.h substituted by include/sysc/communication/sc_port_h In file: ../../../../src/sysc/kernel/sc_object.cpp:264 Warning: (W506) illegal characters: nclude/sysc/communication/sc_port.h substituted by nclude/sysc/communication/sc_port_h In file: ../../../../src/sysc/kernel/sc_object.cpp:264 Warning: (W506) illegal characters: clude/sysc/communication/sc_port.h substituted by clude/sysc/communication/sc_port_h In file: ../../../../src/sysc/kernel/sc_object.cpp:264 Starts with Warning: (W506) illegal characters: /usr/local/systemc231a/include/sysc/communication/sc_port.h substituted by /usr/local/systemc231a/include/sysc/communication/sc_port_h In file: ../../../../src/sysc/kernel/sc_object.cpp:264 ends with Warning: (W506) illegal characters: /sysc/communication/sc_port.h substituted by /sysc/communication/sc_port_h In file: ../../../../src/sysc/kernel/sc_object.cpp:264
  28. Hi, I've been looking at creating a Python library to work with IP-XACT. My current attempt (https://github.com/olofk/ipyxact) implements a small subset of IP-XACT, but it would be too much work to do this for the complete standard, so instead I've been looking at using generateDS to help me with the process of creating classes. The problem that appears now is that there are some tags in the schema files with identical names that are defined in several places. An example of this is the viewRef type. It is defined in 7 different places. Some of these are identical, which leaves us with 3 unique definitions. These three unique versions are similar enough so that the python classes are actually identical for all 7 definitions. My question is therefore, should there really only be one definition of viewRef, that all the other can refer to? The same thing would apply to other tags as well, such as accessHandles, registerType, portType etc, or am I missing something? I haven't dealt with xsd files before, so my knowledge of the subject is limited
  1. Load more activity