Skip to content

Commit 073d50d

Browse files
committed
Round up default KEEP_WIDTH settings when DATA_WIDTH is not a multiple of 8
1 parent 96716b0 commit 073d50d

File tree

69 files changed

+82
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+82
-82
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Parametrizable priority encoder.
205205

206206
DATA_WIDTH : width of tdata signal
207207
KEEP_ENABLE : enable tkeep signal (default DATA_WIDTH>8)
208-
KEEP_WIDTH : width of tkeep signal (default DATA_WIDTH/8)
208+
KEEP_WIDTH : width of tkeep signal (default (DATA_WIDTH+7)/8)
209209
LAST_ENABLE : enable tlast signal
210210
ID_ENABLE : enable tid signal
211211
ID_WIDTH : width of tid signal

rtl/axis_adapter.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ module axis_adapter #
3939
// If disabled, tkeep assumed to be 1'b1
4040
parameter S_KEEP_ENABLE = (S_DATA_WIDTH>8),
4141
// tkeep signal width (words per cycle) on input interface
42-
parameter S_KEEP_WIDTH = (S_DATA_WIDTH/8),
42+
parameter S_KEEP_WIDTH = ((S_DATA_WIDTH+7)/8),
4343
// Width of output AXI stream interface in bits
4444
parameter M_DATA_WIDTH = 8,
4545
// Propagate tkeep signal on output interface
4646
// If disabled, tkeep assumed to be 1'b1
4747
parameter M_KEEP_ENABLE = (M_DATA_WIDTH>8),
4848
// tkeep signal width (words per cycle) on output interface
49-
parameter M_KEEP_WIDTH = (M_DATA_WIDTH/8),
49+
parameter M_KEEP_WIDTH = ((M_DATA_WIDTH+7)/8),
5050
// Propagate tid signal
5151
parameter ID_ENABLE = 0,
5252
// tid signal width

rtl/axis_arb_mux.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module axis_arb_mux #
4040
// Propagate tkeep signal
4141
parameter KEEP_ENABLE = (DATA_WIDTH>8),
4242
// tkeep signal width (words per cycle)
43-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
43+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
4444
// Propagate tid signal
4545
parameter ID_ENABLE = 0,
4646
// input tid signal width

rtl/axis_arb_mux_wrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate(ports=4, name=None, output=None):
7575
// Propagate tkeep signal
7676
parameter KEEP_ENABLE = (DATA_WIDTH>8),
7777
// tkeep signal width (words per cycle)
78-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
78+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
7979
// Propagate tid signal
8080
parameter ID_ENABLE = 0,
8181
// input tid signal width

rtl/axis_async_fifo.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module axis_async_fifo #
4343
// If disabled, tkeep assumed to be 1'b1
4444
parameter KEEP_ENABLE = (DATA_WIDTH>8),
4545
// tkeep signal width (words per cycle)
46-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
46+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
4747
// Propagate tlast signal
4848
parameter LAST_ENABLE = 1,
4949
// Propagate tid signal

rtl/axis_async_fifo_adapter.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ module axis_async_fifo_adapter #
4343
// If disabled, tkeep assumed to be 1'b1
4444
parameter S_KEEP_ENABLE = (S_DATA_WIDTH>8),
4545
// tkeep signal width (words per cycle) on input interface
46-
parameter S_KEEP_WIDTH = (S_DATA_WIDTH/8),
46+
parameter S_KEEP_WIDTH = ((S_DATA_WIDTH+7)/8),
4747
// Width of output AXI stream interface in bits
4848
parameter M_DATA_WIDTH = 8,
4949
// Propagate tkeep signal on output interface
5050
// If disabled, tkeep assumed to be 1'b1
5151
parameter M_KEEP_ENABLE = (M_DATA_WIDTH>8),
5252
// tkeep signal width (words per cycle) on output interface
53-
parameter M_KEEP_WIDTH = (M_DATA_WIDTH/8),
53+
parameter M_KEEP_WIDTH = ((M_DATA_WIDTH+7)/8),
5454
// Propagate tid signal
5555
parameter ID_ENABLE = 0,
5656
// tid signal width

rtl/axis_broadcast.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module axis_broadcast #
4040
// Propagate tkeep signal
4141
parameter KEEP_ENABLE = (DATA_WIDTH>8),
4242
// tkeep signal width (words per cycle)
43-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
43+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
4444
// Propagate tlast signal
4545
parameter LAST_ENABLE = 1,
4646
// Propagate tid signal

rtl/axis_broadcast_wrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate(ports=4, name=None, output=None):
7575
// Propagate tkeep signal
7676
parameter KEEP_ENABLE = (DATA_WIDTH>8),
7777
// tkeep signal width (words per cycle)
78-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
78+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
7979
// Propagate tlast signal
8080
parameter LAST_ENABLE = 1,
8181
// Propagate tid signal

rtl/axis_crosspoint.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module axis_crosspoint #
4242
// Propagate tkeep signal
4343
parameter KEEP_ENABLE = (DATA_WIDTH>8),
4444
// tkeep signal width (words per cycle)
45-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
45+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
4646
// Propagate tlast signal
4747
parameter LAST_ENABLE = 1,
4848
// Propagate tid signal

rtl/axis_crosspoint_wrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def generate(ports=4, name=None, output=None):
8181
// Propagate tkeep signal
8282
parameter KEEP_ENABLE = (DATA_WIDTH>8),
8383
// tkeep signal width (words per cycle)
84-
parameter KEEP_WIDTH = (DATA_WIDTH/8),
84+
parameter KEEP_WIDTH = ((DATA_WIDTH+7)/8),
8585
// Propagate tlast signal
8686
parameter LAST_ENABLE = 1,
8787
// Propagate tid signal

0 commit comments

Comments
 (0)