📄 receiver.h
字号:
/************************************************************************
* file name: receiver.h
* description: for test use.
* modification history
* --------------------
* 2003-5-3 9:05:48, created by zhuwei
*/
#ifndef _RECEIVER_H
#define _RECEIVER_H
/* includes----------------------------------------------------------- */
#include "packet.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
SC_MODULE(receiver)
{
sc_in<packet_type> rpackin; // input port
sc_out<packet_type> rpackout; // output port
sc_out<long> dout; // output port
sc_in<bool> rclk;
int framenum;
packet_type packin, packold;
packet_type s;
int retry;
void receive_data();
// Constructor
SC_CTOR(receiver)
{
SC_METHOD(receive_data); // Method Process
sensitive_pos << rclk;
framenum = 1;
retry = 1;
}
};
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
#endif /* _RECEIVER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -