From 00596d497991d5bab8e753171507857841463043 Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Mon, 8 Aug 2022 16:43:52 -0500 Subject: [PATCH] fpga: lib: Update header for AXI4S add/remove bytes Original-commit: 8af3c0e52df9c3d2585f8579edbf72a7e79fb880 --- lib/axi4s_sv/axi4s_add_bytes.sv | 6 ++++-- lib/axi4s_sv/axi4s_remove_bytes.sv | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/axi4s_sv/axi4s_add_bytes.sv b/lib/axi4s_sv/axi4s_add_bytes.sv index 7c2169e..08fb866 100644 --- a/lib/axi4s_sv/axi4s_add_bytes.sv +++ b/lib/axi4s_sv/axi4s_add_bytes.sv @@ -7,13 +7,14 @@ // // Description: // -// Add zero filled bytes to a packet. -// tUser = {error,trailing bytes}; +// Add zero filled bytes to a packet. TKEEP is ignored. TUSER should have the +// format {error, trailing bytes}; // // LIMITATIONS // The block only adds bytes to the beginning of a word. // // Parameters: +// // ADD_START - Add bytes before this point (0 means start) // 0 is the only supported value right now // ADD_BYTES - Number of bytes to add @@ -23,6 +24,7 @@ // it means the extra space may be added before // we setup the values we want to overwrite onto // that space. +// module axi4s_add_bytes #( int ADD_START = 0, diff --git a/lib/axi4s_sv/axi4s_remove_bytes.sv b/lib/axi4s_sv/axi4s_remove_bytes.sv index 9522a35..89dcbef 100644 --- a/lib/axi4s_sv/axi4s_remove_bytes.sv +++ b/lib/axi4s_sv/axi4s_remove_bytes.sv @@ -6,18 +6,19 @@ // Module : axi4s_remove_bytes // // Description: -// Remove bytes from a packet. 1 removal can happen per -// packet. The removal is made by delaying the output -// by a clock, and then combining the new and old word -// and providing a combination of shifted words. -// This implementation requires that the user field -// holds the number of valid bytes in the word, and the MSB of the user field -// indicates if the MAC had an error. +// +// Remove bytes from a packet. 1 removal can happen per packet. The removal +// is made by delaying the output by a clock, and then combining the new and +// old word and providing a combination of shifted words. This implementation +// requires that the user field holds the number of valid bytes in the word, +// and the MSB of the user field indicates if the MAC had an error. // // The block will hold off the input if it goes to the BONUS State. // -// This block is intended to remove data from the beginning or middle -// of a packet. You can truncate a packet by setting REM_END to -1. +// This block is intended to remove data from the beginning or middle of a +// packet. You can truncate a packet by setting REM_END to -1. +// +// TKEEP is not used. TUSER should have the format {error, trailing bytes}; // // LIMITATIONS // The block will set the error bit if you put in a packet between @@ -27,6 +28,7 @@ // Packets must be terminated with tlast. // // Parameters: +// // REM_START - First byte to remove (0 means start) // REM_END - Last byte to remove (-1 means truncate from REM START) //