Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Questions about Configuring the De5-Net FPGA Board

when i followed the steps in the "de5net_network_opencl_manual.pdf", i got the following problems:

1.in "test ‘aocl flash’ command" section, after i finished the clock setting and tried to use "aocl program acl0 bin/fft2d.aocx" to test the progrom, i got the following errors:

aocl program: Running reprogram from /home/storm/altera/14.0/hld/board/de5net_network/linux64/libexec

Unable to open the device acl0.

aocl program: Program failed.

2.in the "driver installation " section, when i use "aocl install " or "./make_all " to install the driver, i got the following errors:

aocl install: Running install from /home/storm/altera/14.0/hld/board/de5net_network/linux64/libexec

Using kernel source files from /usr/src/linux-headers-3.16.0-30-generic

make: Entering directory `/usr/src/linux-headers-3.16.0-30-generic'

CC [M] /tmp/opencl_driver_yH5TgN/aclpci_queue.o

CC [M] /tmp/opencl_driver_yH5TgN/aclpci.o

/tmp/opencl_driver_yH5TgN/aclpci.c:61:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘probe’

static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id);

^

/tmp/opencl_driver_yH5TgN/aclpci.c:62:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_chrdev’

static int __devinit init_chrdev (struct aclpci_dev *aclpci);

^

/tmp/opencl_driver_yH5TgN/aclpci.c:63:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’

static void __devexit remove(struct pci_dev *dev);

^

/tmp/opencl_driver_yH5TgN/aclpci.c:65:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scan_bars’

static int __devinit scan_bars(struct aclpci_dev *aclpci, struct pci_dev *dev);

^

/tmp/opencl_driver_yH5TgN/aclpci.c:66:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_bars’

static int __devinit map_bars(struct aclpci_dev *aclpci, struct pci_dev *dev);

^

/tmp/opencl_driver_yH5TgN/aclpci.c:82:12: error: ‘probe’ undeclared here (not in a function)

.probe = probe,

^

/tmp/opencl_driver_yH5TgN/aclpci.c:83:13: error: ‘remove’ undeclared here (not in a function)

.remove = remove,

^

/tmp/opencl_driver_yH5TgN/aclpci.c:115:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_chrdev’

static int __devinit init_chrdev (struct aclpci_dev *aclpci) {

^

/tmp/opencl_driver_yH5TgN/aclpci.c:489:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘probe’

static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id) {

^

/tmp/opencl_driver_yH5TgN/aclpci.c:571:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scan_bars’

static int __devinit scan_bars(struct aclpci_dev *aclpci, struct pci_dev *dev)

^

/tmp/opencl_driver_yH5TgN/aclpci.c:592:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_bars’

static int __devinit map_bars(struct aclpci_dev *aclpci, struct pci_dev *dev)

^

/tmp/opencl_driver_yH5TgN/aclpci.c:640:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’

static void __devexit remove(struct pci_dev *dev) {

^

/tmp/opencl_driver_yH5TgN/aclpci.c:628:13: warning: ‘free_bars’ defined but not used [-Wunused-function]

static void free_bars(struct aclpci_dev *aclpci, struct pci_dev *dev) {

^

/tmp/opencl_driver_yH5TgN/aclpci.c:103:21: warning: ‘aclpci_get_free’ defined but not used [-Wunused-function]

static unsigned int aclpci_get_free(void)

^

/tmp/opencl_driver_yH5TgN/aclpci.c:449:24: warning: ‘find_upstream_dev’ defined but not used [-Wunused-function]

static struct pci_dev* find_upstream_dev (struct pci_dev *dev) {

^

make[1]: *** [/tmp/opencl_driver_yH5TgN/aclpci.o] Error 1

make: *** [_module_/tmp/opencl_driver_yH5TgN] Error 2

make: Leaving directory `/usr/src/linux-headers-3.16.0-30-generic'

cp: cannot stat ‘./aclpci_drv.ko’: No such file or directory

cp: cannot create regular file ‘/etc/sysconfig/modules/aclpci.modules’: No such file or directory

chmod: cannot access ‘/etc/sysconfig/modules/aclpci.modules’: No such file or directory

modprobe: FATAL: Module aclpci_drv not found.

The Operating system is Ubuntu and the board is De5-NET FPGA.

I appreciate if anyone can help me.

Thanks,

Jiawen

19 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi B,

    I have deal with the problem successfully!!

    Thank you so much for you reply and help!

    Best wishes,

    Jiawen

    --- Quote End ---

    Hi Jiawen,

    For the first question, the unable to open device acl0. Can I know if you also solve that? Thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi Jiawen,

    For the first question, the unable to open device acl0. Can I know if you also solve that? Thanks

    --- Quote End ---

    After I installed the drivers successfully, I still had this problem and didn't deal with it. The errors are as followings:

    root@storm:/home/storm/altera/14.0/hld/board/de5net_network/tests/fft2d# aocl program acl0 bin/fft2d.aocx

    aocl program: Running reprogram from /home/storm/altera/14.0/hld/board/de5net_network/linux64/libexec

    Unable to open the device acl0.

    aocl program: Program failed.

    I appreciate someone can give me any suggestion.

    Best wishes,

    Jiawen
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    After I installed the drivers successfully, I still had this problem and didn't deal with it. The errors are as followings:

    root@storm:/home/storm/altera/14.0/hld/board/de5net_network/tests/fft2d# aocl program acl0 bin/fft2d.aocx

    aocl program: Running reprogram from /home/storm/altera/14.0/hld/board/de5net_network/linux64/libexec

    Unable to open the device acl0.

    aocl program: Program failed.

    I appreciate someone can give me any suggestion.

    Best wishes,

    Jiawen

    --- Quote End ---

    Hi Jiawen,

    Did you try the aocl diagnose to make sure the system can find the fpga device currently?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi Jiawen,

    Did you try the aocl diagnose to make sure the system can find the fpga device currently?

    --- Quote End ---

    I tried aocl diagnose. But it didn't detect any FPGA devices. Do you know what's the problem?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am chinese . So my english is poor and i need the same problem which you solved ? can you help me solve this problem?

    thank you!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    when i followed the steps in the "de5net_network_opencl_manual.pdf", i got the following problems:

    1.in "test ‘aocl flash’ command" section, after i finished the clock setting and tried to use "aocl program acl0 bin/fft2d.aocx" to test the progrom, i got the following errors:

    aocl program: Running reprogram from /home/storm/altera/14.0/hld/board/de5net_network/linux64/libexec

    Unable to open the device acl0.

    aocl program: Program failed.

    2.in the "driver installation " section, when i use "aocl install " or "./make_all " to install the driver, i got the following errors:

    aocl install: Running install from /home/storm/altera/14.0/hld/board/de5net_network/linux64/libexec

    Using kernel source files from /usr/src/linux-headers-3.16.0-30-generic

    make: Entering directory `/usr/src/linux-headers-3.16.0-30-generic'

    CC [M] /tmp/opencl_driver_yH5TgN/aclpci_queue.o

    CC [M] /tmp/opencl_driver_yH5TgN/aclpci.o

    /tmp/opencl_driver_yH5TgN/aclpci.c:61:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘probe’

    static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id);

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:62:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_chrdev’

    static int __devinit init_chrdev (struct aclpci_dev *aclpci);

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:63:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’

    static void __devexit remove(struct pci_dev *dev);

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:65:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scan_bars’

    static int __devinit scan_bars(struct aclpci_dev *aclpci, struct pci_dev *dev);

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:66:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_bars’

    static int __devinit map_bars(struct aclpci_dev *aclpci, struct pci_dev *dev);

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:82:12: error: ‘probe’ undeclared here (not in a function)

    .probe = probe,

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:83:13: error: ‘remove’ undeclared here (not in a function)

    .remove = remove,

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:115:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_chrdev’

    static int __devinit init_chrdev (struct aclpci_dev *aclpci) {

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:489:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘probe’

    static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id) {

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:571:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scan_bars’

    static int __devinit scan_bars(struct aclpci_dev *aclpci, struct pci_dev *dev)

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:592:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_bars’

    static int __devinit map_bars(struct aclpci_dev *aclpci, struct pci_dev *dev)

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:640:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’

    static void __devexit remove(struct pci_dev *dev) {

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:628:13: warning: ‘free_bars’ defined but not used [-Wunused-function]

    static void free_bars(struct aclpci_dev *aclpci, struct pci_dev *dev) {

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:103:21: warning: ‘aclpci_get_free’ defined but not used [-Wunused-function]

    static unsigned int aclpci_get_free(void)

    ^

    /tmp/opencl_driver_yH5TgN/aclpci.c:449:24: warning: ‘find_upstream_dev’ defined but not used [-Wunused-function]

    static struct pci_dev* find_upstream_dev (struct pci_dev *dev) {

    ^

    make[1]: *** [/tmp/opencl_driver_yH5TgN/aclpci.o] Error 1

    make: *** [_module_/tmp/opencl_driver_yH5TgN] Error 2

    make: Leaving directory `/usr/src/linux-headers-3.16.0-30-generic'

    cp: cannot stat ‘./aclpci_drv.ko’: No such file or directory

    cp: cannot create regular file ‘/etc/sysconfig/modules/aclpci.modules’: No such file or directory

    chmod: cannot access ‘/etc/sysconfig/modules/aclpci.modules’: No such file or directory

    modprobe: FATAL: Module aclpci_drv not found.

    The Operating system is Ubuntu and the board is De5-NET FPGA.

    I appreciate if anyone can help me.

    Thanks,

    Jiawen

    --- Quote End ---

    I need the same problem.Please help me! Thank you!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It seems that Ubuntu cannot support the OpenCL well. Please have a try to use Red Hat Ehterprise 64-bit Linux instead. Altera recommand to use this one on working with OpenCl.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have an easier way of getting this running which works on the latest Centos-7 and I presume will also work on Ubuntu and other distributions.

    First navigate to the linux/driver of the BSP.

    Firstly edit aclpci.c: At the top of the file add the lines
    #define __devinit
    # define __devexit

    Secondly edit aclpci_cmd.c: On line 83 remove the assignment
    Change
        result = pci_restore_state(aclpci->pci_dev);
    to 
        pci_restore_state(aclpci->pci_dev);
    On lines 438-440 comment out (or delete) the statement
    if (dev->aer_firmware_first) { 
        return -EIO; 
    }

    You should now be able to run "aocl install" successfully.