Andy,
on the P1666 technical reflector [1], Bishnupriya brought up a quite
long-standing issue related to unwanted operator ambiguities for
sc_(u)int(_base), that can arise when enabling the fixed-point types via
SC_INCLUDE_FX.
As one of the possible solutions, I have then suggested to make the
conversion constructors from the builtin types of sc_fxval(_fast)
explicit, since seems to fix the issue (with some minor backwards
compatibility limitations), see [2] for a summary.
There has been a side discussion with Mac, that there may be other
cases of ambiguities (longer expressions, purely containing sc_fixed),
which I could not reproduce with the reference simulator.
Attached is an archive with a patch against the latest OSCI internal
version of the reference implementation providing the proposed change.
Would you please have a look at this issue and the proposed solution?
I'm afraid, that we might be missing some subtle corner case here...
Thanks,
Philipp
1.
http://www.eda.org/systemc/systemc-p1666/systemc-p1666-technical/hm/0815.html
2.
http://www.eda.org/systemc/systemc-p1666/systemc-p1666-technical/hm/0828.html
Contents of attached archive:
sc_fxval_test.cpp
quick test for some of the problematic expressions
0001-sc_fxval-_fast-make-ctors-explicit.patch
patch to make some of the constructors of sc_fxval(_fast)
explicit, unless SC_FXVAL_IMPLICIT_CONV is defined
(for backwards compatibility, as suggested by David).
0001-fix-tests-for-sc_fxval-explicit-constructors.patch
patch against the SystemC regression tests to fix the
backwards compatibility issues in some of the fixed-point
tests
0002-sc_dt-div_scfx_rep-fix-default-max-word-length.patch
patch, fixing a bug in SystemC 2.3.09jul10_beta, where
the default argument of the sc_dt::div_scfx_rep function
has been broken (unrelated)
-- 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.
This archive was generated by hypermail 2.1.8 : Wed Dec 01 2010 - 14:23:52 PST