diff --git a/src/xilinx.cpp b/src/xilinx.cpp index d831cd9..43f9fad 100644 --- a/src/xilinx.cpp +++ b/src/xilinx.cpp @@ -841,10 +841,7 @@ void Xilinx::program_mem(ConfigBitstreamParser *bitfile) const uint8_t *data = bitfile->getData(); int tx_len; Jtag::tapState_t tx_end; - int burst_len = byte_length / 100; - - if (burst_len == 0) - burst_len = byte_length; + const int burst_len = (byte_length < 100) ? byte_length : byte_length / 100; ProgressBar progress("Load SRAM", byte_length, 50, _quiet);