Jump to content

request_update() call when the writer policy is set to SC_MANY_WRITERS.


Recommended Posts


With the writer policy set to SC_MANY_WRITERS, the following code in sc_signal.h ends up calling request_update() because policy_type::needs_update() always returns true for SC_MANY_WRITERS though there is no value change This is different from SystemC-2.3.1.  Is this an intentional change ? I looked through the LRM but did not come across anything that mentions about this.

289 sc_signal_t<T,POL>::write( const T& value_ )
290 {
291     // first write per eval phase: m_new_val == m_cur_val
292     bool value_changed = !( m_new_val == value_ );
293     if ( !policy_type::check_write(this, value_changed) )
294         return;
296     m_new_val = value_;
297     if( value_changed || policy_type::needs_update() ) {
298         request_update();
299     }
300 }

Thanks for all the help.


Link to comment
Share on other sites

Yes, this change in behaviour of SystemC 2.3.2 with respect to SystemC 2.3.1 is intentional to better conform to IEEE Std 1666-2011, which states in clause 6.4.4 about signal writes under the SC_MANY_WRITERS policy:


If the template argument WRITER_POLICY has the value SC_MANY_WRITERS, it shall be an error to write to a given signal instance from more than one process instance during any given evaluation phase, but different process instances may write to a given signal instance during different delta cycles.

 This fix by @Philipp A Hartmann is documented in the RELEASENOTES of SystemC 2.3.2:


  - Correctly detect all conflicting signal writes under the SC_MANY_WRITERS writer policy.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...