In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bhenning wrote: Hi Dave, Properly used, the overhead is <10% - the key is to use FCACHE to load loops. When I came up with LMM I thought people would use FCACHE extensively to cache loops - it makes loops of up to 128 instructions execute at full cog speed (after loading it). Take a look at the pre-release version of my LAS assembler; it hides most of the differences of LMM. Fair warnings: it may still have bugs; but I do know that it generates correct code for the test file (I worked on it until the output was the same, bit for bit, with the Propeller Tool) I will also have an LMM Basic compiler, but that won't be available until sometime next year. Hope this helps, Bill [quote="Dave Hein"][quote="Mike Green"] @David - Have you looked at Bill Henning's LMM (Large Memory Model)? This is a special tiny interpreter that reads assembly instructions from HUB memory into a cog for execution one at a time. It runs slower than straight assembly, but much faster than Spin and has all 32K of the Hub memory to hold the program. It's used as the basis for the several C compilers (Catalina and ImageCraft's).[/quote]Mike, I looked at the information on the Large Memory Model, and it was very interesting. However, it seems like there is a significant loss in efficiency due to executing one instruction at a time. The cycle overhead is from 4x to 8x depending on how much the loop is unrolled. Also, all of the jump instructions have to be fully implemented by the interpreter. Has anybody looked into an overlay scheme? This method works by having a static portion of the code and several dynamically-loaded portions. A new dynamic portion is loaded into memory whenever a function is called in that portion. If done properly, this can efficiently execute large programs. Of course, if it is not done correctly it can be very inefficient. I recall an overlay program I once wrote on a PDP-15 that used DECtape as the mass storage device. It was very entertaining watching the DECtape spin back and forth as the program needed new overlays. :p Dave[/quote] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=2&m=373927#m387841 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)