From 9e0dfb54670beebae7e3041e5616434f84f67a14 Mon Sep 17 00:00:00 2001 From: Lucian Petrica <lucianp@xilinx.com> Date: Wed, 7 Oct 2020 12:48:14 +0100 Subject: [PATCH] Rounding depth only to powers of 2 for compatibility with Vivado --- src/finn/transformation/fpgadataflow/set_fifo_depths.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/finn/transformation/fpgadataflow/set_fifo_depths.py b/src/finn/transformation/fpgadataflow/set_fifo_depths.py index 0f8880b3b..736f95048 100644 --- a/src/finn/transformation/fpgadataflow/set_fifo_depths.py +++ b/src/finn/transformation/fpgadataflow/set_fifo_depths.py @@ -71,9 +71,7 @@ def optimize_depth(depth): return 2 if depth <= 32: return 32 - if depth <= 1024: - return int(2 ** math.ceil(math.log2(depth))) - return int(math.ceil(depth / 1024) * 1024) + return int(2 ** math.ceil(math.log2(depth))) class InsertAndSetFIFODepths(Transformation): -- GitLab