History log of /gem5/src/systemc/core/sc_time.cc
Revision Date Author Comments
# 13410:a03275d35b40 07-Nov-2018 Gabe Black <gabeblack@google.com>

systemc: Stop using python to set/manage the global time resolution.

Now that that's managed in c++, we can do that directly without having
to depend on the python code being available, the code which lets us
call from c++ to python, or for the embedded python interpretter to
have started running and have loaded the appropriate modules.

Change-Id: Ied110d8f22181095f8c0c645636a9bd67964263e
Reviewed-on: https://gem5-review.googlesource.com/c/14056
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>


# 13335:299a16ef8e3c 10-Oct-2018 Gabe Black <gabeblack@google.com>

systemc: Get rid of leftovers from unimplemented warnings past.

These warnings were removed when the functionality they warned about
was implemented, but there were some leftovers like unnecessary
includes and some helper functions which hid gem5 specific headers
from the ext directory.

Change-Id: Ic886ac0f1264687524e3a7b7eaab8836f318a5a2
Reviewed-on: https://gem5-review.googlesource.com/c/13398
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13317:36c574a4036e 07-Oct-2018 Gabe Black <gabeblack@google.com>

systemc: Switch to using predefined messages for core.

Create and use predefined messages for core which match the ones
Accellera uses.

Change-Id: I05b1398933f753946d5917f39d0f39c7cb45ed9f
Reviewed-on: https://gem5-review.googlesource.com/c/13323
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13265:6cde60ee99fb 27-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Add a non-standard sc_time constructor and from_string.

The sc_time constructor was being called, but because of implicit type
conversions, a const char * was being treated as a bool and totally
unrelated constructor was being called.

This change adds and implements the missing but non-standard
constructor. It also implements the from_string function which uses
that constructor.

Change-Id: I21e7e40fd1a8d1c579b1abdc2036d016501f510c
Reviewed-on: https://gem5-review.googlesource.com/c/13191
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13263:bcd6d8140486 27-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Implement the sc_time_tuple class.

This class is non-standard and is an implementation detail in
Accellera's implementation, but is referred to directly by the tests.
It does the same thing as the time printing function, so rather than
having duplicate code the printing function now uses the sc_time_tuple
class even though it was doing fine on its own already.

Change-Id: I69594ed0651f212ded6d979d60523bb3b0a789b1
Reviewed-on: https://gem5-review.googlesource.com/c/13189
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13252:8814e5d87a48 22-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Move some constants out of sc_time.cc for other files to use.

Change-Id: Ic88c6834dfe980022e58a3d859ea53193a55bbb1
Reviewed-on: https://gem5-review.googlesource.com/c/12971
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13247:4aafce81e7dd 22-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Add an error check to sc_time.

Change-Id: Ie525a1624a6496a51277fb984cbfeec21eb79749
Reviewed-on: https://gem5-review.googlesource.com/c/12966
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13195:de9e5572ac44 10-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Stop assuming picoseconds as the time resolution.

Also adjust some code to avoid floating point rounding problems and
integer overflow issues.

Change-Id: Ib4b9c4cf4af00333951db5ce07819556141aa5da
Reviewed-on: https://gem5-review.googlesource.com/c/12614
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13177:7b750aeab360 05-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Implement sc_time::to_string.

This is just another way to call sc_time::print, but it returns a
string instead of printing to a stream.

Change-Id: Idc90c539127e6153af9511bfe5f258b870362330
Reviewed-on: https://gem5-review.googlesource.com/c/12596
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13151:5ce517287782 01-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Add some error checks to sc_set_default_time_unit.

Change-Id: I1d21c56d3b39044d91c96c98d242a571c099707c
Reviewed-on: https://gem5-review.googlesource.com/c/12463
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13149:91e215a2da78 01-Sep-2018 Gabe Black <gabeblack@google.com>

systemc: Implement sc_(g|s)et_time_resolution.

Change-Id: If546bea633e777cdb2b14f47c0d9d50b044b99cf
Reviewed-on: https://gem5-review.googlesource.com/c/12461
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13124:538eff58fb30 28-Aug-2018 Gabe Black <gabeblack@google.com>

systemc: Implement support for the default time unit.

This is deprecated, but still used in the tests.

Change-Id: I454540e419c53624a37f3d1271cb240415b816b6
Reviewed-on: https://gem5-review.googlesource.com/c/12276
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13057:b1cdffff3bed 15-Aug-2018 Gabe Black <gabeblack@google.com>

systemc: Implement a little more of sc_time.

This change implements a pair of constructors, and some conversion
functions.

Change-Id: Ibd0e9ec5bcc24f4a17896313996b3112b5ef1934
Reviewed-on: https://gem5-review.googlesource.com/12208
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13040:877a6e22f8d4 07-Aug-2018 Gabe Black <gabeblack@google.com>

systemc: Implement a few more member functions for sc_time.

Change-Id: I40a7fb278f2a0ec4124589e02e4441c1866c86ea
Reviewed-on: https://gem5-review.googlesource.com/12071
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13039:0c8ecf92a420 07-Aug-2018 Gabe Black <gabeblack@google.com>

systemc: Use the new python interface to delay fixing the timescale.

This is necessary if an sc_time object is constructed globally, either
directly or indirectly, before python is available to fix the
timescale. The call will be deferred until the interpretter is up and
ready.

Change-Id: I486c0a90d44a0e0f0ad8c530b7148e1cff04a5cc
Reviewed-on: https://gem5-review.googlesource.com/12070
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12989:f5e0cebe6999 20-Jul-2018 Gabe Black <gabeblack@google.com>

systemc: Implement + and - for sc_time, and sc_max_time.

Change-Id: I294b63840e42e2afdef198229adc60ddbb60b9a1
Reviewed-on: https://gem5-review.googlesource.com/12040
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12986:761e57785c6a 20-Jul-2018 Gabe Black <gabeblack@google.com>

systemc: Fix the time resolution when constructing an sc_time.

This is (sort of) mandated by the spec. More specifically the spec says
that the systemc API for changing the time resolution can only be
called once, and can only be called before a non-zero sc_time is
constructed.

Because sc_time can be constructed during elaboration and the gem5
version of time resolution is generally not locked down until the
actual simulation starts (after elaboration), the sc_time constructor
needs to call the fixing function itself to ensure that, for instance,
the scaling factors for various real life time units within gem5 are
initialized.

Change-Id: Ied4b43659834761b55b5ae49ea62779af891d9e3
Reviewed-on: https://gem5-review.googlesource.com/12037
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12983:fb1f462ae89e 19-Jul-2018 Gabe Black <gabeblack@google.com>

systemc: Implement some of the basics of sc_time.

This is a very incomplete implementation, but is enough to unblock
implementing some other dependent features.

Change-Id: Ibd2f3476fe01389e277c6956d48337f551d14acd
Reviewed-on: https://gem5-review.googlesource.com/12034
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12927:6be191c20575 16-Jun-2018 Gabe Black <gabeblack@google.com>

systemc: Add the non-standard sc_time_tuple class.

Change-Id: Ia3d6a6a4ea3383c82605653faac570ced7bebb70
Reviewed-on: https://gem5-review.googlesource.com/11277
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12925:a745745a930b 15-Jun-2018 Gabe Black <gabeblack@google.com>

systemc: Add deprecated sc_time constructors.

Change-Id: Iffae751272302ff2996258a1ab31b086e12bbb8d
Reviewed-on: https://gem5-review.googlesource.com/11275
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12923:8a77b84341de 15-Jun-2018 Gabe Black <gabeblack@google.com>

systemc: Add some deprecated sc_time factory methods.

Change-Id: I0d9a7040a48b9f0d0079e9daecaf44ea78c186de
Reviewed-on: https://gem5-review.googlesource.com/11273
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12916:8fa0c4e23f69 15-Jun-2018 Gabe Black <gabeblack@google.com>

systemc: Add deprecated default time unit management functions.

Having default time units is deprecated, and so are the functions that
manage them.

Change-Id: Ie21f9a5fca9868dd4f0adcd9f32c568fbec1fa72
Reviewed-on: https://gem5-review.googlesource.com/11270
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12837:413a7b490b1b 08-May-2018 Gabe Black <gabeblack@google.com>

systemc: Seperate the "external" header interface.

Most (but not all) of the SystemC headers are part of the "external"
interface that an existing, standard compliant module would include
through <systemc.h> or <systemc>. Since those follow slightly different
rules (relative includes, no gem5 includes), this change separates them
out so that they're easier to identify.

Also, this change moves the other files into a "core" subdirectory,
with the intention to add a "dt", aka data type, directory some time in
the future when those standard defined types are implemented.

Change-Id: Ida63f9cc0bc0431024d4dd691cc5b22b944a99a8
Reviewed-on: https://gem5-review.googlesource.com/10835
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>