这个问题涉及到如何使用中断来处理到达输入接口的数据在内存中的输入和存储,以及如何考虑使用这种机制实现的数据速率。在这个特定问题中,每个新数据项的到达会触发一个中断请求,以输入数据项并将其存储在memory.The问题中的队列中,这是关于计算在此场景中可实现的最大数据速率。
您首先需要计算从接口响应中断的时间,运行中断服务例程(ISR)并返回到中断的program.From (这一点和每个中断上输入的数据位数),您需要计算每秒以位为单位的最大数据速率,这是可以处理的。下面给出CPU响应中断并切换到ISR所需的时钟周期数、ISR执行的指令数、ISR中每条指令执行的平均时钟周期数、每个中断上数据项输入的位数以及时钟频率。您可以假设,一旦ISR完成,CPU就可以立即再次中断,而不是在此之前。
clock cycles to respond to interrupt = 15
instructions executed in ISR = 50
average clock cycles per instruction = 8
number of bits per data item = 8
clock frequency = 5MHz
a) What is the time in microseconds to respond to an interrupt from the interface, run the interrupt service routine (ISR) and return to the interrupted program?
b) What is the maximum data rate in Kbits/second (K is 1000 , not 1024)?
Answers
a) 83.0
b) 96.4有人能解释一下答案吗?
发布于 2014-01-06 16:54:08
A. (50条指令*8条指令+ 15条响应周期)/5 Mhz = (50*8 + 15) /5= 83
B. (每isr /83个usecs/isr) * 1000 = (8/ 83 )*1000 = 96.385
阅读量纲分析
https://stackoverflow.com/questions/20954803
复制相似问题