Forum Discussion

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

PCIe-385N board factory flash load 13.1

Hi,

The Nallatech factory flash configuration can be reloaded to the PCIe-385N for Altera OpenCL 13.1 with the appropriate flash file below by running the "aocl flash pcie385n_a7_factory.aocx" command (or "aocl flash pcie385n_d5_factory.aocx").

G

6 Replies

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

    --- Quote Start ---

    Hi,

    The Nallatech factory flash configuration can be reloaded to the PCIe-385N for Altera OpenCL 13.1 with the appropriate flash file below by running the "aocl flash pcie385n_a7_factory.aocx" command (or "aocl flash pcie385n_d5_factory.aocx").

    G

    --- Quote End ---

    Hi gigi,

    Thanks for the package. Is this the default hardware image burnt into the flash, just want to make sure. I was trying to figure out a problem. I downloaded Hello_Wolrd sample code package for 13.1 for Altera Web. I burnt the hello_world_131_pcie385n_a7.aocx they provide and powered off my computer and restarted. When I run ./hello_world after run make -f makefile. It failed.

    fpga is in user mode. enabling bridges

    querying platform for info:

    ==========================

    cl_platform_name = altera sdk for opencl

    cl_platform_vendor = altera corporation

    cl_platform_version = opencl 1.0 altera sdk for opencl, version 13.1

    error: cl_device_not_found

    location: ../common/src/aocl_utils.cpp:355

    query for number of devices failed

    Also, same case if I burnt hello_world.aocx I compiled by myself.

    More hint. When I run aocl diagnostic

    aocl diagnostic: running diagnostic from /home/jisuansuogcb/altera/13.1/hld/board/pcie385n/linux64/bin

    running diagnostic for : acl0

    fpga is in user mode. enabling bridges

    using platform: altera sdk for opencl

    failed clgetdeviceids.

    error code: -1

    aocl diagnostic: failed.

    But when I run aocl install, it is done.

    aocl install: running install from /home/jisuansuogcb/altera/13.1/hld/board/pcie385n/linux64/bin

    using kernel source files from /usr/src/kernels/2.6.18-274.el5xen-x86_64

    make: entering directory `/usr/src/kernels/2.6.18-274.el5-xen-x86_64'

    building modules, stage 2.

    modpost

    make: leaving directory `/usr/src/kernels/2.6.18-274.el5-xen-x86_64'

    It seems like some problem with PCIe. But aocl diagnostic was successful before I burnt aocx into flash. So I am afraid if I ruint PCIe drivers in ROM and am thinking about burnt the default hardware image back. Thank!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi hangyuxuan19910802,

    If your board was functioning before you updated the flash with a design you compiled yourself, I would think that maybe the flash update was not successful or the aocx file was somehow invalid.

    Depending on the board you have (A7 or D5), I would reprogram the flash with the factory design for 13.1 I previously posted using the "aocl flash <design>.aocx" command. Once you have done that, power down your system fully (not only reboot) and power it back up. Then check if you can do "aocl diagnostic" again.

    Thanks,

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

    --- Quote Start ---

    Hi hangyuxuan19910802,

    If your board was functioning before you updated the flash with a design you compiled yourself, I would think that maybe the flash update was not successful or the aocx file was somehow invalid.

    Depending on the board you have (A7 or D5), I would reprogram the flash with the factory design for 13.1 I previously posted using the "aocl flash <design>.aocx" command. Once you have done that, power down your system fully (not only reboot) and power it back up. Then check if you can do "aocl diagnostic" again.

    Thanks,

    G

    --- Quote End ---

    Thank you gigi!!

    I tried the aocx your provided in your opencl_13.1_a7_factory.zip (http://www.alteraforum.com/forum/attachment.php?attachmentid=8813&d=1398896333). After cool reboot, it did work when I run $aocl diagnostic and I could see the communication information. But, when I burnt the hello_world.aocx again, it crashed as before. Some hint is when I ran this one $lspci | grep Altera, there was no output. Does it probably mean something wrong with pcie driver installation? I am using pcie_385n_a7. Am i missing some steps in between? Thanks!

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

    --- Quote Start ---

    Hi hangyuxuan19910802,

    If your board was functioning before you updated the flash with a design you compiled yourself, I would think that maybe the flash update was not successful or the aocx file was somehow invalid.

    Depending on the board you have (A7 or D5), I would reprogram the flash with the factory design for 13.1 I previously posted using the "aocl flash <design>.aocx" command. Once you have done that, power down your system fully (not only reboot) and power it back up. Then check if you can do "aocl diagnostic" again.

    Thanks,

    G

    --- Quote End ---

    Thank you, gigi!!

    I burnt factory image pcie385n_a7_factory.aocx from this post. It worked and I saw my a7 board can communicate with host machine through pcie, when I ran $ aocl diagnostic. Then I burnt hello_world.aocx again. After cold reboot the host machine, it crashed and showed the same information as before when I ran $ aocl diagnostic.

    aocl diagnostic: running diagnostic from /home/jisuansuogcb/altera/13.1/hld/board/pcie385n/linux64/bin

    running diagnostic for : acl0

    fpga is in user mode. enabling bridges

    using platform: altera sdk for opencl

    failed clgetdeviceids.

    error code: -1

    aocl diagnostic: failed.

    Something I am not sure is that when I ran $lspci | grep alter, there was no output, probably meaning board driver installation failure, according to get_started documents. As for the board driver installation, since I am using pcie 385n a7 board, I just ran $aocl install, the result was

    aocl install: running install from /home/jisuansuogcb/altera/13.1/hld/board/pcie385n/linux64/bin

    using kernel source files from /usr/src/kernels/2.6.18-274.el5xen-x86_64

    make: entering directory `/usr/src/kernels/2.6.18-274.el5-xen-x86_64'

    building modules, stage 2.

    modpost

    make: leaving directory `/usr/src/kernels/2.6.18-274.el5-xen-x86_64'

    That means, as I understand, the driver was compiled successfully. And do I have to run any other commands for the driver installation? Or am I missing some processes before I run ./hello_world on host side? Another question is what does the factory hardware image .aocx do? If I burnt hello_world instead, and the default one should be erased, as I understand, the program of the default image which makes communication between board and host successful will be erased too,right?

    Thanks!!

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

    Hi Yuxuan,

    if you run "aocl flash hello_world.aocx" (your design) after you have run "aocl flash pcie385n_a7_factory.aocx" your design will overwrite the factory image.

    As you have managed to regain access to your board when going back to the factory design it confirms your design is somehow wrong and that the board itself is working as expected.

    Maybe you compiled it for a D5 board instead of an A7?

    You do not need to update your flash if you are only using 13.1; you only need to update your flash if you are updating to 14.0.

    Thanks,

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

    --- Quote Start ---

    Hi Yuxuan,

    if you run "aocl flash hello_world.aocx" (your design) after you have run "aocl flash pcie385n_a7_factory.aocx" your design will overwrite the factory image.

    As you have managed to regain access to your board when going back to the factory design it confirms your design is somehow wrong and that the board itself is working as expected.

    Maybe you compiled it for a D5 board instead of an A7?

    You do not need to update your flash if you are only using 13.1; you only need to update your flash if you are updating to 14.0.

    Thanks,

    G

    --- Quote End ---

    Thank you. It is not working. I think you are right there's problem with the design.aocx. But I am sure I am using A7 board since I can get information from JTAG and also your a7 factory image works for my board. When I burnt the flash with the design, it failed. But after that, I flashed back to factory image and ran $./hello world...it showed :

    ./hello_world

    querying platform for info:

    ==========================

    cl_platform_name = altera sdk for opencl

    cl_platform_vendor = altera corporation

    cl_platform_version = opencl 1.0 altera sdk for opencl, version 13.1

    querying device for info:

    ========================

    cl_device_name = pcie385n_a7 : pcie-385n altera stratix v computing card

    cl_device_vendor = nallatech inc.

    cl_device_vendor_id = 4466

    cl_device_version = opencl 1.0 altera sdk for opencl, version 13.1

    cl_driver_version = 13.1

    cl_device_address_bits = 64

    cl_device_available = true

    cl_device_endian_little = true

    cl_device_global_mem_cache_size = 32768

    cl_device_global_mem_cacheline_size = 0

    cl_device_global_mem_size = 4294967296

    cl_device_image_support = false

    cl_device_local_mem_size = 16384

    cl_device_max_clock_frequency = 1000

    cl_device_max_compute_units = 1

    cl_device_max_constant_args = 8

    cl_device_max_constant_buffer_size = 1073741824

    cl_device_max_work_item_dimensions = 3

    cl_device_max_work_item_dimensions = 1024

    cl_device_min_data_type_align_size = 128

    cl_device_preferred_vector_width_char = 4

    cl_device_preferred_vector_width_short = 2

    cl_device_preferred_vector_width_int = 1

    cl_device_preferred_vector_width_long = 1

    cl_device_preferred_vector_width_float = 1

    cl_device_preferred_vector_width_double = 0

    command queue out of order? = false

    command queue profiling enabled? = true

    using aocx: hello_world_131_pcie385n_a7.aocx

    cvp failed

    cvp failed

    kernel initialization is complete.

    launching the kernel...

    thread# 2: hello from altera's opencl compiler!

    CvP failed, but *hello world* is printed. How can I interpret this? Thanks so much.

    yuxuan