1 Sep 2006 03:14
Re: Interrupts problem
Jachym Holecek <freza <at> dspfpga.com>
2006-09-01 01:14:03 GMT
2006-09-01 01:14:03 GMT
Hello Jean-Francois, # Jean-Francois Boudreault 2006-08-31: > I have a problem with custom hardware interruptions. > > I'm currently designing custom network device. I'm using Jachym's port > on virtex fpga with the console on the serial port. I have a driver > which allocate dma memory on initialization. I use a callout function > called every 30ms that simply write 32bits dma memory address to a > register of the custom device to initiate a network transfert (which > take <1ms). As soon transfert is completed, the custom device sends an > interruption which call my driver's interruption routine that reset the > callout to another 30ms. This is not the best way to archieve high throughput... you might want to enqueue new packet from the "transfer done" interrupt handler. Well, ideally you'd want to come up with a smart DMA engine that does most of the work for you(Continue reading)> On booting, I see packets going out of the custom device every 30ms as > expected. But as soon the system is booted and my console started ('sh' > called in single-user mode), it takes about 400ms to receive > interruption from the custom device. Then if I give input to the console > (simply press and hold ENTER key) I get back 30ms response from device. Hmm, I'd suspect interrupt priority masks are incorrectly calculated. What IPL are you running at? Also, as Tim noted, the problem could be deeper down in interrupt handling code (though I've never seen the behaviour you describe on the Virtex). It would be useful to add some diagnostic printfs to ext_intr (print interrupt status register at the
> On booting, I see packets going out of the custom device every 30ms as
> expected. But as soon the system is booted and my console started ('sh'
> called in single-user mode), it takes about 400ms to receive
> interruption from the custom device. Then if I give input to the console
> (simply press and hold ENTER key) I get back 30ms response from device.
Hmm, I'd suspect interrupt priority masks are incorrectly calculated.
What IPL are you running at? Also, as Tim noted, the problem could
be deeper down in interrupt handling code (though I've never seen the
behaviour you describe on the Virtex). It would be useful to add some
diagnostic printfs to ext_intr (print interrupt status register at the
RSS Feed