diff --git a/src/finn/util/data_packing.py b/src/finn/util/data_packing.py
index 1d919de5d55363bbe71f0dfc44ca6fe3025f5a4a..e67638bd1ca81d933fbfbffec9efcd7f84fa961e 100644
--- a/src/finn/util/data_packing.py
+++ b/src/finn/util/data_packing.py
@@ -275,6 +275,7 @@ def npy_to_rtlsim_input(input_file, input_dtype, pad_to_nbits, reverse_inner=Tru
     finn.util.basic.pack_innermost_dim_as_hex_string() for more info on how the
     packing works. If reverse_inner is set, the innermost dimension will be
     reversed prior to packing."""
+    pad_to_nbits = roundup_to_integer_multiple(pad_to_nbits, 4)
     if issubclass(type(input_file), np.ndarray):
         inp = input_file
     elif os.path.isfile(input_file):