?? channel.h
字號:
/************************************************************************
* file name: channel.h
* description: for test use.
* modification history
* --------------------
* 2003-5-3 8:44:52, created by zhuwei
*/
#ifndef _CHANNEL_H
#define _CHANNEL_H
/* includes----------------------------------------------------------- */
#include "packet.h"
/* defines------------------------------------------------------------ */
/* typedefs----------------------------------------------------------- */
SC_MODULE(channel)
{
sc_in<packet_type> tpackin; // input port
sc_in<packet_type> rpackin; // input port
sc_out<packet_type> tpackout; // output port
sc_out<packet_type> rpackout; // output port
packet_type packin;
packet_type packout;
packet_type ackin;
packet_type ackout;
void receive_data();
void send_ack();
// Constructor
SC_CTOR(channel) /* zhuwei (2003-5-5 16:20:12) 構造函數,實例化時即被運行 */
{
SC_METHOD(receive_data); // Method Process
sensitive << tpackin;
SC_METHOD(send_ack); // Method Process
sensitive << rpackin;
}
};
/* externs------------------------------------------------------------ */
/* globals------------------------------------------------------------ */
/* forward declarations----------------------------------------------- */
#endif /* _CHANNEL_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -