lua-users home
lua-l archive

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


We are running Lua 5.4 on a 32 bit controller, it needs ca. 80kB-120kB
ROM and 80kB RAM and then working fine.

I think a typcial modern FPGA you can somehow emulate such a 32bit CPU
with 80kB ROM and 80 kB RAM without much problems - so then you should
be able to run just "standard Lua" there. (of course you have to write
some libraries yourself, especially the io/file-library, but also some
"hardware-access" library (we call it "pin"), and  further a
communication interface library "com" (overwriting the Lua "print"
function), and best also some task handling library for safe
cooperative mutlithreading "task". Also the math library will need
rewrite in any high-speed CPU usually, to use any advanced math CPU
functionality. And Lua libraries like debug or coroutines or so we do
NOT allow for the user (preferring our own task library, this handles
the coroutine handling / yielding in the C++ level...).