Jump to content

David Black

  • Content Count

  • Joined

  • Last visited

  • Days Won


David Black last won the day on December 11

David Black had the most liked content!

About David Black

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,996 profile views
  1. You specified a signed number which was converted to unsigned under rules of twos complement. Change “0x to “0xus and you will obtain desired results. See section 7.3 String literals on page 199 of IEEE-1666-2011 for more information.
  2. Possibly editing using a UTF-8 editor and inserted 3 weird characters.
  3. Observation: gets() is now considered forbidden in C since it is the cause of many hack attacks to create buffer overflow. get_s is recommended because it puts an upper limit on the number of acceptable characters. Although C++ std::string can handle large strings, it could still be an issue. I am not saying you should never use it, but please be aware. I realize our SystemC activities are usually confined to safe internal use only situations, but I can forsee examples on the open web that might lead to an issue. [Note: I teach C/C++ security courses in addition to my SystemC activities..]
  4. As the error message says, you are missing the required sc_main subroutine. You did not show your invocation line, which could be helpful.
  5. Doulos UVM Golden Reference Guide Kindle Edition: https://www.amazon.com/dp/B01HDQEN0Q/ref=cm_sw_em_r_mt_dp_U_4YeXDb7QW80NC
  6. No for a port; however, you could accomplish the goal with an sc_port< sc_signal<T> >
  7. Write your own channel, which is really quite simple(*). You could provide a template specialization of sc_fifo as a convenient and familiar interface. * It's just C++. We show students how to write their own FIFO channel as part of our Fundamentals of SystemC course <https://www.doulos.com/content/training/systemc_fundamental_training.php>.
  8. It should also be noted that sc_event::notify (all variants) are not blocking methods. You would have to yield your process to see the effects. Yielding is accomplished in SC_THREAD using the sc_core::wait (all variants) methods.
  9. UVM-SystemC is a library. It is not a tool. You are expected to be very knowledgeable in both C++ and SystemC before using it. Knowledge of SystemVerilog UVM is useful. To use on the command-line you would have to decide your build methodology (probably make) and create appropriate files for that. RTFM please.
  10. Logging in with a social accounts gives you access to all non-commercial simulators and some commercial simulators. If you want to use all the commercial simulators, you need a commercial/work e-mail address. For SystemC you don't need the commercial simulators.
  11. This is both well known and well defined in the specification: sc_event only queues a single event for future notification notify immediate cancels the outstanding queued event and "happens" immediately. This is why it is called "immediate". If you attempt to queue non-zero notifications, only notifications nearer to the current time replace old ones. SC_ZERO_TIME can only be superceded by immediate notification. If you need to queue multiple notifications use the sc_event_queue.
  12. It is unclear where your std::cout is located. The earliest I would expect is inside start_of_simulation() or as the first thing inside an SC_THREAD. But your code has another issue. You are declaring two independent variables. One in the struct, and the other as a stack located version with an initial value of 4 ms. Perhaps you meant to do something like: https://www.edaplayground.com/x/2c9j
  13. Port not bound means that you forgot to connect a port. SystemC does not allow unconnected ports (at least not without some extra work). If you didn't name your port instances explicitly, SystemC arranges to have them named "port_0", "port_1", "port_2", ... etc. So you apparently have five ports on some module and you've only connected four of them.
  14. wait(SC_ZERO_TIME); But perhaps there is more to your question. You probably need to provide some code to get a more comprehensive answer. For example, the above assumes an SC_THREAD process. If you have an SC_METHOD, then you would use: next_trigger(SC_ZERO_TIME); combined with some FSM mechanism.
  • Create New...