sc_time.cc revision 12923
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 161sc_time 162sc_time::from_value(sc_dt::uint64) 163{ 164 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 165 return sc_time(); 166} 167 168sc_time 169sc_time::from_seconds(double) 170{ 171 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 172 return sc_time(); 173} 174 175sc_time 176sc_time::from_string(const char *str) 177{ 178 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 179 return sc_time(); 180} 181 182const sc_time 183operator + (const sc_time &, 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 &, const sc_time &) 191{ 192 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 193 return sc_time(); 194} 195 196const sc_time 197operator * (const sc_time &, double) 198{ 199 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 200 return sc_time(); 201} 202 203const sc_time 204operator * (double, const sc_time &) 205{ 206 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 207 return sc_time(); 208} 209 210const sc_time 211operator / (const sc_time &, double) 212{ 213 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 214 return sc_time(); 215} 216 217double 218operator / (const sc_time &, const sc_time &) 219{ 220 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 221 return 0.0; 222} 223 224std::ostream & 225operator << (std::ostream &os, const sc_time &) 226{ 227 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 228 return os; 229} 230 231const sc_time SC_ZERO_TIME; 232 233void 234sc_set_time_resolution(double, sc_time_unit) 235{ 236 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 237} 238 239sc_time 240sc_get_time_resolution() 241{ 242 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 243 return sc_time(); 244} 245 246const sc_time & 247sc_max_time() 248{ 249 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 250 return *(const sc_time *)nullptr; 251} 252 253void 254sc_set_default_time_unit(double, sc_time_unit) 255{ 256 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 257} 258 259sc_time 260sc_get_default_time_unit() 261{ 262 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 263 return *(sc_time *)nullptr; 264} 265 266} // namespace sc_core 267