Visualizing the propeller
Graham Stabler
Posts: 2,510
Eight engineers sit around a white-board, one of them wakes up and starts working through a list of tasks:
First he wakes up engineer number 1 and asks him to keep an eye on a temperature gauge and write the temperature on the white-board as often as he can.
He wakes up engineer 2 and asks him to monitor the rotation of a shaft but to keep it to himself unless asked.
He then wakes up engineer 3, his job is to draw on the window whatever he is sent so the people outside can see, he will find what he has to draw written on the white-board.
Once engineer 0 has done all of this he starts on another list of tasks which he repeats over and over. Sometimes he reads the temperature off the white-board and writes it to another part of the white-board ready to be displayed on the window. Other times he writes a command on the window for engineer 2 who once he sees it writes the shaft position on the white-board and rubs out the command so engineer 0 knows the position is ready to read.
To avoid any mess on the white-board they pass the pen around between the engineers one at a time, even letting the sleeping engineers have a chance to grab it, they are also only given the chance to write a couple of words (or one big long one).
OK, it's a bit silly and a work in progress, I just thought it might be a way to explain to people how multiple cores are used on the propeller. Perhaps it can be expanded upon or can inspire something nice to watch (animation of film). The idea is to try and be simple but at the same time accurate.
Cheers,
Graham
First he wakes up engineer number 1 and asks him to keep an eye on a temperature gauge and write the temperature on the white-board as often as he can.
He wakes up engineer 2 and asks him to monitor the rotation of a shaft but to keep it to himself unless asked.
He then wakes up engineer 3, his job is to draw on the window whatever he is sent so the people outside can see, he will find what he has to draw written on the white-board.
Once engineer 0 has done all of this he starts on another list of tasks which he repeats over and over. Sometimes he reads the temperature off the white-board and writes it to another part of the white-board ready to be displayed on the window. Other times he writes a command on the window for engineer 2 who once he sees it writes the shaft position on the white-board and rubs out the command so engineer 0 knows the position is ready to read.
To avoid any mess on the white-board they pass the pen around between the engineers one at a time, even letting the sleeping engineers have a chance to grab it, they are also only given the chance to write a couple of words (or one big long one).
OK, it's a bit silly and a work in progress, I just thought it might be a way to explain to people how multiple cores are used on the propeller. Perhaps it can be expanded upon or can inspire something nice to watch (animation of film). The idea is to try and be simple but at the same time accurate.
Cheers,
Graham
Comments
It would be interesting to write out all of the example programs in the manual as white board narratives.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My head is pasming!
I just have a feeling that a lot of the problems beginners have is understanding how the propeller works from an overview side of things, it is hard to see the bigger picture from the manual and many of the tutorials just tell you what to do which is great until you want to move to something more complicated.
Graham
Good start.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
I think the joke is that you pay all 8 engineers even if 4 of them don't ever come to work.
Not quite true, they are real engineers, they are always hanging around at work, you just need to give them some specific instructions.
Personalizing is always a good teaching aid just as it is a good debugging aid. It's called "playing computer". Many years ago Motorola's HC05 applications guide had a section which began like this:
www.google.com.au/url?sa=t&source=web&ct=res&cd=6&ved=0CB4QFjAF&url=http%3A%2F%2Fwww.c-robotics.com%2Ficdata%2F68hc05.pdf&ei=-kqMS_HiKoH8tAP_69ieAw&usg=AFQjCNFp5rsjL2t8XxbEVsfOpnrBcq4fRQ&sig2=bHS7oPuFrDgfHtMd6ocpwA
Playing computer is a learning exercise where you pretend to be a CPU
that is executing a program. Programmers often mentally check
programs by playing computer as they read through a software routine.
While playing computer, it is not necessary to break instructions down to
individual processor cycles. Instead, instructions are treated as a single
complete operation rather than several detailed steps
Of course all engineers have tools and so it is with cogs as they have the video and counter "tools".
So when it comes to the Propeller I think of 8 people (they have to be engineers) working together around a central information hub (coffee pot). Like real engineers they can do their own thing but unlike eight real engineers they all communicate together and share the same resources.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Graham
Maybe you should rotate the whiteboard instead of passing the pen. The pen can then be used to write to a small personal whiteboard everytime. The pen would then be the memory access.
But they don't see the whole big rotating whiteboard. They can only focus on one location. ... Maybe magnetic plates are better than pens ... The engineer can pic one from or attach one to the whiteboard. There are plates in 3 sizes.
The engineers sit around a round table in a round room and each one has a window (video generator). But usually only one opened the rolling shutter. He's the one who pics magnetic plates and attaches it to the window.
Eeach engineer has two wristwatches (counters). But maybe he's not interested in it, so he did not put a battery in.
How to visualize the I/Os?
The whiteboard idea is really great. I also thought about the "program" being on the table. Engineer 0 goes and fills it's instruction space up, taking a copy of that program back to their desk, where they begin operating on it. When Engineer 1 is needed, Engineer 0 would direct Engineer 1 to copy code X to code Y, on the table and beginning to work as well. The idea there being that it takes time to initialize a COG, and that a COG only operates from it's own space, not the shared memory space.
A wall clock is a shared time reference for all involved. Seems easy enough there.
Each engineer has their own dedicated special purpose device on their desk that works like the counters and video shift registers, etc... Maybe a coupla devices work here.
Some more details like that, and it might be a seriously good working analogy.
I've taught advanced parametric solid modeling and concurrent engineering with managed data repositories for years, and always start out with a "chalk talk" like this. The difference in learning is significantly better when it's used, as opposed to simply jumping into the material, no matter how introductory. IMHO, this thread is worth some musing over time to flesh this out some.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Post Edited (potatohead) : 3/2/2010 7:58:22 AM GMT
First thought was to use monkeys, since we have seen that before. But thinking further, I like the engineers better.
It would seem to me that 8 engineers around a round table (pardon the pun) and the hub memory would be a large slate (whiteboard say A3 or A2 size). Each engineer would also have their own 'cog memory' A4 slate (or A5). The hub slate would be passed around the table.
Behind each engineer would be a technician (being the counters) and they might have a whiteboard (on wheels) and colored pens to simulate the VGA/TV or a keyboard for input or other such connections (serial, temp gauge, LEDs, etc) for the output.
I think this could really work well, and with a table and a camera above with a fish-eye lens, it could demonstrate the concept of the prop quite well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
The idea of the pen was simply to show the idea of the round robin approach, it is like holding the conch in the lord of the flies. The whiteboard could be a grid, you can write a long word across 4 of the boxes, or shorter words over less of
them. The only limitation is a max of 4 sequential boxes at a time.
It's hard to know how far to stretch such analogies, you can go so far that you lose the reader, perhaps the idea of each cog having a hardware counter doesn't really need this sort of explanation. IO is also a generally understandable concept.
Graham
I like the idea with the lights.
Some of the analogies used in the scientific press are really not very helpful at all and infuriate me, I also remember learning about voltage and being told it was like pressure, but that was as far as their analogy went which is not all that helpful if you don't really have a feel for what pressure is, at the time it was just a word.
Graham