can someone please explain this matter to me ?

look at this : Linux on an 8-bit micro? - Dmitry.GR

so this guy was able to run some form of linux on an 8bit AVR , interesting the SD card and RAM parts are clear though there is just one thing that i am unable to understand . the ARM emulator part ??

what is an "ARM emulator code" ?? how is that even supposed to work ??
or does it just read the ASM commands of that ARM chip then interpret them ???

It takes about 2 hours to boot to bash prompt

Need we go any further :slight_smile:

...R

Robin2:
Need we go any further :slight_smile:

...R

i know that's the greatest thing about it .

2 hours or not, it's an accomplishment!
It's kind of like NetBSD that you could (virtually) run on a toaster.
I like people who do stuff like this, there is no real use but it shows knowledge, dedication and patience.
Thanks for sharing :slight_smile:

About the emulator: I am no expert, but I assume it indeed translates the ARM machine commands and translates these to AVR machine commands. It 'emulates' being an ARM CPU.
As you can read in his story, the AVR runs at 24MhZ but effective clockspeed is 6.5KhZ, so 1 clockcycle of the ARM emulater involves a huge amount of AVR clockticks.
No matter how long it takes, he got it to work and that is a major achievement. Many kudos!

thank you very much Benji . yeah , i really like these things to ..

amine2:
i know that's the greatest thing about it .

Jeez, then what is the worst thing about it?

...R

If you want a better understanding - at a high level, of course - of how computers really work - purchase and read the book "The Pattern on the Stone: The Simple Ideas that Make Computers Work" by W. Daniel Hillis (1998, Basic Books, ISBN 0-465-02595-1).

thank you Cr0sh :slight_smile: i will check it .

amine2:
thank you very much Benji . yeah , i really like these things to …

You really like these things to what?

Solve the Reimann Hypothesis?
Amuse kittens?

or does it just read the ASM commands of that ARM chip then interpret them

No, it reads ARM machine code instructions and interprets them.

Consider, for a moment, the likelihood that all the RAM on a 328 may not equal the size of the register file on even a simple ARM core.

AWOL:
You really like these things to what?

Solve the Reimann Hypothesis?
Amuse kittens?
No, it reads ARM machine code instructions and interprets them.

Consider, for a moment, the likelihood that all the RAM on a 328 may not equal the size of the register file on even a simple ARM core.

i know , that's why i am planning to use an external DRAM , just like the guy in the blog .
i am alot familiar with the AVR processors , i know those are very simple in comparaison with the ARM structure , and that's exactly the ambiguous point , i am planning to write a emulator for a processor that i don't know a thing about yet ...

The point I made about RAM was not to say “you don’t have enough RAM to do anything useful, duh”, it was to point out that often, parts of the processor being modelled must be stored in slow, external memory, further slowing the emulation.
Don’t forget that even early ARM processors had cache - it seems a little perverse (even if it it absolutely necessary) to emulate cache (which is supposed to be fast) in memory (powered by user clock cycles, remember), that runs at exactly the same speed as all the other memory, controlled by “registers” (which should be even faster still) also sharing the same memory.

(Though, having said that, Sophie Wilson emulated the original ARM processor design on a BBC micro!)

AWOL:
The point I made about RAM was not to say "you don't have enough RAM to do anything useful, duh", it was to point out that often, parts of the processor being modelled must be stored in slow, external memory, further slowing the emulation.
Don't forget that even early ARM processors had cache - it seems a little perverse (even if it it absolutely necessary) to emulate cache (which is supposed to be fast) in memory (powered by user clock cycles, remember), that runs at exactly the same speed as all the other memory, controlled by "registers" (which should be even faster still) also sharing the same memory.

(Though, having said that, Sophie Wilson emulated the original ARM processor design on a BBC micro!)

well , as far as that goes , on the AVR UCs the access of registers is fastest , then comes SRAM , then Flash and then the trivial last part that is the SD-card .

for emulation , SRAM should hold the register data , that is the fastest for the ARM , the DRAM should hold the rest , and the AVR registers will be fully reserved to accomplish instructions at the fastest time possible , this guy accomplished that at 10KHz (after 6.5Khz) due to C programming , non-optimized code and the constant refreshing of the DRAM , if i somehow manage to avoid getting the processor to fully do the refreshing of the DRAM and do the full code of instructions in assembly i think i might get this to 20khz . though it's too early to say that since i still find those ARM processor datasheets a pain to fully understand .
at first i expected it to be something similar in complexity to the AVRs though the whole registers and arrangements deal are alot more complicated . i am only doing this for me to develop my experience .

thank you very much though AWOL . i am not doing thid

on the AVR UCs the access of registers is fastest , then comes SRAM

They're in the same memory space; my guess is that they're as fast as each other, but I'd love to see your reference.

AWOL:
You really like these things to what?

Solve the Reimann Hypothesis?
Amuse kittens?

exactly what I feel, people has too much free time nowadays

I suppose that writing a software emulator (which runs on PC) is too boring
even if it make more sense

I'll point out that the first machine I used that ran Unix was a PDP-11/70 (top-of-the-line DEC minicomputer, at the time, good for maybe 20 simultaneous users), which I see rated at 0.4 MIPS in the same chart that rates Z80-class machines at about 0.05 MIPS. I'd rate the AVRs as 8+ times faster than the old Z80s (though exact comparisons are difficult, and the memory structure is very different.)
So running a command-line unix for one user, even with simulation overhead, doesn't seem out-of-the-question.

So running a command-line unix for one user, even with simulation overhead, doesn't seem out-of-the-question.

Well, the AVR will be emulating some other processor, and because it doesn't have enough RAM, it will be emulating memory too (and the MMU), so not only are you taking a hit emulating the instructions, you're taking a hit on fetching those instructions through a narrow eight bit (at best) pipe., whilst making sure that the fetch itself is allowed.
I'm pretty sure the PDP-11 didn't suffer such restrictions.

precisely