完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
喜
我试图在应用程序中利用中断的优势。 但是,我发现当处理器在中断处理程序代码中运行行时,它会错过其他一些中断信号。 由于这些中断信号是由VHDL模块创建的,即使中断事件已经处理,它们也不会停止。 在中断处理程序代码中,我必须在处理中断事件之前重置全局中断信号。 所以我必须知道中断处理程序在处理中断事件期间需要多长时间。 有人能告诉我如何计算处理器在应用程序中执行多行所花费的时间吗? 感谢您的考虑和帮助! 以上来自于谷歌翻译 以下为原文 hi, I tried to take the advantage of the interrupt in an application. However, I found when the processor run the lines in the interrupt handler code, it missed some other interrupt signals. Since these interrupt signals were created by a VHDL module, and they woundn't be stopped even when the interrupt event has been processing. While in the interrup handler code, I have to reset the global interrupt signals before processing the interrupt event. So I have to know how long the interrupt handler would take during it processed the interrupt event. Could anybody tell me how to calculate the time that the processor spent for executing several lines in an application? Thank you for your consideration and help! |
|
相关推荐
5个回答
|
|
嗨,你能用GPIO端口吗?
在代码中的各个点处切换一些引脚,然后将范围连接到它们。或者在您的设计中放置一个定时器外设,并在相应的代码行之前和之后进行采样。 取决于您需要的分辨率(如果所有代码都是“在一起”)。我大多数时候更喜欢示波器解决方案(但也许这是我的硬件偏见:-)干杯,马丁 Martin Thompsonmartin.j.thompson@trw.com http://www.conekt.co.uk/capabilities/electronic-hardware 以上来自于谷歌翻译 以下为原文 Hi, Can you use a GPIO port? Toggle some pins at various points in the code, and then conenct a scope up to them. Or put a timer peripheral in your design and sample that before and after the appropriate lines of code. Depends on the resolution you require (and if all the code is "together"). I prefer the scope solution most of the time (but maybe that's my HW bias :-) Cheers, Martin Martin Thompson martin.j.thompson@trw.com http://www.conekt.co.uk/capabilities/electronic-hardware |
|
|
|
我会尝试你的建议!
非常感谢你! 以上来自于谷歌翻译 以下为原文 I'll try it with your suggestion! Thank you very much! |
|
|
|
嗨,
如果您正在使用MicroBlaze并且不禁用主代码中的中断,则可以通过查看MSR寄存器的跟踪输出来测量中断处理程序所花费的时间。 MicroBlaze有一个名为trace_msr_reg的跟踪输出信号,它具有内部MSR寄存器的值。 在MSR寄存器中有一个中断允许位(IE),它在中断时被清除,并在从中断处理程序返回时再次被使能。 因此,除非您有时禁用代码中的中断,否则此位的状态将准确反映中断处理程序所花费的时间。 通过使用此位,您无需修改代码。 GöranBilski 以上来自于谷歌翻译 以下为原文 Hi, If you are using MicroBlaze and don't disable interrupts in your main code, there is a way to measure the time spent in the interrupt handler by looking at the trace output of the MSR register.There is a trace output signal from MicroBlaze called trace_msr_reg which has the value of the internal MSR register.In the MSR register there is a Interrupt Enable bit (IE) which is cleared when taking an interrupt and enabled again when returning from the interrupt handler. So unless you sometimes disable interrupts in your code, the status of this bit reflect exactly the time spent in the interrupt handler.By using this bit, you don't have to modify your code. Göran Bilski |
|
|
|
GöranBilski,
您的解决方案非常棒我猜是因为如果这种方式有效,我不需要更改我的代码。 但是,我现在使用PPC405。 也许它无法使用,是否正确? 感谢您的帮助! 以上来自于谷歌翻译 以下为原文 Göran Bilski, Your solution is great I guess since I needn't change my code if this way works. However, I used PPC405 now. Maybe it can't be used, is it correct? Thank you for your help! |
|
|
|
我想问一些与这个话题无关的事情。
是否有关于这些跟踪信号的文档,特别是有关trace_msr_reg的文档? 我的意思是这个信号的哪一位对应于MSR的哪一位? 谢谢, 尼科斯 以上来自于谷歌翻译 以下为原文 I want to ask something irrelevant to the topic. Is there any documentation about these trace signals and specifically for that trace_msr_reg? I mean which bit of this signal corresponds to which bit of the MSR? Thanks, Nikos |
|
|
|
只有小组成员才能发言,加入小组>>
2395 浏览 7 评论
2810 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2277 浏览 9 评论
3354 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2445 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
780浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
558浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
404浏览 1评论
1985浏览 0评论
704浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-3 21:19 , Processed in 1.205635 second(s), Total 57, Slave 50 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号