Microchip
直播中

梅宁琛

8年用户 246经验值
私信 关注
[问答]

PIC32MK FPU与上下文切换

我正在考虑为新设计指定PIC32 MK1024MCF100T-I/PT,部分原因在于IEEE-75 4单精度和双精度FPU。应用程序将是一个带中断的轮询超循环。浮点运算在主和中断上下文中是需要的。这提出了一个重要的问题:FPU状态保存是如何在这个微控制器家族中处理的?我有皮质M4F的经验,它给出了三种选择:永远、永远和懒惰(懒惰意味着FPU状态只在需要时就被中断)。在皮质M4F,堆叠模式是由软件在程序执行早期指定的。这是如何处理的PIC32 MK的MIPS核心?此外,由于FPU与整数单元并行运行,并且可能在长时间运行的指令(如div.d)的中间,当断言被中断时,FPU指令在进行中会发生什么?
                    
                    
以上来自于百度翻译

               
                                                                                      以下为原文

                                                                            I am thinking about specifying PIC32MK1024MCF100T-I/PT for a new design, in part because of its IEEE-754 single- and double-precision FPU.

The application will be a polled superloop with interrupts. Floating point math is needed in main and interrupt contexts.

This raises the important question: How is FPU state saving handled on this microcontroller family? I have experience with the Cortex M4F, which gives three options: never, always, and lazy (where lazy means FPU state is stacked on interrupt entry only if needed). On Cortex M4F, the stacking mode is specified by software early in program execution. How is this handled by the PIC32MK's MIPS core?

Also, since the FPU runs in parallel to the integer unit and may be in the middle of a long-running instruction such as DIV.D when an interrupt is asserted, what happens to the FPU instruction in progress?

更多回帖

发帖
×
20
完善资料,
赚取积分