sc_time.cc revision 12837
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright 9 * notice, this list of conditions and the following disclaimer in the 10 * documentation and/or other materials provided with the distribution; 11 * neither the name of the copyright holders nor the names of its 12 * contributors may be used to endorse or promote products derived from 13 * this software without specific prior written permission. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * 27 * Authors: Gabe Black 28 */ 29 30#include "base/logging.hh" 31#include "systemc/ext/core/sc_time.hh" 32 33namespace sc_core 34{ 35 36sc_time::sc_time() 37{ 38 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 39} 40 41sc_time::sc_time(double, sc_time_unit) 42{ 43 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 44} 45 46sc_time::sc_time(const sc_time &) 47{ 48 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 49} 50 51sc_time & 52sc_time::operator = (const sc_time &) 53{ 54 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 55 return *this; 56} 57 58sc_dt::uint64 59sc_time::value() const 60{ 61 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 62 return 0; 63} 64 65double 66sc_time::to_double() const 67{ 68 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 69 return 0.0; 70} 71double 72sc_time::to_seconds() const 73{ 74 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 75 return 0.0; 76} 77 78const std::string 79sc_time::to_string() const 80{ 81 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 82 return ""; 83} 84 85bool 86sc_time::operator == (const sc_time &) const 87{ 88 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 89 return true; 90} 91 92bool 93sc_time::operator != (const sc_time &) const 94{ 95 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 96 return false; 97} 98 99bool 100sc_time::operator < (const sc_time &) const 101{ 102 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 103 return false; 104} 105 106bool 107sc_time::operator <= (const sc_time &) const 108{ 109 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 110 return true; 111} 112 113bool 114sc_time::operator > (const sc_time &) const 115{ 116 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 117 return false; 118} 119 120bool 121sc_time::operator >= (const sc_time &) const 122{ 123 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 124 return true; 125} 126 127sc_time & 128sc_time::operator += (const sc_time &) 129{ 130 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 131 return *this; 132} 133 134sc_time & 135sc_time::operator -= (const sc_time &) 136{ 137 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 138 return *this; 139} 140 141sc_time & 142sc_time::operator *= (double) 143{ 144 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 145 return *this; 146} 147 148sc_time & 149sc_time::operator /= (double) 150{ 151 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 152 return *this; 153} 154 155void 156sc_time::print(std::ostream &) const 157{ 158 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 159} 160 161const sc_time 162operator + (const sc_time &, const sc_time &) 163{ 164 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 165 return sc_time(); 166} 167 168const sc_time 169operator - (const sc_time &, const sc_time &) 170{ 171 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 172 return sc_time(); 173} 174 175const sc_time 176operator * (const sc_time &, double) 177{ 178 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 179 return sc_time(); 180} 181 182const sc_time 183operator * (double, const sc_time &) 184{ 185 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 186 return sc_time(); 187} 188 189const sc_time 190operator / (const sc_time &, double) 191{ 192 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 193 return sc_time(); 194} 195 196double 197operator / (const sc_time &, const sc_time &) 198{ 199 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 200 return 0.0; 201} 202 203std::ostream & 204operator << (std::ostream &os, const sc_time &) 205{ 206 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 207 return os; 208} 209 210const sc_time SC_ZERO_TIME; 211 212void 213sc_set_time_resolution(double, sc_time_unit) 214{ 215 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 216} 217 218sc_time 219sc_get_time_resolution() 220{ 221 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 222 return sc_time(); 223} 224 225const sc_time & 226sc_max_time() 227{ 228 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 229 return *(const sc_time *)nullptr; 230} 231 232} // namespace sc_core 233