ate.h

来自「国外开源的一个片上网络系统的源代码」· C头文件 代码 · 共 35 行

H
35
字号
/*
name: ate.h

function: This file is used to create a module used to test chips. It reads test stimuli from its dedicated memory and send these datas
              to CUT. And receive the test respondes from the CUT, check whether the responses are correct.

author: fbz, key labtorary of computer system and architecture, CAS
Email: fubinzhang@ict.ac.cn
*/
#define STI_BANDWIDTH 4
#define RES_BANDWIDTH 4

SC_MODULE(ATE)
{
	sc_in<bool> clk, rst;
	sc_in<sc_uint<RES_BANDWIDTH>> test_response;
	
	sc_out<sc_uint<STI_BANDWIDTH>> test_stimuli;
	sc_out<bool> valid;
	enum ate_state {FIRST_SLICE, SECOND_SLICE, THIRD_SLICE, CAPTURE, FIRST_RESPONSE, SECOND_RESPONSE};
	ate_state state;
	bool en, r_en;

	SC_CTOR(ATE)
		{
		SC_METHOD(rst_state);
			sensitive_pos<<rst;
		SC_METHOD(send_data);
			sensitive_pos<<clk;
		SC_METHOD(receive_data);
			sensitive_pos<<clk;
		}
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?