?? transmit.h
字號:
/************************************************************************
* file name: transmit.h
* description: for test use.
* modification history
* --------------------
* 2003-5-2 17:09:26, created by zhuwei
*/
#ifndef _TRANSMIT_H
#define _TRANSMIT_H
/* includes----------------------------------------------------------- */
#include "packet.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
SC_MODULE(transmit)
{
sc_in<packet_type> tpackin; // input port
sc_in<bool> timeout; // input port
sc_out<packet_type> tpackout; // output port
sc_inout<bool> start_timer; // output port
sc_in<bool> clock;
int buffer;
int framenum;
packet_type packin, tpackold;
packet_type s;
int retry;
bool start;
void send_data();
int get_data_fromApp();
// Constructor
SC_CTOR(transmit)
{
SC_METHOD(send_data); // Method Process
sensitive << timeout;
sensitive_pos << clock; /* zhuwei (2003-5-5 15:36:38) the process is sensitive to positive edge changes on input port clock.*/
framenum = 1;
retry = 0;
start = false;
buffer = get_data_fromApp();
}
};
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
#endif /* _TRANSMIT_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -