data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v
None: at end of input
1: b'%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:28: Cannot find include file: core/csrlist.vh\n`include "core/csrlist.vh" \n         ^~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core,data/full_repos/permissive/114498561/core/csrlist.vh\n             data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core,data/full_repos/permissive/114498561/core/csrlist.vh.v\n             data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core,data/full_repos/permissive/114498561/core/csrlist.vh.sv\n             core/csrlist.vh\n             core/csrlist.vh.v\n             core/csrlist.vh.sv\n             obj_dir/core/csrlist.vh\n             obj_dir/core/csrlist.vh.v\n             obj_dir/core/csrlist.vh.sv\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:106: Define or directive not defined: \'`CSR_MVENDORID\'\n    `CSR_MVENDORID: begin\n    ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:106: syntax error, unexpected \':\', expecting endcase\n    `CSR_MVENDORID: begin\n                  ^\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:109: Define or directive not defined: \'`CSR_MARCHID\'\n    `CSR_MARCHID: begin\n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:109: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MARCHID: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:112: Define or directive not defined: \'`CSR_MIMPID\'\n    `CSR_MIMPID: begin\n    ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:112: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MIMPID: begin\n                 ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:115: Define or directive not defined: \'`CSR_MHARTID\'\n    `CSR_MHARTID: begin\n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:115: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MHARTID: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:118: Define or directive not defined: \'`CSR_MISA\'\n    `CSR_MISA: begin\n    ^~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:118: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MISA: begin\n               ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:122: Define or directive not defined: \'`CSR_MTVEC\'\n    `CSR_MTVEC: begin\n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:122: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MTVEC: begin\n                ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:126: Define or directive not defined: \'`CSR_MSCRATCH\'\n    `CSR_MSCRATCH: begin\n    ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:126: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MSCRATCH: begin\n                   ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:132: Define or directive not defined: \'`CSR_MEPC\'\n    `CSR_MEPC: begin\n    ^~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:132: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MEPC: begin\n               ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:138: Define or directive not defined: \'`CSR_MCAUSE\'\n    `CSR_MCAUSE: begin\n    ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:138: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MCAUSE: begin\n                 ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:144: Define or directive not defined: \'`CSR_MTVAL\'\n    `CSR_MTVAL: begin\n    ^~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:144: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MTVAL: begin\n                ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:150: Define or directive not defined: \'`CSR_MCYCLE\'\n    `CSR_MCYCLE: begin\n    ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:150: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MCYCLE: begin\n                 ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:156: Define or directive not defined: \'`CSR_MINSTRET\'\n    `CSR_MINSTRET: begin\n    ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:156: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MINSTRET: begin\n                   ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:162: Define or directive not defined: \'`CSR_MCYCLEH\'\n    `CSR_MCYCLEH: begin\n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:162: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MCYCLEH: begin\n                  ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:168: Define or directive not defined: \'`CSR_MINSTRETH\'\n    `CSR_MINSTRETH: begin\n    ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:168: syntax error, unexpected begin, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER or new\n    `CSR_MINSTRETH: begin\n                    ^~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:174: syntax error, unexpected default\n    default: begin\n    ^~~~~~~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:204: syntax error, unexpected <=, expecting IDENTIFIER\n        mcause <= 32\'d0;\n               ^~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:208: syntax error, unexpected <=, expecting IDENTIFIER\n        mcause <= 32\'d2;\n               ^~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:211: syntax error, unexpected <=, expecting IDENTIFIER\n        mcause <= 32\'d4;\n               ^~\n%Error: data/full_repos/permissive/114498561/01-embedded-softcore-rv32i/core/csr_ehu.v:214: syntax error, unexpected <=, expecting IDENTIFIER\n        mcause <= 32\'d6;\n               ^~\n%Error: Cannot continue\n'
module csr_ehu
  (

   clk, resetb, XB_bubble,

   read, write, set, clear, imm, a_rd,
   initiate_illinst, initiate_misaligned,

   XB_FD_exception_unsupported_category,
   XB_FD_exception_illegal_instruction,
   XB_FD_exception_instruction_misaligned,
   XB_FD_exception_load_misaligned,
   XB_FD_exception_store_misaligned,

   src_dst, d_rs1, uimm, FD_pc, XB_pc, data_out, csr_mepc
   );
