LMM theory and HW - Questions
Hi all,
I was looking to Catalina compiler bcs I am interested in the LMM theory.
I am very new to it so I wanted to give it a try. I have several questions from the HW side.
I understand that (correct me if I am wrong) the code+variables are saved on an external memory and moved to the propeller when needed.
Well, if I understood correctly then, I have two questions:
1) the memory cannot be an EEPROM, it must be something like a SRAM otherwise it would wear out quickly. How does the original code get moved to it? (always assuming I am understanding how LMM works)
2) Where and how is the interface with the external memory defined, both HW and SW sides.
· The code loading the "program+variables" from external memory has to know how to read/write the memory chip.
Thanks
P.S. Does anybody run any kind of Linux on a LMM hw with Propeller?
I was looking to Catalina compiler bcs I am interested in the LMM theory.
I am very new to it so I wanted to give it a try. I have several questions from the HW side.
I understand that (correct me if I am wrong) the code+variables are saved on an external memory and moved to the propeller when needed.
Well, if I understood correctly then, I have two questions:
1) the memory cannot be an EEPROM, it must be something like a SRAM otherwise it would wear out quickly. How does the original code get moved to it? (always assuming I am understanding how LMM works)
2) Where and how is the interface with the external memory defined, both HW and SW sides.
· The code loading the "program+variables" from external memory has to know how to read/write the memory chip.
Thanks
P.S. Does anybody run any kind of Linux on a LMM hw with Propeller?
Comments
Since I came up with LMM, I'll try to address your questions [noparse]:)[/noparse]
LMM is a technique to allow cogs to execute code stored in the hub memory, or external memory, so that programs longer than 496 instructions can be written.
1) EEPROM could be used, but as you note it would wear out quickly if used for data. Most XMM (external memory) implementations hook up one or more memory chips to the propeller, often using latches. I designed Morpheus for running large XMM programs, and it has up to 16MB of memory space that can be populated. Cluso99 has Triblade and Ramblade, Dr_Acula has Dracblade, Ale and mctrivia among others are also working on XMM solutions.
2) The memory interface depends on the implementation; I use a mix of propeller pins and latches, as my design is optimized for large external memory and 20MB/sec burst transfers so it can be used for a frame buffer, Cluso99's design allows for less memory, but it is faster for random access. Dr_Acula's solution minimizes propeller pins by using more latches. Other upcoming designs use CPLD's.
The software interface depends on the hardware, and all memory hardware implementations provide some example code for interfacing.
Please note that most external memory projects are commercial in nature, so you need to buy boards from the vendor to use them, and cannot make your own PC boards to sell of those designs.
I am also working on a virtual memory manager that allows the use of slower SPI memory, using as few as four propeller pins, at the expense of speed.
I hope this helps,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
Las - Large model assembler Largos - upcoming nano operating system
I see Bill has answered your LMM questions. There are a few threads with lots of discussion about the various implementations and methodologies. There is also overlay loading too. See the VMCOG thread for Bill's work on Virtual Memory.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Thanks!
Catalina implements three different addressing modes (which are related to, but not identical with, the various memory models):
The first addressing mode (TINY) does not require any external memory or other hardware at all - all data and code is stored in the 32kb of RAM built into the Propeller chip (often referred to as Hub RAM). This mode is applicable to any Propeller, and is roughly equivalent to the addressing mode used by both PASM and SPIN programs. This means C programs can be compiled and run on any Propeller.
The TINY addressing mode is used by both the "Large Memory Model" (LMM) and the "EEPROM Memory Model" (EMM), and corresponds to what most people mean when they just say LMM by itself (EMM is unique to Catalina). The difference between LMM and EMM is all about how a program is loaded. As the name implies, EMM programs are intended to be loaded from an external EEPROM - this gives some advantages becasue programs can be loaded in several sections (using a simple overlay loader) that allows the initialization code to be executed then discarded before the actual C program is loaded. But once loaded, both LMM and EMM programs use the TINY addressing mode.
The other two addressing modes require an "eXternal Memory Model" (XMM) to be implemented in hardware (as described by Bill) because they both require additional external SRAMs to be hooked up to the Prop.
The second Catalina addressing mode (SMALL) expects instructions to be stored in external SRAM (which can be up to 16Mb), but all data is still stored in the Prop internal Hub RAM (and is limited to 32kb).
This mode could also support executing code from an external EEPROM in place of the SRAM, but you would need to create a custom loader to get the ball rolling (not too difficult - it would just be minor variation to one of the existing Catalina loaders). Currently, you can only load XMM programs from a local SD card. However, I've just finished writing a serial loader that can load both LMM and XMM programs direct to a Prop from a PC - it will be in the next release of Catalina.
The third Catalina addressing mode (LARGE) expects code, global data and the program heap to be stored in external SRAM (which can be up to 16Mb combined), but the stack and frame are stored in internal Hub RAM (and are limited to 32kb).
There are various schemes for implementing XMM in hardware - Catalina supports most of the current schemes, and it is also possible to design your own scheme and incorporate the necessary access routines in the Catalina XMM kernel.
Ross.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Catalina - a FREE C compiler for the Propeller - see Catalina
Post Edited (RossH) : 2/23/2010 2:41:37 AM GMT