Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Yesterday
  3. swami060

    SystemC 2.3.3 Setup in Visual Studio 2019.

    The errors seem to be link-time errors. * The first thing I would check would be to see if SystemC.lib/path has been properly listed in the Project properties window of your example. * If that is fine, then the next item to check would be to see if the SystemC library that you are linking against is the same as the one used for building your example (x86 debug). * If that's also fine, check for the /MD /MDd /MT /MTd option match for your example and SystemC build options.
  4. Jayasantosh Annaram

    SystemC 2.3.3 Setup in Visual Studio 2019.

    Hi, I'm trying to setup in SystemC 2.3.3 in visual studio 2019. I'm getting the following errors while try to build.
  5. Last week
  6. shankarsrinivasan

    Alternate Scoreboarding approach

    I am also looking like this kind of scroeboard "byte scoreboard" to comparing data on each lanes.
  7. Thanks Richard for quick reply, can you share some insights on the example below considering SEL_AB as field 2, DTA and DTB as field1. Q2) Also if one doesn't want to use alternate register, what field naming convention to use as IPXACT doesn't allow usage of "/" character? ex in field name, DTA/DTB with which character to replace "/"? <spirit:component xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009 http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009/index.xsd"> <spirit:vendor>Vendor</spirit:vendor> <spirit:library>Library</spirit:library> <spirit:name>new_file</spirit:name> <spirit:version>1.0</spirit:version> <spirit:memoryMaps> <spirit:memoryMap> <spirit:name>mmap</spirit:name> <spirit:addressBlock> <spirit:name>blk1</spirit:name> <spirit:baseAddress>0x0</spirit:baseAddress> <spirit:range>0xc</spirit:range> <spirit:width>32</spirit:width> <spirit:usage>register</spirit:usage> <spirit:access>read-write</spirit:access> <spirit:register> <spirit:name>regA</spirit:name> <spirit:addressOffset>0x0</spirit:addressOffset> <spirit:size>32</spirit:size> <spirit:access>read-write</spirit:access> <spirit:field> <spirit:name>DTA</spirit:name> <spirit:bitOffset>0</spirit:bitOffset> <spirit:bitWidth>16</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> <spirit:field> <spirit:name>SEL_AB</spirit:name> <spirit:bitOffset>16</spirit:bitOffset> <spirit:bitWidth>4</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> <spirit:alternateRegisters> <spirit:alternateRegister> <spirit:name>regB</spirit:name> <spirit:alternateGroups> <spirit:alternateGroup>DB</spirit:alternateGroup> </spirit:alternateGroups> <spirit:access>read-write</spirit:access> <spirit:field> <spirit:name>DTB</spirit:name> <spirit:bitOffset>0</spirit:bitOffset> <spirit:bitWidth>16</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> <spirit:field> <spirit:name>SEL_AB</spirit:name> <spirit:bitOffset>16</spirit:bitOffset> <spirit:bitWidth>1</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> </spirit:alternateRegister> </spirit:alternateRegisters> </spirit:register> </spirit:addressBlock> <spirit:addressUnitBits>8</spirit:addressUnitBits> </spirit:memoryMap> </spirit:memoryMaps> </spirit:component>
  8. ankit jain

    Capturing register array information inside IPXACT XML

    Hi, one solution could be using register file containing registers with dimension (for column) and then applying dimension on register file (for row).
  9. Hi David, bumping an old thread. How will you do the binding in your above example? I have a top level block which has A, B and C bounded as A -> B -> C. The module B has multiple sub-modules B1, B2 and B3. Can I have a multi_passthrough_initiator_socket within B and bind it (in the constructor of B) to the simple_target sockets of B1, B2 and B3? If so, how do I do it?
  10. Hello Ankit, The active alternate register in the component implementation is selected by an alternateGroup. An alternateGroup is considered actively selecting an alternateRegisters due to an unspecified combination of port values, register values, memory values, or other component internal state values which can change value while the component implementation is running. An alternateGroup does not change the component implementation. Both scenarios you mention could be supported by the IP-XACT alternateRegister feature. Some examples: 1. The alternateGroup activation combination includes a component port value which can be tied to a constant in the component instantiation. 2. The alternateGroup activation combination includes a field value.
  11. Hi, I wanted to know use case of alternate register. Scenario 1(DYNAMIC) : lets take an example, for capturing metadata of a register.The field(1) in register represents data whose context changes when another field (2)is having another data. So in this case h/w changes field (2) data dynamically, changing context of field (1) data. Does alternate register is used in this case? Can multiple "alternate group names" tag be used while instantiating module registers. Scenario 2(STATIC) : According to my understanding, alternate register is used for capturing registers according to mode in which module is to be instantiated i.e. only 1 register definition to be selected from multiple alternate registers while instantiating module registers using single "alternate group name" tag. What is the use case of alternate registers.(Scenario 1 or 2) Thanks
  12. Earlier
  13. Actually in my experience mixing various C++ standard levels is not advisable as they imply changes in libstdc++ which may lead to all sort of issues. So my general recomendation is to have the same setting in all libraries. Hence this general apporach. And conan_set_std() conan_set_std() will set the standard level to C++14 in this example.
  14. First of all, thank you for the quick and effective help. To be frank, I found the conan approach attractive because otherwise it is rather tedious to start up a new project; I guess the same feeling triggered you to assemble and publish the package. My naive idea was that both myself when I assemble a new working environment as well as my users installing the package on their own system, will set up the system using conan (i.e. we do not need to hunt down the individual packages, sometimes finding version compatibility problems), and after that we can rely on the CMake environment as before. That is I do not need conan in the followings, but I need it heavily when I start up. So, the ideal would be not a "CMake only" (where I DO NEED to deal with the packages and their dependencies), and not a "conan only" (where I come out from the normal CMake environment) handling. I would prefer the combined way. Maybe you should have a look at the the package and devote a couple of sentences in the readme file to this aspect. I think that what you call "conan-only" version, meets my needs (except that in the section "Build the project (it will download the needed libraries) and run it:" after cmake .. a make shall also be inserted). I think it is a very useful contribution, especially for the beginners and non-professional developers. I think, however, that every single development must start immediately at the very beginning with testing; so it would be great to complete this contribution with a testing example. I would suggest to make one more update. In the conanfile.txt you say [options] SystemC:stdcxx=14 and in CMakeLists.txt set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) find_package(SystemC REQUIRED) if(SystemC_FOUND) As the SystemC (AFAIK) defaults standard to '98 and it can be set independently; it may make confusion if you use this makefile with another sources, compiled independently (library version mismatch). In my own sources I use set (CMAKE_CXX_STANDARD ${SystemC_CXX_STANDARD} CACHE STRING "C++ standard to build all targets. Supported values are 98, 11, and 14.") of course after find_package(SystemCLanguage CONFIG REQUIRED) I think this can prevent some potential questions and bugs. (BTW: SystemC or SystemClanguage is the preferred utilization)
  15. Actually you need to add the library dirs to your cmake target liek this: link_directories(${CONAN_LIB_DIRS_GTEST}) add_executable(TransactionExample main.cpp) target_link_libraries(TransactionExample ${CONAN_LIBS}) Since the CMake setup in the example project is not 'conan only' things are a bit different (it can also be used with SYSTEMC_HOME env variable). If you rely entirely on conan you could simplify the CMakeLists.txt to cmake_minimum_required(VERSION 3.3) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include(Conan) project(TransactionExample CXX) setup_conan() conan_set_std() conan_global_flags() add_executable(TransactionExample main.cpp) conan_target_link_libraries(TransactionExample) I updated the README in the Quickstart Project accordingly
  16. Well, up to that point is everything fine. In the next step I attempt to add gtest using line gtest/1.8.1@bincrafters/stable The message is $ make [ 50%] Linking CXX executable bin/TransactionExample /usr/bin/ld: cannot find -lgmock_maind /usr/bin/ld: cannot find -lgmockd /usr/bin/ld: cannot find -lgtestd collect2: error: ld returned 1 exit status CMakeFiles/TransactionExample.dir/build.make:94: recipe for target 'bin/TransactionExample' failed make[2]: *** [bin/TransactionExample] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/TransactionExample.dir/all' failed make[1]: *** [CMakeFiles/TransactionExample.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 well, I understood that gmock is missing, but AFAIN since 1.8.0 it should come with gtest. In addition, the dependencies are about something similar. No difference if I use conan; somehow gtest depencence is missed.
  17. You should use SystemCVerification/2.0.1@minres/stable instead of 2.0.0a. As these are binary packages (with source) there are version dependencies. TLM2.0 is part of SystemC so it comes automatically with the SystemC package. Actually I might want to start with: git clone https://github.com/Minres/SystemC-Quickstart cd SystemC-Quickstart/ mkdir build cd build/ cmake .. make This is all you need to start developing based on SystemC. More details to be found in the README.md
  18. I recently discovered the conan-style install, but I have difficulties with using it. I started with the quickstart example. My conanfile.txt contains [requires] SystemC/2.3.3@minres/stable SystemCVerification/2.0.0a@minres/stable gtest/1.8.1@bincrafters/stable flex/2.6.4@bincrafters/stable qt5/5.13.0@bincrafters/stable and $ conan remote list conan-center: https://conan.bintray.com [Verify SSL: True] minres: https://api.bintray.com/conan/minres/conan-repo [Verify SSL: True] flex: https://github.com/bincrafters/conan-flex [Verify SSL: True] qt5: https://github.com/bincrafters/conan-qt [Verify SSL: True] gtest: https://github.com/bincrafters/conan-gtest [Verify SSL: True] Shall I do anything else? With this, I receive the message $ sudo conan install .. --build=missing Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++ compiler.version=7 os=Linux os_build=Linux [options] [build_requires] [env] WARN: SystemCVerification/2.0.0a@minres/stable requirement SystemC/2.3.2@minres/stable overridden by your conanfile to SystemC/2.3.3@minres/stable flex/2.6.4@bincrafters/stable: Not found in local cache, looking in remotes... flex/2.6.4@bincrafters/stable: Trying with 'conan-center'... flex/2.6.4@bincrafters/stable: Trying with 'minres'... flex/2.6.4@bincrafters/stable: Trying with 'flex'... flex/2.6.4@bincrafters/stable: Trying with 'qt5'... flex/2.6.4@bincrafters/stable: Trying with 'gtest'... ERROR: Unable to find 'flex/2.6.4@bincrafters/stable' in remotes I.e. gtest can be installed with conan, the rest not ; the same happens with the command line $ conan install qt/5.13.0@bincrafters/stable Do I wrong something? BTW: I receive the message WARN: SystemCVerification/2.0.0a@minres/stable requirement SystemC/2.3.2@minres/stable overridden by your conanfile to SystemC/2.3.3@minres/stable Which is true, I really changed in the conanfile.txt to 2.3.3. Maybe SystemCVerification should be updated. Also, I wanted to install TLM. Does it have similar conan recipe and store?
  19. This is not official Accellera repository. But in case your company is Accellera member you can request access to Accellera UVM git repositories.
  20. Independently on thread evaluation order code will output 0x0. Because signal values are updated during "Update phase" of simulation. Check Section "4. Elaboration and simulation semantics" of SystemC standard.
  21. Master and Slave use same clock, so I think Slave need only care data_in. class slave : public sc_module { public: sc_in<bool> clk; sc_in<uint32_t> data_in; slave(sc_module_name name):clk("clk"),data_in("data_in"){ SC_HAS_PROCESS(slave); SC_METHOD(run); dont_initialize(); sensitive << data_in; } void run(){ cout<<hex<<data_in.read()<<endl; } ~slave(){ } }; or class slave : public sc_module { public: sc_in<bool> clk; sc_in<uint32_t> data_in; slave(sc_module_name name):clk("clk"),data_in("data_in"){ SC_HAS_PROCESS(slave); SC_THREAD(run); dont_initialize(); sensitive << data_in; } void run(){ cout<<hex<<data_in.read()<<endl; } ~slave(){ } };
  22. Create a handshake signal.
  23. Hello In the following code, how I can make sure that slave thread get its turn after master so that slave gets the correct value. The below code output 0 instead of 0x11223344. In general how to make sure that the threads are executed in a specific order once a pos edge is detected. For example if we have 10 threads all are sensitive to posedge of the clock. How to make sure the threads are always executed in order 1,2,3,4,5,6,7,8,9,10 so that the behavior is deterministic. #include <iostream> #include "systemc.h" class master : public sc_module { public: sc_in<bool> clk; sc_out<uint32_t> data_out; master(sc_module_name name):clk("clk"),data_out("data_out"){ SC_HAS_PROCESS(master); SC_THREAD(run); } void run(){ wait(clk.posedge_event()); data_out.write(0x11223344); } ~master(){ } }; class slave : public sc_module { public: sc_in<bool> clk; sc_in<uint32_t> data_in; slave(sc_module_name name):clk("clk"),data_in("data_in"){ SC_HAS_PROCESS(slave); SC_THREAD(run); } void run(){ wait(clk.posedge_event()); cout<<hex<<data_in.read()<<endl; } ~slave(){ } }; class top : public sc_module{ public: master m; slave s; sc_clock clk; sc_signal<bool> valid; sc_signal<uint32_t> data; top(sc_module_name name):m("m"),s("s"),clk("clk",sc_time(5,SC_NS)),data("data"){ m.clk(clk); s.clk(clk); m.data_out(data); s.data_in(data); } ~top(){ } }; Thanks Khushi
  24. How are you doing end of test with UVM1.2 ? Setting up drain time (as shown below) used to work find till UVM1.1d as uvm run phase will get it's phase_done assigned to uvm_test_done, but that logic seems to be removed from uvm_phase.svh in uvm-1.2. http://blog.verificationgentleman.com/2016/03/an-overview-of-uvm-end-of-test-mechanisms.html class test_drain_time extends test; virtual function void end_of_elaboration_phase(uvm_phase phase); uvm_phase run_phase = uvm_run_phase::get(); run_phase.phase_done.set_drain_time(this, 16 * 2); endfunction // ... endclass Even using another approach mentioned in the same blog about using objection doesn't work anymore as phase_done for run_phase is not allocated and I see following error when it tries to raise/drop objections. uvm_test_top.m_env.m_scoreboard' attempted to drop an objection on 'run', however 'run' is not a task-based phase node! (This is a UVM_PHASE_IMP, you have to query the schedule to find the UVM_PHASE_NODE) virtual function void write_north(amiq_apb_pkg::amiq_apb_mon_item item); uvm_phase run_phase; super.write_north(item); if (num_seen_north_items % 2 == 1) return; run_phase = uvm_run_phase::get(); run_phase.raise_objection(this); endfunction
  25. Caution: SystemC Kernel is not thread-safe without taking special precautions. If you call into SystemC from outside the SystemC OS-thread, you may need to create a primitive channel utilizing async_request_update(). If on the other hand you are simply stalling SystemC from within, which is what I think is being stated, then you should be fine with simple std::mutex (not sc_core::sc_mutex which is only for use inside SystemC between SystemC internal "processes").
  26. Hmm, not sure if I understand you correctly. Your C++ code has an entry function, right? If you just call this entry function from a SC_THREAD it runs in a thread context and can call wait to let other parts of the simulation continue. The other option you have is to run your C++ code in a second (OS) thread, e.g. a std::thread. This allows to use the usual syncronization primitives of the OS like mutexes and alike. BR
  27. Background/Problem: I have some existing code in C++, that runs on my physical hardware that I would like to run within SystemC for testbenching. I would like as much of this code to be identical so the hardware tests match the TB tests. At the bottom level I am replacing my hardware read/write class (that interacts with hardware) with a systemC module that all other classes will inherit from. The code I have, that currently runs on hardware, is dependent on the fact that the process doesn't proceed until there is a return from the read() or write() functions. However, in order to interact with the systemC ports, I require the function to spawn a thread to handle this process and suspend the thread while modelsim processes the hardware. Without spawning a thread, I cannot do wait() or have sensitivity functionality. On the surface this seemed straightforward, however, since I do not want the C++ code to change, beyond adding a top level wrapper, I am running in to issues. First, when I have my C++ code call a function to spawn a thread to do a read/write transaction, I lose the ability to wait until that thread is finished. I could make the C++ code into sc_threads so I can use wait(), but that defeats the purpose of what I am trying to do, (keep all of the abstracted classes similar between hardware and tb). The only "solution" I can think, if you can call it that, is passing a variable by reference to this spawned thread, then having the process do a while(foo!=barr) until the thread signals it is finished by changing this variable. However I don't know if this is even viable, because in addition to wasting cycles, the spawned thread might not even be executed by the event scheduler in the systemC kernel. So I doubt this would work. My Questions: Is it possible to have a C++ function that is called normally wait until an SC_thread is finished? Is there a way to handle hardware interactions that require waiting without having to spawn or use a thread?
  28. Hi all, I have a question about behavior of uvm_sequence_base::kill method. In case of virtual (layered) sequence, how should be uvm_sequnce_base::start task invocation of lower layer sequences when uvm_sequece_base::kill method is invoked? Should be finished completely? Can be terminated suddenly? I attached an example code. If start task invocation of lower layer sequences should be finished completely, both of uvm_info within innter_sequence and uvm_info within outer_sequence should be displayed. However, when I executed this sample code with the latest VCS, uvm_info within innter_sequence was not displayed. Regards, Taichi Ishitani process_test_uvm.sv
  29. Are there any plans on continuing using the GitHub repository for such releases or has it been discontinued?
  1. Load more activity