- if(bitparse_find_section(bitstream_version, 'a', &fpga_info_len, &compressed_fpga_stream, output_buffer)) {
- for (uint16_t i = 0; i < fpga_info_len; i++) {
- char c = (char)get_from_fpga_stream(bitstream_version, &compressed_fpga_stream, output_buffer);
- if (i < sizeof(tempstr)) {
- tempstr[i] = c;
- }
- }
- if (!memcmp("fpga_lf", tempstr, 7))
- strncat(dst, "LF ", len-1);
- else if (!memcmp("fpga_hf", tempstr, 7))
- strncat(dst, "HF ", len-1);
- }
- strncat(dst, "FPGA image built", len-1);
- if(bitparse_find_section(bitstream_version, 'b', &fpga_info_len, &compressed_fpga_stream, output_buffer)) {
- strncat(dst, " for ", len-1);
- for (uint16_t i = 0; i < fpga_info_len; i++) {
- char c = (char)get_from_fpga_stream(bitstream_version, &compressed_fpga_stream, output_buffer);
- if (i < sizeof(tempstr)) {
- tempstr[i] = c;
- }
- }
- strncat(dst, tempstr, len-1);
- }
- if(bitparse_find_section(bitstream_version, 'c', &fpga_info_len, &compressed_fpga_stream, output_buffer)) {
- strncat(dst, " on ", len-1);
- for (uint16_t i = 0; i < fpga_info_len; i++) {
- char c = (char)get_from_fpga_stream(bitstream_version, &compressed_fpga_stream, output_buffer);
- if (i < sizeof(tempstr)) {
- tempstr[i] = c;
- }
- }
- strncat(dst, tempstr, len-1);
- }
- if(bitparse_find_section(bitstream_version, 'd', &fpga_info_len, &compressed_fpga_stream, output_buffer)) {
- strncat(dst, " at ", len-1);
- for (uint16_t i = 0; i < fpga_info_len; i++) {
- char c = (char)get_from_fpga_stream(bitstream_version, &compressed_fpga_stream, output_buffer);
- if (i < sizeof(tempstr)) {
- tempstr[i] = c;
- }
- }
- strncat(dst, tempstr, len-1);
- }
-
- strncat(dst, "\n", len-1);