00001 #ifndef CTHREAD_H_INCLUDED_ 00002 #define CTHREAD_H_INCLUDED_ 00003 00004 #include <vector> 00005 #include <utility> 00006 00007 #include "rose.h" 00008 #include "function.h" 00009 #include "port.h" 00010 #include "inport.h" 00011 #include "channel.h" 00012 00013 namespace risc { 00014 00015 // These are the reset signal types. A reset signal 00016 // can be represented by a in/inout port 00017 typedef std::pair<Port*, SgBoolValExp*> ResetSignal; 00018 //typedef std::pair<Port*, SgBoolValExp*> AsyncResetSignal; 00019 00020 typedef std::vector<ResetSignal*> ResetSignalVector; 00021 typedef std::vector<ResetSignal*>::iterator ResetSignalVectorIter; 00022 typedef std::vector<ResetSignal*>::const_iterator ResetSignalVectorConstIter; 00023 00024 //typedef std::vector<AsyncResetSignal*> 00025 // AsyncResetSignalVector; 00026 //typedef std::vector<AsyncResetSignal*>::iterator 00027 // AsyncResetSignalVectorIter; 00028 //typedef std::vector<AsyncResetSignal*>::const_iterator 00029 // AsyncResetSignalVectorConstIter; 00030 00031 class CThread: public Function { 00032 00033 public: 00034 00038 explicit CThread(SgFunctionDefinition *ast_node); 00039 00040 00041 InPort *clk_port_; 00042 00043 ResetSignalVector reset_signal_; 00044 ResetSignalVector async_reset_signal_; 00045 00046 private: 00050 CThread(const CThread &t); 00051 }; 00052 00053 typedef std::vector<CThread*> CThreadVector; 00054 typedef std::vector<CThread*>::iterator CThreadVectorIter; 00055 typedef std::vector<CThread*>::const_iterator CThreadVectorConstIter; 00056 00057 }; // end namespace risc 00058 00059 #endif /* CTHREAD_H_INCLUDED_ */ 00060 00061 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */