`include "constants.h"

module fsm(output reg RegDst,
           output reg Branch,  
           output reg MemRead,
           output reg MemWrite,  
           output reg MemToReg,  
           output reg ALUSrc,  
           output reg RegWrite,  
           output reg [3:0] ALUOp,  
           input [5:0] opcode, 
           input [5:0] func);

  always @(*) 
   begin
     case (opcode)
      `R_FORMAT: 
          begin 
            RegDst = 1'b1;
            MemRead = 1'b0;
			
           // Place your code for R-format here 
		   
          end
       `LW :   
           begin 
            RegDst = 1'b0;
          // Place your code for lw  here 
           end
        `SW :   
           // // Place your code for sw  here 
       
	     // likewise for the remaining instructions
		 
      endcase
    end // always
    
endmodule
