📄 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 + -