sc_module.cc revision 12958
112027Sjungma@eit.uni-kl.de/* 212027Sjungma@eit.uni-kl.de * Copyright 2018 Google, Inc. 312027Sjungma@eit.uni-kl.de * 412027Sjungma@eit.uni-kl.de * Redistribution and use in source and binary forms, with or without 512027Sjungma@eit.uni-kl.de * modification, are permitted provided that the following conditions are 612027Sjungma@eit.uni-kl.de * met: redistributions of source code must retain the above copyright 712027Sjungma@eit.uni-kl.de * notice, this list of conditions and the following disclaimer; 812027Sjungma@eit.uni-kl.de * redistributions in binary form must reproduce the above copyright 912027Sjungma@eit.uni-kl.de * notice, this list of conditions and the following disclaimer in the 1012027Sjungma@eit.uni-kl.de * documentation and/or other materials provided with the distribution; 1112027Sjungma@eit.uni-kl.de * neither the name of the copyright holders nor the names of its 1212027Sjungma@eit.uni-kl.de * contributors may be used to endorse or promote products derived from 1312027Sjungma@eit.uni-kl.de * this software without specific prior written permission. 1412027Sjungma@eit.uni-kl.de * 1512027Sjungma@eit.uni-kl.de * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1612027Sjungma@eit.uni-kl.de * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1712027Sjungma@eit.uni-kl.de * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1812027Sjungma@eit.uni-kl.de * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1912027Sjungma@eit.uni-kl.de * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2012027Sjungma@eit.uni-kl.de * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2112027Sjungma@eit.uni-kl.de * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2212027Sjungma@eit.uni-kl.de * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2312027Sjungma@eit.uni-kl.de * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2412027Sjungma@eit.uni-kl.de * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2512027Sjungma@eit.uni-kl.de * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2612027Sjungma@eit.uni-kl.de * 2712027Sjungma@eit.uni-kl.de * Authors: Gabe Black 2812027Sjungma@eit.uni-kl.de */ 2912027Sjungma@eit.uni-kl.de 3012027Sjungma@eit.uni-kl.de#include <memory> 3112027Sjungma@eit.uni-kl.de#include <vector> 3212027Sjungma@eit.uni-kl.de 3312027Sjungma@eit.uni-kl.de#include "base/logging.hh" 3412027Sjungma@eit.uni-kl.de#include "systemc/core/module.hh" 3512027Sjungma@eit.uni-kl.de#include "systemc/core/process_types.hh" 3612027Sjungma@eit.uni-kl.de#include "systemc/ext/core/sc_module.hh" 3712027Sjungma@eit.uni-kl.de#include "systemc/ext/core/sc_module_name.hh" 3812027Sjungma@eit.uni-kl.de 3912027Sjungma@eit.uni-kl.denamespace sc_gem5 4012027Sjungma@eit.uni-kl.de{ 4112027Sjungma@eit.uni-kl.de 4212027Sjungma@eit.uni-kl.deProcess * 4312027Sjungma@eit.uni-kl.denewMethodProcess(const char *name, ProcessFuncWrapper *func) 4412027Sjungma@eit.uni-kl.de{ 4512027Sjungma@eit.uni-kl.de return new Method(name, func); 4612027Sjungma@eit.uni-kl.de} 4712027Sjungma@eit.uni-kl.de 4812027Sjungma@eit.uni-kl.deProcess * 4912027Sjungma@eit.uni-kl.denewThreadProcess(const char *name, ProcessFuncWrapper *func) 5012027Sjungma@eit.uni-kl.de{ 5112027Sjungma@eit.uni-kl.de return new Thread(name, func); 5212027Sjungma@eit.uni-kl.de} 5312027Sjungma@eit.uni-kl.de 5412027Sjungma@eit.uni-kl.deProcess * 5512027Sjungma@eit.uni-kl.denewCThreadProcess(const char *name, ProcessFuncWrapper *func) 5612027Sjungma@eit.uni-kl.de{ 5712027Sjungma@eit.uni-kl.de return new CThread(name, func); 5812027Sjungma@eit.uni-kl.de} 5912027Sjungma@eit.uni-kl.de 6012027Sjungma@eit.uni-kl.de} // namespace sc_gem5 6112027Sjungma@eit.uni-kl.de 6212027Sjungma@eit.uni-kl.denamespace sc_core 6312027Sjungma@eit.uni-kl.de{ 6412027Sjungma@eit.uni-kl.de 6512027Sjungma@eit.uni-kl.desc_bind_proxy::sc_bind_proxy(const sc_interface &_interface) : 6612027Sjungma@eit.uni-kl.de _interface(&_interface), _port(nullptr) 6712027Sjungma@eit.uni-kl.de{} 6812027Sjungma@eit.uni-kl.de 6912027Sjungma@eit.uni-kl.desc_bind_proxy::sc_bind_proxy(const sc_port_base &_port) : 7012027Sjungma@eit.uni-kl.de _interface(nullptr), _port(&_port) 7112027Sjungma@eit.uni-kl.de{} 7212027Sjungma@eit.uni-kl.de 7312027Sjungma@eit.uni-kl.deconst sc_bind_proxy SC_BIND_PROXY_NUL(*(const sc_port_base *)nullptr); 7412027Sjungma@eit.uni-kl.de 7512027Sjungma@eit.uni-kl.desc_module::~sc_module() {} 7612027Sjungma@eit.uni-kl.de 7712027Sjungma@eit.uni-kl.deconst sc_bind_proxy SC_BIND_PROXY_NIL(*(const sc_port_base *)nullptr); 7812027Sjungma@eit.uni-kl.de 7912027Sjungma@eit.uni-kl.devoid 8012027Sjungma@eit.uni-kl.desc_module::operator () (const sc_bind_proxy &p001, 8112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p002, 8212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p003, 8312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p004, 8412027Sjungma@eit.uni-kl.de const sc_bind_proxy &p005, 8512027Sjungma@eit.uni-kl.de const sc_bind_proxy &p006, 8612027Sjungma@eit.uni-kl.de const sc_bind_proxy &p007, 8712027Sjungma@eit.uni-kl.de const sc_bind_proxy &p008, 8812027Sjungma@eit.uni-kl.de const sc_bind_proxy &p009, 8912027Sjungma@eit.uni-kl.de const sc_bind_proxy &p010, 9012027Sjungma@eit.uni-kl.de const sc_bind_proxy &p011, 9112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p012, 9212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p013, 9312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p014, 9412027Sjungma@eit.uni-kl.de const sc_bind_proxy &p015, 9512027Sjungma@eit.uni-kl.de const sc_bind_proxy &p016, 9612027Sjungma@eit.uni-kl.de const sc_bind_proxy &p017, 9712027Sjungma@eit.uni-kl.de const sc_bind_proxy &p018, 9812027Sjungma@eit.uni-kl.de const sc_bind_proxy &p019, 9912027Sjungma@eit.uni-kl.de const sc_bind_proxy &p020, 10012027Sjungma@eit.uni-kl.de const sc_bind_proxy &p021, 10112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p022, 10212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p023, 10312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p024, 10412027Sjungma@eit.uni-kl.de const sc_bind_proxy &p025, 10512027Sjungma@eit.uni-kl.de const sc_bind_proxy &p026, 10612027Sjungma@eit.uni-kl.de const sc_bind_proxy &p027, 10712027Sjungma@eit.uni-kl.de const sc_bind_proxy &p028, 10812027Sjungma@eit.uni-kl.de const sc_bind_proxy &p029, 10912027Sjungma@eit.uni-kl.de const sc_bind_proxy &p030, 11012027Sjungma@eit.uni-kl.de const sc_bind_proxy &p031, 11112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p032, 11212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p033, 11312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p034, 11412027Sjungma@eit.uni-kl.de const sc_bind_proxy &p035, 11512027Sjungma@eit.uni-kl.de const sc_bind_proxy &p036, 11612027Sjungma@eit.uni-kl.de const sc_bind_proxy &p037, 11712027Sjungma@eit.uni-kl.de const sc_bind_proxy &p038, 11812027Sjungma@eit.uni-kl.de const sc_bind_proxy &p039, 11912027Sjungma@eit.uni-kl.de const sc_bind_proxy &p040, 12012027Sjungma@eit.uni-kl.de const sc_bind_proxy &p041, 12112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p042, 12212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p043, 12312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p044, 12412027Sjungma@eit.uni-kl.de const sc_bind_proxy &p045, 12512027Sjungma@eit.uni-kl.de const sc_bind_proxy &p046, 12612027Sjungma@eit.uni-kl.de const sc_bind_proxy &p047, 12712027Sjungma@eit.uni-kl.de const sc_bind_proxy &p048, 12812027Sjungma@eit.uni-kl.de const sc_bind_proxy &p049, 12912027Sjungma@eit.uni-kl.de const sc_bind_proxy &p050, 13012027Sjungma@eit.uni-kl.de const sc_bind_proxy &p051, 13112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p052, 13212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p053, 13312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p054, 13412027Sjungma@eit.uni-kl.de const sc_bind_proxy &p055, 13512027Sjungma@eit.uni-kl.de const sc_bind_proxy &p056, 13612027Sjungma@eit.uni-kl.de const sc_bind_proxy &p057, 13712027Sjungma@eit.uni-kl.de const sc_bind_proxy &p058, 13812027Sjungma@eit.uni-kl.de const sc_bind_proxy &p059, 13912027Sjungma@eit.uni-kl.de const sc_bind_proxy &p060, 14012027Sjungma@eit.uni-kl.de const sc_bind_proxy &p061, 14112027Sjungma@eit.uni-kl.de const sc_bind_proxy &p062, 14212027Sjungma@eit.uni-kl.de const sc_bind_proxy &p063, 14312027Sjungma@eit.uni-kl.de const sc_bind_proxy &p064) 14412027Sjungma@eit.uni-kl.de{ 14512027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 14612027Sjungma@eit.uni-kl.de} 14712027Sjungma@eit.uni-kl.de 14812027Sjungma@eit.uni-kl.deconst std::vector<sc_object *> & 14912027Sjungma@eit.uni-kl.desc_module::get_child_objects() const 15012027Sjungma@eit.uni-kl.de{ 15112027Sjungma@eit.uni-kl.de return _gem5_module->obj()->get_child_objects(); 15212027Sjungma@eit.uni-kl.de} 15312027Sjungma@eit.uni-kl.de 15412027Sjungma@eit.uni-kl.deconst std::vector<sc_event *> & 15512027Sjungma@eit.uni-kl.desc_module::get_child_events() const 15612027Sjungma@eit.uni-kl.de{ 15712027Sjungma@eit.uni-kl.de return _gem5_module->obj()->get_child_events(); 15812027Sjungma@eit.uni-kl.de} 15912027Sjungma@eit.uni-kl.de 16012027Sjungma@eit.uni-kl.desc_module::sc_module() : 16112027Sjungma@eit.uni-kl.de sc_object(sc_gem5::newModule()->name()), 16212027Sjungma@eit.uni-kl.de _gem5_module(sc_gem5::currentModule()) 16312027Sjungma@eit.uni-kl.de{} 16412027Sjungma@eit.uni-kl.de 16512027Sjungma@eit.uni-kl.desc_module::sc_module(const sc_module_name &) : sc_module() {} 16612027Sjungma@eit.uni-kl.desc_module::sc_module(const char *_name) : sc_module(sc_module_name(_name)) {} 16712027Sjungma@eit.uni-kl.desc_module::sc_module(const std::string &_name) : 16812027Sjungma@eit.uni-kl.de sc_module(sc_module_name(_name.c_str())) 16912027Sjungma@eit.uni-kl.de{} 17012027Sjungma@eit.uni-kl.de 17112027Sjungma@eit.uni-kl.devoid 17212027Sjungma@eit.uni-kl.desc_module::reset_signal_is(const sc_in<bool> &, bool) 17312027Sjungma@eit.uni-kl.de{ 17412027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 17512027Sjungma@eit.uni-kl.de} 17612027Sjungma@eit.uni-kl.de 17712027Sjungma@eit.uni-kl.devoid 17812027Sjungma@eit.uni-kl.desc_module::reset_signal_is(const sc_inout<bool> &, bool) 17912027Sjungma@eit.uni-kl.de{ 18012027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 18112027Sjungma@eit.uni-kl.de} 18212027Sjungma@eit.uni-kl.de 18312027Sjungma@eit.uni-kl.devoid 18412027Sjungma@eit.uni-kl.desc_module::reset_signal_is(const sc_out<bool> &, bool) 18512027Sjungma@eit.uni-kl.de{ 18612027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 18712027Sjungma@eit.uni-kl.de} 18812027Sjungma@eit.uni-kl.de 18912027Sjungma@eit.uni-kl.devoid 19012027Sjungma@eit.uni-kl.desc_module::reset_signal_is(const sc_signal_in_if<bool> &, bool) 19112027Sjungma@eit.uni-kl.de{ 19212027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 19312027Sjungma@eit.uni-kl.de} 19412027Sjungma@eit.uni-kl.de 19512027Sjungma@eit.uni-kl.de 19612027Sjungma@eit.uni-kl.devoid 19712027Sjungma@eit.uni-kl.desc_module::async_reset_signal_is(const sc_in<bool> &, bool) 19812027Sjungma@eit.uni-kl.de{ 19912027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 20012027Sjungma@eit.uni-kl.de} 20112027Sjungma@eit.uni-kl.de 20212027Sjungma@eit.uni-kl.devoid 20312027Sjungma@eit.uni-kl.desc_module::async_reset_signal_is(const sc_inout<bool> &, bool) 20412027Sjungma@eit.uni-kl.de{ 20512027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 20612027Sjungma@eit.uni-kl.de} 20712027Sjungma@eit.uni-kl.de 20812027Sjungma@eit.uni-kl.devoid 20912027Sjungma@eit.uni-kl.desc_module::async_reset_signal_is(const sc_out<bool> &, bool) 21012027Sjungma@eit.uni-kl.de{ 21112027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 21212027Sjungma@eit.uni-kl.de} 21312027Sjungma@eit.uni-kl.de 21412027Sjungma@eit.uni-kl.devoid 21512027Sjungma@eit.uni-kl.desc_module::async_reset_signal_is(const sc_signal_in_if<bool> &, bool) 21612027Sjungma@eit.uni-kl.de{ 21712027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 21812027Sjungma@eit.uni-kl.de} 21912027Sjungma@eit.uni-kl.de 22012027Sjungma@eit.uni-kl.de 22112027Sjungma@eit.uni-kl.devoid 22212027Sjungma@eit.uni-kl.desc_module::dont_initialize() 22312027Sjungma@eit.uni-kl.de{ 22412027Sjungma@eit.uni-kl.de ::sc_gem5::Process::newest()->dontInitialize(); 22512027Sjungma@eit.uni-kl.de} 22612027Sjungma@eit.uni-kl.de 22712027Sjungma@eit.uni-kl.devoid 22812027Sjungma@eit.uni-kl.desc_module::set_stack_size(size_t size) 22912027Sjungma@eit.uni-kl.de{ 23012027Sjungma@eit.uni-kl.de ::sc_gem5::Process::newest()->setStackSize(size); 23112027Sjungma@eit.uni-kl.de} 23212027Sjungma@eit.uni-kl.de 23312027Sjungma@eit.uni-kl.de 23412027Sjungma@eit.uni-kl.devoid sc_module::next_trigger() { ::sc_core::next_trigger(); } 23512027Sjungma@eit.uni-kl.de 23612027Sjungma@eit.uni-kl.devoid 23712027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_event &e) 23812027Sjungma@eit.uni-kl.de{ 23912027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(e); 24012027Sjungma@eit.uni-kl.de} 24112027Sjungma@eit.uni-kl.de 24212027Sjungma@eit.uni-kl.devoid 24312027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_event_or_list &eol) 24412027Sjungma@eit.uni-kl.de{ 24512027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(eol); 24612027Sjungma@eit.uni-kl.de} 24712027Sjungma@eit.uni-kl.de 24812027Sjungma@eit.uni-kl.devoid 24912027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_event_and_list &eal) 25012027Sjungma@eit.uni-kl.de{ 25112027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(eal); 25212027Sjungma@eit.uni-kl.de} 25312027Sjungma@eit.uni-kl.de 25412027Sjungma@eit.uni-kl.devoid 25512027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_time &t) 25612027Sjungma@eit.uni-kl.de{ 25712027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(t); 25812027Sjungma@eit.uni-kl.de} 25912027Sjungma@eit.uni-kl.de 26012027Sjungma@eit.uni-kl.devoid 26112027Sjungma@eit.uni-kl.desc_module::next_trigger(double d, sc_time_unit u) 26212027Sjungma@eit.uni-kl.de{ 26312027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(d, u); 26412027Sjungma@eit.uni-kl.de} 26512027Sjungma@eit.uni-kl.de 26612027Sjungma@eit.uni-kl.devoid 26712027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_time &t, const sc_event &e) 26812027Sjungma@eit.uni-kl.de{ 26912027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(t, e); 27012027Sjungma@eit.uni-kl.de} 27112027Sjungma@eit.uni-kl.de 27212027Sjungma@eit.uni-kl.devoid 27312027Sjungma@eit.uni-kl.desc_module::next_trigger(double d, sc_time_unit u, const sc_event &e) 27412027Sjungma@eit.uni-kl.de{ 27512027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(d, u, e); 27612027Sjungma@eit.uni-kl.de} 27712027Sjungma@eit.uni-kl.de 27812027Sjungma@eit.uni-kl.devoid 27912027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_time &t, const sc_event_or_list &eol) 28012027Sjungma@eit.uni-kl.de{ 28112027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(t, eol); 28212027Sjungma@eit.uni-kl.de} 28312027Sjungma@eit.uni-kl.de 28412027Sjungma@eit.uni-kl.devoid 28512027Sjungma@eit.uni-kl.desc_module::next_trigger(double d, sc_time_unit u, const sc_event_or_list &eol) 28612027Sjungma@eit.uni-kl.de{ 28712027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(d, u, eol); 28812027Sjungma@eit.uni-kl.de} 28912027Sjungma@eit.uni-kl.de 29012027Sjungma@eit.uni-kl.devoid 29112027Sjungma@eit.uni-kl.desc_module::next_trigger(const sc_time &t, const sc_event_and_list &eal) 29212027Sjungma@eit.uni-kl.de{ 29312027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(t, eal); 29412027Sjungma@eit.uni-kl.de} 29512027Sjungma@eit.uni-kl.de 29612027Sjungma@eit.uni-kl.devoid 29712027Sjungma@eit.uni-kl.desc_module::next_trigger(double d, sc_time_unit u, const sc_event_and_list &eal) 29812027Sjungma@eit.uni-kl.de{ 29912027Sjungma@eit.uni-kl.de ::sc_core::next_trigger(d, u, eal); 30012027Sjungma@eit.uni-kl.de} 30112027Sjungma@eit.uni-kl.de 30212027Sjungma@eit.uni-kl.de 30312027Sjungma@eit.uni-kl.debool 30412027Sjungma@eit.uni-kl.desc_module::timed_out() 30512027Sjungma@eit.uni-kl.de{ 30612027Sjungma@eit.uni-kl.de warn("%s not implemented.\n", __PRETTY_FUNCTION__); 30712027Sjungma@eit.uni-kl.de return false; 30812027Sjungma@eit.uni-kl.de} 30912027Sjungma@eit.uni-kl.de 31012027Sjungma@eit.uni-kl.de 31112027Sjungma@eit.uni-kl.devoid 31212027Sjungma@eit.uni-kl.desc_module::wait() 31312027Sjungma@eit.uni-kl.de{ 31412027Sjungma@eit.uni-kl.de ::sc_core::wait(); 31512027Sjungma@eit.uni-kl.de} 31612027Sjungma@eit.uni-kl.de 31712027Sjungma@eit.uni-kl.devoid 31812027Sjungma@eit.uni-kl.desc_module::wait(int i) 31912027Sjungma@eit.uni-kl.de{ 32012027Sjungma@eit.uni-kl.de ::sc_core::wait(i); 32112027Sjungma@eit.uni-kl.de} 32212027Sjungma@eit.uni-kl.de 32312027Sjungma@eit.uni-kl.devoid 32412027Sjungma@eit.uni-kl.desc_module::wait(const sc_event &e) 32512027Sjungma@eit.uni-kl.de{ 32612027Sjungma@eit.uni-kl.de ::sc_core::wait(e); 32712027Sjungma@eit.uni-kl.de} 32812027Sjungma@eit.uni-kl.de 32912027Sjungma@eit.uni-kl.devoid 33012027Sjungma@eit.uni-kl.desc_module::wait(const sc_event_or_list &eol) 33112027Sjungma@eit.uni-kl.de{ 33212027Sjungma@eit.uni-kl.de ::sc_core::wait(eol); 33312027Sjungma@eit.uni-kl.de} 33412027Sjungma@eit.uni-kl.de 33512027Sjungma@eit.uni-kl.devoid 33612027Sjungma@eit.uni-kl.desc_module::wait(const sc_event_and_list &eal) 33712027Sjungma@eit.uni-kl.de{ 33812027Sjungma@eit.uni-kl.de ::sc_core::wait(eal); 33912027Sjungma@eit.uni-kl.de} 34012027Sjungma@eit.uni-kl.de 34112027Sjungma@eit.uni-kl.devoid 34212027Sjungma@eit.uni-kl.desc_module::wait(const sc_time &t) 34312027Sjungma@eit.uni-kl.de{ 34412027Sjungma@eit.uni-kl.de ::sc_core::wait(t); 34512027Sjungma@eit.uni-kl.de} 34612027Sjungma@eit.uni-kl.de 34712027Sjungma@eit.uni-kl.devoid 34812027Sjungma@eit.uni-kl.desc_module::wait(double d, sc_time_unit u) 34912027Sjungma@eit.uni-kl.de{ 35012027Sjungma@eit.uni-kl.de ::sc_core::wait(d, u); 35112027Sjungma@eit.uni-kl.de} 35212027Sjungma@eit.uni-kl.de 35312027Sjungma@eit.uni-kl.devoid 35412027Sjungma@eit.uni-kl.desc_module::wait(const sc_time &t, const sc_event &e) 35512027Sjungma@eit.uni-kl.de{ 35612027Sjungma@eit.uni-kl.de ::sc_core::wait(t, e); 35712027Sjungma@eit.uni-kl.de} 35812027Sjungma@eit.uni-kl.de 35912027Sjungma@eit.uni-kl.devoid 36012027Sjungma@eit.uni-kl.desc_module::wait(double d, sc_time_unit u, const sc_event &e) 36112027Sjungma@eit.uni-kl.de{ 36212027Sjungma@eit.uni-kl.de ::sc_core::wait(d, u, e); 36312027Sjungma@eit.uni-kl.de} 36412027Sjungma@eit.uni-kl.de 36512027Sjungma@eit.uni-kl.devoid 36612027Sjungma@eit.uni-kl.desc_module::wait(const sc_time &t, const sc_event_or_list &eol) 36712027Sjungma@eit.uni-kl.de{ 36812027Sjungma@eit.uni-kl.de ::sc_core::wait(t, eol); 36912027Sjungma@eit.uni-kl.de} 37012027Sjungma@eit.uni-kl.de 37112027Sjungma@eit.uni-kl.devoid 37212027Sjungma@eit.uni-kl.desc_module::wait(double d, sc_time_unit u, const sc_event_or_list &eol) 37312027Sjungma@eit.uni-kl.de{ 37412027Sjungma@eit.uni-kl.de ::sc_core::wait(d, u, eol); 37512027Sjungma@eit.uni-kl.de} 37612027Sjungma@eit.uni-kl.de 37712027Sjungma@eit.uni-kl.devoid 37812027Sjungma@eit.uni-kl.desc_module::wait(const sc_time &t, const sc_event_and_list &eal) 37912027Sjungma@eit.uni-kl.de{ 38012027Sjungma@eit.uni-kl.de ::sc_core::wait(t, eal); 38112027Sjungma@eit.uni-kl.de} 38212027Sjungma@eit.uni-kl.de 38312027Sjungma@eit.uni-kl.devoid 38412027Sjungma@eit.uni-kl.desc_module::wait(double d, sc_time_unit u, const sc_event_and_list &eal) 38512027Sjungma@eit.uni-kl.de{ 38612027Sjungma@eit.uni-kl.de ::sc_core::wait(d, u, eal); 38712027Sjungma@eit.uni-kl.de} 38812027Sjungma@eit.uni-kl.de 38912027Sjungma@eit.uni-kl.de 39012027Sjungma@eit.uni-kl.devoid 39112027Sjungma@eit.uni-kl.desc_module::halt() 39212027Sjungma@eit.uni-kl.de{ 39312027Sjungma@eit.uni-kl.de ::sc_core::halt(); 39412027Sjungma@eit.uni-kl.de} 39512027Sjungma@eit.uni-kl.de 39612027Sjungma@eit.uni-kl.devoid 39712027Sjungma@eit.uni-kl.desc_module::at_posedge(const sc_signal_in_if<bool> &s) 39812027Sjungma@eit.uni-kl.de{ 39912027Sjungma@eit.uni-kl.de ::sc_core::at_posedge(s); 40012027Sjungma@eit.uni-kl.de} 40112027Sjungma@eit.uni-kl.de 40212027Sjungma@eit.uni-kl.devoid 40312027Sjungma@eit.uni-kl.desc_module::at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &s) 40412027Sjungma@eit.uni-kl.de{ 40512027Sjungma@eit.uni-kl.de ::sc_core::at_posedge(s); 40612027Sjungma@eit.uni-kl.de} 40712027Sjungma@eit.uni-kl.de 40812027Sjungma@eit.uni-kl.devoid 40912027Sjungma@eit.uni-kl.desc_module::at_negedge(const sc_signal_in_if<bool> &s) 41012027Sjungma@eit.uni-kl.de{ 41112027Sjungma@eit.uni-kl.de ::sc_core::at_negedge(s); 41212027Sjungma@eit.uni-kl.de} 41312027Sjungma@eit.uni-kl.de 41412027Sjungma@eit.uni-kl.devoid 41512027Sjungma@eit.uni-kl.desc_module::at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &s) 41612027Sjungma@eit.uni-kl.de{ 41712027Sjungma@eit.uni-kl.de ::sc_core::at_negedge(s); 41812027Sjungma@eit.uni-kl.de} 41912027Sjungma@eit.uni-kl.de 42012027Sjungma@eit.uni-kl.de 42112027Sjungma@eit.uni-kl.devoid 42212027Sjungma@eit.uni-kl.denext_trigger() 42312027Sjungma@eit.uni-kl.de{ 42412027Sjungma@eit.uni-kl.de sc_gem5::Process *p = sc_gem5::scheduler.current(); 42512027Sjungma@eit.uni-kl.de p->setDynamic(nullptr); 42612027Sjungma@eit.uni-kl.de} 42712027Sjungma@eit.uni-kl.de 42812027Sjungma@eit.uni-kl.devoid 42912027Sjungma@eit.uni-kl.denext_trigger(const sc_event &e) 43012027Sjungma@eit.uni-kl.de{ 43112027Sjungma@eit.uni-kl.de sc_gem5::Process *p = sc_gem5::scheduler.current(); 43212027Sjungma@eit.uni-kl.de p->setDynamic(new ::sc_gem5::SensitivityEvent(p, &e)); 43312027Sjungma@eit.uni-kl.de} 434 435void 436next_trigger(const sc_event_or_list &eol) 437{ 438 sc_gem5::Process *p = sc_gem5::scheduler.current(); 439 p->setDynamic(new ::sc_gem5::SensitivityEventOrList(p, &eol)); 440} 441 442void 443next_trigger(const sc_event_and_list &eal) 444{ 445 sc_gem5::Process *p = sc_gem5::scheduler.current(); 446 p->setDynamic(new ::sc_gem5::SensitivityEventAndList(p, &eal)); 447} 448 449void 450next_trigger(const sc_time &t) 451{ 452 sc_gem5::Process *p = sc_gem5::scheduler.current(); 453 p->setDynamic(new ::sc_gem5::SensitivityTimeout(p, t)); 454} 455 456void 457next_trigger(double d, sc_time_unit u) 458{ 459 next_trigger(sc_time(d, u)); 460} 461 462void 463next_trigger(const sc_time &t, const sc_event &e) 464{ 465 sc_gem5::Process *p = sc_gem5::scheduler.current(); 466 p->setDynamic(new ::sc_gem5::SensitivityTimeoutAndEvent(p, t, &e)); 467} 468 469void 470next_trigger(double d, sc_time_unit u, const sc_event &e) 471{ 472 next_trigger(sc_time(d, u), e); 473} 474 475void 476next_trigger(const sc_time &t, const sc_event_or_list &eol) 477{ 478 sc_gem5::Process *p = sc_gem5::scheduler.current(); 479 p->setDynamic( 480 new ::sc_gem5::SensitivityTimeoutAndEventOrList(p, t, &eol)); 481} 482 483void 484next_trigger(double d, sc_time_unit u, const sc_event_or_list &eol) 485{ 486 next_trigger(sc_time(d, u), eol); 487} 488 489void 490next_trigger(const sc_time &t, const sc_event_and_list &eal) 491{ 492 sc_gem5::Process *p = sc_gem5::scheduler.current(); 493 p->setDynamic( 494 new ::sc_gem5::SensitivityTimeoutAndEventAndList(p, t, &eal)); 495} 496 497void 498next_trigger(double d, sc_time_unit u, const sc_event_and_list &eal) 499{ 500 next_trigger(sc_time(d, u), eal); 501} 502 503bool 504timed_out() 505{ 506 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 507 return false; 508} 509 510 511void 512wait() 513{ 514 sc_gem5::Process *p = sc_gem5::scheduler.current(); 515 p->setDynamic(nullptr); 516 sc_gem5::scheduler.yield(); 517} 518 519void 520wait(int n) 521{ 522 for (int i = 0; i < n; i++) 523 wait(); 524} 525 526void 527wait(const sc_event &e) 528{ 529 sc_gem5::Process *p = sc_gem5::scheduler.current(); 530 p->setDynamic(new ::sc_gem5::SensitivityEvent(p, &e)); 531 sc_gem5::scheduler.yield(); 532} 533 534void 535wait(const sc_event_or_list &eol) 536{ 537 sc_gem5::Process *p = sc_gem5::scheduler.current(); 538 p->setDynamic(new ::sc_gem5::SensitivityEventOrList(p, &eol)); 539 sc_gem5::scheduler.yield(); 540} 541 542void 543wait(const sc_event_and_list &eal) 544{ 545 sc_gem5::Process *p = sc_gem5::scheduler.current(); 546 p->setDynamic(new ::sc_gem5::SensitivityEventAndList(p, &eal)); 547 sc_gem5::scheduler.yield(); 548} 549 550void 551wait(const sc_time &t) 552{ 553 sc_gem5::Process *p = sc_gem5::scheduler.current(); 554 p->setDynamic(new ::sc_gem5::SensitivityTimeout(p, t)); 555 sc_gem5::scheduler.yield(); 556} 557 558void 559wait(double d, sc_time_unit u) 560{ 561 wait(sc_time(d, u)); 562} 563 564void 565wait(const sc_time &t, const sc_event &e) 566{ 567 sc_gem5::Process *p = sc_gem5::scheduler.current(); 568 p->setDynamic(new ::sc_gem5::SensitivityTimeoutAndEvent(p, t, &e)); 569 sc_gem5::scheduler.yield(); 570} 571 572void 573wait(double d, sc_time_unit u, const sc_event &e) 574{ 575 wait(sc_time(d, u), e); 576} 577 578void 579wait(const sc_time &t, const sc_event_or_list &eol) 580{ 581 sc_gem5::Process *p = sc_gem5::scheduler.current(); 582 p->setDynamic( 583 new ::sc_gem5::SensitivityTimeoutAndEventOrList(p, t, &eol)); 584 sc_gem5::scheduler.yield(); 585} 586 587void 588wait(double d, sc_time_unit u, const sc_event_or_list &eol) 589{ 590 wait(sc_time(d, u), eol); 591} 592 593void 594wait(const sc_time &t, const sc_event_and_list &eal) 595{ 596 sc_gem5::Process *p = sc_gem5::scheduler.current(); 597 p->setDynamic( 598 new ::sc_gem5::SensitivityTimeoutAndEventAndList(p, t, &eal)); 599 sc_gem5::scheduler.yield(); 600} 601 602void 603wait(double d, sc_time_unit u, const sc_event_and_list &eal) 604{ 605 wait(sc_time(d, u), eal); 606} 607 608void 609halt() 610{ 611 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 612} 613 614void 615at_posedge(const sc_signal_in_if<bool> &) 616{ 617 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 618} 619 620void 621at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &) 622{ 623 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 624} 625 626void 627at_negedge(const sc_signal_in_if<bool> &) 628{ 629 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 630} 631 632void 633at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &) 634{ 635 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 636} 637 638const char * 639sc_gen_unique_name(const char *) 640{ 641 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 642 return ""; 643} 644 645bool 646sc_hierarchical_name_exists(const char *name) 647{ 648 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 649 return false; 650} 651 652bool 653sc_start_of_simulation_invoked() 654{ 655 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 656 return false; 657} 658 659bool 660sc_end_of_simulation_invoked() 661{ 662 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 663 return false; 664} 665 666sc_module * 667sc_module_sc_new(sc_module *mod) 668{ 669 static std::vector<std::unique_ptr<sc_module> > modules; 670 modules.emplace_back(mod); 671 return mod; 672} 673 674} // namespace sc_core 675