Shop OBEX P1 Docs P2 Docs Learn Events
Visualizing the propeller — Parallax Forums

Visualizing the propeller

Graham StablerGraham Stabler Posts: 2,510
edited 2010-03-02 11:22 in Propeller 1
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

Comments

  • AlsowolfmanAlsowolfman Posts: 65
    edited 2010-03-01 15:18
    This is an interesting idea! i think this works well for spin only programs, but if you add in assembly they each need their own mini chalk boards to do their own work with, then they transfer it to the main board when they have the marker. also the window guy needs a special window marker. hmm i don't think that adds to understandability.

    It would be interesting to write out all of the example programs in the manual as white board narratives.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My head is pasming!
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-01 15:38
    I agree about the window, this was all a bit off the cuff.

    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
  • potatoheadpotatohead Posts: 10,261
    edited 2010-03-01 16:18
    You should flesh that analogy out more. For newbies, personification is an extremely potent tool for understanding computing concepts.

    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!
  • mikedivmikediv Posts: 825
    edited 2010-03-01 18:14
    Gee Graham I was waiting for the punch line I thought it was going to be a joke you know how many engineers does it take to change a light bulb.. lol
  • w8anw8an Posts: 176
    edited 2010-03-01 22:13
    Why am I suddenly hit with a visualization of the Keystone Kops? shocked.gif
  • Tired2Tired2 Posts: 29
    edited 2010-03-01 22:30
    mikediv said...
    Gee Graham I was waiting for the punch line I thought it was going to be a joke you know how many engineers does it take to change a light bulb.. lol

    I think the joke is that you pay all 8 engineers even if 4 of them don't ever come to work.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-02 00:02
    Tired2 said...
    mikediv said...
    Gee Graham I was waiting for the punch line I thought it was going to be a joke you know how many engineers does it take to change a light bulb.. lol

    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 StablerGraham Stabler Posts: 2,510
    edited 2010-03-02 00:19
    Even without personification a representation of how the propeller is working would be really helpful, I've found just taking through programs with people has helped them, where you can flick from file to file and almost animate your explanation. But something a little more classy would be so much better I'm just not sure I am able to do it as I am not confident enough in my own understanding.

    Graham
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-02 06:58
    Hmmm ... being accurate ...

    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?
  • potatoheadpotatohead Posts: 10,261
    edited 2010-03-02 07:53
    I was thinking of a set of lights in the room that all could see and act on according to their instructions, with each engineer having switches to interact with them, as some analogy for the "pins".

    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
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-03-02 08:28
    When I started reading I thought it was a prop joke. But, as I read on I realised what it was about.

    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
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-02 09:48
    MagIO2 said...
    Hmmm ... being accurate ...

    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 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
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-03-02 11:00
    I think you can extend an analogy according to the reached level. You'd start with a big picture and when they learned their lessons and really understood the analogy AND the propeller so far, you can add things like counters and so on to the analogy ... I think a good analogy should be used from beginning to the end.

    I like the idea with the lights.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-02 11:22
    Good point, I agree extending is fine as long as you don't have to force the analogy. If the analogy is as abstract as the concept being explained something has gone wrong.

    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
Sign In or Register to comment.