PDA

View Full Version : Adding RAM, not EEPROM



A.C. fishing
02-11-2007, 11:39 PM
Hello. Would it be possible to add a lot more RAM(Not EEPROM) to the propellor? Could the propellor hook up to and use external RAM?
thanks,
ACfishing

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



Somebody said...
-Never Underestimate the power of human stupidity.



Mike Green
02-11-2007, 11:52 PM
Yes and no. Search the forums for past discussions on this. AndreL is currently working on an SRAM expansion card for the Hydra for example. Majongg is also working on an external RAM. It is simply not possible to add addition RAM as an extension to the existing 32K of on-chip Hub (or Cog) RAM. Any external RAM still looks like I/O to the Propeller. The main issue is saving I/O pins since addressing the external RAM takes a lot of address lines. A couple of 8-bit latches could be used to hold up to a 24-bit address with an 8-bit bus used for the address bytes and read/write data transfers. You'd need a couple of control lines for a total maybe of 10-14 I/O pins used to access up to 16Mbytes. In assembly language, you could probably transfer a byte every 500ns.

A.C. fishing
02-12-2007, 12:19 AM
Thanks for your reply Mike Green.
Another few questions:
-How does Propellor Assembly differ from x86 Assembly?
-Does the Spin interpreter just compile Spin code, or does it also completely compile Prop. Assembly into pure Machine Code?
-If not, then does each cog's processor compile the Prop. Assembly directly?, or do they run on pure machine code and I'm missing something?
thanks,
ACfishing

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



Somebody said...
-Never Underestimate the power of human stupidity.



Mike Green
02-12-2007, 12:32 AM
Propeller assembly is similar in concept to x86 assembly, but it is also very different. There are no registers in Propeller assembly since all cog memory locations are treated as registers. There's no stack and no stack pointer ... calls are done differently. Any instruction can be conditionally executed rather than needing a conditional branch.

The Spin interpreter doesn't compile Spin code. The Propeller Tool includes a compiler that compiles Spin to byte codes and assembles Propeller assembly language into instructions (machine code / binary). The Spin interpreter is a program, written originally in assembly language that's stored in the Propeller's ROM and gets loaded into a cog to interpret Spin byte codes (which are stored in the main RAM (hub memory)). The Spin interpreter can copy an assembly language program (after it's assembled into binary instructions) into another cog (memory) for execution on its own using a COGNEW or COGINIT instruction.

So, the Propeller Tool translates the Spin and assembly source programs into binary information which gets loaded into the Propeller's main (32K) RAM and optionally copied into an attached EEPROM. When the download completes, the Propeller starts up a copy of the Spin interpreter which begins interpreting the byte codes. These may cause some blocks of assembly instructions (in binary) to be loaded into other cogs and executed. They may also cause additional copies of the Spin interpreter to be loaded into other cogs which will also start interpreting byte codes at the same time.

A.C. fishing
02-12-2007, 12:43 AM
thanks for clearing up those issues,
ACfishing

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



Somebody said...
-Never Underestimate the power of human stupidity.



Graham Stabler
02-12-2007, 04:33 AM
One of the previous threads:

http://forums.parallax.com/forums/default.aspx?f=25&m=158040

Graham

mahjongg
02-12-2007, 11:59 PM
Also see this thread for my 256 KB RAM expansion that uses 10 I/O lines.

http://forums.parallax.com/showthread.php?p=629266

Mahjongg