Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove global originator #83

Closed
twieman opened this issue Jun 13, 2016 · 1 comment
Closed

Remove global originator #83

twieman opened this issue Jun 13, 2016 · 1 comment

Comments

@twieman
Copy link
Contributor

twieman commented Jun 13, 2016

Currently, the accessor updates a global originator variable before calling into the parameter implementation, to track value originators. This came about because at one time both the accessor and implementation inherited from a common parameter interface. That is no longer the case, thanks to resolving #36 (the class diagram changes are depicted there for those interested). The global originator is clunky and causes problems (e.g. 6/1 review of #75, and 6/7 review of #77).

We will now update the parameter implementation methods to accept an originator reference, and get rid of the global variable. Philipp provided this code snippet as an representative expectation for the outcome:
cci_param<T,TM>::set( const T& val ) { m_pImpl()->set(val, m_originator); }

Ballpark effort estimate: 1/2 week.

twieman added a commit that referenced this issue Aug 15, 2016
This resolves #68; legacy parameters will inherit from cci_param_if.  #83 is also fixed.

Several classes have been renamed for improved consistency with core SystemC and general clarity:
- The "accessor" proxy has been renamed "handle", as in sc_process_handle.
- cci_base_param (and other similar names) renamed to cci_param_base, as in sc_port_base/sc_value_base.
- get_value() returns typed value, get_cci_value() returns what you'd expect, get_raw_value() returns void * punned value.
- parameter and handle class names now explicitly reflect which are typed (e.g. cci_param_typed<T>), with shorthand aliases provided for convenience.

Handles are now more explicit (they were subtle and potentially confusing before).

Callbacks are still a gap and will be addressed next.  Examples (beyond ex01, ex02) will be updated in two phases: first those without callbacks then, once callbacks are updated, those with callbacks.
@twieman
Copy link
Contributor Author

twieman commented Aug 15, 2016

Closed by PR #90.

@twieman twieman closed this as completed Aug 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant