Unable to get AFI information from slot 0.

0

Hello,

I have a problem when I try to run an example on F1.

I am running this example:
https://github.com/aws/aws-fpga/blob/master/hdk/docs/IPI_GUI_Examples.md#ipitut

I have done all the vivado stuff, and created the .tar file without a problem.

I have put it on a s3 bucket, and i have created the AFI using create-fpga-image.

I got the ImageID and ImageGlobalId.

I have then loaded the local image to slot 0 and the output of fpga-describe-local-image -S 0 -H says that the image with the correct agfi is loaded. It gives me the VendorId and the DeviceId.

As per instructions in the example from the link above, I did the folowing:

  • cp -r aws-fpga/hdk/common/shell_stable/hlx/hlx_examples/build/IPI/hello_world/software .
  • changed the deviceId in software/test_cl.c to the correct value
  • make all
  • sudo ./test_cl

And I get the following error:

2019-08-13T14:39:08.238901Z, undefined, ERROR, test_cl.c +217: check_afi_ready(): Unable to get AFI information from slot 0. Are you running as root?
2019-08-13T14:39:08.239046Z, undefined, ERROR, test_cl.c +67: main(): AFI not ready

It is as if the function fpga_mgmt_describe_local_image(slot_id, &info,0) can't access to the data it needs.

What can I do to solve this problem?

Thank you in advance.

Edited by: oglamocanin on Aug 13, 2019 8:41 AM

asked 5 years ago252 views
4 Answers
0

Can you please reply with which FPGA Developer AMI you are using and which version of the HDK? You can find the AMI by selecting the instance in the EC2 console and looking at the description. You can find the HDK version in the RELEASE_NOTES.md file in your clone of the aws-fpga repo.

AWS
answered 5 years ago
0

Hello,

I am using the following AMI:
FPGA Developer AMI - 1.6.0

And the HDK version is the one i cloned from git yesterday, so it is the following:
Release 1.4.10.

Thanks in advance.

answered 5 years ago
0

Thanks for reporting this. This is a bug in test_cl.c. This will be fixed in the next release and we will add tests to ensure that this works in the future. To fix the bug, please add the following 2 lines at line 58:

    /* initialize the fpga_mgmt library */
    rc = fpga_mgmt_init();

The modified code should look like:

int main(int argc, char **argv) {
    int rc;
    int slot_id;

    /* initialize the fpga_mgmt library */
    rc = fpga_mgmt_init();

    /* initialize the fpga_pci library so we could have access to FPGA PCIe from this applications */
    rc = fpga_pci_init();
    fail_on(rc, out, "Unable to initialize the fpga_pci library");

Then rerun

make all; sudo ./test_cl

The output should look like:

$ sudo ./test_cl
AFI PCI  Vendor ID: 0x1d0f, Device ID 0xf000

===== Hello World Example =====
Writing for VLED (0xAAAA) with BAR1-AXI GPIO
Use the following command to get the VLED value after running the software
# sudo fpga-get-virtual-led  -S 0
FPGA slot id 0 have the following Virtual LED:
1010-1010-1010-1010

Writing to AXI BRAM with ASCII

Reading ASCII from AXI BRAM
H
e
l
l
o
 
W
o
r
l
d
!
AWS
answered 5 years ago
0

Thanks, this fixed the issue.

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions