首页 > 系统相关 >ubuntu20.04使用plx9054官方驱动 转载

ubuntu20.04使用plx9054官方驱动 转载

时间:2023-07-17 10:55:22浏览次数:38  
标签:ubuntu20.04 program ## PKUXIADAQ make cd plx9054 file 转载

转载地址http://wuhongyi.cn/PKUXIADAQ/en/INSTALL.html

Installation of Software

Installation for this software is requrired by

  • CERN ROOT 6
    • GCC >= 4.8

  • FFTW3

  • OPENSSL

The operating system tested by this program includes CentOS7 / Scientific Linux 7 / CentOS8 / Ubuntu18.04 / Ubuntu20.04

This package uses PLX9054 driver with version 8.23. The operating systems supported by this version of the driver are CentOS 7 / CentOS 8 / Debian 08 / Debian 09 / Debian 10 / Ubuntu 18.04 / Ubuntu 20.04.

危险

Graphical interface programs and non-graphical interface programs cannot run at the same time!

Graphical interface programs and non-graphical interface programs cannot run at the same time!

Graphical interface programs and non-graphical interface programs cannot run at the same time!

The steps for Installation

  • Delete the old version of the PKUXIADAQ folder in your personal directory

  • Extract this package into your personal directory ($HOME)

  • Set up environment variables

  • Compile Plx9054 driver

  • Compile pixie16 driver API (this API has been modified by Hongyi Wu, driven by unofficial standards)

  • Compile graphical acquisition software

  • Compile non-graphical acquisition software

  • Compile online monitor program

  • Compile data converter program

  • Compile event reconstruction program (optional)

## Set up environment variables


# Add the follwing content into .bashrc file
export PLX_SDK_DIR=$HOME/PKUXIADAQ/PlxSdk

# put PKUXIADAQ.tar.gz(or PKUXIADAQ-master.tar.gz) in the personal directory /home, the position ~/

tar -zxvf PKUXIADAQ.tar.gz
or
tar -zxvf PKUXIADAQ-master.tar.gz
mv PKUXIADAQ-master  PKUXIADAQ

# Acquire PKUXIADAQ directory
## Compile Plx9054 driver

# Open a new terminal
cd ~
cd PKUXIADAQ/
#Delete the undeleted driver that may exist. If there is no such directory, you do not need to execute the command.
rm -rf PlxSdk
tar -xvf PlxSdk823.tar
cd PlxSdk/PlxApi/
make clean
make
# If it succeeds,you will see Library "Library/PlxApi.a" built successfully


cd ../Samples/ApiTest/
make clean
make
#if it succeeds,you will see Application "App/ApiTest" built successfully

# If an error is reported, find the corresponding solution according to the operating system
cd ../../Driver/
./builddriver 9054

# If it succeeds,you will see Driver "Plx9054/Plx9054.ko" built sucessfully
## Compile pixie16

cd ~
cd PKUXIADAQ/software/
make clean
make

# As long as no error is reported, the libPixie16App.a libPixie16Sys.a will be generated in the folder
# Modify settings parameters
cd ~
cd PKUXIADAQ/parset/


# Modify cfgPixie16.txt file。
# The value after CrateID indicates the chassis number, and the value is allowed to be 0-15. If there is only a chassis, the parameter is set freely (usually the default 0 is used). If multiple chassis are running synchronously, make sure that the number of each chassis is set to a different value.
# SettingPars Following is the parameter setting file and write the parameter configuration file to be used.
# ModuleSlot The first value number indicates the number of plugins, and if there are 3 plugins, it is 3. The following numbers are for each plug-in in the slot position of the chassis (the slot position is counted from 2), and there are three plugins followed by 2 3 4 respectively.
#AutoRunModeTimes The following values are the time for automatic switching in automatic operation mode.
# Parameter ModuleSampingRate and ModuleBits only take effect in offline mode. When the main interface is initialized in Offline mode, this parameter is read.


# Modify the Run.config file, the first line in the file is the original data storage path, and the second is the file name.
# Modify the RunNumber file, the value in this file is the run number of the actual run.
## Compile graphical acquisition software

cd ~
cd PKUXIADAQ/GUI/
make clean
make
## Compile non-graphical acquisition software

cd ~
cd PKUXIADAQ/NOGUI/
make clean
make
## Compile online monitor program

cd ~
cd PKUXIADAQ/OnlineStattics/

make clean
make
## Compile data converter program

cd ~
cd PKUXIADAQ/DecodeAndSortAll/

