Scripting during runtime
tuxman
Posts: 9
in Propeller 1
I am now trying to make prop as a realtime processing engine for my current project, that receives raw UART, converts it to format acceptable by "host" connected via serial, while at the same time waiting for that "host" to eventually send packet representing which output lines to pull
I thought it would be nice if signals that repeat often and have the same outcome could be processed inside prop, but that would require some sort of scripting method, so that on bootup "host" could specify reactions beforehand, but how to do that in C or PASM?
I thought it would be nice if signals that repeat often and have the same outcome could be processed inside prop, but that would require some sort of scripting method, so that on bootup "host" could specify reactions beforehand, but how to do that in C or PASM?
Comments
For scripting in C I've written two different small scripting languages: TinyScript and PropLisp. Both are easy to extend in C and quite small, but they're also pretty slow compared to Forth (although of course since they're extensible you can handle speed critical things in C).
This is no where near as powerful or flexible as Tachyon or ersmith's TinyScript and PropLisp, but it's small, easy, compact, fast, and best of all, you don't have to translate your entire project to Forth .
I've attached a simple demo of the parser.
in just a few lines of code on top of an already existing Tachyon image like the EXPLORER ...
So, current protocol prototype has 5 bytes for input address, same for reaction address.
But those are limited to <200 iops, while propeller is capable of at least 300.
I would like to have two features that would limit host dependency:
- preloading reactions from host (after program boot) so that prop would process most often used switch combinations on its own (some sort of lookup table)
- preloading chains of outputs (with timing)
I know forth has facilities to support such features, but then there would be a massive problem of integrating it into the rest of the system.
Also, i was looking into using remaining 4 pins and 2 cogs somehow, maybe there is a way of loading new code after the one from eeprom has loaded?