The project I'm currently working on involves DSP programming, which makes debugging and testing tricky (it usually involves an oscilloscope!).

To get round this one of the more senior guys developed a 'virtual' version of the system using a few bits of extra code to compile it under Windows. To control the simulation he made up his own (very simple) scripting language. The scripts are read in by the simulator program at start up, then executed.

As part of my continuing efforts to spread the word about Perl I suggested that inventing your own scripting languages was a bad idea. I've now been asked to demonstrate how we could do the same thing using an existing language.

The basic idea is that we set up a load of system settings and then specify events to occur at a given time. The main simulation code runs, triggers the events and logs what has happened. To me this looks a lot like the way Perl-Tk works.

Has anyone done something like this before? My initial idea is to use Inline::C to provide an interface to the C DSP code and a Perl module with functions that allow easy setting up of events and control of the simulated hardware.

Of course, there's no time allocated for this on the project, I suspect I'll be developing this in my own time.

--

Kevin O'Rourke


In reply to Software simulation using Perl by kevin_i_orourke

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.