Review: sc_writer_policy

From: Philipp A. Hartmann <philipp.hartmann@offis.de>
Date: Mon Nov 22 2010 - 05:39:58 PST

John,

while cleaning up my implementation along the wording of the
sc_writer_policy in the new Draft LRM, I've noticed some minor issues in
the definitions:

Assignment operators sc_signal/buffer:

  To support assignments from signals with different policies, I think
  we should add an assignment operator, taking sc_signal_in_if<T> to
  all signal variants.

  For sc_signal, this would lead to (signal variant still needed to
  avoid pre-defined operator=):

  sc_signal<T,POL>& operator=( T const& );
  sc_signal<T,POL>& operator=( sc_signal_in_if<T> const& );
  sc_signal<T,POL>& operator=( sc_signal<T,POL> const& );

  For sc_buffer, we can change the sc_signal overload to interface
  variant:

  sc_buffer<T,POL>& operator=( T const& );
  sc_buffer<T,POL>& operator=( sc_signal_in_if<T> const& );
  sc_buffer<T,POL>& operator=( sc_buffer<T,POL> const& );

Output stream operator (typos):

  template <class T, sc_writer_policy WRITER_POLICY = SC_ONE_WRITER>
  inline std::ostream&
  operator<< ( std::ostream&, const sc_signal<T,WRITER_POLICY>& );

  -> default argument not allowed for template functions [7.4.2]

  In 7.4.11, the second template parameter is missing.

sc_signal<bool/sc_logic>::get_writer_policy

  For the bool/sc_logic specialisations, the get_writer_policy functions
  are missing.

Greertings from Oldenburg,
Philipp

-- 
Philipp A. Hartmann
Hardware/Software Design Methodology Group
OFFIS Institute for Information Technology
R&D Division Transportation · FuE-Bereich Verkehr
Escherweg 2 · 26121 Oldenburg · Germany · http://offis.de/en/
Phone/Fax: +49-441-9722-420/282 · PGP: 0x9161A5C0 · Skype: phi.har
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Nov 22 05:40:31 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 22 2010 - 05:40:33 PST