[sdiy] was how_you_got_started...

Rick Jansen rick.jansen at xs4all.nl
Sat Sep 26 20:31:44 CEST 2015


C++ needs a runtime system to take care of dynamic memory.. Is that available in DSP environments?

rick

> On 26 Sep 2015, at 20:20, Scott Gravenhorst <music.maker at gte.net> wrote:
> 
> Thomas Strathmann <thomas at pdp7.org> wrote:
> >On 26/09/15 04:31, Scott Gravenhorst wrote:
> >> Yes, I found this to be true by doing it.  I've been able to write a
> >> nice additive flute model monosynth for dsPIC33F in C, but my best
> >> efforts at polysynths are in assembly language.  The main issue for
> >> me is the fact that there is no native data type support for 16 bit
> >> fixed point arithmetic.  Worse yet is that sometimes designs need
> >> more than one definition for 16 bit fixed point.  Usually 1.15
> >> works, but there are times other configurations are necessary.  This
> >> is rather difficult
> >> and at least ugly in C even using typedef etc.  Just ugly.  And in C
> >> I had to write several functions in assembly language anyway that
> >> handle the use of DSP instructions because they are not used by the
> >> C compiler even if it's logical to do so.  At least in my
> >> experience...  can anyone tell me how to make an FIR filter in C30 >> that uses the MAC instruction... ??
> >
> >What about using C++ for such cases. Seems like a good fit for hiding
> >the complexity of custom arithmetic code. Probably not ideal, but >surely better than writing raw assembly code all the way.
> >
> >    Thomas
> 
> Well, C++ may be able to handle the fixed point problem better than C, but it still won't use the MAC or other DSP instructions.
> 
> But for me, using assembly language with the dsPIC is not a burden at all and it allows me to use binary "tricks" that aren't obvious or even possible in C without yet more ugly code.  I've done assembly language programming for so long, it's really (as someone else posted) just like writing a letter because I can think at that level after doing it for so many years.  I've always been able to write much tighter code in assembly language than in C (and I've used C for more than 30 years).
> 
> -- ScottG
> ________________________________________________________________________
> -- Scott Gravenhorst
> -- http://scott.joviansynth.com/
> -- When the going gets tough, the tough use the command line.
> -- Matt 21:22
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy



More information about the Synth-diy mailing list