All Activity

This stream auto-updates   

  1. Yesterday
  2. Hi Phillip, Actually I did not give a proper thought to this aspect, now that you mention it might make sense. I just followed the "general configure procedure" from linux.. But maybe for the sake of proper closure to this topic, is this a matter of efficiency of choosing between fibers and pthreads, because if there is, then the build process with pthreads should still work. I will check if it works without pthreads and post the result. Regards, Andrei
  3. Hi Guys, I want to print out some info in the log file as bellow: TEST0001: seed = 12 Out_Str: Hello_test Out_Num: 64 TEST0002: seed = 12345678 Out_Str: Hello_Public_test Out_Num: 1024 I have do this as follows: $fdisplay("TEST%04d: seed = %d Out_str: %s Out_Num: %d", index, seed, out_str, out_num); But I can not got the format which I wanted. Can you tell me how can I do this? Thanks a lot!
  4. Last week
  5. In the Mentor cookbook, they create it in the test, and then pass a handle to the env config object. This resource is typically used by the sequence (also in test) so the structure is fine with me. The use model is that you'll need to have a RAL declared for block, sub-system, and SoC levels. This way you can specify offset for sub-level register blocks, hdl path slices for backdoor access (optional), etc.
  6. Can you explain, why you try to use Pthreads on the Msys/MinGW platform? This environment doesn't come with a Pthreads library by default, you would need to install a separate one. And Pthreads will certainly be less efficient than the WinFiber-based process implementation. Thanks, Philipp
  7. Hi Dan, I have created a register layering example and I preferred to create object of class extended from "uvm_reg_block" in test. As you mentioned, this provided me flexibility to pass references around between reg block and reg adapter, reg predictor and reg sequence. While thinking of moving reg block to env class, ease of use or other issues would really depend on your use model. Communication between reg block and adapter, predictor can be done in env class connect phase as well (You can move adapter, predictor handles creation as well in the env class). If you are looking to keep reg block in test base and then use that in extended test class of different tests, I could see use of that in passing reg block to reg sequences. But that could as well be achieved by passing uvm_reg_block class handle to uvm_resource_db and then access that from reg sequence. So I think both the way should be OK (Though I haven't tried having reg block in env class yet, but if there is any specific pitfall then some expert on this forum could help us). I preferred to have in test class, as I like having direct dotted access to refer objects rather than pass using uvm config or resource db. I am not sure if I could help you much using above answer, but please let me know and I can provide you reference with example code snippets if needed. Thanks, Amit
  8. Hi all. This is my first post here and I'm learning UVM, but I'm not new to verification or SystemVerilog. I've seen three examples of integrating uvm_reg_block objects into a test bench. two of them (jellybean and verificationacademy) create the extended uvm_reg_block object in the test object, whereas doulos creates it in the top level env (above the agent env). For a hierarchical point of view, the latter location seems to make the most sense. However, it seems that there's a bunch of hoops to jump through to get it working. From a ease of use sense, creating it in the test object (as long as you have a base test class from which all others are derived) gets around the struggles (at least the ones that I have had) with getting the right regmodel handle passed around to where it is needed. ...and the traditional non-register-model test/sequence building/flow works because it is the test that sets the regmodel handle in the sequence after it is created. The question that I have (and I might be opening up a can of worms here) is what is the consensus on where in the test bench hierarchy is the regmodel object built? What pitfalls might I face later on down the road if I choose one methods over the other? Thanks for you insight. Dan Moore - Principal Engineer - Rohde & Schwarz, USA, Inc.
  9. Earlier
  10. I would recommend using nested "registerfile" objects within an addressBlock to contain your registers since these can be multi-dimensional arrays. We added the registerfile object in IEEE 1685-2009. You can use "bank" objects to group addressBlock objects but arrays are not supported.
  11. Hi Sumit. what you are doing here is a hierarchical module. foo is a member, i.e. a submodule of bar. They should not have the same name. If you want bar to be derived from foo, then derive bar from foo instead of sc_module. Then, you instantiation will work. If you want foo to be a submodule of bar, let the derivation as is but fix your initializer lists. You need to forward the name argument to the base class constructor in every class derived from sc_module, i.e. in bar as well. Furthermore, the submodule foo should not have the same name as its parent bar. // constructor Bar(sc_core::sc_module_name name) : sc_module(name) // forward name to base class constructor , foo("foo") // name submodule foo 'foo' { ... Or use the SC_CTOR macro that handles this for you. Greetings Ralph
  12. Hi all, I'm using vendors' tool to generate register models. I wanna know how to describe one address-block is instantiated multiple times in IP-XACT. For example, there are 2~4 instances of the same DMA engine module in my testbench. Which schema can I use to describe this? The further question is how to group address blocks in IP-XACT? For example, I have a bridge-similar module BRDG(have registers) will be instantiated to more than 20 IPs of SOC. I wanna the generated uvm register model combine each BRDG with related IP in one uvm_reg_block. How to describe this in IP-XACT? Currently, i'm using script to deal with this. I want to know if IP-XACT native support this. Thanks
  13. Hi Ralph I tried as you suggested(see below). I still have the same issue. #include <iostream> #include <systemc.h> using namespace std; class Foo: public virtual sc_module { public: Foo(sc_module_name name):sc_module(name) { } }; class Bar : public virtual sc_module { public: Foo foo; Bar(sc_module_name name) : foo(name) { } }; int sc_main(int argc, char* argv[]){ Bar b("b"); sc_start(); return 0; } Thanks Sumit
  14. OK. Thanks. I now saw that there is a comparable guard expression in the sc_cor_pthread.cpp file. But I think changing this needs some more care and investigation. I forward this to the developer community. Greetings Ralph
  15. hi, UVM_ML, developed by Cadence, indeed contains UVM_SV. But it also contains Multi Language capabilities, enable connecting packages implemented in SV, e, and SC. For example - in the UVM_ML, the configuration DB serves all languages. So one can call config-set() from one language, and config-get() from another, hence configuring components implemented in another language. Another example - the objection to End of Test is synchronised over framework so that the test is stopped only after all objections from all languages are dropped.
  16. When implementing your own memory manager for TLM payload objects, you have to follow the rules laid down in IEEE Std 1666-2011 clauses 14.5 and 14.6. When you are leaking memory it is because your new operation to allocate a new tlm_generic_payload object has no matching delete operation. As I understand your implementation, you want to pool the allocated objects once they've been created for the rest of the simulation to reuse them after they've been handed back to the memory manager for another allocation. Therefore, the right moment to delete your payload objects is when the memory manager is deleted itself. To achieve this, you have to traverse your free_list in the mem_manager::~mem_manager() destructor and call delete on each entry. Additionally, you have changed the visibility of your memory manager destructor from public to private. This is not good object-oriented design. Also, the generic payload pointer *ptr should not be a member variable but rather a local variable to mem_manager::allocate(). Clause 14.5e) of IEEE Std 1666-2011 states that you should also call the reset member function of your tlm_generic_payload object in order to delete any extensions marked for automatic deletion. I hope these hints help you to resolve your memory management issues!
  17. These days, I have done some study on UVM_ML. But In my verification work, The work can be done good with UVM_SV lib, which can be done by UVM_ML too. So I want to know why the UVM_ML is coming out, and what its advantage is. In Which Context the UVM_ML is a better choice than UVM_SV ?
  18. Hi, For 2.3.1a revision: I modified line 33 of sc_cor_fiber.h as follows #if (defined(_WIN32) || defined(WIN32) || defined(WIN64)) && !defined(SC_USE_PTHREADS) The build process of the SystemC library succeeds. However there are issues when using the library during the link phase. -> make check fails. see attachment. make_check.log Note: I tried with this modification of the header file in the past also with GCC and it behaved the same as now. For 2.3.2 revision: the behavior is similar with 2.3.1a, that is, the compilation fails with the same compiler error message as seen in the first post. see attachment make.log I did not modified again the headers for 2.3.2. I used configure method, not cmake for 2.3.2 Regards, Andrei
  19. Dear all, I implemented a memory manager (implementing the tlm_mm_interface interface). However, whenever I use the manager with TLM, I get loads of memory leaks, that seem to be caused by the new in the allocate method. Does anybody know an alternative implementation of this, or does anybody understand how I could avoid the leaks? What am I doing wrong? Best regards, S. #include <systemc.h> #include <tlm.h> class mem_manager : public tlm::tlm_mm_interface{ public: std::vector<tlm::tlm_generic_payload *> free_list; tlm::tlm_generic_payload * allocate(); void free(tlm::tlm_generic_payload *); tlm::tlm_generic_payload * ptr; private: ~mem_manager(); }; mem_manager::~mem_manager(){ } tlm::tlm_generic_payload * mem_manager::allocate(){ if (!free_list.empty()) { ptr = free_list.back(); free_list.pop_back(); cout<<"free list not empty"<<endl; } else { ptr = new tlm::tlm_generic_payload(this); cout<<"free list empty"<<endl; } return ptr; } void mem_manager::free(tlm::tlm_generic_payload * trans){ free_list.push_back((tlm::tlm_generic_payload *)trans); }
  20. Dear all, I am new to payload extensions and I would appreciate a feedback on whether I am doing things right.. I need to declare a simple payload extension, including two additional fields: a reset value a 16 bit bit vector representing the value of a register In the header, I simply declare the clone/copy from functions, plus my additional fields: class reg_extension : public tlm::tlm_extension<reg_extension>{ public: reg_extension(); tlm::tlm_extension_base* clone() const ; void copy_from(tlm::tlm_extension_base const &); bool reset; sc_bv<16> value; }; And then I implemented the functions, by taking care of the additional reset and value fields: reg_extension::reg_extension(){ reset = false; value = sc_bv<16>(0); } tlm::tlm_extension_base * reg_extension::clone() const{ cout<<"Executing clone!"<<endl; reg_extension * ext = new reg_extension(); ext->reset = this->reset; ext->value = this->value; return ext; } void reg_extension::copy_from(tlm::tlm_extension_base const & ext){ reset = static_cast<reg_extension const &>(ext).reset; value = static_cast<reg_extension const &>(ext).value; } Is this enough for the extension to work? Best regards, S.
  21. Dear all, I am new to payload extensions and I would appreciate a feedback on whether I am doing things right.. I need to declare a simple payload extension, including two additional fields: a reset value a 16 bit bit vector representing the value of a register In the header, I simply declare the clone/copy from functions, plus my additional fields: class reg_extension : public tlm::tlm_extension<reg_extension>{ public: reg_extension(); tlm::tlm_extension_base* clone() const ; void copy_from(tlm::tlm_extension_base const &); bool reset; sc_bv<16> value; }; And then I implemented the functions, by taking care of the additional reset and value fields: reg_extension::reg_extension(){ reset = false; value = sc_bv<16>(0); } tlm::tlm_extension_base * reg_extension::clone() const{ cout<<"Executing clone!"<<endl; reg_extension * ext = new reg_extension(); ext->reset = this->reset; ext->value = this->value; return ext; } void reg_extension::copy_from(tlm::tlm_extension_base const & ext){ reset = static_cast<reg_extension const &>(ext).reset; value = static_cast<reg_extension const &>(ext).value; } Is this enough for the extension to work? Best regards, S.
  22. Hi, You have to forward the module name to the base class constructor: foo(sc_core::sc_module_name name) : sc_module(name) {} Or use SC_CTOR instead. Greetings Ralph
  23. Hi. There seems to be a problem with the '#if defined' expressions. MSYS gcc and clang define _WIN32, and in combination with using pthreads, SC_USE_PTHREADS is defined as well. Could you please evaluate possible fixes? E.g. adding '!defined(SC_USE_PTHREADS)' in line 33 of sc_cor_fiber.h? And could you please try with the public review version of SystemC 2.3.2 as well (http://www.accellera.org/downloads/drafts-review)? If this works, I can try to forward the issue to the SystemC developer working group. Greetings Ralph
  24. Hi, After a debug session with Ameya (whom I thank), the build using clang was successful on cygwin but it still fails on MSYS2. Actually the build is failing with both GCC and clang compilers under MSYS2, each of them generating the same compiler error as mentioned in the first post. If anyone has a working MSYS environment in which it was able to build the systemc library, I'd like to have some confirmation. Regards, Andrei
  25. Hello Andrei, From the provided logs I see you have a lot of clang and llvm defined in the path: PATH: /cygdrive/d/_Install/LLVM/bin PATH: /cygdrive/d/Install/CMake/bin PATH: /cygdrive/d/Install/gnuplot/bin PATH: /cygdrive/d/_Install/LLVM012017/LLVM/bin PATH: /cygdrive/c/_Program Files/LLVM/bin PATH: /cygdrive/d/Install/GnuWin32/getGnuWin/GetGnuWin32/gnuwin32/bin PATH: /cygdrive/d/Install/winhex PATH: /cygdrive/d/_Install/MinGW64_2/mingw64/bin PATH: /cygdrive/d/_Install/MinGW64/mingw32/bin PATH: /cygdrive/d/_Install/Msys2/mingw64/bin PATH: /cygdrive/d/_Install/SCBuilder/mingw32/bin PATH: /cygdrive/d/_Install/MinGW/msys/1.0/bin PATH: /cygdrive/c/Windows PATH: /cygdrive/d/Install/Vim PATH: /cygdrive/c/Program Files (x86)/Synopsys/QUASAR3-1.1.1-beta1/libso-msvc-10.0 PATH: /cygdrive/d/Install/Make PATH: /cygdrive/d/Install/GnuWin32/bin PATH: /cygdrive/d/Install/Vim PATH: /cygdrive/d/Install/GNU PATH: /cygdrive/d/Install/LLVM_vs2013/LLVM/bin Try to remove some of them. But first see if you are able to build a simple C++ application using Cygwin clang++. I suspect the clang++ executable is picking up libraries incompatible for it to execute properly. Note: Try to keep all the PATH/other environment variable as clean as possible. I usually have a central location batch/shell scripts from where I will source the environment variables required for the development environment. Windows is much harder development environment to work with and too slow for my preference. Regards, Ameya Vikram Singh
  26. Hi Ameya, Actually with cygwin I get even earlier to a stop, as during the configure process it fails compile a C++ program. (but that may be related again to how complete is my cygwin environment). However within cygwin I manage to build the systemc library with the GCC chain which I'm able to use it, so I still have question marks regarding the reason for this cygwin:clang:configure:failToBuildC++ situation. see attachement. For Virtual Box solution I need more time to evaluate but I'll consider it. Thank you, Andrei config.log
  27. Hello Andrei, I actually checked my SystemC config.log and observe similar behavior from the configure script. For now try building the library and see if the build is progressing or not. In case you are getting similar issue, then if possible try to use a Linux VM in a VirtualBox. If you are not able to use a Linux VM then as a last resort you can try installing cygwin but the performance will not be as good. In the mean time I'll try to find a system where MSYS2 is installed with similar package layout as yours to debug the build issue. Regards, Ameya Vikram Singh
  28. Hi Ameya, The path given to configure was indeed the Windows absolute path. I fixed that. Regarding MSYS2 setup I added some packages(that you mentioned autoconf, automake) and everything containing pthread that I could find but I see no meaningful difference in the way config.log looks like. However, this initial compiler error is independent in my opinion of the availability of the pthread lib. I attach the latest config.log and a list of my installed packages. Appreciate your help. Andrei config.log installed.packages
  1. Load more activity