[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: dsPIC33F Lua support (Was: Advocating Lua on an embedded systems fair)
- From: Bogdan Marinescu <bogdan.marinescu@...>
- Date: Wed, 11 Feb 2009 13:31:30 +0200
Heh, that sounds insanely crazy indeed :) Following your idea though (just for the sake of exercise :) ) I don't think you'd need to emulate a 32-bit CPU, this might prove far too complex and in the end unusable for practical reasons. What you could do is define an extremely small and simple "virtual machine" (one that is "optimized" for low cost implementations, not speed) and then use LLVM (for example) to compile to your virtual machine. Overall, this approach might be less complex than emulating a 32-bit CPU on an 8-bit CPU.
Hope I'm not getting inhumanly OT here :)
On Wed, Feb 11, 2009 at 1:21 PM, David Given <email@example.com>
-----BEGIN PGP SIGNED MESSAGE-----
John Hind wrote:
> I am a fan of the 8-Bit PICs too having done projects using them, but alwaysOne idea I've been vaguely mulling over for a while is to emulate a
> in assembler rather than C. I do not think they've made the 32-Bit
> transition well, either commercially or technically.
32-bit system on a 8-bit embedded processor.
While this does sound insane, and does have obvious performance issues,
it would allow really low pinout systems that would be stupidly cheap. A
bottom-end PIC could run the emulation in-core, and use a high-speed
serial interface to talk to a serial RAM chip; Microchip make 256kB
devices for under a dollar.
Of course, given that the low end PICs run at 4MHz or so and that
emulation overhead is *at least* an order of magnitude, you're probably
going to end up with a device roughly equivalent to a 500kHz real
processor. Even Lua might have trouble running at an acceptable speed on
OTOH if you consider that your entire device is probably going to cost
about a dollar fifty, consist of two 8-pin DIP ICs, and consume about
3.5mA (most of which is the RAM!), the bounds for what makes
'acceptable' are really, really low.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----