--
-- Component : alu_ctrl
--
-- Generated by System Architect version v8.5_2.2 by ja-wells on Feb 22, 97
--
-- sensitivity_attr :: 'transaction
-- 
-- This component tells the alu which operation to perform based on
-- the state machine mode, instruction op field and, for rtype 
-- instructions, the instruction function field. This was implemented
-- as a separate component to more accurately reflect logic delays.
ARCHITECTURE spec OF alu_ctrl IS
BEGIN

   -------------------------------------------------------------------
   vhdl_alu_ctrl : PROCESS (ALUOp, FuncI, OpI)
   -------------------------------------------------------------------
		variable result: mips_alu_control;
   BEGIN
		case ALUOp is
			when uADD =>
				result := aADD;
			when uSUB =>
				result := aSUB;
			when uFUNC =>
				case FuncI is
					when cADD =>
						result := aADD;
					when cAND =>
						result := aAND;
					when cOR  =>
						result := aOR;
					when cSLL =>
						result := aSLL;
					when cSLT =>
            		result := aSLT;
					when cSRL =>
						result := aSRL;
					when cSUB =>
						result := aSUB;
         		when others =>
            		result := (OTHERS => 'X');
    			end case;
			when uOP =>
				case OpI is
					when oADDI =>
						result := aADD;
					when oANDI =>
						result := aAND;
					when oORI  =>
						result := aOR;
					when oSLTI =>
	            	result := aSLT;
       			when others =>
            		result := (OTHERS => 'X');
     			end case;   
         when others =>
            result := (OTHERS => 'X');
		end case;

		ALUCtrl <= result after 5 ns;
   END PROCESS vhdl_alu_ctrl ;
END spec ;


Click here to go up.