sc_module.cc (12958:a8188f40f342) | sc_module.cc (12982:c7966254372e) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * 27 * Authors: Gabe Black 28 */ 29 30#include <memory> 31#include <vector> 32 33#include "base/logging.hh" | 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 --- 17 unchanged lines hidden (view full) --- 26 * 27 * Authors: Gabe Black 28 */ 29 30#include <memory> 31#include <vector> 32 33#include "base/logging.hh" |
34#include "systemc/core/kernel.hh" |
|
34#include "systemc/core/module.hh" 35#include "systemc/core/process_types.hh" 36#include "systemc/ext/core/sc_module.hh" 37#include "systemc/ext/core/sc_module_name.hh" 38 39namespace sc_gem5 40{ 41 --- 25 unchanged lines hidden (view full) --- 67{} 68 69sc_bind_proxy::sc_bind_proxy(const sc_port_base &_port) : 70 _interface(nullptr), _port(&_port) 71{} 72 73const sc_bind_proxy SC_BIND_PROXY_NUL(*(const sc_port_base *)nullptr); 74 | 35#include "systemc/core/module.hh" 36#include "systemc/core/process_types.hh" 37#include "systemc/ext/core/sc_module.hh" 38#include "systemc/ext/core/sc_module_name.hh" 39 40namespace sc_gem5 41{ 42 --- 25 unchanged lines hidden (view full) --- 68{} 69 70sc_bind_proxy::sc_bind_proxy(const sc_port_base &_port) : 71 _interface(nullptr), _port(&_port) 72{} 73 74const sc_bind_proxy SC_BIND_PROXY_NUL(*(const sc_port_base *)nullptr); 75 |
75sc_module::~sc_module() {} | 76sc_module::~sc_module() { delete _gem5_module; } |
76 77const sc_bind_proxy SC_BIND_PROXY_NIL(*(const sc_port_base *)nullptr); 78 79void 80sc_module::operator () (const sc_bind_proxy &p001, 81 const sc_bind_proxy &p002, 82 const sc_bind_proxy &p003, 83 const sc_bind_proxy &p004, --- 563 unchanged lines hidden (view full) --- 647{ 648 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 649 return false; 650} 651 652bool 653sc_start_of_simulation_invoked() 654{ | 77 78const sc_bind_proxy SC_BIND_PROXY_NIL(*(const sc_port_base *)nullptr); 79 80void 81sc_module::operator () (const sc_bind_proxy &p001, 82 const sc_bind_proxy &p002, 83 const sc_bind_proxy &p003, 84 const sc_bind_proxy &p004, --- 563 unchanged lines hidden (view full) --- 648{ 649 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 650 return false; 651} 652 653bool 654sc_start_of_simulation_invoked() 655{ |
655 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 656 return false; | 656 return ::sc_gem5::kernel->startOfSimulationComplete(); |
657} 658 659bool 660sc_end_of_simulation_invoked() 661{ | 657} 658 659bool 660sc_end_of_simulation_invoked() 661{ |
662 warn("%s not implemented.\n", __PRETTY_FUNCTION__); 663 return false; | 662 return ::sc_gem5::kernel->endOfSimulationComplete(); |
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 | 663} 664 665sc_module * 666sc_module_sc_new(sc_module *mod) 667{ 668 static std::vector<std::unique_ptr<sc_module> > modules; 669 modules.emplace_back(mod); 670 return mod; 671} 672 673} // namespace sc_core |