Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • User cannot build the firmware on RedHawk machine because Vivado doesn't support the RedHawk machine distro.
  • User can just build it on Ubuntu then use the python script to program the generated .MCS file. To do that pleaseAD follow following steps:
    • Step 1: Go to Ubuntu server and build the firmware. For more information on how to build the firmware of your project please follow the link given in Related articles.
    • Step 2: Once the FPGA programming files are ready. Copy those files to RedHawk machine by using following command.

How to reprogram the PCIe firmware via Rogue software

  • Step 1: To setup the rogue environment please follow the following command.
    • pskube-minion03 ~$ bash
      bash-4.2$ source ~ruckman/anaconda3/etc/profile.d/conda.sh
      bash-4.2$ conda activate rogue_v5.15.3
      (rogue_v5.15.3) bash-4.2$
    • This will activate the conda rogue enviroment
  • Step 2: Go to software folder by typing following command.
    • cd user_project/software
  • Step 3: Run the PCIe firmware update script
    • $ python scripts/updatePcieFpga.py --path <PATH_TO_IMAGE_DIR>

      where <PATH_TO_IMAGE_DIR> is path to image directory (example: ../firmware/targets/SnlBesKcu1500/images/)

      Select image number when following message is shown:

    • Rogue/pyrogue version v5.10.0. https://github.com/slaclab/rogue
      Basedir = /afs/slac.stanford.edu/g/controls/development/users/ktkim/Project/EdgeML/snl-bes-dev/firmware/submodules/axi-pcie-core/scripts
      Start: Started zmqServer on ports 9099-9101
      #########################################
      Current Firmware Loaded on the PCIe card:
      #########################################
      Path         = PcieTop.AxiPcieCore.AxiVersion
      FwVersion    = 0x1010000
      UpTime       = 0:56:11
      GitHash      = 0x35cdbac182394d890796f4114e5a85f7e9a87966
      XilinxDnaId  = 0x4002000101181bc40480a145
      FwTarget     = SnlBesKcu1500
      BuildEnv     = Vivado v2021.1
      BuildServer  = rdsrv317 (Ubuntu 20.04.3 LTS)
      BuildDate    = Thu 09 Dec 2021 12:33:26 PM PST
      Builder      = ruckman
      #########################################
      0 : ../../assets/SnlBesKcu1500/v1.1.0/SnlBesKcu1500-0x01010000-20211209123326-ruckman-35cdbac
      1 : Exit
      Enter image to program into the PCIe card's PROM: <IMAGE_NUMBER>
  • Step 4:  Reboot the RedHawk machineReboot the RedHawk machine by typing following command
    • sudo reboot
  • Step 5: ssh to RedHawk from "pslogin": "ssh psstuart"
  • Step 6: Reload the driver by following stes:
    • $ sudo /u1/aes-stream-drivers/data_dev/driver/load
      $ cat /proc/datadev_0
      -------------- Axi Version ----------------
           Firmware Version : 0x3
                 ScratchPad : 0x0
              Up Time Count : 3292321
                  Device ID : 0x0
                   Git Hash : 0000000000000000000000000000000000000000
                  DNA Value : 0x00000000430a12684ec7d10100008004
               Build String : DrpTDetSemi: Vivado v2018.2, pslab01.slac.stanford.edu (x86_64), Built Wed Aug 14 22:34:06 PDT 2019 by weaver

      $ cat /u1/aes-stream-drivers/data_dev/driver/load
      #!/bin/sh
      
      # set up the proper kernel build environment)
      cd /lib/modules/$(uname -r)/build; ./ccur-config -c -n
      
      # build kernel loadable module
      cd /u1/aes-stream-drivers/data_dev/driver; make clean; make
      
      # add new driver
      /sbin/insmod /u1/aes-stream-drivers/data_dev/driver/datadev.ko cfgSize=0x200000 cfgRxCount=256 cfgTxCount=16 || exit 1
      
      # give appropriate group/permissions
      chmod 666 /dev/datadev*
  • Step 3: open the scripts/devGui.py file and comment the default port number.

...