X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fvisitor%2Fhds%2Flib%2FProcessWrapper.h;fp=dol%2Fsrc%2Fdol%2Fvisitor%2Fhds%2Flib%2FProcessWrapper.h;h=76ab3b37cfa38d8df1ae7c7103eec709e0686e7a;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/visitor/hds/lib/ProcessWrapper.h b/dol/src/dol/visitor/hds/lib/ProcessWrapper.h new file mode 100644 index 0000000..76ab3b3 --- /dev/null +++ b/dol/src/dol/visitor/hds/lib/ProcessWrapper.h @@ -0,0 +1,58 @@ +#ifndef _PROCESSWRAPPER_H_ +#define _PROCESSWRAPPER_H_ + +#include "systemc.h" +#include "dol.h" +#include "dol_sched_if.h" +#include "Fifo.h" +#include "WindowedFifo.h" +#include "functional_trace.h" +#include "Performance_Extraction.h" + + +#ifdef INCLUDE_PROFILER +extern FILE *profiler_output_file; +extern unsigned int profiler_event_counter; +#endif + +class ProcessWrapper : virtual public dol_sched_if, public sc_module +{ + public: + ProcessWrapper(sc_module_name name); + virtual ~ProcessWrapper(); + virtual void initialize(); + virtual int fire(); + virtual bool isDetached() { return _isDetached; } + virtual void detach(); + virtual int getIndex(unsigned indexNumber) const; + virtual char* getName() const; + +#ifdef INCLUDE_PROFILER + virtual void addToProfile(const char *event, void *port, + int length); +#endif + +#ifdef INCLUDE_TRACE + int start_line; + int end_line; + char channel_name[NAME_LENGTH]; +#endif + +#ifdef INCLUDE_PERFORMANCE + int start_line; + int end_line; + CURRENT_TIME start_time; + CURRENT_TIME end_time; +#endif + + protected: + char* _name; + DOLProcess _process; + bool _isDetached; + int _iteratorIndex[4]; + virtual int getIndex(const char* string, char* tokens, + int indexNumber) const; +}; + +#endif +