针对嵌入式系统实时控制和信号处理的需求,建立了一种基于DSP架构的快速上下文切换机制,为实时处理提供了有力支持.机制采用两条独立的总线,分别用来传送地址和数据信息,实现地址和数据信息的并行传输,增加了上下文保存和恢复的带宽;同时应用影子寄存器与通用寄存器之间的切换,有效减少了对存储器的访问;引入对上下文的延后保存和提前恢复操作,解决了任务或中断嵌套调用时的低效问题,显著地提高了上下文切换的速度.%This paper presented a novel mechanism of fast context switching based on DSP is presented according to the requirements of the real time controlling and signal processing in embedded systems, which provides a strong support for realtime processing. First, the mechanism involved two independent bus, dedicated for address and data information separately, that is to say, data and address information could be transmitted in parallel, which could expand ihe bandwidth for context saving and restoring; Furthermore, switching between shadow registers and general registers was adopted in order to reduce the a-mount of memory accessing; What' s more, the method of post-saving and pre-restoring the context was used, with which the efficiency of the task or interrupt nesting was enhanced and the speed of context switching was confirmed to be improved significantly.
展开▼