module SPCLogic(IR,SPCWrite,EPCWrite,INTWrite,OutWrite);
    input [3:0] IR;
    input [3:0] SPCWrite;
    output EPCWrite;
    output INTWrite;
    output OutWrite;

assign EPCWrite=(IR[3:0]==2||SPCWrite[1]==1)&&SPCWrite[0]==1;
assign INTWrite=(IR[3:0]==1||SPCWrite[2]==1)&&SPCWrite[0]==1;
assign OutWrite=(IR[3:0]==4||SPCWrite[3]==1)&&SPCWrite[0]==1;

endmodule
