OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1718 Discussions

**ERROR** : PR incompatible bitstream error detected

MEghb
Beginner
2,356 Views

Hi, 

I am trying to set up the OpenCL compilation for my Intel Programmable Acceleration Card. I installed the board and the acceleration software stack provided by Intel. I was able to program the board with the hello_world.aocx and vector_add.aocx bitstream provided in the installation folder and everything was fine. However, when I tried to compile the same hello_world kernel for my board, I got the following error when I tried to program the board with the .aocx file generated after I compiled the code with OpenCL myself. 

libopae-c reconf.c:427:fpgaReconfigureSlot() **ERROR** : Failed to reconfigure bitstream: Input/output error
libopae-c reconf.c:450:fpgaReconfigureSlot() **ERROR** : PR incompatible bitstream error detected
Error writing bitstream to FPGA: reconfiguration error
Error programming device

 

Also, I checked the quartus_sh_compile.log and noticed the following error despite the fact the OpenCL finished compilation and generated the .aocx file. 

 

Critical Warning (125091): Tcl error: couldn't read file "a10_hpr_floorplan.qsf": no such file or directory
    while executing
"source a10_hpr_floorplan.qsf"
    (file "afu_ip_gt.qsf" line 61)
Error (125080): Can't open project -- Quartus Prime Settings File contains one or more errors
Error (23035): Tcl error: ERROR: You must open a project before you can use this command.

    while executing
"set_global_assignment -name SEARCH_PATH $CCIP_AVMM_SRC/hw/rtl"
    (file "./BBB_ccip_avmm/hw/par/ccip_avmm_addenda.qsf" line 14)
    invoked from within
"source "$CCIP_AVMM_SRC/hw/par/ccip_avmm_addenda.qsf""
    (procedure "add_bbb_assignments" line 4)
    invoked from within
"add_bbb_assignments"
    (file "add_bbb_to_pr_project.tcl" line 30)
Error (23031): Evaluation of Tcl script add_bbb_to_pr_project.tcl unsuccessful

 

I am using the latest version of Intel Acceleration Stack, OpenCL on Ubuntu 18.04, and I also tried it on another system with rhel7.8 and the issue was same both of the times.  
I appreciate it if anybody could help me with this issue. 

 

Thanks, 
Mostafa

0 Kudos
5 Replies
Sergey_I_Intel1
Employee
2,356 Views

Hello Eghbali Mostafa,

 

Did you try to process via "aocl program" or via running the OpenCL host executable binary?

 

Best regards,

Sergey

0 Kudos
MEghb
Beginner
2,356 Views

Hi Sergey,

 
I tried both, and the error is the same. 

 

Thanks,

Mostafa

0 Kudos
Dai__Michael
Beginner
2,356 Views

Ran into this as well since I wasn't familiar with all the new security features in the PAC cards. You basically need to take the extra step to either add in just the security metadata to your bitstream (unsigned), or fully encrypt your bitstream (signed). I recommend you read this document here for more info: https://www.intel.com/content/www/us/en/programmable/documentation/xfr1578356347803.html#bdv1578790141701

From the docs, the fastest way to test out your bitstream above would be to create an unsigned bitstream via:

$AOCL_BOARD_PACKAGE_ROOT/linux64/libexec/sign_aocx.sh -H openssl_manager \
-i <path_to_input_file/input_filename.aocx> -r NULL -k NULL \
-o <path_to_output_file/output_filename.aocx>

Then you can program or run the host code provided that the output filename/pathing is still correct.

Hope this helps.

0 Kudos
Saikiranbelana
1,281 Views

Hi, I was trying to unsign the compiled aocx file. It crashes by this error:

fpga@fpgaserver2:~/A10_OPENCL/vector_add/bin$ source /home/fpga/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/libexec/sign_aocx.sh -H openssl_manager -i vector_add.aocx -r NULL -k NULL -o vector_add_unsigned.aocx 
The script assumes the PACsign and Intel Acceleration Stack environment is setup. If not run the command : <stack_installation_path>/init_env.sh
hsm_manager=openssl_manager
aocx filename/path=vector_add.aocx
root_public_key=NULL
csk_public_key=NULL
output filename/path=vector_add_unsigned.aocx
null=1
openssl hsm_manager_options=openssl_manager 
input path =.
input filename =vector_add.aocx
output path =.
output filename =vector_add_unsigned.aocx
Extracted the filename as vector_add_unsigned 
1. Extracted the bin from the aocx 
2. Extracted the gzip compressed GBS file from the .bin
gzip: temp_vector_add_unsigned.gbs already exists; do you wish to overwrite (y or n)? y
3. Uncompressed .gz it to get the GBS file
Initiating PACSign tool to sign the GBS. This process will take a couple of minutes...
Creating unsigned aocx file by signing a NULL key 
No root key specified.  Generate unsigned bitstream? Y = yes, N = no: Y
No CSK specified.  Generate unsigned bitstream? Y = yes, N = no: Y
No root entry hash bitstream specified.  Verification will not be done.  Continue? Y = yes, N = no: Y
Error: Module: openssl.py, Function: __init__, Line: 332
       Failed to find crypto library (libcrypto.so).

For RedHat-based distros, install package openssl-devel.
For Debian-based distros, install package libssl-dev.

 

I have installed `libssl-dev` and it still causes the same error. I have edited ldconfig to add `libcrypto.so` library too. 

Is there something I'm missing with openssl installation ?

0 Kudos
MEghb
Beginner
2,356 Views

Thanks for your reply, Micheal. It was really helpful. I checked that and It worked. Just one more question, do you get the same error during the code compilation? The one that saying "couldn't read file "a10_hpr_floorplan.qsf". 


Mostafa,

0 Kudos
Reply