<DIV style="font-family:Arial, sans-serif; font-size:10pt;">As I recall, I went to a great deal of trouble to write the code so it didn't touch the stack during the fast routine. You can live with stack hits before you pipe up the OUTER loop, and after it has completed. You can't live with stack hits in the middle of the loop(s).<BR><BR>Assembly language is your FRIEND sometimes. (If you can track down, say, a good radix-2 or radix-4 FFT for a real DSP, it will give you some insight. Start by reading an FIR filter, though.)<DIV><BR></DIV><DIV>Hit the TI website and pull down some of their app notes.<BR><BR>--- jan.de.kruyf@gmail.com wrote:<BR><BR>From: Jan de Kruyf <jan.de.kruyf@gmail.com><BR>To: ETH Oberon and related systems <oberon@lists.inf.ethz.ch><BR>Subject: Re: [Oberon] Wojtek's comment<BR>Date: Sat, 29 Aug 2015 13:54:03 +0200<BR><BR><DIV dir="ltr"><DIV>John, good day.</DIV><DIV><BR></DIV>> I'd suggest (based on DSP experience) that, if you allow procedures to be marked for fast RAM, <DIV>> you restrict such marking to leaf procedures.<BR></DIV><DIV><BR></DIV><DIV>We have not seen yet the exact scope of work that needs to be done fast. This is a data gathering , with perhaps some DSP, application. So lets wait and see first. </DIV><DIV>Your suggestion is valuable though, if this is at all possible.</DIV><DIV><BR></DIV><DIV>A question:</DIV><DIV>how did you handle the stack between slow and fast execution parts of the program? Or did it run in separate threads, making the stack business automatic?</DIV><DIV>You see, I know zippo about embedded DSP. Have you got a link to some data sheet / application notes perhaps?</DIV><DIV><BR></DIV><DIV>cheers,</DIV><DIV><BR></DIV><DIV>j.</DIV><DIV><BR></DIV><DIV><BR></DIV></DIV><DIV><BR><DIV>On Sat, Aug 29, 2015 at 1:40 PM, John R. Strohm <SPAN dir="ltr"><<A href="mailto:strohm@airmail.net">strohm@airmail.net</A>></SPAN> wrote:<BR><BLOCKQUOTE style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">--- <A href="mailto:PeterMatthias@web.de">PeterMatthias@web.de</A> wrote:<BR>
> Until a generalized solution is found I would simply scan for the module<BR>
> names in linker that need code and/or data in fast ram and allocate it<BR>
> there. A generalized solution would be to mark code/date in a special<BR>
> way and let the linker do the allocation automatically.<BR>
<BR>
In one of the later versions of the Oberon compiler, Prof. Wirth added a special mark to denote leaf procedures. This kinda bugged me, as the compiler can easily determine whether a procedure is a leaf procedure or not, but it makes sense if you are writing a quick-and-dirty one-pass generate-IMMEDIATELY compiler, as opposed to building an abstract syntax tree and waiting until you have the entire procedure in front of you and can generate the code for it all at once.<BR>
<BR>
I'd suggest (based on DSP experience) that, if you allow procedures to be marked for fast RAM, you restrict such marking to leaf procedures.<BR>
<BR>
The alternative is to do a transitive closure on the marked procedure: Any procedure called by a procedure marked to be located in fast RAM must also be located in fast RAM. This is a good way to use up fast RAM very quickly, if you make one bad call decision.<BR>
<BR>
I also agree with the guy who said you want all of the fast RAM allocation information in ONE place, to make it easier to manage it all, which argues against marking individual procedures, and argues in favor of a linker control file. I've had to do this, on a fair-sized embedded DSP project. It was a headache and it remained an ongoing headache.<BR>
<BR>
--John R. Strohm<BR>
<BR>
--<BR>
<A href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</A> mailing list for ETH Oberon and related systems<BR>
<A href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</A><BR>
</BLOCKQUOTE></DIV><BR></DIV>
--
<A href="/eonapps/ft/wm/page/compose?send_to=Oberon%40lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</A> mailing list for ETH Oberon and related systems
<A href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</A>
</DIV></DIV>