Added PyScModule to forward simulation phase callbacks

This commit is contained in:
2019-06-08 14:31:23 +00:00
parent b1334a0689
commit 4381c9be32
5 changed files with 120 additions and 9 deletions

33
PyScModule.h Normal file
View File

@@ -0,0 +1,33 @@
/*
* PyScModule.h
*
* Created on: 08.06.2019
* Author: eyck
*/
#ifndef COMPONENTS_PYSCMODULE_H_
#define COMPONENTS_PYSCMODULE_H_
#include <systemc>
#include <unordered_map>
#include <tuple>
typedef struct _object PyObject;
namespace scc {
class PyScModule: public sc_core::sc_module {
public:
PyScModule(PyObject* self, const sc_core::sc_module_name& nm);
virtual ~PyScModule();
protected:
void before_end_of_elaboration() override;
void end_of_elaboration() override;
void start_of_simulation() override;
void end_of_simulation() override;
private:
void invoke_callback(const char*);
PyObject* self{nullptr};
};
}
#endif /* COMPONENTS_PYSCMODULE_H_ */