# Modify UserDefine.hh according to the instructions in the program.

make clean
make
## Compile event reconstruction program

cd ~
cd PKUXIADAQ/EventBuilder/

# Modify UserDefine.hh according to the instructions in the program.

make clean
make

Instruction for use

  • Restart the computer after booting the chassis (the computer must be open later than the chassis)

  • Load Plx9054 driver under ROOT permission after opening the chassis

  • Normal acquisition

## Load Plx9054 driver under ROOT permission


cd ~
cd PKUXIADAQ/PlxSdk/Bin/

## CENTOS
su # input ROOT password
./Plx_load 9054
## Ubuntu
## The 18th line of the file Plx_load needs to be modified:  export PLX_SDK_DIR=/home/[user name]/PKUXIADAQ/PlxSdk
sudo ./Plx_load 9054

# You Will see a prompt to load successfully
## CENTOS
exit  #Exit ROOT permission
## Start the graphical interface program

cd ~
cd ~/PKUXIADAQ/GUI
./gddaq

# The graphical interface will pop up.
# You can choose Online/Offline Mode then press Boot to initialize.
# After waiting for initialization, you can modify the output data file path, file name, and run number. Press the Complete button to confirm.
# The LSRunStart button becomes operational at this time. You can start pressing Start and then press Stop for the second time.
# Online Statistics option selections mean sending online statistics
# Update Energy Monitor: Each time you select it, the energy spectrum information is read from the plug-in and sent to the online program (frequent select
## Start the non-graphical interface program

cd ~
cd ~/PKUXIADAQ/NOGUI
./gddaq
## Start online monitor program


cd ~
cd PKUXIADAQ/OnlineStattics/
./online

# The graphical interface will pop up.
# Press RunStart to start monitoring and update the input rate and output rate of each channel every 3 seconds. (The first time you enable the program after opening the chassis, you need to enable it after the acquisition is turned on)
# In the lower right corner of the monitoring interface, there is monitoring of the amount of hard disk usage for writing data.



# EnergyMonitor page is used to view the spectrum. Due to the internal register size limitations of the plug-in, this energy spectrum differs from the actual spectrum in channel range.
## execute data converter program


cd ~
cd PKUXIADAQ/DecodeAndSortAll/

# After the last run of acquisition, we can convert the previous run of data to ROOT format file.

./decodeandsort xxx1 [... xxx2 xxx3 ...]
#xxx indicates Run Number in different ceate

Common installation errors

Ubuntu 22.04

Not tested

Ubuntu 20.04

for file Driver/Source.Plx9000/Driver.c

// add the following 3 lines at the begining of file:
#ifndef INCLUDE_VERMAGIC
#define INCLUDE_VERMAGIC
#endif

for file Driver/Source.Plx9000/SuppFunc.c

// Line 956 is modified as follows:
down_read( &current->mm->mmap_lock );

// Line 969 is modified as follows:
up_read( &current->mm->mmap_lock );

// Comment line 402-410
// if (request_mem_region(
//         pdx->PciBar[BarIndex].Properties.Physical,
//         pdx->PciBar[BarIndex].Properties.Size,
//         PLX_DRIVER_NAME
//         ) == NULL)
// {
//     return (-ENOMEM);
// }
// else

Ubuntu 18.04

The soon-to-be launched upgrade

for file Driver/Source.Plx9000/Driver.c

for file Driver/Source.Plx9000/SuppFunc.c

CentOS8

For CentOS 8, the wrong solution for installing PLX9054 driver:

// Modify Include/Plx_sysdep.h line 153
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))

CentOS7

For CentOS / scientific Linux 7.6 / 7.7, the wrong solution for installing PLX9054 driver:

./builddriver 9054
Build: Plx9054

- PLA: CentOS Linux release 7.6.1810 (Core)
- KER: 3.10.0-957.12.2.el7.x86_64
- INC: /lib/modules/3.10.0-957.12.2.el7.x86_64/build/include
- CPU: x86_64 (64-bit Little Endian)
- CMP: Gcc
- TYP: Driver
- PLX: 9054
- CFG: Release

make[1]: Entering directory '/usr/src/kernels/3.10.0-957.12.2.el7.x86_64'
arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended.。 Stop.
make[1]: Leaving directory '/usr/src/kernels/3.10.0-957.12.2.el7.x86_64'
make: *** [BuildDriver] Error 2

The above is the output prompt when the error occurs.

At this point, the user can modify the file /usr/src/kernels/3.10.0-957.12.2.el7.x86_64/arch/x86/Makefile to avoid this error by cancel the following code.

