diff --git a/src/finn/transformation/fpgadataflow/set_fifo_depths.py b/src/finn/transformation/fpgadataflow/set_fifo_depths.py index 8699cd7001edf98443702b9a0d3d45565f2377ea..9ac1000468d72c49a3d6d19556dd8b96fb5fe7a4 100644 --- a/src/finn/transformation/fpgadataflow/set_fifo_depths.py +++ b/src/finn/transformation/fpgadataflow/set_fifo_depths.py @@ -451,7 +451,9 @@ class InsertAndSetFIFODepths(Transformation): return (model, False) -def get_fifo_split_configs(depth, max_qsrl_depth, max_vivado_depth): +def get_fifo_split_configs(depth, max_qsrl_depth=256, max_vivado_depth=32768): + """Break non-power-of-2 sized FIFO depths into several ones""" + def floor_pow2(x): if (x & (x - 1) == 0) and x != 0: return x @@ -486,6 +488,7 @@ def get_fifo_split_configs(depth, max_qsrl_depth, max_vivado_depth): # into several ones ret_pass2 = list(map(decompose_pow2, ret)) + # unpack list of lists ret_pass2 = [x for dec_list in ret_pass2 for x in dec_list] # finally, add impl_style to each split FIFO