单片机中环形队列取余运算的改进  被引量:1

Improvement of Ring Queue Remainder Calculation in MCU

在线阅读下载全文

作  者:梁凤涛 Liang Fengtao(R&D Department,Nanjing SUMEC Intelligence Technology Co.,Ltd.,Nanjing 210000,China)

机构地区:[1]南京苏美达智能技术有限公司研发部,南京210000

出  处:《单片机与嵌入式系统应用》2023年第9期65-66,共2页Microcontrollers & Embedded Systems

摘  要:针对环形队列入队、出队时取余运算耗时问题,提出一种使用按位与运算的方法,大大缩短了入队、出队耗时;针对批量写入/读出数据时,使用单字节方式效率低的缺点,提出了一种对队列一次性读/写多字节的实现方式。实际测试结果表明,本文提出的方法耗时更少、执行效率更高。In order to solve the problem of time consuming in the process of queue entry and queue exit,this paper proposes a method of bit-sum operation,which greatly reduces the time consuming in queue entry and queue exit.In view of the low efficiency of using single byte mode when writing and reading data in batch,this paper proposes a way to read and write multiple bytes in a queue at one time.The actual test shows that the proposed method is less time-consuming and more efficient.

关 键 词:环形队列 MCU 嵌入式系统 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象