vasu_c Posted July 10, 2018 Report Share Posted July 10, 2018 Hi, 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; 295 296 m_new_val = value_; 297 if( value_changed || policy_type::needs_update() ) { 298 request_update(); 299 } 300 } Thanks for all the help. Quote Link to comment Share on other sites More sharing options...
maehne Posted July 11, 2018 Report Share Posted July 11, 2018 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: Quote 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: Quote - Correctly detect all conflicting signal writes under the SC_MANY_WRITERS writer policy. Philipp A Hartmann and David Black 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.