sc_module.cc revision 12928
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 <memory> 31#include <vector> 32 33#include "base/logging.hh" 34#include "systemc/ext/core/sc_module.hh" 35 36namespace sc_core 37{ 38 39sc_bind_proxy::sc_bind_proxy(const sc_interface &interface) 40{ 41 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 42} 43 44sc_bind_proxy::sc_bind_proxy(const sc_port_base &port) 45{ 46 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 47} 48 49const sc_bind_proxy SC_BIND_PROXY_NUL(*(const sc_port_base *)nullptr); 50 51sc_module::~sc_module() 52{ 53 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 54} 55 56const char * 57sc_module::kind() const 58{ 59 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 60 return ""; 61} 62 63const sc_bind_proxy SC_BIND_PROXY_NIL(*(const sc_port_base *)nullptr); 64 65void 66sc_module::operator () (const sc_bind_proxy &p001, 67 const sc_bind_proxy &p002, 68 const sc_bind_proxy &p003, 69 const sc_bind_proxy &p004, 70 const sc_bind_proxy &p005, 71 const sc_bind_proxy &p006, 72 const sc_bind_proxy &p007, 73 const sc_bind_proxy &p008, 74 const sc_bind_proxy &p009, 75 const sc_bind_proxy &p010, 76 const sc_bind_proxy &p011, 77 const sc_bind_proxy &p012, 78 const sc_bind_proxy &p013, 79 const sc_bind_proxy &p014, 80 const sc_bind_proxy &p015, 81 const sc_bind_proxy &p016, 82 const sc_bind_proxy &p017, 83 const sc_bind_proxy &p018, 84 const sc_bind_proxy &p019, 85 const sc_bind_proxy &p020, 86 const sc_bind_proxy &p021, 87 const sc_bind_proxy &p022, 88 const sc_bind_proxy &p023, 89 const sc_bind_proxy &p024, 90 const sc_bind_proxy &p025, 91 const sc_bind_proxy &p026, 92 const sc_bind_proxy &p027, 93 const sc_bind_proxy &p028, 94 const sc_bind_proxy &p029, 95 const sc_bind_proxy &p030, 96 const sc_bind_proxy &p031, 97 const sc_bind_proxy &p032, 98 const sc_bind_proxy &p033, 99 const sc_bind_proxy &p034, 100 const sc_bind_proxy &p035, 101 const sc_bind_proxy &p036, 102 const sc_bind_proxy &p037, 103 const sc_bind_proxy &p038, 104 const sc_bind_proxy &p039, 105 const sc_bind_proxy &p040, 106 const sc_bind_proxy &p041, 107 const sc_bind_proxy &p042, 108 const sc_bind_proxy &p043, 109 const sc_bind_proxy &p044, 110 const sc_bind_proxy &p045, 111 const sc_bind_proxy &p046, 112 const sc_bind_proxy &p047, 113 const sc_bind_proxy &p048, 114 const sc_bind_proxy &p049, 115 const sc_bind_proxy &p050, 116 const sc_bind_proxy &p051, 117 const sc_bind_proxy &p052, 118 const sc_bind_proxy &p053, 119 const sc_bind_proxy &p054, 120 const sc_bind_proxy &p055, 121 const sc_bind_proxy &p056, 122 const sc_bind_proxy &p057, 123 const sc_bind_proxy &p058, 124 const sc_bind_proxy &p059, 125 const sc_bind_proxy &p060, 126 const sc_bind_proxy &p061, 127 const sc_bind_proxy &p062, 128 const sc_bind_proxy &p063, 129 const sc_bind_proxy &p064) 130{ 131 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 132} 133 134const std::vector<sc_object *> & 135sc_module::get_child_objects() const 136{ 137 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 138 return *(const std::vector<sc_object *> *)nullptr; 139} 140 141const std::vector<sc_event *> & 142sc_module::get_child_events() const 143{ 144 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 145 return *(const std::vector<sc_event *> *)nullptr; 146} 147 148sc_module::sc_module(const sc_module_name &) 149{ 150 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 151} 152 153sc_module::sc_module() 154{ 155 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 156} 157 158sc_module::sc_module(const char *) 159{ 160 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 161} 162 163sc_module::sc_module(const std::string &) 164{ 165 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 166} 167 168void 169sc_module::reset_signal_is(const sc_in<bool> &, bool) 170{ 171 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 172} 173 174void 175sc_module::reset_signal_is(const sc_inout<bool> &, bool) 176{ 177 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 178} 179 180void 181sc_module::reset_signal_is(const sc_out<bool> &, bool) 182{ 183 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 184} 185 186void 187sc_module::reset_signal_is(const sc_signal_in_if<bool> &, bool) 188{ 189 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 190} 191 192 193void 194sc_module::async_reset_signal_is(const sc_in<bool> &, bool) 195{ 196 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 197} 198 199void 200sc_module::async_reset_signal_is(const sc_inout<bool> &, bool) 201{ 202 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 203} 204 205void 206sc_module::async_reset_signal_is(const sc_out<bool> &, bool) 207{ 208 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 209} 210 211void 212sc_module::async_reset_signal_is(const sc_signal_in_if<bool> &, bool) 213{ 214 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 215} 216 217 218void 219sc_module::dont_initialize() 220{ 221 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 222} 223 224void 225sc_module::set_stack_size(size_t) 226{ 227 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 228} 229 230 231void 232sc_module::next_trigger() 233{ 234 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 235} 236 237void 238sc_module::next_trigger(const sc_event &) 239{ 240 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 241} 242 243void 244sc_module::next_trigger(const sc_event_or_list &) 245{ 246 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 247} 248 249void 250sc_module::next_trigger(const sc_event_and_list &) 251{ 252 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 253} 254 255void 256sc_module::next_trigger(const sc_time &) 257{ 258 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 259} 260 261void 262sc_module::next_trigger(double, sc_time_unit) 263{ 264 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 265} 266 267void 268sc_module::next_trigger(const sc_time &, const sc_event &) 269{ 270 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 271} 272 273void 274sc_module::next_trigger(double, sc_time_unit, const sc_event &) 275{ 276 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 277} 278 279void 280sc_module::next_trigger(const sc_time &, const sc_event_or_list &) 281{ 282 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 283} 284 285void 286sc_module::next_trigger(double, sc_time_unit, const sc_event_or_list &) 287{ 288 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 289} 290 291void 292sc_module::next_trigger(const sc_time &, const sc_event_and_list &) 293{ 294 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 295} 296 297void 298sc_module::next_trigger(double, sc_time_unit, const sc_event_and_list &) 299{ 300 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 301} 302 303 304void 305sc_module::wait() 306{ 307 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 308} 309 310void 311sc_module::wait(int) 312{ 313 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 314} 315 316void 317sc_module::wait(const sc_event &) 318{ 319 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 320} 321 322void 323sc_module::wait(const sc_event_or_list &) 324{ 325 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 326} 327 328void 329sc_module::wait(const sc_event_and_list &) 330{ 331 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 332} 333 334void 335sc_module::wait(const sc_time &) 336{ 337 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 338} 339 340void 341sc_module::wait(double, sc_time_unit) 342{ 343 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 344} 345 346void 347sc_module::wait(const sc_time &, const sc_event &) 348{ 349 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 350} 351 352void 353sc_module::wait(double, sc_time_unit, const sc_event &) 354{ 355 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 356} 357 358void 359sc_module::wait(const sc_time &, const sc_event_or_list &) 360{ 361 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 362} 363 364void 365sc_module::wait(double, sc_time_unit, const sc_event_or_list &) 366{ 367 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 368} 369 370void 371sc_module::wait(const sc_time &, const sc_event_and_list &) 372{ 373 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 374} 375 376void 377sc_module::wait(double, sc_time_unit, const sc_event_and_list &) 378{ 379 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 380} 381 382 383void 384sc_module::halt() 385{ 386 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 387} 388 389void 390sc_module::at_posedge(const sc_signal_in_if<bool> &) 391{ 392 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 393} 394 395void 396sc_module::at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &) 397{ 398 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 399} 400 401void 402sc_module::at_negedge(const sc_signal_in_if<bool> &) 403{ 404 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 405} 406 407void 408sc_module::at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &) 409{ 410 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 411} 412 413 414void 415next_trigger() 416{ 417 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 418} 419 420void 421next_trigger(const sc_event &) 422{ 423 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 424} 425 426void 427next_trigger(const sc_event_or_list &) 428{ 429 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 430} 431 432void 433next_trigger(const sc_event_and_list &) 434{ 435 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 436} 437 438void 439next_trigger(const sc_time &) 440{ 441 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 442} 443 444void 445next_trigger(double, sc_time_unit) 446{ 447 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 448} 449 450void 451next_trigger(const sc_time &, const sc_event &) 452{ 453 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 454} 455 456void 457next_trigger(double, sc_time_unit, const sc_event &) 458{ 459 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 460} 461 462void 463next_trigger(const sc_time &, const sc_event_or_list &) 464{ 465 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 466} 467 468void 469next_trigger(double, sc_time_unit, const sc_event_or_list &) 470{ 471 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 472} 473 474void 475next_trigger(const sc_time &, const sc_event_and_list &) 476{ 477 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 478} 479 480void 481next_trigger(double, sc_time_unit, const sc_event_and_list &) 482{ 483 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 484} 485 486 487void 488wait() 489{ 490 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 491} 492 493void 494wait(int) 495{ 496 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 497} 498 499void 500wait(const sc_event &) 501{ 502 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 503} 504 505void 506wait(const sc_event_or_list &) 507{ 508 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 509} 510 511void 512wait(const sc_event_and_list &) 513{ 514 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 515} 516 517void 518wait(const sc_time &) 519{ 520 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 521} 522 523void 524wait(double, sc_time_unit) 525{ 526 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 527} 528 529void 530wait(const sc_time &, const sc_event &) 531{ 532 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 533} 534 535void 536wait(double, sc_time_unit, const sc_event &) 537{ 538 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 539} 540 541void 542wait(const sc_time &, const sc_event_or_list &) 543{ 544 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 545} 546 547void 548wait(double, sc_time_unit, const sc_event_or_list &) 549{ 550 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 551} 552 553void 554wait(const sc_time &, const sc_event_and_list &) 555{ 556 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 557} 558 559void 560wait(double, sc_time_unit, const sc_event_and_list &) 561{ 562 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 563} 564 565void 566halt() 567{ 568 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 569} 570 571void 572at_posedge(const sc_signal_in_if<bool> &) 573{ 574 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 575} 576 577void 578at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &) 579{ 580 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 581} 582 583void 584at_negedge(const sc_signal_in_if<bool> &) 585{ 586 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 587} 588 589void 590at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &) 591{ 592 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 593} 594 595const char * 596sc_gen_unique_name(const char *) 597{ 598 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 599 return ""; 600} 601 602bool 603sc_start_of_simulation_invoked() 604{ 605 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 606 return false; 607} 608 609bool 610sc_end_of_simulation_invoked() 611{ 612 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 613 return false; 614} 615 616sc_module * 617sc_module_sc_new(sc_module *mod) 618{ 619 static std::vector<std::unique_ptr<sc_module> > modules; 620 modules.emplace_back(mod); 621 return mod; 622} 623 624} // namespace sc_core 625