data/full_repos/permissive/188868339/src/decoder/INSTR_DECODER.v
data/verilator_xmls/dbcc7491-d9e2-438f-b519-f9e0a5c1f2cd.xml
module INSTR_DECODER(
	input [7:0] INSTR,
	output SUMS,
	output ANDS,
	output ORS,
	output EORS,
	output SRS,
	output DEC_En,
	output C_En,
	output Z_En,
	output I_En,
	output D_En,
	output B_En,
	output V_En,
	output N_En
);

	

	localparam ORA = 3'b000;
	localparam AND = 3'b001;
	localparam EOR = 3'b010;
	localparam ADC = 3'b011;
	localparam STA = 3'b100;
	localparam LDA = 3'b101;
	localparam CMP = 3'b110;
	localparam SBC = 3'b111;	
	

	localparam ASL = 3'b000;
	localparam ROL = 3'b001;
	localparam LSR = 3'b010;
	localparam ROR = 3'b011;
	localparam STX = 3'b100;
	localparam LDX = 3'b101;
	localparam DEC = 3'b110;
	localparam INC = 3'b111;
		

	localparam BIT = 3'b001;
	localparam JMP = 3'b010;
	localparam JMPABS = 3'b011;
	localparam STY = 3'b100;
	localparam LDY = 3'b101;
	localparam CPY = 3'b110;
	localparam CPX = 3'b111;
	

	localparam IM = 3'b000;
	localparam ZP = 3'b001;
	localparam AC = 3'b010;
	localparam AB = 3'b011;
	localparam ZPY = 3'b100;
	localparam ZPX = 3'b101;
	localparam ABY = 3'b110;
	localparam ABX = 3'b111;
	
	

	

	localparam BPL = 8'h10;
	localparam BMI = 8'h30;
	localparam BVC = 8'h50;
	localparam BVS = 8'h70;
	localparam BCC = 8'h90;
	localparam BCS = 8'hB0;
	localparam BNE = 8'hD0;
	localparam BEQ = 8'hF0;
	

	localparam BRK = 8'h00;
	localparam JSRABS = 8'h20;
	localparam RTI = 8'h40;
	localparam RTS = 8'h60;
	

	localparam PHP = 8'h08;
	localparam PLP = 8'h28;
	localparam PHA = 8'h48;
	localparam PLA = 8'h68;
	localparam DEY = 8'h88;
	localparam TAY = 8'hA8;
	localparam INY = 8'hC8;
	localparam INX = 8'hE8;
	localparam CLC = 8'h18;
	localparam SEC = 8'h38;
	localparam CLI = 8'h58;
	localparam SEI = 8'h78;
	localparam TYA = 8'h98;
	localparam CLV = 8'hB8;
	localparam CLD = 8'hD8;
	localparam SED = 8'hF8;
	
	localparam TXA = 8'h8A;
	localparam TXS = 8'h9A;
	localparam TAX = 8'hAA;
	localparam TSX = 8'hBA;
	localparam DEX = 8'hCA;
	localparam NOP = 8'hEA;
	
endmodule
module INSTR_DECODER(
	input [7:0] INSTR,
	output SUMS,
	output ANDS,
	output ORS,
	output EORS,
	output SRS,
	output DEC_En,
	output C_En,
	output Z_En,
	output I_En,
	output D_En,
	output B_En,
	output V_En,
	output N_En
);


	

	localparam ORA = 3'b000;
	localparam AND = 3'b001;
	localparam EOR = 3'b010;
	localparam ADC = 3'b011;
	localparam STA = 3'b100;
	localparam LDA = 3'b101;
	localparam CMP = 3'b110;
	localparam SBC = 3'b111;	
	

	localparam ASL = 3'b000;
	localparam ROL = 3'b001;
	localparam LSR = 3'b010;
	localparam ROR = 3'b011;
	localparam STX = 3'b100;
	localparam LDX = 3'b101;
	localparam DEC = 3'b110;
	localparam INC = 3'b111;
		

	localparam BIT = 3'b001;
	localparam JMP = 3'b010;
	localparam JMPABS = 3'b011;
	localparam STY = 3'b100;
	localparam LDY = 3'b101;
	localparam CPY = 3'b110;
	localparam CPX = 3'b111;
	

	localparam IM = 3'b000;
	localparam ZP = 3'b001;
	localparam AC = 3'b010;
	localparam AB = 3'b011;
	localparam ZPY = 3'b100;
	localparam ZPX = 3'b101;
	localparam ABY = 3'b110;
	localparam ABX = 3'b111;
	
	

	

	localparam BPL = 8'h10;
	localparam BMI = 8'h30;
	localparam BVC = 8'h50;
	localparam BVS = 8'h70;
	localparam BCC = 8'h90;
	localparam BCS = 8'hB0;
	localparam BNE = 8'hD0;
	localparam BEQ = 8'hF0;
	

	localparam BRK = 8'h00;
	localparam JSRABS = 8'h20;
	localparam RTI = 8'h40;
	localparam RTS = 8'h60;
	

	localparam PHP = 8'h08;
	localparam PLP = 8'h28;
	localparam PHA = 8'h48;
	localparam PLA = 8'h68;
	localparam DEY = 8'h88;
	localparam TAY = 8'hA8;
	localparam INY = 8'hC8;
	localparam INX = 8'hE8;
	localparam CLC = 8'h18;
	localparam SEC = 8'h38;
	localparam CLI = 8'h58;
	localparam SEI = 8'h78;
	localparam TYA = 8'h98;
	localparam CLV = 8'hB8;
	localparam CLD = 8'hD8;
	localparam SED = 8'hF8;
	
	localparam TXA = 8'h8A;
	localparam TXS = 8'h9A;
	localparam TAX = 8'hAA;
	localparam TSX = 8'hBA;
	localparam DEX = 8'hCA;
	localparam NOP = 8'hEA;
	
endmodule