计算机工程与设计2024,Vol.45Issue(10) :3170-3176.DOI:10.16208/j.issn1000-7024.2024.10.037

银河麒麟系统下基于缓存队列的CAN驱动设计与实现

Design and implementation of CAN driver based on cache queue in KylinOS

刘丽霞 刘志鹏 张力 李之乾
计算机工程与设计2024,Vol.45Issue(10) :3170-3176.DOI:10.16208/j.issn1000-7024.2024.10.037

银河麒麟系统下基于缓存队列的CAN驱动设计与实现

Design and implementation of CAN driver based on cache queue in KylinOS

刘丽霞 1刘志鹏 2张力 1李之乾1
扫码查看

作者信息

  • 1. 中国航天科工集团第二研究院七〇六所,北京 100854
  • 2. 32379部队第一科室,北京 100072
  • 折叠

摘要

为使基于FPGA的CAN功能在国产操作系统上得以应用,提出一种在银河麒麟操作系统下基于缓存队列的CAN驱动设计与实现方法.在目前主流的银河麒麟V10操作系统下,利用Linux下PCIe设备驱动架构,设计并实现基于FPGA的国产CAN驱,实现CAN发送、接收通信功能.使用缓存队列解决CAN使用的SJA1000协议中硬件接收缓存有限可能造成的丢包问题.对比测试结果表明,提出的CAN驱动满足通信应用,性能稳定,无丢包发生.实现成果可以转化为第三方库丰富操作系统内核驱动库.

Abstract

To apply the CAN function based on FPGA to the domestic operating system,the design and implementation of CAN driver based on cache queue in KylinOS was proposed.Under the current mainstream Kylin V10 operating system,using PCIe device driver architecture under Linux,the domestic CAN driver based on FPGA was designed and implemented.CAN was used to send and receive communication function.A method of using cache queue was presented to solve the possible packet loss prob-lem caused by limited hardware receiving cache in SJA1000 protocol used by CAN.The comparison test shows that the proposed CAN driver meets the requirements of communication applications,and has stable performance and no packet loss.Implementa-tion results can be translated into third-party libraries rich operating system kernel driver libraries.

关键词

区域网络控制/驱动/现场可编程门阵列/周边设备高速连接标准/接收缓存/操作系统/通信

Key words

controller area network(CAN)/driver/field programmable gate array/peripheral component interconnect express(PCIe)/reception cache/operating system/communication

引用本文复制引用

出版年

2024
计算机工程与设计
中国航天科工集团二院706所

计算机工程与设计

CSTPCD北大核心
影响因子:0.617
ISSN:1000-7024
段落导航相关论文