ifneq ($(RETPOLINE_CFLAGS),)
    KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) -DRETPOLINE
else
    $(error CONFIG_RETPOLINE=y, but not supported by the compiler. Compiler update recommended.)
endif

9054 driver loading error

If you use NI PCIe-8381 and the driver cannot be loaded, as shown in the following figure, check whether the dial CLOCK MODE is ON.

_images/pcie8381.jpg

标签:ubuntu20.04,program,##,PKUXIADAQ,make,cd,plx9054,file,转载
From: https://www.cnblogs.com/eastgeneral/p/17559412.html

相关文章

  • 如何从Altium Designer官方网站下载元件库-转载
    如何从AltiumDesigner官方网站下载元件库_ad官网下载元件库_睿思派克的博客-CSDN博客画PCB没有元件库怎么办?可以查官方手册,一个引脚一个引脚画上去,生成元件库。也可以去下载Altium官方元件库。 1.AD10之前的“冷冻库”进入http://wiki.altium.com/display/ADOH/Download+L......
  • Python 并发编程之IO模型(转载)
    Python并发编程之IO模型https://www.cnblogs.com/linhaifeng/articles/7454717.htmlIO模型介绍为了更好地了解IO模型,我们需要事先回顾下:同步、异步、阻塞、非阻塞同步(synchronous)IO和异步(asynchronous)IO,阻塞(blocking)IO和非阻塞(non-blocking)IO分别是什么,到底有什么区别......
  • [转载] GPT-4对游戏文本检查的最佳实践
    转自公众号网易雷火测试中心GPT-4是OpenAI利用自然语言处理技术研发的大型语言模型,能够协助人类进行写作辅助、文章撰写、智能聊天机器人、编程辅助、新闻生成、游戏设计等工作。它能理解并回应各种语言风格和主题,提供创新的解决方案,帮助各行各业解决问题。本文......
  • 利用U盘给Intel NUC重装Ubuntu20.04系统
    背景因为社团里刚好有一个被玩坏的IntelNUC,我又刚好对此感兴趣,于是学长就交给我这一项任务,让我给这台NUC刷机。目录NUC刷机基本上简单分为四步一、格式化U盘二、下载Ubuntu20.04系统镜像三、将系统镜像写入U盘,制成启动盘四、把启动盘里的系统整到NUC里,重装系统,完成刷机。......
  • Oracle学习笔记:parallel并行处理 --转载 https://blog.csdn.net/w892824196/article/
    在使用oracel查询时,可以通过并行提高查询速度。例如:select/*+parallel(a,6)*/count(1)fromtable_namea;强行启用并行度来执行当前SQL。加上这个说明之后,可以强行启用Oracle的多线程处理功能,提高效率。但本身启动这个功能,也是要消耗资源与性能的。所有,一般都会在返回记......
  • ubuntu20.04 配置编译安装nginx的systemctl启动命令
    vim/usr/lib/systemd/system/nginx.service[Unit]Description=nginx-highperformancewebserverAfter=network.targetremote-fs.targetnss-lookup.target[Service]Type=forkin......
  • 北京:不用选医保也能报销的医院,这样查询! 转载
    人民网北京3月8日电(记者乔业琼)目前,北京市共有2900余家基本医疗保险定点医疗机构,按照北京市基本医疗保险参保人员就医管理规定,除本人选定的定点医疗机构以外,所有定点中医医院、定点专科医院和39家定点A类医院为参保人员共同的定点医院,无需选择,可按规定就医。自2021年7月1日起,北京......
  • Python 并发编程之协程(转载)
    Python并发编程之协程https://www.cnblogs.com/linhaifeng/articles/7429894.html引子本节的主题是基于单线程来实现并发,即只用一个主线程(很明显可利用的cpu只有一个)情况下实现并发,为此我们需要先回顾下并发的本质:切换+保存状态cpu正在运行一个任务,会在两种情况下切走去执......
  • Django 模板语言获取列表(可迭代对象)的下标、索引。从而实现显示序号(转载)
    ......
  • [GIT]如何删除分支【转载】
    前言在用git开发过程中,我们在分支合并后会将分支删除。这里我们会遇到两种情况,一是本地和远程的分支都还在,另一种就是远程仓库已经删除了,但本地仓库还有备份。本地和远程分支都在这是最常见的情况了,在这种情况下,我们会先删除本地分支,再删除远程分支。1.删除本地分支在git中,删除......