The openPOWERLINK master stack on Altera Cyclone V SoC is executed in a bare metal environment. Here the time critical network support layers of openPOWERLINK run as a stand alone driver application on NIOS II softcore processor in the FPGA fabric. The user support library along with a demo master application run on one ARM Cortex A9 Core 0 in the hard processing system (HPS). The two applications (demo master and driver) use a fast shared memory interface on FPGA DDR3 for data exchange and on OCM (M9K memory) for control information exchange. The design uses in-built Ethernet interface with the openPOWERLINK-optimized controller openMAC which enables low SoC jitters.

 

 

1. Hardware requirements

The hardware items required to run openPOWERLINK Hardware MN demo on Altera Cyclone V SoC are as follows:

  • 1 Altera Cyclone V SoC development board to act as the openPOWERLINK Master
  • 1 Linux development PC
  • 2 Linux PC to act as the openPOWERLINK Slave
  • 1 Micro SD Card Reader
  • 1 Micro SD Card
  • 4 Ethernet Cables
  • 1 Network switch or hub
  • 1 Mini USB serial cable
2. Software requirements

Following are the software packages and its dependencies to be downloaded to run openPOWERLINK Hardware Master demo on Altera Cyclone V SoC.

  • Ubuntu 12.04/14.04
  • Altera Quartus II v14.0.200 (To be installed on the development PC)
3. Download the pre-built binaries
  • To download the pre-built binaries – click here

4. openPOWERLINK master demo application on Altera Cyclone V SoC

This section describes the steps to be carried out to run openPOWERLINK Hardware MN demo on Altera Cyclone V SoC.
To convert the SD card as bootable medium for Altera Cyclone V SoC:

  • Open an SoC EDS 14.0 Command Shell and run as administrator to be able to create partitions in SD card.
  • Prepare the SD card using the following commands after connecting it:
    • dd if=${SOCEDS_DEST_ROOT}/embeddedsw/socfpga/prebuilt_images/sd_card_linux_boot_image.img of=/dev/<sd_card_drive> bs=1M
    • alt-boot-disk-util -p preloader-mkpimage.bin -a write -d <sd_card_path>
  • Copy the following files to the SD card:
    • BOOT.bin
    • fpga.rbf

To find the SD card drive do the following:

  • Remove the sd card
  • Type the following command
    • cat /proc/partitions
  • Note down the devices listed
  • Connect the SD card
  • Type the following command
    • cat /proc/partitions
  • Note down the devices listed
  • The difference between the two lists is the SD card drive

To run openPOWERLINK master application, follow the steps below using the serial terminal:

  • Connect the USB-to-miniUSB cable from development PC to board connector HPS UART(J8)
  • Insert the SD card into Altera Cyclone V SoC Master Board and power up the board
  • Connect the board connector(J33/J34) to the local network, this provides the ethernet PHY connection for the FPGA in Altera Cyclone V SoC
  • Open a terminal program
  • Install Minicom using the command:
    • sudo apt-get install minicom
  • Run Minicom using the command:
    • sudo minicom -s
  • Go to serial port set up
    • Set Serial device as /dev/ttyUSB0
    • Set Hardware Flow Control to NO
  • Save the setup
  • Now the openPOWERLINK MN log can be viewed in the serial terminal
5. openPOWERLINK slave demo application on Linux PC

This section describes the steps to be carried out to run openPOWERLINK Linux CN demo.

  • Open a new terminal on the Linux PC to run openPOWERLINK slave
  • Change to the driver daemon install directory on slave PC
    • cd <path to driver application> (Path: /openPOWERLINK_c5soc/Linux_CN1/oplk_bin/oplkd-pcap/)
  • Run the PCAP driver daemon using the following command:
    • sudo ./oplkcnd-pcap
  • Open another terminal
  • Change to the slave application install directory on slave PC
    • cd <path to slave application> (Path: /openPOWERLINK_c5soc/Linux_CN1/oplk_bin/demo_cn_console/)
  • Run the slave application using following command:
    • sudo ./demo_cn_console
  • Repeat the openPOWERLINK slave demo application steps on the slave 2 (CN32) Linux PC.