lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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 :)

Best,
Bogdan

On Wed, Feb 11, 2009 at 1:21 PM, David Given <dg@cowlark.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Hind wrote:
[...]
> I am a fan of the 8-Bit PICs too having done projects using them, but always
> in assembler rather than C. I do not think they've made the 32-Bit
> transition well, either commercially or technically.

One idea I've been vaguely mulling over for a while is to emulate a
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
that.

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.

- --
David Given
dg@cowlark.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJkrSef9E0noFvlzgRAm0fAJ4soOJIvh6yqjrg5U9DCZygdp3y6QCfR0tR
72NCknWSkMdmPOZNG/hkprE=
=buQU
-----END PGP SIGNATURE-----