LINUX系统下GPIB驱动优化设计与实现
DOI:
CSTR:
作者:
作者单位:

西安精密机械研究所

作者简介:

通讯作者:

中图分类号:

基金项目:


Optimal Design and Implementation of GPIB Driver in LINUX System
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    为方便开发基于LINUX操作系统的GPIB仪器,近几年,Linux内核也集成了专用在测试测量领域里的GPIB总线驱动,但直接拿来利用发现,在向仪器发命令的频率比较高时,此驱动传输性能不是很理想,偶尔还会出现驱动挂掉,造成LINUX内核崩溃。针对以上问题,给出了在LINUX架构下GPIB驱动优化设计方案。分析了LINUX字符设备驱动模型;在中断服务程序底半部里,引入了结合睡眠机制的非原子操作工作队列,提高了驱动运行效率;提出了利用FIFO半满而非传统的全满标志位作为数据传输判断标准,提升了数据传输速率,引入了读写操作互斥的信号量,消除了由于读写竞态引起的驱动异常;对优化后的GPIB驱动进行测试,结果表明,上述问题得到了一定的改善。

    Abstract:

    In order to facilitate the development of GPIB instruments based on LINUX operating system, in recent years, the LINUX kernel has also integrated a GPIB bus driver specially used in the field of testing and measurement. However, after being directly used, it is found that the transmission performance of this driver is not very ideal when sending commands to instruments with relatively high frequency, occasionally there will be drive hanging off, to cause kernel crash. In view of the above problems, the GPIB-driven optimization design scheme under the LINUX architecture is given. The LINUX character device driver model is analyzed; In the bottom half of the interrupt service program, a non-atomic operating work queue combined is introduced to improve the driving operation efficiency; The use of FIFO half full instead of the traditional full flag bit as the data transmission standard is proposed to improve the data transfer rate; Introducing mutually exclusive signal for read and write operations, eliminating drive-running anomalies caused by read and write race; Tests on the optimized GPIB driver, result shows that the above problem have been improved to some extent.

    参考文献
    相似文献
    引证文献
引用本文

赵昕,郭恩全,李小杰. LINUX系统下GPIB驱动优化设计与实现计算机测量与控制[J].,2020,28(3):163-167.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2020-01-15
  • 最后修改日期:2020-02-03
  • 录用日期:2020-02-10
  • 在线发布日期: 2020-03-30
  • 出版日期:
文章二维码