Jump to content

David Black

  • Content Count

  • Joined

  • Last visited

  • Days Won


David Black last won the day on April 6

David Black had the most liked content!

About David Black

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,814 profile views
  1. Could you put your example on EDA playground.com and share the link?
  2. Post your code on EDAplayground and I might have a look later.
  3. I concur with Eyck's comments. A few more thoughts: SystemC-processes are very different from OS processes. SystemC itself runs inside a single OS-thread. SystemC uses cooperative multitasking to simulate SystemC processes, which come in three flavors: SC_THREAD, SC_METHOD, and SC_CTHREAD (for synthesis). This is common among discrete event-driven simulators (e.g., Verilog, SystemVerilog, and VHDL use the same idea) Cooperative multitasking simplifies the coding a lot to make it easier for designers using these simulators. When documenting, I fin
  4. Your problem is in the verilog because you created a race condition. Replace the $display with $strobe to see the proper settled condition of the signals. See https://www.edaplayground.com/x/9KdZ Perhaps you have not been formally trained in the semantics of event driven simulation.
  5. With some corrections, it works on EDA playground <https://edaplayground.com/x/q3Ei>. Note: You do really don't need those deleted copy-constructors, etc. Rule of zero works. Also SC_HAS_PROCESS works best inside the thread. Also works on under Ubuntu with GCC 10.0.
  6. That's an odd question since: 1. SystemC is software (C++ actually). 2. SystemC is used to model software running on hardware. So, most folks would model the hardware and use the software to validate the use cases. The next step would be to implement the hardware and then run the software on the real hardware. Some of the software used in a SystemC model would possibly be transformed into hardware (e.g., using an HLS synthesis tool such as Cadence Stratus, Siemens EDA's Catapult or Xilinx Vitis_HLS) or conventionally with RTL. Where is the software you ask? It depends on yo
  7. If you want real help, you need to show us the source code. At a minimum, we would need to see the signal declarationwithin its context, and the location of it's constructor and write method. If using a custom datatype, we need to know that definition. Also, what compiler switches are used (e.g., -Wall -Wextra -std=?)? What compilation warnings are emitted? What version of SystemC?
  8. Be aware that SystemC kernel is not threadsafe with exception of async_request_update(). So you must code accordingly.
  9. Suggestions: 1. use stricter compilation rules such as -pedantic -Wall -Wextra and require all compilations to have zero warnings. This methodology will catch most errors. Use Ptah as to make exceptions around specific warnings you allow but only when you are certain and only for short code segments. 2. Switch from g++ to clang++ 3. Run static analysis and lint tools on your code Consider using Jetbrains’ CLion toolset. Inexpensive for what it does.
  10. You should also take a look at uvm_heartbeat. It might be appropriate.
  11. Consider using a uvm_event from the uvm_event pool and possibly a uvm_event_callback. Monitor 1 sends a delayed event: task monitor1::run_phase( uvm_phase phase); My_transaction sent_txn; uvm_event sent_evt = uvm_event_pool::get_global_pool().get("my_timed_event"); uvm_event rcvd_evt = uvm_event_pool::get_global_pool().get("my_received_event"); forever begin ... collect transaction ... timeout: fork begin received_evt.wait_trigger(); disable timeout; #timeout evt.trigger( sent_txn ); join_none end endtask: monitor1 Monitor 2 sends received transact
  12. I think you are slicing the data structure. See https://stackoverflow.com/questions/274626/what-is-object-slicing.
  13. sc_core::wait will always move to a subsequent (i.e., different) delta cycle. // sc_time_stamp: 0 s sc_delta_count:0 wait( 1, SC_US ); // sc_time_stamp: 1 us sc_delta_count:1 wait( SC_ZERO_TIME ); // sc_time_stamp: 1 us sc_delta_count: 2 wait( 2, SC_NS ); // sc_time_stamp: 1002 ns sc_delta_count: 3
  14. I would further suggest that the static casting sounds suspicious, but without actual code we cannot determine much about the situation. Ideally you could put a subset of your code on www.EDAplayground.com and share a link. You might also consider turning on compiler switches such as GCC’s --pedantic and -Wall to see if the are any coding violations.
  15. Probably because LeakSanitizer was designed with a proper understanding of pthreads; whereas, the non-pthreads implementation uses Q(uick)Threads (or some variant), which implements some assembly language to play with the processor stack to perform context switching. This confuses most if not all memory analysis programs. Pthreads is more universal but slightly slower than QThreads.
  • Create New...