Math coprocessor possible with AP7000?

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there an easy way to interface a math coprocessor to a AT32AP7000? I understand all floating point arithmetics would need to be trapped and redirected at the kernel level for anyone running linux, but does anyone have any experience with interfacing a serial coprocessor like the PAK-1 or PAK-2 (probably not those, they are a little slow...) with an AVR32 or ARM device?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Floating point math in avr32 is all done in software; that is, the compiler isn't going to generate any floating point instructions which can be trapped. If you're feeling keen to hack on the compiler I guess you could set an exception trap and offload to an external processor but it's not exactly a lightning-fast mechanism. I'd think it'd have to be a pretty fast coprocessor to make this faster than just using software floating point. Plus then there are instruction ordering issues, would you have to stall the avr32 awaiting the result anyway? So you wouldn't get any of the parallelism advantages which usually come with a coprocessor.

You could potentially do a program-level offload where the userspace software takes care of sending the commands to the processor and awaiting their completion. Speedup would depend on how efficiently you could do that and whether you've got work to do while the instruction is being completed. Thread-level parallelism is a hellsova lot easier to control than ILP :)

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was thinking along the same lines.. I really only would need it to offload some of the burden for my own apps, but I was wondering if there was a way to make the whole system profit from it...

What I had in mind was a background socket-bind daemon with the sole task of queuing and running the calcs. (my application does not require anything real-time...)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UNiXWHoRe wrote:
What I had in mind was a background socket-bind daemon with the sole task of queuing and running the calcs. (my application does not require anything real-time...)
Seems sane :). Once you've worked out which copro to use you'll be able to see whether you'll need a little kernel driver or whether _everything_ can be done from userspace.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep that's the one I was looking at, although I am unsure about the max clock rate...