`include "core/csrlist.vh"
   input wire clk, resetb, XB_bubble;


   input wire read, write, set, clear, imm;
   input wire [4:0] a_rd;
   input wire [11:0] src_dst;
   input wire [31:0] FD_pc, XB_pc, d_rs1;
   input wire [4:0]  uimm;
   input wire	     XB_FD_exception_unsupported_category;
   input wire	     XB_FD_exception_illegal_instruction;
   input wire	     XB_FD_exception_instruction_misaligned;
   input wire	     XB_FD_exception_load_misaligned;
   input wire	     XB_FD_exception_store_misaligned;
   output reg [31:0] data_out;
   output reg 	     initiate_illinst, initiate_misaligned;
   output wire [31:0] csr_mepc;
   reg 		      XB_exception_illegal_instruction;
   reg [31:0] 	      mepc;
   reg [31:0] 	      mscratch, mcause, mtval;
   reg [63:0] 	      mcycle, minstret;

   wire 	      initiate_exception;
   wire 	      FD_exception, XB_exception;

   assign FD_exception = XB_FD_exception_unsupported_category |
   		         XB_FD_exception_illegal_instruction |
   		         XB_FD_exception_instruction_misaligned |
   		         XB_FD_exception_load_misaligned |
   		         XB_FD_exception_store_misaligned;

   assign XB_exception = XB_exception_illegal_instruction;

   assign initiate_exception = XB_exception | FD_exception;

   assign csr_mepc = mepc;



   always @ (*) begin : EXCEPTION_HANDLING_UNIT
      initiate_illinst
	= ~XB_bubble & (XB_exception_illegal_instruction |
      			XB_FD_exception_illegal_instruction |
      			XB_FD_exception_unsupported_category);
      initiate_misaligned
	= ~XB_bubble & (XB_FD_exception_instruction_misaligned |
      			XB_FD_exception_load_misaligned |
      			XB_FD_exception_store_misaligned);
   end


   wire [31:0] 	     operand;
   assign operand = imm ? {27'b0, uimm} : d_rs1;

   wire 	     really_read, really_write, really_set, really_clear;


   assign really_read = read && (a_rd != 5'b0);
   assign really_write = write && !(imm && uimm == 5'b0);
   assign really_set = set && (uimm != 5'b0);
   assign really_clear = clear && (uimm != 5'b0);

   always @ (posedge clk, negedge resetb) begin : CSR_PIPELINE
      if (!resetb) begin
	 mcycle <= 64'b0;
	 minstret <= 64'b0;
	 mepc <= 32'bX;
	 data_out <= 32'bX;
      end
      else if (clk) begin
	 XB_exception_illegal_instruction = 1'b0;
	 mcycle <= mcycle + 64'b1;
	 if (!XB_bubble) begin

	    minstret <= minstret + 64'b1;
	 end

	 case (src_dst)
	   `CSR_MVENDORID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MARCHID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MIMPID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MHARTID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MISA: begin

	      if (really_read) data_out <= 32'b0100_0000_0000_0000_0000_0001_0000_0000;
	   end
	   `CSR_MTVEC: begin

	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MSCRATCH: begin
	      if (really_read) data_out <= mscratch;
	      if (really_write) mscratch <= operand;
	      if (really_set) mscratch <= mscratch | operand;
	      if (really_clear) mscratch <= mscratch & ~operand;
	   end
	   `CSR_MEPC: begin
	      if (really_read) data_out <= mepc;
	      if (really_write) mepc <= operand;
	      if (really_set) mepc <= mepc | operand;
	      if (really_clear) mepc <= mepc & ~operand;
	   end
	   `CSR_MCAUSE: begin
	      if (really_read) data_out <= mcause;
	      if (really_write) mcause <= operand;
	      if (really_set) mcause <= mcause | operand;
	      if (really_clear) mcause <= mcause & ~operand;
	   end
	   `CSR_MTVAL: begin
	      if (really_read) data_out <= mtval;
	      if (really_write) mtval <= operand;
	      if (really_set) mtval <= mtval | operand;
	      if (really_clear) mtval <= mtval & ~operand;
	   end
	   `CSR_MCYCLE: begin
	      if (really_read) data_out <= mcycle[0+:32];
	      if (really_write) mcycle[0+:32] <= operand;
	      if (really_set) mcycle[0+:32] <= mcycle[0+:32] | operand;
	      if (really_clear) mcycle[0+:32] <= mcycle[0+:32] & ~operand;
	   end
	   `CSR_MINSTRET: begin
	      if (really_read) data_out <= minstret[0+:32];
	      if (really_write) minstret[0+:32] <= operand;
	      if (really_set) minstret[0+:32] <= minstret[0+:32] | operand;
	      if (really_clear) minstret[0+:32] <= minstret[0+:32] & ~operand;
	   end
	   `CSR_MCYCLEH: begin
	      if (really_read) data_out <= mcycle[32+:32];
	      if (really_write) mcycle[32+:32] <= operand;
	      if (really_set) mcycle[32+:32] <= mcycle[32+:32] | operand;
	      if (really_clear) mcycle[32+:32] <= mcycle[32+:32] & ~operand;
	   end
	   `CSR_MINSTRETH: begin
	      if (really_read) data_out <= minstret[32+:32];
	      if (really_write) minstret[32+:32] <= operand;
	      if (really_set) minstret[32+:32] <= minstret[32+:32] | operand;
	      if (really_clear) minstret[32+:32] <= minstret[32+:32] & ~operand;
	   end
	   default: begin

	      if (src_dst[11:4] == 8'hB0 || 
		  src_dst[11:4] == 8'hB1 ||
		  src_dst[11:4] == 8'hB8 ||
		  src_dst[11:4] == 8'hB9 ||
		  src_dst[11:4] == 8'h32 ||
		  src_dst[11:4] == 8'h33
		  ) begin : PERFORMANCE_MONITORS
		 data_out <= 32'b0;
	      end
	      else begin

		 if (~XB_bubble & (read|write|set|clear))
		   XB_exception_illegal_instruction = 1'b1;
	      end
	   end
	 endcase

	 if (XB_exception) begin




	    mepc <= FD_pc;
	    mcause <= 32'd2;
	 end
	 else if (FD_exception) begin
	    mepc <= XB_pc;
	    if (XB_FD_exception_instruction_misaligned) begin
	       mcause <= 32'd0;
	    end
	    else if (XB_FD_exception_illegal_instruction |
		     XB_FD_exception_unsupported_category) begin
	       mcause <= 32'd2;
	    end
	    else if (XB_FD_exception_load_misaligned) begin
	       mcause <= 32'd4;
	    end
	    else if (XB_FD_exception_store_misaligned) begin
	       mcause <= 32'd6;
	    end
	 end
      end
   end
   
