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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [PCIe/] [src/] [RIFFA/] [riffa_chnl_tx.sv] - Diff between revs 34 and 39

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

Rev 34 Rev 39
Line 1... Line 1...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
////                                                              ////
////                                                              ////
//// Copyright (C) 2015 Authors and OPENCORES.ORG                 ////
//// Copyright (C) 2017 Authors and OPENCORES.ORG                 ////
////                                                              ////
////                                                              ////
//// This source file may be used and distributed without         ////
//// This source file may be used and distributed without         ////
//// restriction provided that this copyright statement is not    ////
//// restriction provided that this copyright statement is not    ////
//// removed from the file and that any derivative work contains  ////
//// removed from the file and that any derivative work contains  ////
//// the original copyright notice and the associated disclaimer. ////
//// the original copyright notice and the associated disclaimer. ////
Line 29... Line 29...
  riffa_chn_tx
  riffa_chn_tx
  #(
  #(
    N // data bus width in bytes
    N // data bus width in bytes
  )
  )
  (
  (
    riffa_chnl_if chnl_in,
    riffa_chnl_if chnl_bus,
    input tx_ready,
    input tx_ready,
    input tx_done,
    input tx_done,
    output acked,
    output acked,
    output reg [30:0] tx_index,
    output reg [30:0] tx_index,
    input tx_last,
    input tx_last,
Line 47... Line 47...
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  //
  //
  riffa_chnl_tx_fsm
  riffa_chnl_tx_fsm
    riffa_chnl_tx_fsm_i
    riffa_chnl_tx_fsm_i
    (
    (
      .tx(chnl_in.tx),
      .tx(chnl_bus.tx),
      .tx_ack(chnl_in.tx_ack),
      .tx_ack(chnl_bus.tx_ack),
      .*
      .*
    );
    );
 
 
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  //
  //
  always_ff @(posedge clk)
  always_ff @(posedge clk)
    if(reset | ~chnl_in.tx | tx_done)
    if(reset | ~chnl_bus.tx | tx_done)
      tx_index = 0;
      tx_index = 0;
    else if(chnl_in.tx_data_valid & chnl_in.tx_data_ren)
    else if(chnl_bus.tx_data_valid & chnl_bus.tx_data_ren)
      tx_index <= tx_index + (N/4); // increment by 32 bit words
      tx_index <= tx_index + (N/4); // increment by 32 bit words
 
 
 
 
// --------------------------------------------------------------------
// --------------------------------------------------------------------
//
//

powered by: WebSVN 2.1.0

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