摘要
文章主要介绍了TMS320C64XDSP的常规代码开发流程。利用数据相关性及关键路径,解决哪些指令可并行执行,进而合理安排指令的执行顺序;采用PV操作的生产者消费者算法解决共享资源的互斥问题,使寄存器和存储器避免指令间写-写、读-写冲突;采用银行家算法进一步检测资源的利用状况,避免死锁的发生。将三者有机的结合,可以得到无死锁的并行代码,为流水线结构的汇编语言程序设计提供了一种有效的方法。可以证明,这是一种有效并且可取的方法,为并行代码的快速且充分执行提供了依据。
This article summarized the TMS320C64X DSP characteristic and the general code development flow, determined some instructions to be possible the concurrent execution, and farther reasonably arranged the order of the instruction to carry out by the Data Relevance and the Critical Path. The article used producer-consumer algorithm based on PV operation to avoid the interference of shared resource, as well as the conflict to the register and the memory about the instruction writing - writing, reading - writing. Further, to avoid the deadlock the using resources was examined by banker algorithm. Logical planning them, the Deadlock-free Concurrent Code was obtained,so that one effective method was provided for assembly language programming on pipeline structure. It is proved the method is effective and advisable, so as to the warranty for the fast and fully execution of concurrent code.
出处
《电脑与信息技术》
2009年第6期56-59,71,共5页
Computer and Information Technology