endmodule
module csr_ehu
  (

   clk, resetb, XB_bubble,

   read, write, set, clear, imm, a_rd,
   initiate_illinst, initiate_misaligned,

   XB_FD_exception_unsupported_category,
   XB_FD_exception_illegal_instruction,
   XB_FD_exception_instruction_misaligned,
   XB_FD_exception_load_misaligned,
   XB_FD_exception_store_misaligned,

   src_dst, d_rs1, uimm, FD_pc, XB_pc, data_out, csr_mepc
   );

`include "core/csrlist.vh"
   input wire clk, resetb, XB_bubble;


   input wire read, write, set, clear, imm;
   input wire [4:0] a_rd;
   input wire [11:0] src_dst;
   input wire [31:0] FD_pc, XB_pc, d_rs1;
   input wire [4:0]  uimm;
   input wire	     XB_FD_exception_unsupported_category;
   input wire	     XB_FD_exception_illegal_instruction;
   input wire	     XB_FD_exception_instruction_misaligned;
   input wire	     XB_FD_exception_load_misaligned;
   input wire	     XB_FD_exception_store_misaligned;
   output reg [31:0] data_out;
   output reg 	     initiate_illinst, initiate_misaligned;
   output wire [31:0] csr_mepc;
   reg 		      XB_exception_illegal_instruction;
   reg [31:0] 	      mepc;
   reg [31:0] 	      mscratch, mcause, mtval;
   reg [63:0] 	      mcycle, minstret;

   wire 	      initiate_exception;
   wire 	      FD_exception, XB_exception;

   assign FD_exception = XB_FD_exception_unsupported_category |
   		         XB_FD_exception_illegal_instruction |
   		         XB_FD_exception_instruction_misaligned |
   		         XB_FD_exception_load_misaligned |
   		         XB_FD_exception_store_misaligned;

   assign XB_exception = XB_exception_illegal_instruction;

   assign initiate_exception = XB_exception | FD_exception;

   assign csr_mepc = mepc;



   always @ (*) begin : EXCEPTION_HANDLING_UNIT
      initiate_illinst
	= ~XB_bubble & (XB_exception_illegal_instruction |
      			XB_FD_exception_illegal_instruction |
      			XB_FD_exception_unsupported_category);
      initiate_misaligned
	= ~XB_bubble & (XB_FD_exception_instruction_misaligned |
      			XB_FD_exception_load_misaligned |
      			XB_FD_exception_store_misaligned);
   end


   wire [31:0] 	     operand;
   assign operand = imm ? {27'b0, uimm} : d_rs1;

   wire 	     really_read, really_write, really_set, really_clear;


   assign really_read = read && (a_rd != 5'b0);
   assign really_write = write && !(imm && uimm == 5'b0);
   assign really_set = set && (uimm != 5'b0);
   assign really_clear = clear && (uimm != 5'b0);

   always @ (posedge clk, negedge resetb) begin : CSR_PIPELINE
      if (!resetb) begin
	 mcycle <= 64'b0;
	 minstret <= 64'b0;
	 mepc <= 32'bX;
	 data_out <= 32'bX;
      end
      else if (clk) begin
	 XB_exception_illegal_instruction = 1'b0;
	 mcycle <= mcycle + 64'b1;
	 if (!XB_bubble) begin

	    minstret <= minstret + 64'b1;
	 end

	 case (src_dst)
	   `CSR_MVENDORID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MARCHID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MIMPID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MHARTID: begin
	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MISA: begin

	      if (really_read) data_out <= 32'b0100_0000_0000_0000_0000_0001_0000_0000;
	   end
	   `CSR_MTVEC: begin

	      if (really_read) data_out <= 32'b0;
	   end
	   `CSR_MSCRATCH: begin
	      if (really_read) data_out <= mscratch;
	      if (really_write) mscratch <= operand;
	      if (really_set) mscratch <= mscratch | operand;
	      if (really_clear) mscratch <= mscratch & ~operand;
	   end
	   `CSR_MEPC: begin
	      if (really_read) data_out <= mepc;
	      if (really_write) mepc <= operand;
	      if (really_set) mepc <= mepc | operand;
	      if (really_clear) mepc <= mepc & ~operand;
	   end
	   `CSR_MCAUSE: begin
	      if (really_read) data_out <= mcause;
	      if (really_write) mcause <= operand;
	      if (really_set) mcause <= mcause | operand;
	      if (really_clear) mcause <= mcause & ~operand;
	   end
	   `CSR_MTVAL: begin
	      if (really_read) data_out <= mtval;
	      if (really_write) mtval <= operand;
	      if (really_set) mtval <= mtval | operand;
	      if (really_clear) mtval <= mtval & ~operand;
	   end
	   `CSR_MCYCLE: begin
	      if (really_read) data_out <= mcycle[0+:32];
	      if (really_write) mcycle[0+:32] <= operand;
	      if (really_set) mcycle[0+:32] <= mcycle[0+:32] | operand;
	      if (really_clear) mcycle[0+:32] <= mcycle[0+:32] & ~operand;
	   end
	   `CSR_MINSTRET: begin
	      if (really_read) data_out <= minstret[0+:32];
	      if (really_write) minstret[0+:32] <= operand;
	      if (really_set) minstret[0+:32] <= minstret[0+:32] | operand;
	      if (really_clear) minstret[0+:32] <= minstret[0+:32] & ~operand;
	   end
	   `CSR_MCYCLEH: begin
	      if (really_read) data_out <= mcycle[32+:32];
	      if (really_write) mcycle[32+:32] <= operand;
	      if (really_set) mcycle[32+:32] <= mcycle[32+:32] | operand;
	      if (really_clear) mcycle[32+:32] <= mcycle[32+:32] & ~operand;
	   end
	   `CSR_MINSTRETH: begin
	      if (really_read) data_out <= minstret[32+:32];
	      if (really_write) minstret[32+:32] <= operand;
	      if (really_set) minstret[32+:32] <= minstret[32+:32] | operand;
	      if (really_clear) minstret[32+:32] <= minstret[32+:32] & ~operand;
	   end
	   default: begin

	      if (src_dst[11:4] == 8'hB0 || 
		  src_dst[11:4] == 8'hB1 ||
		  src_dst[11:4] == 8'hB8 ||
		  src_dst[11:4] == 8'hB9 ||
		  src_dst[11:4] == 8'h32 ||
		  src_dst[11:4] == 8'h33
		  ) begin : PERFORMANCE_MONITORS
		 data_out <= 32'b0;
	      end
	      else begin

		 if (~XB_bubble & (read|write|set|clear))
		   XB_exception_illegal_instruction = 1'b1;
	      end
	   end
	 endcase

	 if (XB_exception) begin




	    mepc <= FD_pc;
	    mcause <= 32'd2;
	 end
	 else if (FD_exception) begin
	    mepc <= XB_pc;
	    if (XB_FD_exception_instruction_misaligned) begin
	       mcause <= 32'd0;
	    end
	    else if (XB_FD_exception_illegal_instruction |
		     XB_FD_exception_unsupported_category) begin
	       mcause <= 32'd2;
	    end
	    else if (XB_FD_exception_load_misaligned) begin
	       mcause <= 32'd4;
	    end
	    else if (XB_FD_exception_store_misaligned) begin
	       mcause <= 32'd6;
	    end
	 end
      end
   end
   
endmodule