oqueue.h
来自「基于4个mips核的noc设计」· C头文件 代码 · 共 77 行
H
77 行
/* * TU Eindhoven * Eindhoven, The Netherlands * * Name : oqueue.h * * Author : A.S.Slusarczyk@tue.nl * * Date : 13-09-2003 * * Function : Output queue of the e-cube router * * */#ifndef OQUEUE_H_INCLUDED#define OQUEUE_H_INCLUDED#include <systemc.h>#include "net_dim.h"SC_MODULE(OUTPUT_QUEUE){ sc_in<bool> clk, rst; // signals to the outside (network) sc_in< bool > ack; sc_out< bool > req; sc_out< sc_bv<FLIT_LEN> > data; // signals to/from crossbar sc_in< bool > req_in; sc_out< bool > ack_in; sc_in< sc_bv<FLIT_LEN> > data_in; // control FSM enum state { EMPTY, BUFFERING };#ifdef VERILOG sc_signal<state> current_state, next_state;#else sc_signal<unsigned> current_state, next_state;#endif void control_logic(); void control_change_state(); // buffer for a flit sc_signal< sc_bv<FLIT_LEN> > buffer; sc_signal< bool > buffer_write; sc_signal< bool > buffer_clear; void buffer_process(); void data_out(); SC_CTOR(OUTPUT_QUEUE) { SC_METHOD(control_logic); sensitive << current_state << req_in << ack; SC_METHOD(control_change_state); sensitive_pos << clk << rst; SC_METHOD(buffer_process); sensitive_pos << clk; SC_METHOD(data_out); sensitive << buffer; } };#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?