oneapi-src / oneapi-src/oneAPI-samples

FPGA tests don't all work using Quartus

Đang mở
#1,355 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
C++
Star
1.2k
Fork
745
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Summary

The board_test example (and other examples I've tested) from DirectProgramming/C++SYCL_FPGA/ReferenceDesigns fails on the part of the test that tries to extract the reference frequency using the aocl binedit functionality.

Version

Report oneAPI Toolkit version and oneAPI Sample version or hash.

oneAPI version 2022.0.2
quartus version 20.4
oneAPI sample hash f6660eef7007d0acb7de1bce9c6e5844c6615a80

Environment

Intel Stratix 10, Bittware N520 MX

Steps to reproduce

cd ~/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/board_test
mkdir build
cd build
cmake .. -DFPGA_BOARD=s10mx:p520_hpc_m210h_g3x16
make fpga
./board_test.fpga

Observed behavior

When compiled and run the board_test.fpga executable fails, with this output at the end of the run:

*****************************************************************
*******************  Kernel Clock Frequency Test  ***************
*****************************************************************

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

Digging into the code it is because this functionality:

   std::string temp_cmd = "aocl binedit " + kBinaryName + " print .acl.quartus_report";
   const char *open_cmd_rep = temp_cmd.c_str();

Doesn't actually work. The executable (board_test.fpga) does not have anything to report when using 1aocl binedit board_test.fpga list, i.e. it produces an empty output:

Sections in package file:

This can be fixed by changing the command to this:

   std::string temp_cmd = "aocl binedit " + kBinaryName + ".prj/base.aocx" + " print .acl.quartus_report";
   const char *open_cmd_rep = temp_cmd.c_str();

Which then can be used to extract the reference FPGA frequency.

I can commit this as a pull request.

Expected behavior

The board_test to run without issues.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu trong DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/board_test và tìm cách sử dụng kBinaryName hoặc aocl binedit được nêu trong báo cáo. Tái hiện sự cố bằng các lệnh CMake và make được cung cấp trên thiết lập FPGA đã nêu, sau đó xác minh rằng board_test.fpga hoàn tất Kernel Clock Frequency Test mà không có logic_error và báo cáo tần số tham chiếu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cmake, cpp
Lĩnh vực
embedded-iot, testing-qa
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.