www.pudn.com > noc.rar > aluctrl.h


/*
 *  TU Eindhoven
 *  Eindhoven, The Netherlands
 *
 *  Name            :   aluctrl.h
 *
 *  Author          :   Sander Stuijk (sander@ics.ele.tue.nl)
 *
 *  Date            :   July 23, 2002
 *
 *  Function        :   ALU controller
 *
 *  History         :
 *      23-07-02    :   Initial version.
 *      13-12-02    :   Synthesizable version A.S.Slusarczyk@tue.nl
 *
 */
 
#ifndef ALUCTRL_H_INCLUDED
#define ALUCTRL_H_INCLUDED

#include "mips.h"

SC_MODULE(ALUCTRL) {
	sc_in< 	sc_bv >	functionCode;	// Bit [0,5] of instruction
	sc_in< 	sc_bv 	  >	ALUop;			// ALU operation code
	sc_in<	sc_bv	  >	Shamt;			// Shift amount
	sc_out< sc_bv  >	ALUctrl;		// Control output to ALU
	
	void aluctrl_thread();
	
	// Constructor
	SC_CTOR(ALUCTRL) {
		SC_METHOD(aluctrl_thread); //-> SC_THREAD(aluctrl_thread);
		sensitive << functionCode << ALUop << Shamt;
	}
};

#endif