data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v
1: b'%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:3: Cannot find include file: softMC.inc\n`include "softMC.inc"\n         ^~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/459857219/hw/boards/ML605,data/full_repos/permissive/459857219/softMC.inc\n             data/full_repos/permissive/459857219/hw/boards/ML605,data/full_repos/permissive/459857219/softMC.inc.v\n             data/full_repos/permissive/459857219/hw/boards/ML605,data/full_repos/permissive/459857219/softMC.inc.sv\n             softMC.inc\n             softMC.inc.v\n             softMC.inc.sv\n             obj_dir/softMC.inc\n             obj_dir/softMC.inc.v\n             obj_dir/softMC.inc.sv\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:31: Define or directive not defined: \'`ROW_OFFSET\'\n   dfi_bank = instr[`ROW_OFFSET +: BANK_WIDTH];\n                    ^~~~~~~~~~~\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:31: syntax error, unexpected +:, expecting TYPE-IDENTIFIER\n   dfi_bank = instr[`ROW_OFFSET +: BANK_WIDTH];\n                                ^~\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:32: Define or directive not defined: \'`WE_OFFSET\'\n   dfi_we_n = instr[`WE_OFFSET];\n                    ^~~~~~~~~~\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:32: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n   dfi_we_n = instr[`WE_OFFSET];\n                              ^\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:33: Define or directive not defined: \'`CAS_OFFSET\'\n   dfi_cas_n = instr[`CAS_OFFSET];\n                     ^~~~~~~~~~~\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:33: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n   dfi_cas_n = instr[`CAS_OFFSET];\n                                ^\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:34: Define or directive not defined: \'`RAS_OFFSET\'\n   dfi_ras_n = instr[`RAS_OFFSET];\n                     ^~~~~~~~~~~\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:34: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n   dfi_ras_n = instr[`RAS_OFFSET];\n                                ^\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:35: Define or directive not defined: \'`CS_OFFSET\'\n   dfi_cs_n = instr[`CS_OFFSET +: CS_WIDTH];\n                    ^~~~~~~~~~\n%Error: data/full_repos/permissive/459857219/hw/boards/ML605/instr_decoder.v:35: syntax error, unexpected +:, expecting TYPE-IDENTIFIER\n   dfi_cs_n = instr[`CS_OFFSET +: CS_WIDTH];\n                               ^~\n%Error: Exiting due to 11 error(s)\n'
module instr_decoder #(parameter ROW_WIDTH = 15, BANK_WIDTH = 3, CS_WIDTH = 1)(
	input en,
	input[31:0] instr,
	
	output reg[ROW_WIDTH - 1:0] dfi_address,
	output reg[BANK_WIDTH - 1:0] dfi_bank,
	output reg dfi_cas_n,
	output reg[CS_WIDTH - 1:0] dfi_cs_n,
	output reg dfi_ras_n,
	output reg dfi_we_n
);
	
	localparam LOW = 1'b0;
	localparam HIGH = 1'b1;

	always@* begin
		dfi_address = {ROW_WIDTH{1'bx}};
		dfi_bank = {BANK_WIDTH{1'bx}};
		
		dfi_cas_n = HIGH;
		dfi_cs_n = {CS_WIDTH{HIGH}};
		dfi_ras_n = HIGH;
		dfi_we_n = HIGH;
		
		if(en) begin
			dfi_address = instr[ROW_WIDTH - 1:0];
			dfi_bank = instr[`ROW_OFFSET +: BANK_WIDTH];
			dfi_we_n = instr[`WE_OFFSET];
			dfi_cas_n = instr[`CAS_OFFSET];
			dfi_ras_n = instr[`RAS_OFFSET];
			dfi_cs_n = instr[`CS_OFFSET +: CS_WIDTH];
		end
	end
endmodule
module instr_decoder #(parameter ROW_WIDTH = 15, BANK_WIDTH = 3, CS_WIDTH = 1)(
	input en,
	input[31:0] instr,
	
	output reg[ROW_WIDTH - 1:0] dfi_address,
	output reg[BANK_WIDTH - 1:0] dfi_bank,
	output reg dfi_cas_n,
	output reg[CS_WIDTH - 1:0] dfi_cs_n,
	output reg dfi_ras_n,
	output reg dfi_we_n
);

	
	localparam LOW = 1'b0;
	localparam HIGH = 1'b1;

	always@* begin
		dfi_address = {ROW_WIDTH{1'bx}};
		dfi_bank = {BANK_WIDTH{1'bx}};
		
		dfi_cas_n = HIGH;
		dfi_cs_n = {CS_WIDTH{HIGH}};
		dfi_ras_n = HIGH;
		dfi_we_n = HIGH;
		
		if(en) begin
			dfi_address = instr[ROW_WIDTH - 1:0];
			dfi_bank = instr[`ROW_OFFSET +: BANK_WIDTH];
			dfi_we_n = instr[`WE_OFFSET];
			dfi_cas_n = instr[`CAS_OFFSET];
			dfi_ras_n = instr[`RAS_OFFSET];
			dfi_cs_n = instr[`CS_OFFSET +: CS_WIDTH];
		end
	end
endmodule