Jump to content

Recommended Posts

Posted

Hi everyone,

I'm concerned about when to use sc_signal or sc_buffer.

I understand that sc_buffer is derived from sc_signal and the supported value change event will be notified whenever the buffer is written whether the value of the buffer has changed or not

However, are there any other differences? such as performance, complexity...?

When should sc_buffer be used, when should sc_signal be used? Since sc_buffer has some advantages, should we use sc_buffer for all cases?

Thank you.

Nhu Vo.

Posted

Per default, I would recommend you to prefer sc_signal, as it yields optimal performance for the common case, where you want to cause activation of a listening thread/method only when the signal‘s value has actually changed. sc_buffer is primarily useful, when you want to synchronise thread/method executions based on each write - even if the same value got written.

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.

Guest
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...