OpenCores
URL https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [axi4_stream_lib/] [src/] [axis_register_slice.sv] - Diff between revs 36 and 38

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 36 Rev 38
Line 55... Line 55...
 
 
  wire          rd_empty;
  wire          rd_empty;
  wire [W-1:0]  rd_data;
  wire [W-1:0]  rd_data;
  wire          rd_en;
  wire          rd_en;
 
 
  defparam tiny_sync_fifo_i.W=W; // why are needed these for recursive modules?
  defparam tiny_sync_fifo_i.W=W; // why are these needed for recursive modules?
  tiny_sync_fifo
  tiny_sync_fifo
  // tiny_sync_fifo #(W)
  // tiny_sync_fifo #(W)
    tiny_sync_fifo_i(.clk(aclk), .reset(~aresetn), .*);
    tiny_sync_fifo_i(.clk(aclk), .reset(~aresetn), .*);
 
 
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  //
  //
  generate
  defparam axis_map_fifo_i.N=N; // why are these needed for recursive modules?
    begin: assign_gen
  defparam axis_map_fifo_i.I=I;
      if(USE_TSTRB & USE_TKEEP)
  defparam axis_map_fifo_i.D=D;
      begin
  defparam axis_map_fifo_i.U=U;
        assign wr_data =
  defparam axis_map_fifo_i.USE_TSTRB=USE_TSTRB;
          {
  defparam axis_map_fifo_i.USE_TKEEP=USE_TKEEP;
            axis_in.tdata,
  defparam axis_map_fifo_i.W=W;
            axis_in.tlast,
  axis_map_fifo
            axis_in.tuser,
    // #(
            axis_in.tstrb,
      // .N(N),
            axis_in.tkeep
      // .I(I),
          };
      // .D(D),
        assign
      // .U(U),
          {
      // .USE_TSTRB(USE_TSTRB),
            axis_out.tdata,
      // .USE_TKEEP(USE_TKEEP),
            axis_out.tlast,
      // .W(W)
            axis_out.tuser,
    // )
            axis_out.tstrb,
    axis_map_fifo_i(.*);
            axis_out.tkeep
 
          } = rd_data;
 
      end
 
      else if(USE_TSTRB)
 
      begin
 
        assign wr_data =
 
          {
 
            axis_in.tdata,
 
            axis_in.tlast,
 
            axis_in.tuser,
 
            axis_in.tstrb
 
          };
 
        assign
 
          {
 
            axis_out.tdata,
 
            axis_out.tlast,
 
            axis_out.tuser,
 
            axis_out.tstrb
 
          } = rd_data;
 
      end
 
      else if(USE_TKEEP)
 
      begin
 
        assign wr_data =
 
          {
 
            axis_in.tdata,
 
            axis_in.tlast,
 
            axis_in.tuser,
 
            axis_in.tkeep
 
          };
 
        assign
 
          {
 
            axis_out.tdata,
 
            axis_out.tlast,
 
            axis_out.tuser,
 
            axis_out.tkeep
 
          } = rd_data;
 
      end
 
      else
 
      begin
 
        assign wr_data =
 
          {
 
            axis_in.tdata,
 
            axis_in.tlast,
 
            axis_in.tuser
 
          };
 
        assign
 
          {
 
            axis_out.tdata,
 
            axis_out.tlast,
 
            axis_out.tuser
 
          } = rd_data;
 
      end
 
    end
 
  endgenerate
 
 
 
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  //
  //
  assign axis_in.tready   = ~wr_full;
  assign axis_in.tready   = ~wr_full;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.