turning an 8 bit into a 32 bit cpu
Chris Micro
Posts: 160
turning an 8 bit into a 32 bit cpu
This morning I woke up and thought I could do something useless but interesting.
Here is the result
The goal is reached and the led blinks.. my Atmega runs now propeller code
This morning I woke up and thought I could do something useless but interesting.
Here is the result
The goal is reached and the led blinks.. my Atmega runs now propeller code
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Can you describe the current functionalities, and the ones you are working on?
I've got an ATmega32 over here, so I'll give it a try.
Keep up the good work!
Well ...
No, no, you can become much slower if you do it the other way
Now my Atmega runs 4 Cogs in parallel. It is now a quad core 32 bit controller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eccles : How do I open the door?
Bluebottle : You turn the knob on your side
Eccles : I haven't got a knob on my side!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit the home of pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
Well,yes, that brings me to an idea: Compiling the emulator with Catalina and creating virtuall COGs
With the remark of ALE you can have 8-1+32 = 39 Cogs
isn't that great?
This thing is written in C right. Eventually I will have a 6809 emulator up and running on the Prop which will be running the CUBIX OS. Which just happens to have an 8085 emulator. Which could then run your COG emulator compiled for 8080. Which could then run....
I love that picture of your atmega and LED by the way.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
No, that chip is an ATmega32, an 8bit controller running at 16mips.
Atmel does however make ARM7 chips.
So, for the beginners: This project is just a fun project. There is no practical use yet to emulate a 32 core on an 8 bit core. Don't ask if you can buy another processor to make the same things as with the propeller.
By not all the instructions of the propeller are implemented in the emulation. I implemented just the instructions necessary to run the led demo.
I like the suggestion of ZiCog: Emulating on Emulator in another and to see how slow we can get but still working! I the emulators must be quite good if the can run a c-program of another processor without errors.
Another idea which came do my mind: whats about virtual COGs ? Did anyone try to implement some in propASM? How many instructions would be necessary for one emulated instructions? How fast could it be? probably 10 times slower than the real COG?
Yes and no. C (and many other) compilers often do not use all of the possible instructions and addressing modes etc of their target CPU. The ZiCog emulator runs compiled C programs no problem but then it also passes 99% of the tests of a very stringent instruction set test program which compares instruction execution results against a real Z80.
I'm hoping for the same level of accuracy for the 6809 emulator, just now I'm not sure how to create the tests though.
If we can stack up the emulators we should do it, just for fun. How big is the COG emulator, in C lines and/or compiled atmega bytes?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Cog 1 : ZiCog
Cog 2 : MoCog
Cog 3 : AtMega
Cog 4 : 6502 Apple
Cog 5 : 68008
Cog 7 : Commodore
Cog 0 : I/O handler
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
ZiCog, MoCog and 6502 are under way. Who's volunteering for AtMega and 68008. I think I'm done with emulations in this lifetime.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
>If we can stack up the emulators we should do it, just for fun. How big is the COG emulator, in C lines and/or compiled atmega bytes?
It is difficult to count the lines. All together the resulting file has between 2K and 4K depending on the optimization level given to the compiler.
The COG emulation is in Cog.c.
That would be fantastic to run it on the Z80 emulator.
It's not really virtual cogs but you can do multitasking with either LMM or the LMM idea but using instructions in the cog space. There is an example attached that someone else wrote. You may be able to find the original thread if you do a search of the forums. You could write a full cog emulator though if you really wanted to. Could actually be interesting to implement memory protection and other things using it.
thanks you for the file. Nice. A pity that it cannot process all assembler commands.
Probably a work around would be possible with source and destination prediction.
chris
www.xmos.com
Only four cores, but each can have up to eight hardware threads that can be treated like separate CPUs (100 MIPS or 50 MIPS each).
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
It is true, the speed would be sufficient for a mechanical plotter.
But there are some simple tv-driver for the Atmegas. So if one of this is used, even to drive a display would be possible.