Messages in this thread | | | Subject | Re: Driver for tightly coupled memory | From | Ben Nizette <> | Date | Wed, 17 Sep 2008 08:27:02 +1000 |
| |
On Tue, 2008-09-16 at 10:39 -0700, Alessio Sangalli wrote: > Ben Dooks wrote: > > IIRC, there's no current support for using TCMs. > > I think I will write a module that implements a software FIFO. One > function to allocate a FIFO n words deep, a "push" and a "pop" and > similar. The calling module will have to setup the FIFO and use it > probably in ISRs or similar (the policy will totally remain in the > caller module). Any comments on such approach?
I'd feel uncomfortable about picking an arbitrary function for the TCM to accomplish. Why don't you just set up a genalloc on that RAM and let the user use it for what they will?
If a driver needs a quick FIFO it can attempt to get the RAM for said FIFO from the genalloc and fall back to main memory otherwise. Simple, flexible, easy :-)
--Ben.
| |