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