?? timer.h
字號:
/************************************************************************
* file name: timer.h
* description: for test use.
* modification history
* --------------------
* 2003-5-3 9:21:11, created by zhuwei
*/
#ifndef _TIMER_H
#define _TIMER_H
/* includes----------------------------------------------------------- */
#include "systemc.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
SC_MODULE(timer)
{
sc_inout<bool> start; // input port
sc_out<bool> timeout; // output port
sc_in<bool> clock; // input port
//sc_in_clk clk;
int count;
void runtimer();
// Constructor
SC_CTOR(timer)
{
SC_THREAD(runtimer); // Thread process
sensitive_pos << clock; /* zhuwei (2003-5-7 11:35:32) wait until clock’event and clock = ‘1’*/
/* zhuwei (2003-5-7 11:46:02) 或者寫成:sensitive_pos(clock); */
sensitive << start;
count = 0;
}
};
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
#endif /* _TIMER_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -