data/full_repos/permissive/40989439/AdaptevaLib/elink-gold/axi_master_wr.v
1: b"%Error: data/full_repos/permissive/40989439/AdaptevaLib/elink-gold/axi_master_wr.v:206: Cannot find file containing module: 'fifo'\n   fifo #(.DW(ACH), .AW(AFW)) fifo_ach( \n   ^~~~\n        ... Looked in:\n             data/full_repos/permissive/40989439/AdaptevaLib/elink-gold,data/full_repos/permissive/40989439/fifo\n             data/full_repos/permissive/40989439/AdaptevaLib/elink-gold,data/full_repos/permissive/40989439/fifo.v\n             data/full_repos/permissive/40989439/AdaptevaLib/elink-gold,data/full_repos/permissive/40989439/fifo.sv\n             fifo\n             fifo.v\n             fifo.sv\n             obj_dir/fifo\n             obj_dir/fifo.v\n             obj_dir/fifo.sv\n%Error: data/full_repos/permissive/40989439/AdaptevaLib/elink-gold/axi_master_wr.v:334: Cannot find file containing module: 'fifo'\n   fifo #(.DW(DCH), .AW(DFW)) fifo_dch( \n   ^~~~\n%Error: Exiting due to 2 error(s)\n"
module axi_master_wr (

   awid, awaddr, awlen, awsize, awburst, awlock, awcache, awprot,
   awvalid, wid, wdata, wstrb, wlast, wvalid, bready,
   emesh_wr_wait_inb,

   aclk, eclk, reset, awready, wready, bid, bresp, bvalid,
   emesh_access_outb, emesh_write_outb, emesh_datamode_outb,
   emesh_ctrlmode_outb, emesh_dstaddr_outb, emesh_srcaddr_outb,
   emesh_data_outb
   );

   parameter MIDW = 6;
   parameter MAW  = 32;
   parameter MDW  = 64;
   parameter ACH = MAW+2;
   parameter AFW = 4;
   parameter DFW = 4;
   parameter DCH = MDW+8;
   parameter STW = 8;






   input aclk;
   input eclk;
   input reset;




   input            awready;
   



   input 	    wready;




   input [MIDW-1:0]  bid;
   input [1:0] 	    bresp;
   input 	    bvalid;
      



   input 	    emesh_access_outb;
   input 	    emesh_write_outb;
   input [1:0] 	    emesh_datamode_outb;
   input [3:0] 	    emesh_ctrlmode_outb;
   input [31:0]     emesh_dstaddr_outb;
   input [31:0]     emesh_srcaddr_outb;
   input [31:0]     emesh_data_outb;   
   







   output [MIDW-1:0] awid;
   output [MAW-1:0]  awaddr;
   output [3:0]     awlen;
   output [2:0]     awsize;
   output [1:0]     awburst;
   output [1:0]     awlock;
   output [3:0]     awcache;
   output [2:0]     awprot;
   output 	    awvalid;
      



   output [MIDW-1:0] wid;
   output [MDW-1:0]  wdata;
   output [STW-1:0] wstrb;
   output 	    wlast;
   output 	    wvalid;
   



   output 	    bready;
   



   output 	    emesh_wr_wait_inb;  







   reg [33:0] 	    addr_reg;
   reg [63:0] 	    data_reg;
   reg 		    emesh_wr_access_reg;
   reg 		    ach_fifo_empty_reg;
   reg [ACH-1:0]    ach_fifo_reg;
   reg [63:0] 	    realgn_byte;
   reg [63:0] 	    realgn_hword;
   reg 		    dch_fifo_empty_reg;
   reg [DCH-1:0]    dch_fifo_reg;
   reg [7:0] 	    wstrb_hword;
   reg [7:0] 	    wstrb_byte;
      



   wire 	    emesh_wr_access;
   wire [ACH-1:0]   ach_fifo_in;
   wire [ACH-1:0]   ach_fifo_out;
   wire 	    ach_fifo_wr;
   wire 	    ach_fifo_rd;
   wire 	    ach_fifo_full;
   wire 	    ach_fifo_empty;
   wire 	    ach_advance;
   wire 	    awvalid_awready;
   wire [2:0] 	    realgn_ctrl;
   wire 	    byte_realgn;
   wire 	    hword_realgn;
   wire 	    word_realgn;
   wire [63:0] 	    realgn_word;
   wire [63:0] 	    data_realgn;
   wire [DCH-1:0]   dch_fifo_in;
   wire [DCH-1:0]   dch_fifo_out;
   wire 	    dch_fifo_wr;
   wire 	    dch_fifo_rd;
   wire 	    dch_fifo_empty;
   wire 	    dch_advance;
   wire 	    wvalid_wready;
   wire [7:0] 	    wstrb_realgn;
   wire [7:0] 	    wstrb_word;
   wire 	    dch_fifo_full;
   
   

   assign emesh_wr_wait_inb = ach_fifo_full | dch_fifo_full;

   assign emesh_wr_access = emesh_access_outb & emesh_write_outb &
                                               ~emesh_wr_wait_inb;

   always @ (posedge eclk)
     if (emesh_wr_access)
       addr_reg[33:0] <= {emesh_dstaddr_outb[31:0],emesh_datamode_outb[1:0]};

   always @ (posedge eclk)
     if (emesh_wr_access)
       data_reg[63:0] <= {emesh_srcaddr_outb[31:0],emesh_data_outb[31:0]};
 
   always @ (posedge eclk or posedge reset)
     if(reset)
       emesh_wr_access_reg <= 1'b0;
     else if(~emesh_wr_wait_inb)
       emesh_wr_access_reg <= emesh_wr_access;
   




   assign ach_fifo_in[ACH-1:0] = addr_reg[33:0];
   assign ach_fifo_wr          = emesh_wr_access_reg & ~emesh_wr_wait_inb;
   assign ach_fifo_rd          = ~ach_fifo_empty & (~awvalid | awvalid_awready);
   assign ach_advance          = awvalid_awready | ~awvalid;
   
   


   fifo #(.DW(ACH), .AW(AFW)) fifo_ach(

				       .rd_data		(ach_fifo_out[ACH-1:0]),
				       .rd_fifo_empty	(ach_fifo_empty),
				       .wr_fifo_full	(ach_fifo_full),

				       .reset		(reset),
				       .wr_clk		(eclk),
				       .rd_clk		(aclk),
				       .wr_write	(ach_fifo_wr),
				       .wr_data		(ach_fifo_in[ACH-1:0]),
				       .rd_read		(ach_fifo_rd));
   

   always @ (posedge aclk or posedge reset)
     if(reset)
       ach_fifo_empty_reg <= 1'b1;
     else if(ach_advance)
       ach_fifo_empty_reg <= ach_fifo_empty;

   always @ (posedge aclk)
     if (ach_advance)
       ach_fifo_reg[ACH-1:0] <= ach_fifo_out[ACH-1:0];

   assign awid[MIDW-1:0]  = {(MIDW){1'b0}};
   assign awaddr[MAW-1:0] = ach_fifo_reg[ACH-1:2];
   assign awlen[3:0]     = 4'b0000;
   assign awsize[2:0]    = {1'b0,ach_fifo_reg[1:0]};
   assign awburst[1:0]   = 2'b01;
   assign awlock[1:0]    = 2'b00;
   assign awcache[3:0]   = 4'b0000;
   assign awprot[2:0]    = 3'b000;
   assign awvalid        = ~ach_fifo_empty_reg;

   assign awvalid_awready = awvalid & awready;
   




   assign realgn_ctrl[2:0]  = addr_reg[4:2];
   assign byte_realgn       = (addr_reg[1:0] == 2'b00);
   assign hword_realgn      = (addr_reg[1:0] == 2'b01);
   assign word_realgn       = (addr_reg[1:0] == 2'b10);

   always @ (realgn_ctrl[2:0] or data_reg[7:0])
     begin
       casez (realgn_ctrl[2:0])
	 3'b000 : realgn_byte[63:0] = {{(56){1'b0}},data_reg[7:0]             };
	 3'b001 : realgn_byte[63:0] = {{(48){1'b0}},data_reg[7:0],{( 8){1'b0}}};
	 3'b010 : realgn_byte[63:0] = {{(40){1'b0}},data_reg[7:0],{(16){1'b0}}};
	 3'b011 : realgn_byte[63:0] = {{(32){1'b0}},data_reg[7:0],{(24){1'b0}}};
	 3'b100 : realgn_byte[63:0] = {{(24){1'b0}},data_reg[7:0],{(32){1'b0}}};
	 3'b101 : realgn_byte[63:0] = {{(16){1'b0}},data_reg[7:0],{(40){1'b0}}};
	 3'b110 : realgn_byte[63:0] = {{(8){1'b0}},data_reg[7:0] ,{(48){1'b0}}};
	 3'b111 : realgn_byte[63:0] = {            data_reg[7:0] ,{(56){1'b0}}};
	 default: realgn_byte[63:0] = {{(56){1'b0}},data_reg[7:0]};
       endcase
     end
   
   always @ (realgn_ctrl[2:1] or data_reg[15:0])
     begin
      casez (realgn_ctrl[2:1])
	2'b00 : realgn_hword[63:0] = {{(48){1'b0}},data_reg[15:0]};
	2'b01 : realgn_hword[63:0] = {{(32){1'b0}},data_reg[15:0],{(16){1'b0}}};
	2'b10 : realgn_hword[63:0] = {{(16){1'b0}},data_reg[15:0],{(32){1'b0}}};
	2'b11 : realgn_hword[63:0] = {             data_reg[15:0],{(48){1'b0}}};
	default: realgn_hword[63:0] = {{(48){1'b0}},data_reg[15:0]};
      endcase
     end
   
   assign realgn_word[63:0] = realgn_ctrl[2] ? {data_reg[31:0],{(32){1'b0}}} :
			                       {{(32){1'b0}},data_reg[31:0]};

   assign data_realgn[63:0] = byte_realgn  ? realgn_byte[63:0] :
			      hword_realgn ? realgn_hword[63:0]:
			      word_realgn  ? realgn_word[63:0] :
			                     data_reg[63:0];


   always @ (realgn_ctrl[2:0])
     begin
       casez (realgn_ctrl[2:0])
	 3'b000 : wstrb_byte[7:0] = 8'b00000001;
	 3'b001 : wstrb_byte[7:0] = 8'b00000010;
	 3'b010 : wstrb_byte[7:0] = 8'b00000100;
	 3'b011 : wstrb_byte[7:0] = 8'b00001000;
	 3'b100 : wstrb_byte[7:0] = 8'b00010000;
	 3'b101 : wstrb_byte[7:0] = 8'b00100000;
	 3'b110 : wstrb_byte[7:0] = 8'b01000000;
	 3'b111 : wstrb_byte[7:0] = 8'b10000000;
	 default: wstrb_byte[7:0] = 8'b00000001;
       endcase
     end
   
   always @ (realgn_ctrl[2:1])
     begin
      casez (realgn_ctrl[2:1])
	2'b00 : wstrb_hword[7:0]  = 8'b00000011;
	2'b01 : wstrb_hword[7:0]  = 8'b00001100;
	2'b10 : wstrb_hword[7:0]  = 8'b00110000;
	2'b11 : wstrb_hword[7:0]  = 8'b11000000;
	default: wstrb_hword[7:0] = 8'b00000011;
      endcase
     end
   
   assign wstrb_word[7:0] = realgn_ctrl[2] ? 8'b11110000 : 8'b00001111;
   
   assign wstrb_realgn[7:0] = byte_realgn  ? wstrb_byte[7:0] :
			      hword_realgn ? wstrb_hword[7:0]:
			      word_realgn  ? wstrb_word[7:0] : {(8){1'b1}};
   
   assign dch_fifo_in[DCH-1:0] = {data_realgn[63:0],wstrb_realgn[7:0]};
   assign dch_fifo_wr          = emesh_wr_access_reg & ~emesh_wr_wait_inb;
   assign dch_fifo_rd          = ~dch_fifo_empty & (~wvalid | wvalid_wready);
   assign dch_advance          = wvalid_wready | ~wvalid;
      


   fifo #(.DW(DCH), .AW(DFW)) fifo_dch(

				       .rd_data		(dch_fifo_out[DCH-1:0]),
				       .rd_fifo_empty	(dch_fifo_empty),
				       .wr_fifo_full	(dch_fifo_full),

				       .reset		(reset),
				       .wr_clk		(eclk),
				       .rd_clk		(aclk),
				       .wr_write	(dch_fifo_wr),
				       .wr_data		(dch_fifo_in[DCH-1:0]),
				       .rd_read		(dch_fifo_rd));
   

   always @ (posedge aclk or posedge reset)
     if(reset)
       dch_fifo_empty_reg <= 1'b1;
     else if(dch_advance)
       dch_fifo_empty_reg <= dch_fifo_empty;
   
   always @ (posedge aclk)
     if (dch_advance)
       dch_fifo_reg[DCH-1:0] <= dch_fifo_out[DCH-1:0];
   
   assign wid[MIDW-1:0]   = {(MIDW){1'b0}};
   assign wdata[MDW-1:0]  = dch_fifo_reg[DCH-1:8];
   assign wstrb[STW-1:0] = dch_fifo_reg[7:0];
   assign wlast          = 1'b1;
   assign wvalid         = ~dch_fifo_empty_reg;

   assign wvalid_wready  = wvalid & wready;

   assign bready = 1'b1;
   
endmodule
module axi_master_wr (

   awid, awaddr, awlen, awsize, awburst, awlock, awcache, awprot,
   awvalid, wid, wdata, wstrb, wlast, wvalid, bready,
   emesh_wr_wait_inb,

   aclk, eclk, reset, awready, wready, bid, bresp, bvalid,
   emesh_access_outb, emesh_write_outb, emesh_datamode_outb,
   emesh_ctrlmode_outb, emesh_dstaddr_outb, emesh_srcaddr_outb,
   emesh_data_outb
   );


   parameter MIDW = 6;
   parameter MAW  = 32;
   parameter MDW  = 64;
   parameter ACH = MAW+2;
   parameter AFW = 4;
   parameter DFW = 4;
   parameter DCH = MDW+8;
   parameter STW = 8;






   input aclk;
   input eclk;
   input reset;




   input            awready;
   



   input 	    wready;




   input [MIDW-1:0]  bid;
   input [1:0] 	    bresp;
   input 	    bvalid;
      



   input 	    emesh_access_outb;
   input 	    emesh_write_outb;
   input [1:0] 	    emesh_datamode_outb;
   input [3:0] 	    emesh_ctrlmode_outb;
   input [31:0]     emesh_dstaddr_outb;
   input [31:0]     emesh_srcaddr_outb;
   input [31:0]     emesh_data_outb;   
   







   output [MIDW-1:0] awid;
   output [MAW-1:0]  awaddr;
   output [3:0]     awlen;
   output [2:0]     awsize;
   output [1:0]     awburst;
   output [1:0]     awlock;
   output [3:0]     awcache;
   output [2:0]     awprot;
   output 	    awvalid;
      



   output [MIDW-1:0] wid;
   output [MDW-1:0]  wdata;
   output [STW-1:0] wstrb;
   output 	    wlast;
   output 	    wvalid;
   



   output 	    bready;
   



   output 	    emesh_wr_wait_inb;  







   reg [33:0] 	    addr_reg;
   reg [63:0] 	    data_reg;
   reg 		    emesh_wr_access_reg;
   reg 		    ach_fifo_empty_reg;
   reg [ACH-1:0]    ach_fifo_reg;
   reg [63:0] 	    realgn_byte;
   reg [63:0] 	    realgn_hword;
   reg 		    dch_fifo_empty_reg;
   reg [DCH-1:0]    dch_fifo_reg;
   reg [7:0] 	    wstrb_hword;
   reg [7:0] 	    wstrb_byte;
      



   wire 	    emesh_wr_access;
   wire [ACH-1:0]   ach_fifo_in;
   wire [ACH-1:0]   ach_fifo_out;
   wire 	    ach_fifo_wr;
   wire 	    ach_fifo_rd;
   wire 	    ach_fifo_full;
   wire 	    ach_fifo_empty;
   wire 	    ach_advance;
   wire 	    awvalid_awready;
   wire [2:0] 	    realgn_ctrl;
   wire 	    byte_realgn;
   wire 	    hword_realgn;
   wire 	    word_realgn;
   wire [63:0] 	    realgn_word;
   wire [63:0] 	    data_realgn;
   wire [DCH-1:0]   dch_fifo_in;
   wire [DCH-1:0]   dch_fifo_out;
   wire 	    dch_fifo_wr;
   wire 	    dch_fifo_rd;
   wire 	    dch_fifo_empty;
   wire 	    dch_advance;
   wire 	    wvalid_wready;
   wire [7:0] 	    wstrb_realgn;
   wire [7:0] 	    wstrb_word;
   wire 	    dch_fifo_full;
   
   

   assign emesh_wr_wait_inb = ach_fifo_full | dch_fifo_full;

   assign emesh_wr_access = emesh_access_outb & emesh_write_outb &
                                               ~emesh_wr_wait_inb;

   always @ (posedge eclk)
     if (emesh_wr_access)
       addr_reg[33:0] <= {emesh_dstaddr_outb[31:0],emesh_datamode_outb[1:0]};

   always @ (posedge eclk)
     if (emesh_wr_access)
       data_reg[63:0] <= {emesh_srcaddr_outb[31:0],emesh_data_outb[31:0]};
 
   always @ (posedge eclk or posedge reset)
     if(reset)
       emesh_wr_access_reg <= 1'b0;
     else if(~emesh_wr_wait_inb)
       emesh_wr_access_reg <= emesh_wr_access;
   




   assign ach_fifo_in[ACH-1:0] = addr_reg[33:0];
   assign ach_fifo_wr          = emesh_wr_access_reg & ~emesh_wr_wait_inb;
   assign ach_fifo_rd          = ~ach_fifo_empty & (~awvalid | awvalid_awready);
   assign ach_advance          = awvalid_awready | ~awvalid;
   
   


   fifo #(.DW(ACH), .AW(AFW)) fifo_ach(

				       .rd_data		(ach_fifo_out[ACH-1:0]),
				       .rd_fifo_empty	(ach_fifo_empty),
				       .wr_fifo_full	(ach_fifo_full),

				       .reset		(reset),
				       .wr_clk		(eclk),
				       .rd_clk		(aclk),
				       .wr_write	(ach_fifo_wr),
				       .wr_data		(ach_fifo_in[ACH-1:0]),
				       .rd_read		(ach_fifo_rd));
   

   always @ (posedge aclk or posedge reset)
     if(reset)
       ach_fifo_empty_reg <= 1'b1;
     else if(ach_advance)
       ach_fifo_empty_reg <= ach_fifo_empty;

   always @ (posedge aclk)
     if (ach_advance)
       ach_fifo_reg[ACH-1:0] <= ach_fifo_out[ACH-1:0];

   assign awid[MIDW-1:0]  = {(MIDW){1'b0}};
   assign awaddr[MAW-1:0] = ach_fifo_reg[ACH-1:2];
   assign awlen[3:0]     = 4'b0000;
   assign awsize[2:0]    = {1'b0,ach_fifo_reg[1:0]};
   assign awburst[1:0]   = 2'b01;
   assign awlock[1:0]    = 2'b00;
   assign awcache[3:0]   = 4'b0000;
   assign awprot[2:0]    = 3'b000;
   assign awvalid        = ~ach_fifo_empty_reg;

   assign awvalid_awready = awvalid & awready;
   




   assign realgn_ctrl[2:0]  = addr_reg[4:2];
   assign byte_realgn       = (addr_reg[1:0] == 2'b00);
   assign hword_realgn      = (addr_reg[1:0] == 2'b01);
   assign word_realgn       = (addr_reg[1:0] == 2'b10);

   always @ (realgn_ctrl[2:0] or data_reg[7:0])
     begin
       casez (realgn_ctrl[2:0])
	 3'b000 : realgn_byte[63:0] = {{(56){1'b0}},data_reg[7:0]             };
	 3'b001 : realgn_byte[63:0] = {{(48){1'b0}},data_reg[7:0],{( 8){1'b0}}};
	 3'b010 : realgn_byte[63:0] = {{(40){1'b0}},data_reg[7:0],{(16){1'b0}}};
	 3'b011 : realgn_byte[63:0] = {{(32){1'b0}},data_reg[7:0],{(24){1'b0}}};
	 3'b100 : realgn_byte[63:0] = {{(24){1'b0}},data_reg[7:0],{(32){1'b0}}};
	 3'b101 : realgn_byte[63:0] = {{(16){1'b0}},data_reg[7:0],{(40){1'b0}}};
	 3'b110 : realgn_byte[63:0] = {{(8){1'b0}},data_reg[7:0] ,{(48){1'b0}}};
	 3'b111 : realgn_byte[63:0] = {            data_reg[7:0] ,{(56){1'b0}}};
	 default: realgn_byte[63:0] = {{(56){1'b0}},data_reg[7:0]};
       endcase
     end
   
   always @ (realgn_ctrl[2:1] or data_reg[15:0])
     begin
      casez (realgn_ctrl[2:1])
	2'b00 : realgn_hword[63:0] = {{(48){1'b0}},data_reg[15:0]};
	2'b01 : realgn_hword[63:0] = {{(32){1'b0}},data_reg[15:0],{(16){1'b0}}};
	2'b10 : realgn_hword[63:0] = {{(16){1'b0}},data_reg[15:0],{(32){1'b0}}};
	2'b11 : realgn_hword[63:0] = {             data_reg[15:0],{(48){1'b0}}};
	default: realgn_hword[63:0] = {{(48){1'b0}},data_reg[15:0]};
      endcase
     end
   
   assign realgn_word[63:0] = realgn_ctrl[2] ? {data_reg[31:0],{(32){1'b0}}} :
			                       {{(32){1'b0}},data_reg[31:0]};

   assign data_realgn[63:0] = byte_realgn  ? realgn_byte[63:0] :
			      hword_realgn ? realgn_hword[63:0]:
			      word_realgn  ? realgn_word[63:0] :
			                     data_reg[63:0];


   always @ (realgn_ctrl[2:0])
     begin
       casez (realgn_ctrl[2:0])
	 3'b000 : wstrb_byte[7:0] = 8'b00000001;
	 3'b001 : wstrb_byte[7:0] = 8'b00000010;
	 3'b010 : wstrb_byte[7:0] = 8'b00000100;
	 3'b011 : wstrb_byte[7:0] = 8'b00001000;
	 3'b100 : wstrb_byte[7:0] = 8'b00010000;
	 3'b101 : wstrb_byte[7:0] = 8'b00100000;
	 3'b110 : wstrb_byte[7:0] = 8'b01000000;
	 3'b111 : wstrb_byte[7:0] = 8'b10000000;
	 default: wstrb_byte[7:0] = 8'b00000001;
       endcase
     end
   
   always @ (realgn_ctrl[2:1])
     begin
      casez (realgn_ctrl[2:1])
	2'b00 : wstrb_hword[7:0]  = 8'b00000011;
	2'b01 : wstrb_hword[7:0]  = 8'b00001100;
	2'b10 : wstrb_hword[7:0]  = 8'b00110000;
	2'b11 : wstrb_hword[7:0]  = 8'b11000000;
	default: wstrb_hword[7:0] = 8'b00000011;
      endcase
     end
   
   assign wstrb_word[7:0] = realgn_ctrl[2] ? 8'b11110000 : 8'b00001111;
   
   assign wstrb_realgn[7:0] = byte_realgn  ? wstrb_byte[7:0] :
			      hword_realgn ? wstrb_hword[7:0]:
			      word_realgn  ? wstrb_word[7:0] : {(8){1'b1}};
   
   assign dch_fifo_in[DCH-1:0] = {data_realgn[63:0],wstrb_realgn[7:0]};
   assign dch_fifo_wr          = emesh_wr_access_reg & ~emesh_wr_wait_inb;
   assign dch_fifo_rd          = ~dch_fifo_empty & (~wvalid | wvalid_wready);
   assign dch_advance          = wvalid_wready | ~wvalid;
      


   fifo #(.DW(DCH), .AW(DFW)) fifo_dch(

				       .rd_data		(dch_fifo_out[DCH-1:0]),
				       .rd_fifo_empty	(dch_fifo_empty),
				       .wr_fifo_full	(dch_fifo_full),

				       .reset		(reset),
				       .wr_clk		(eclk),
				       .rd_clk		(aclk),
				       .wr_write	(dch_fifo_wr),
				       .wr_data		(dch_fifo_in[DCH-1:0]),
				       .rd_read		(dch_fifo_rd));
   

   always @ (posedge aclk or posedge reset)
     if(reset)
       dch_fifo_empty_reg <= 1'b1;
     else if(dch_advance)
       dch_fifo_empty_reg <= dch_fifo_empty;
   
   always @ (posedge aclk)
     if (dch_advance)
       dch_fifo_reg[DCH-1:0] <= dch_fifo_out[DCH-1:0];
   
   assign wid[MIDW-1:0]   = {(MIDW){1'b0}};
   assign wdata[MDW-1:0]  = dch_fifo_reg[DCH-1:8];
   assign wstrb[STW-1:0] = dch_fifo_reg[7:0];
   assign wlast          = 1'b1;
   assign wvalid         = ~dch_fifo_empty_reg;

   assign wvalid_wready  = wvalid & wready;

   assign bready = 1'b1;
   
endmodule