Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. SystemC 2.3.2 installation error

    Hello Ameya, Thanks for your prompt response. But I don't have cmake setup on my system. I have 'make' and 'gmake' build system. My GCC version is 4.3.5. Can you help me in the installation with this setup. Regards, Ankur Saini
  3. SystemC 2.3.2 installation error

    Hello @ANKUR SAINI, You can find a snippet of build script for SystemC library installation here: https://github.com/AmeyaVS/SystemC_ramblings/blob/master/resources/build.sh Note: You will need CMake and a C++11 enabled compiler for building the SystemC library with the script provided above. Let me know if it helps. Regards, Ameya Vikram Singh
  4. I am trying to install systemc 2.3.2 on my linux system (x86_64).I followed the steps mentioned here (http://rkrara.blogspot.in/2012/12/install-systemc-230-on-linux.html) But I am getting the errors while running make command. (PFA the error log) Please help me with the installation. make.log
  5. Yesterday
  6. Is there a way to loop over all data attributes in a class declared in SV/UVM, We have something similar in Java: https://stackoverflow.com/questions/3333974/how-to-loop-over-a-class-attributes-in-java The feature would help us implementing data classes.
  7. Last week
  8. Getting a bit from bus

    First thing you need to realize is that sc_signal<> is not a wire and it is not a data type. sc_signal<> is a channel with a non-blocking write and a blocking read. You cannot "connect" a variable to a signal. You have to explicitly make the transfer each time the value changes. There is no equivalent to a Verilog continuous assignment. How do you know if a signal has changed? You have to explicitly watch/wait for the change using additional methods value_changed_event() or possibly posedge_event() if using sc_signal<bool> or sc_signal<sc_logic>. Due to overloading of operator=(), the innocuous looking busCON10 = var_bus_CON[10] turns into: busCON10.write(var_bus_CON[10].read()); which will not return a value until the end of the next delta cycle. Using a cout << busCON directly after this will yield the current delta's value.
  9. Getting a bit from bus

    Hey. It's my first time with SystemC and I'm having the following problem: I made a control matrix that generates a 12 bits control word (sc_bv<12> CON) and I'm trying to get the 10th bit of that word. On my top level cpp I did the following: sc_signal<sc_bit<12> > bus_CON; sc_bv<12> var_bus_CON; var_bus_CON = bus_CON; sc_signal<bool> busCON10; busCON10 = var_bus_CON[10]; and after I'm connecting the ref. variable that I want with that previous signal: programcounter.Ep( busCON10 ); And It's not working. My signal gives me hi impedance at all simulation time. A case that should happen when Ep = 0. p.s: matrix.CON( bus_CON ); Did I make anything wrong?
  10. Explicit parent object

    I agree. We won't stop using dynamic port creation, because it makes life so much easier. So either we'll have to live with a messed up hierarchy, or get a good standard compliant way to achieve it. Or as now, use a non-compliant method. Also, we've just started modeling power gating in TLM, which relies on traversing the SystemC object hierarchy and e.g. making sockets aware that they are off and resetting stuff after power on. With a messed up hierarchy, this might break down.
  11. SystemC 2.3.2 Public Review Now Open

    Hello @shanh, What compiler version are you using? Can you share the build verbose logs? Best Regards, Ameya Vikram Singh
  12. SystemC 2.3.2 Public Review Now Open

    Hi, I am using the flag g++ -std=c++11 but still the same issue
  13. SystemC 2.3.2 Public Review Now Open

    Hello @shanh, When you are linking your application/library to SystemC library you need to specify the C++ standard flags: // For G++ C++11 g++ -std=c++11 // For G++ C++14 g++ -std=c++14 You add these options to the build system configuration options for your application/library build. Regards, Ameya Vikram Singh
  14. SystemC 2.3.2 Public Review Now Open

    Hi, While running a custom library under SystemC 2.3.2, I am getting the following error. In function `__static_initialization_and_destruction_0': /sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx201103L(sc_core::sc_writer_policy)´ I looked into this problem and it seems like it is related to the C++ standard. before build SystemC 2.3.2 I configured it: ../configure --prefix=/users/systemc-2.3.2 In make file I am using CXXFLAGS="-DSC_CPLUSPLUS=201103L" for c++11 standard but the error is still the same.
  15. Analog Postprocessing

    You can do it either in C++ before writing it to a file, or read the files into Matlab and do post-processing there.
  16. Hi all, I'm new to this. Our simulation generates a bunch of analog channels. I would like to do some post-processing (mathematical stuff like max, diff, statistics,..) before viewing. What is the easiest way? # bruno
  17. sc_thread vs pthread

    Thanks for you detailed explanation.
  18. sc_thread vs pthread

    SystemC follows event driven simulation semantics to simplify hardware modeling. In part, this means using a cooperative multi-tasking model rather than a modern pre-emptive model. In this respect, SystemC is like SystemVerilog and VHDL. This makes it easier to focus on the modeling aspects rather than worrying about mutexes, volatility and other interactions due to multicore and parallel processes. Advanced SystemC users can use OS threads for some tasks, but the synchronization aspects are up to the programmer. So SC_THREAD's are not pre-emptive (nor are SC_METHOD processes) and hence a straightforward SystemC model is single core single threaded from an OS/software point of view. Additionally, you should be aware that the SystemC scheduler is not thread-safe for the most part. If you make use of async_request_update(), you can use multicore and parallel processes to interact with SystemC events. This assumes you are an expert programmer and proficient with C++ (not for beginners). There have been and are some efforts underway to standardize parallelization in SystemC, but it is a volunteer effort and you need to be on the SystemC LWG group to participate. Some commercial entities have developments underway, but keeping those closed for the time being. Always keep in mind that SystemC is not freeware, but was created as part of a commercial coalition to standardize modeling across/between companies. Don't think of SystemC as a free simulator. Also, SystemC is often mistaken as a competitor/alternative to SystemVerilog/VHDL, which it is NOT. SystemC was intended for high-level modeling and abstractions above RTL. The ability to co-simulate with RTL is a requirement for some of the use-cases. SystemC is used quietly by many large corporations to augment specification and verification. It differs from the other languages in that it uses an off-the-shelf C++ compiler and has no requirement of a specialized compiler. This benefits companies with huge software development teams using SystemC Virtual Platform models for early software development. The downside of this approach is the C++ compiler has no understanding of the SystemC domain and has no way to make optimizations that SystemVerilog/VHDL do (e.g. clocks). That is one reason that SystemC coders are advised to avoid explicit clock models to gain performance. Keep the design at as high a level of abstraction as you can.
  19. sc_thread vs pthread

    Hi, I am new to SystemC. I have two questions. 1) Do sc_thread generates separate Linux thread for each call and what is the difference between the POSIX thread and sc_thread? 2) Why systemC has no parallelization scheme? The SystemC scheduler uses cooperative multitasking and cannot exploit fully the potential of SMP workstation.
  20. TLM transaction tracing

    Yes I a must agree ! SCV points to the tlm text database - default file ending in impulse - can be re-configured. I found this: http://toem.de/index.php/projects/impulse-hdl/168-using-the-scv-reader scv_tr_text_init(); scv_tr_db db("mydb.scv"); scv_tr_db::set_default_db(&db); Best Regards, Kai
  21. User Guide for systemc 2.3.2

    I solved sc_string error by adding this line to packet.h file typedef std::string sc_string;
  22. User Guide for systemc 2.3.2

    Hi everyone, I installed `systemc v2.3.2` and followed the instructions in user guide found here but when I compile the code using this single command g++ -I. -I/usr/local/systemc-2.3.2/include -L. -L/usr/local/systemc-2.3.2/lib-linux64 -lsystemc -lm -lstdc++ channel.cpp display.cpp packet.cpp receiver.cpp timer.cpp transmit.cpp main.cpp -o main I get so many errors, here are few: /usr/local/systemc-2.3.2/include/sysc/communication/sc_signal_ports.h:311:14: error: no matching function for call to ‘sc_trace(sc_core::sc_trace_file*&, const packet_type&, std::__cxx11::string&)’ sc_trace( p->tf, iface->read(), p->name ); /usr/local/systemc-2.3.2/include/sysc/communication/sc_signal.h:317:26: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘const packet_type’) os << "new value = " << m_new_val << ::std::endl; /usr/local/systemc-2.3.2/include/sysc/tracing/sc_trace.h:279:13: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive] sc_trace( tf, object.read(), name ); main.cpp:42:22: error: ‘class sc_core::sc_clock’ has no member named ‘signal’ sc_trace(tf, CLOCK.signal(), "clock"); ^ main.cpp:51:17: error: no matching function for call to ‘sc_start(int)’ sc_start(10000); ./packet.h:16:69: error: ‘sc_string’ does not name a type extern void sc_trace(sc_trace_file *tf, const packet_type& v, const sc_string& NAME); The source code can be found here Thanks for any help you can offer :)
  23. Earlier
  24. SystemC CCI Build Issues

    Hello @Philipp A Hartmann, Following is my testing development environment: Platform: Cygwin 64-Bit GCC Version: 6.4.0-5 And I have attached the verbose logs for build. I tried your suggestions for wrapping the specialization of the cci_value_converter class with the CCI namespace in the ex16_User_Defined_Data_Type and it seems to fix the issue. Also for the ex07_Parameter_Information example the following patch fixes the issue currently on Cygwin 64-bit. diff --git a/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp b/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp index 1326be0..46fa307 100644 --- a/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp +++ b/examples/ex07_Parameter_Information/ex07_Parameter_Information.cpp @@ -106,7 +106,7 @@ int sc_main(int sc_argc, char* sc_argv[]) { ex07_observer observer_class("observer"); // Simulation time - sc_core::sc_start(30.0, sc_core::SC_NS); + ::sc_core::sc_start(30.0, sc_core::SC_NS); return EXIT_SUCCESS; } // End of sc_main diff --git a/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h b/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h index 471fe41..6ec2cc8 100644 --- a/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h +++ b/examples/ex16_User_Defined_Data_Type/ex16_user_datatype.h @@ -76,8 +76,9 @@ struct route_table_ut { }; // add support for cci_value and JSON (de)serialization +CCI_OPEN_NAMESPACE_ template<> -struct cci::cci_value_converter< route_table_ut > +struct cci_value_converter< route_table_ut > { typedef route_table_ut type; static bool pack( cci_value::reference dst, type const & src ) @@ -105,6 +106,7 @@ struct cci::cci_value_converter< route_table_ut > return false; } }; +CCI_CLOSE_NAMESPACE_ // Overload stream insertion operator of C++ std::ostream& operator <<(std::ostream& os, const route_table_ut& ud) You can also have a look into the verify logs after introducing these fixes. I will also try to build and test on other environments and provide other feedback for the CCI release. Thanks and Regards, Ameya Vikram Singh verifyVerboseLogs.tar.xz verifyFixedLogs.tar.xz Update: Only for the ex16_User_Defined_Data_Type I need to make changes on Linux 64-Bit with g++(5.4.0 C++11 enabled).
  25. Explicit parent object

    Interestingly, I just encountered an HLS design that relies on dynamic ports creation in class methods. As a result sc_object names hierarchy is totally messed-up. But design is synthesizable and working! Even more: looks like HLS tools do not support phase callbacks. So probably it would be still a good idea to standardize hierarchy scope guard.
  26. SystemC CCI Build Issues

    Hi Ameya, thanks for the feedback! Can you please provide the following details: Platform (Cygwin?) GCC version used Logs of verify.pl with -v enabled (to see the full command-lines) The file cci_core/systemc.h is an internal header which is only included through this path. A conflict could only occur, should you add cci_core/ directly to the compiler include path (which is not supported), or if you'd install SystemC below cci_core/ (which would be very weird ;-)). The errors in ex07_Parameter_Information indeed look like the SystemC installation is not correctly resolved. For this, the full command-lines would really help. The error in ex16_User_Defined_Data_Type is indeed a bug (at least before C++14(?)). The fix is to explicitly open the cci namespace around the cci_value_converter specialization in ex16_user_datatype.h. Hope that helps and thanks again, Philipp
  27. Then, you have to express the vectors as an appropriate data type, which fulfils the conditions for the template parameter T of the port/bound signal (cf. to clause 6.4.3 of IEEE Std 1666-2011), i.e., the data type needs to implement the equality operator==, stream operator<<, and assignment operator= as well as a default constructor. E.g., you could try to use a suitable data type from the Eigen library.
  28. How to compare VCD files

    Thanks, I tried with impulse and from first impressions -- it seem to be easy and comfortable. You just have to select the 2 files and get to impulse->Compare with each other . A dialog gives you some options (what and how to compare). BUT - For this extended functionality I had to request the analyze license key (free for non-profitable or 90 day stuff). :-( Will tomorrow check with analog and tlm data. Regards, Jean
  29. This is a known limitation, we ran into this issue last year too. If you look closely you will find commented macros in the scv_extensions mentioning sc_fixed and sc_ufixed. However, uncommenting these entry will not work as these seem to be leftovers from the early implementation dating back to around 2000 when first commits were publicly recorded. You will probably have to find a workaround for that at the moment. Adapting the scv_extensions does not look too trivial.
  1. Load more activity