diff --git a/library/data_offload/data_offload.v b/library/data_offload/data_offload.v index d4682f7e13..ca821ce704 100644 --- a/library/data_offload/data_offload.v +++ b/library/data_offload/data_offload.v @@ -250,7 +250,7 @@ module data_offload #( // it's supported just with the FIFO interface util_axis_fifo_asym #( .S_DATA_WIDTH (SRC_DATA_WIDTH), - .S_ADDRESS_WIDTH (SRC_ADDR_WIDTH_BYPASS), + .ADDRESS_WIDTH (SRC_ADDR_WIDTH_BYPASS), .M_DATA_WIDTH (DST_DATA_WIDTH), .ASYNC_CLK (1) ) i_bypass_fifo ( diff --git a/library/util_axis_fifo_asym/util_axis_fifo_asym.v b/library/util_axis_fifo_asym/util_axis_fifo_asym.v index 8ddc247f75..a2aa6c74e8 100644 --- a/library/util_axis_fifo_asym/util_axis_fifo_asym.v +++ b/library/util_axis_fifo_asym/util_axis_fifo_asym.v @@ -37,14 +37,15 @@ module util_axis_fifo_asym #( parameter ASYNC_CLK = 1, parameter S_DATA_WIDTH = 64, - parameter S_ADDRESS_WIDTH = 5, + parameter ADDRESS_WIDTH = 5, parameter M_DATA_WIDTH = 128, parameter M_AXIS_REGISTERED = 1, parameter ALMOST_EMPTY_THRESHOLD = 4, parameter ALMOST_FULL_THRESHOLD = 4, parameter TLAST_EN = 0, parameter TKEEP_EN = 0, - parameter S_FIFO_LIMITED = 0 + parameter FIFO_LIMITED = 0, + parameter ADDRESS_WIDTH_PERSPECTIVE = 0 ) ( input m_axis_aclk, input m_axis_aresetn, @@ -66,7 +67,7 @@ module util_axis_fifo_asym #( input s_axis_tlast, output s_axis_full, output s_axis_almost_full, - output [S_ADDRESS_WIDTH-1:0] s_axis_room + output [ADDRESS_WIDTH-1:0] s_axis_room ); // define which interface has a wider bus @@ -77,9 +78,11 @@ module util_axis_fifo_asym #( // atomic parameters - NOTE: depth is always defined by the slave attributes localparam A_WIDTH = (RATIO_TYPE) ? M_DATA_WIDTH : S_DATA_WIDTH; - localparam A_ADDRESS = (S_FIFO_LIMITED) ? ((RATIO_TYPE) ? S_ADDRESS_WIDTH : (S_ADDRESS_WIDTH-$clog2(RATIO))) : S_ADDRESS_WIDTH; - localparam A_ALMOST_FULL_THRESHOLD = (S_FIFO_LIMITED) ? ((RATIO_TYPE) ? ALMOST_FULL_THRESHOLD : (ALMOST_FULL_THRESHOLD/RATIO)) : ALMOST_FULL_THRESHOLD; - localparam A_ALMOST_EMPTY_THRESHOLD = (S_FIFO_LIMITED) ? ((RATIO_TYPE) ? (ALMOST_EMPTY_THRESHOLD/RATIO) : ALMOST_EMPTY_THRESHOLD) : ALMOST_EMPTY_THRESHOLD; + localparam A_ADDRESS = (ADDRESS_WIDTH_PERSPECTIVE) ? + ((FIFO_LIMITED) ? ((RATIO_TYPE) ? (ADDRESS_WIDTH-$clog2(RATIO)) : ADDRESS_WIDTH) : ADDRESS_WIDTH) : + ((FIFO_LIMITED) ? ((RATIO_TYPE) ? ADDRESS_WIDTH : (ADDRESS_WIDTH-$clog2(RATIO))) : ADDRESS_WIDTH); + localparam A_ALMOST_FULL_THRESHOLD = (RATIO_TYPE) ? ALMOST_FULL_THRESHOLD : (ALMOST_FULL_THRESHOLD/RATIO); + localparam A_ALMOST_EMPTY_THRESHOLD = (RATIO_TYPE) ? (ALMOST_EMPTY_THRESHOLD/RATIO) : ALMOST_EMPTY_THRESHOLD; // slave and master sequencers reg [$clog2(RATIO)-1:0] s_axis_counter; diff --git a/library/util_axis_fifo_asym/util_axis_fifo_asym_ip.tcl b/library/util_axis_fifo_asym/util_axis_fifo_asym_ip.tcl index d2f152d827..499a8cd93b 100644 --- a/library/util_axis_fifo_asym/util_axis_fifo_asym_ip.tcl +++ b/library/util_axis_fifo_asym/util_axis_fifo_asym_ip.tcl @@ -49,20 +49,37 @@ adi_add_bus_clock "s_axis_aclk" "s_axis" "s_axis_aresetn" set cc [ipx::current_core] +# FIFO_LIMITED Property set_property -dict [list \ "value_format" "bool" \ "value" "false" \ -] [ipx::get_user_parameters S_FIFO_LIMITED -of_objects $cc] +] [ipx::get_user_parameters FIFO_LIMITED -of_objects $cc] set_property -dict [list \ "value_format" "bool" \ "value" "false" \ -] [ipx::get_hdl_parameters S_FIFO_LIMITED -of_objects $cc] +] [ipx::get_hdl_parameters FIFO_LIMITED -of_objects $cc] set_property -dict [list \ - "display_name" "S FIFO Limited" \ - "tooltip" "Limit the amount of data the the Slave FIFO can accumulate. Enabling this bit may reduce the size of S Address, Almost Empty Threshold and Almost Full Threshold depending on the Slave and Master data width ratio." \ -] [ipgui::get_guiparamspec -name "S_FIFO_LIMITED" -component $cc] + "display_name" "FIFO Sample Limited" \ + "tooltip" "Limit the amount of samples the FIFO can accumulate. Enabling this bit may reduce the size of Address, Almost Empty Threshold and Almost Full Threshold depending on the Slave and Master data width ratio." \ +] [ipgui::get_guiparamspec -name "FIFO_LIMITED" -component $cc] + + +set_property -dict [list \ + "value_format" "bool" \ + "value" "false" \ +] [ipx::get_user_parameters ADDRESS_WIDTH_PERSPECTIVE -of_objects $cc] + +set_property -dict [list \ + "value_format" "bool" \ + "value" "false" \ +] [ipx::get_hdl_parameters ADDRESS_WIDTH_PERSPECTIVE -of_objects $cc] + +set_property -dict [list \ + "display_name" "Address Width Perspective" \ + "tooltip" "Sets the address width from the perspective of Master if True, or Slave if false." \ +] [ipgui::get_guiparamspec -name "ADDRESS_WIDTH_PERSPECTIVE" -component $cc] ## TODO: Validate RD_ADDRESS_WIDTH