shift.cpp

来自「基于4个mips核的noc设计」· C++ 代码 · 共 70 行

CPP
70
字号
/* *  TU Eindhoven *  Eindhoven, The Netherlands * *  Name            :   shift.cc * *  Author          :   Sander Stuijk (sander@ics.ele.tue.nl) * *  Date            :   July 23, 2002 * *  Function        :   Shifter * *  History         : *      23-07-02    :   Initial version. *      13-12-02    :   Synthesizable version A.S.Slusarczyk@tue.nl * */ #include "shift.h"void SHIFTRIGHT::shiftright_thread(){	sc_bv<DWORD> a;	sc_bv<DWORD> b;		//-> while (true) {		#ifdef VERBOSE			clog << "SHIFT" << endl;		#endif				a = in.read();		b = a >> SHIFTBIT;		out.write(b);		#ifdef VERBOSE			clog << "Shifter: " << a;			clog << " -> ";			clog << b << endl;		#endif				//-> wait();//-> 	}}void SHIFTLEFT::shiftleft_thread(){	sc_bv<DWORD> a;	sc_bv<DWORD> b;		//-> while (true) {		#ifdef VERBOSE			clog << "SHIFT" << endl;		#endif				a = in.read();		b = a << SHIFTBIT;		out.write(b);				#ifdef VERBOSE			clog << "Shifter: " << a;			clog << " -> ";			clog << b << endl;		#endif				//-> wait();//-> 	}}

⌨️ 快捷键说明

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