3 ms·
Losely related: does anyone know of cheap (and fast) microcontroller with von neuman architecture (ie. able to execute code from RAM) and usable amount of embed
by dfox 16y ago
Losely related: does anyone know of cheap (and fast) microcontroller with von neuman architecture (ie. able to execute code from RAM) and usable amount of embedded RAM (say 32KB at least)?
Only microcontroller architecture than I know of than can be (ab)used as von neuman machine is MCS-51 (and there are even some mass produced products that do that and have self-modifing firmware). But MCS-51 is not exactly fast and moreover this hack requires considerate amount of external components.
- viraptor 16y agoI may be wrong here, but I vaguely remember that Infineon chips used in Siemens mobile phones some time ago (sl45i model exactly - C166) had proper memory mapping architecture in place. Especially, someone managed to exploit a stack overflow there by loading a specific jar file -- that would mean the stack at least was executable (and ram itself that way). The jar did some demo-scene like presentation by injecting the code into a running system and taking the control over from the original firmware. That's another clue that screams "RAM execution". It was a very long time ago though, so I may have some details wrong here, but the sl45i jar hack should be still available on youtube to prove it. Fast -- it could do 26MHz. Cheap... not sure. Edit: Now I remember that someone wrote a binary file loader (from the MMC) that were either memory-copied, or memory-mapped. So yes - definitely look at the Siemens-Infineon C16X series - or newer if they exit.
- dfox 16y agoWell, I know about C166/167, but while it is probably cheap (used in considerate amount of ECUs, and many Siemens products) it is not exactly readily available. Also this architecture is, to put it simply, weird, I would describe it as 16bit hybrid of MCS-51 and Alpha.
- ComputerGuru 16y agoI don't understand: they all (more or less) execute code from RAM. You can't execute code from ROM, and you can only fit an instruction at a time (or so) in the IR within the CPU. Von Neuman doesn't have an exclusive on that. The architecture of the CPU refers more to how the data is processed internally, but generally speaking, it's always "load from ROM, stick in RAM, execute in CPU, write results back to RAM." Rinse and repeat. However, the Von Neuman views both ROM and RAM as a single, vertical unit. You can shift data to and from the ROM & RAM as needed to represent a single high-speed high-volume storage unit, but that's only needed if you want an easy way to page RAM to disk (not run programs from RAM). The Modified Harvard Architecture is nice, and is popular with many embedded devices. I primarily use Atmel, and their Modified Harvard works great for me. Have a look: http://en.wikipedia.org/wiki/Modified_Harvard_architecture http://en.wikipedia.org/wiki/Modified_Harvard_architecture When you're dealing with embedded devices, there's (almost always) another way of dealing with the RAM requirements. For instance, I highly recommend the AT90USB1286 CPUs for hobbyists and entry-level enterprise stuff because of their true USB support and super-low cost. These only have 8k of RAM, but they have 128k Flash memory. You should be able to use the flash to do what you need. The only time you need the kind of stuff you describe is when you're basically running software meant for "normal" CPUs on microcontrollers. When you're trying to run "operating systems" instead of firmware, and "packages" instead of highly-optimized and platform-specific code, that's when you need 32KB+ RAM. For everything else, a larger (32KB+ all the way till 1MB) ROM backend will do. My only problem with the ATMEL was the limited EEPROM size for the actual firmware, and since it's a Harvard architecture the separation between data and instructions makes it difficult to run code from the flash ROM. But the new generation now has 8k+ EEPROM for the firmware, which is a nice improvement.
- dfox 16y agoAnd running "operating system" is exactly what I'm trying to achieve. What I want is simple and cheap hardware platform for teaching.
- ComputerGuru 16y agoThen you don't want a microcontroller. What you want is a dirt-cheap all-in-one CPU/RAM/ROM package. Have a look at mini PCs and plug PCs. http://www.hawkboard.org/distributors http://www.hawkboard.org/distributors http://www.linuxfordevices.com/c/a/News/Mini-Linux-PC-breaks-100-barrier/ http://www.linuxfordevices.com/c/a/News/Mini-Linux-PC-breaks... http://www.wired.com/gadgetlab/2009/02/marvell-offers/ http://www.wired.com/gadgetlab/2009/02/marvell-offers/ Of course, you don't say what you want to teach, so these could be totally missing the mark.
- nzmsv 16y agoSamsung's SoC's have an MMU and will run Linux. Take a look at the Hammer board (http://www.tincantools.com http://www.tincantools.com). Some of NXP's ARM microcontrollers have an external memory bus (but most don't have an MMU), and will run uClinux given enough RAM.
- joeyo 16y agoHave you considered the Blackfin? http://en.wikipedia.org/wiki/Blackfin http://en.wikipedia.org/wiki/Blackfin