Jump to content

Philipp A Hartmann

  • Content Count

  • Joined

  • Last visited

  • Days Won


Philipp A Hartmann last won the day on September 3

Philipp A Hartmann had the most liked content!

About Philipp A Hartmann

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location
    Duisburg, DE

Recent Profile Visitors

2,299 profile views
  1. You have multiple instances of the "bundles" in your monitor class: inherited directly as additional members in the nested classes sim and stub To avoid the name clashes, you can make sim and stub modules themselves via: struct sim : sc_module , if_inputs, if_outputs { SC_CTOR(sim) {} } sim { "sim" };
  2. Exit code 0x103 could indicate an "illegal instruction". Can you try building SystemC with --disable-optimize? As Roman mentioned earlier, Clang 8 is pretty new and SystemC has never been tested with Clang on Windows.
  3. Can you run the failing test manually in a debugger and provide more details on the error? The log looks truncated, as if there is a crash in the test.
  4. I cannot comment on old SystemC versions like SystemC 2.3.1. I recommend to run the same with SystemC 2.3.3 instead.
  5. Fix pushed to the public SystemC repository, see https://github.com/accellera-official/systemc/commit/3e4fc6e0e669c727fcbd46100ee1d7ba58ec5894. This fix will be part of a future release of the Accellera reference implementation. Thanks again for reporting the issue!
  6. Hi Rainer, thanks for your detailed report. The issue seems indeed an incomplete implementation of the CCI 1.0 LRM. I'll forward your finding to the Accellera CCI working group. To achieve the expected behavior, you can locally change the from_json implementation to something like: inline cci_value cci_value::from_json( std::string const & json ) { cci_value v; bool ok = v.json_deserialize( json ); if( !ok ) { // report CCI_VALUE_ERROR instead of using sc_assert v.report_error( "JSON conversion failed", __FILE__, __LINE__ ); } return v; } Local error handling on the calling side then looks like: cci::cci_value v; try { v = cci::cci_value::from_json(string); } catch (... ) { // catch CCI value errors only, others are re-thrown cci::cci_handle_exception( cci::CCI_VALUE_FAILURE ); // customize error behavior, e.g. via SC_REPORT_WARNING( ... ); } Thanks and Greetings from Duisburg, Philipp
  7. There is no builtin support for custom-sized floating point types in SystemC. An open-source C++ bfloat16 implementation can be found here: http://half.sourceforge.net. I would expect that this works more or less out of the box in SystemC (maybe you need to implement a custom sc_trace overload). Hope that helps, Philipp
  8. Hi Khushi, just adding to Eyck's answer, the "default" extensions in SystemC 2.3.3 are the following two implementation defined classes: tlm::tlm_endian_context tlm_utils::instance_specific_extension_carrier Greetings from Duisburg, Philipp
  9. Please be aware, that an sc_and_event_list does not imply that the events in the list are triggered at the same time. I would suggest to keep the only the clock sensitivity and act on the triggers in the body of the method instead: SC_METHOD(func2); sensitive << clk.pos(); dont_initialize(); // ... void func2() { if( nreset.posedge() ) { // nreset went high in this clock cycle // ... } } Alternatively, you can be sensitive to nreset.pos() and check for clk.posedge() (as a consistency check), if you don't have anything else to do in the body of the method. With this approach, you might be able to avoid unnecessary triggers of the method. Side note to Eyck: There's a small typo in the example above, which should should use "&=" to append to an sc_event_and_list. ev_list &= nreset;
  10. Port-to-port binding is not tracked by SystemC after elaboration is completed. You can try to restore (or at least approximate) the mapping yourself by checking "overlap" in the get_interface() results across ports and the hierarchical relationship between the ports' parent objects.
  11. Changing the default writer policy requires to be set consistently throughout the whole application, which might be difficult with third-party infeeds. Since SystemC 2.3.2, you can also set the environment variable SC_SIGNAL_WRITE_CHECK=CONFLICT, which effectively enables SC_MANY_WRITERS at runtime (for all signals, though). Quoting the release notes: - [2.3.2] Add support for SC_SIGNAL_WRITE_CHECK=CONFLICT Instead of disabling all runtime signal write checks via the environment setting SC_SIGNAL_WRITE_CHECK=DISABLE, setting the variable to SC_SIGNAL_WRITE_CHECK=CONFLICT allows detecting conflicting writes to a signal within a single evaluation phase (see INSTALL).
  12. Won't you have multiple drivers anyway as soon as you have a second initiator accessing your transactor? I would recommend to switch your pin interface to use sc_export<sc_signal_*_if<T> > instead of plain signal ports and bind signals with an SC_MANY_WRITERS policy internally. These signals also have constructors that allow initialization to a non-zero value without triggering an event at the start of simulation.
  13. If your company is an Accellera member already, I encourage you to join the SystemC language working group. Otherwise, you can find some documentation about the changes in the RELEASENOTES file of each release (although this particular feature seems to miss an entry :-/).
  14. The match will occur (almost) at the "correct" point in time during the simulation. However, if you sample the value from an unrelated process, there might be some process evaluation ordering dependency (i.e. whether the update_method had already been run). It depends on your requirements, whether this might be an issue. If you do the checks outside of the simulation, i.e. between sc_start calls, you would need to complete the deltas (as per the loop sketched above) before every check. You cannot call sc_start during end_of_simulation.
  15. I don't fully understand the question? My snippet above runs all remaining delta cycles at the current time without advancing the time any further. You can wrap your original sc_start call with the loop in a small helper function (e.g. sc_start_including_deltas(...) , if you find yourself copying the snippet too often.
  • Create New...