Shop OBEX P1 Docs P2 Docs Learn Events
Call for Tiny Objects (Plez!) to go in a Massive Prop Computing Machine — Parallax Forums

Call for Tiny Objects (Plez!) to go in a Massive Prop Computing Machine

HumanoidoHumanoido Posts: 5,770
edited 2010-08-31 09:16 in Propeller 1
Request
I'm looking for "beta-writers" to create tiny simple SPIN object programs, very small in size, that will run self contained in one cog, and can accomplish a single task each.

Reason
I am stoking up the fires of the 40 Propeller-Chip Computing Machine and need many small programs for demonstration. Small because theoretically up to 1024 can run in one cog.

http://forums.parallax.com/showthread.php?t=123828

Possible Suggestions
very small programs to do simple things - display, sensors, popular math, generate whole cube roots, simple algorithms, clever routines, utilities, very tiny games, input/output, TV, Keyboard, memory, eeprom, run a couple keys, LCD, clock, cog observing, and routines that are fun & interesting. Demo code is also useful, i.e. show a use for the counters/other cog resources.

Contributors can also suggest URLs to existing code if the code is small.

Thank you sincerely.
I can be reached in this thread, pm, and email.
Humanoido

Comments

  • ErNaErNa Posts: 1,753
    edited 2010-08-28 04:44
    A nice challenge! What about implementing the game of life http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life or try to graphically simulate rubics cube and rokickis solution?
  • Heater.Heater. Posts: 21,230
    edited 2010-08-28 07:26
    I think the game of Life is a perfect idea for starting out programming Humanoids Towering Inferno.

    It is:

    a) Small and simple for running in COGs.
    b) Could probably run many Life cells in each COG.
    c) Requires decent communication between all those COGs and Props as a two dimensional grid.
    d) easy to display the resuly on a video Prop somewhere.
  • K2K2 Posts: 693
    edited 2010-08-28 11:53
    How may Props call the Towering Inferno home? What sort of power supply keeps them warm and clocking?
  • jazzedjazzed Posts: 11,803
    edited 2010-08-28 12:30
    >> What sort of power supply keeps them warm and clocking?

    250px-Watts_Bar_Nuclear_Power_Plant.jpg

    :smilewinkgrin:

    A Life Cell or more per COG is interesting. Getting them all running collaboratively with a central video display would be *very* interesting. Of course, that's probably beyond the scope of the project.
  • LeonLeon Posts: 7,620
    edited 2010-08-28 13:28
    Computing the Mandelbrot set can be parallelised very easily, it was one of the standard demos for large transputer systems 24 years ago. Ray-tracing was also very popular.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-28 18:44
    K2 wrote: How may Props call the Towering Inferno home? What sort of power supply keeps them warm and clocking?
    K2, thanks for your interest in the 40 Propeller-Chip Computing Machine. The hot fires within have a total of 40 prop chips. This gives 320 total cogs to work with. The power supply is a massive Chinese surplus unit that runs off 220/240 volts. Check out the link for more information.
    Humanoido wrote: I am stoking up the fires of the 40 Propeller-Chip Computing Machine and need many small programs for demonstration. Small because theoretically up to 1024 can run in one cog. http://forums.parallax.com/showthread.php?t=123828
    Humanoido
  • K2K2 Posts: 693
    edited 2010-08-28 19:14
    Wow, it's the Taipei101 of computing! Even looks like it, a bit.

    Props get hot running all cogs full-tilt. Vertical orientation of chips and boards greatly facilitates free-convection.

    As Leon suggested, creating Mandelbrot images is a great use for a bunch of cogs, until they become communications-bound. To display the results, though, you'd have to use something like a PC as a frame-grabber. If you could swing that, you could have wonderful - and zippy - adventures through the Mandelbrot set.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-28 21:11
    K2 wrote: »
    Wow, it's the Taipei101 of computing! Even looks like it, a bit.

    Ironically, I do a lot of my work living just down the street from Taipei 101 in Taiwan. The skyscraper is so tall, the top portion is in the clouds lots of times and obscured. Maybe this influenced the Prop machine design. I know that circulating wind around a skyscraper forms an accumulating vortex, thus enhancing circulation.
    K2 wrote: »
    Props get hot running all cogs full-tilt. Vertical orientation of chips and boards greatly facilitates free-convection.
    They get hot and I have developed some cooling methods, but the most simple is to simply put a fan next to the tower. The air flows smoothly and rapidly around the top and bottom of all boards. Since the unit makes a good apartment heater, an air conditioner is a good supplement. I'm experimenting with alternate ways of cooling and supercooling and exploring overclocking with voltage variance.
    K2 wrote: »
    As Leon suggested, creating Mandelbrot images is a great use for a bunch of cogs, until they become communications-bound. To display the results, though, you'd have to use something like a PC as a frame-grabber. If you could swing that, you could have wonderful - and zippy - adventures through the Mandelbrot set.
    This is very good, and Leon has many good ideas for parallel processing. There is a kind of PC frame grabber already in place on the 40-prop computing machine. I run a virtual keyboard and monitor and have capability to save various states. It's a very cool thing, and saves some power over running more hardware.

    Experiment 101
    For now, in this experiment, I'm looking for tiny simple programs that are unique. They do some tiny task and leave their neighbors alone. Since I will need hundreds of these tiny cog programs, and don't have the time to write every one, I have asked Forum members to help out. My hope is someone will have some simple short little code saved somewhere, or know where to find some programs that are simple short and little. The code only needs to run independent in one cog. My guess is no one has written a tiny clock before..

    Humanoido
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-29 18:05
    There are few tiny programs that can be adapted but certainly not many. The ones on the OBEX are mostly memory and resource hogs and the majority of code calls multiple objects that are just not applicable to the goal of having a tiny program running in one cog. Or did I miss something?

    Humanoido
  • jazzedjazzed Posts: 11,803
    edited 2010-08-29 19:11
    Most propeller users seem to focus on games, robots, controls, monitors, and such.

    What do you think tiny programs should do?
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-29 21:57
    jazzed wrote: »
    Most propeller users seem to focus on games, robots, controls, monitors, and such. What do you think suppose programs should do?
    Hi Jazzed, some of the things I originally mentioned ended up being too big, like full size keyboard and tv. Does this Spin list make any sense?

    Things
    • Tiny real time clock
    • Tiny keyboard 2x2 = 4-key matrix
    • Ultra tiny 1-pin oscilloscope
    • Simple function generator
    • Beeper made with a piezo speaker
    • Record 1-word from mic (2 seconds)
    • Tiny Word Processor (1-page)
    • Tiny Tune
    • IR Remote
    • Thermometer
    Simple Math
    • Calculate whole cubes, such as 1x1x1=1, 2x2x2=8, 3x3x3=27...
    • Calculate hypercube combinations
    • Calculate remaining real time memory in a cog
    • Return the real time counter number
    • Small base conversion dec/binary
    • Almost Endlessly calculate Pi until too big
    Limited Utilities
    • Tiny driver for serial LCD
    • Read cog memory
    • Write/read eeprom
    • Show all pins status high/low
    • Determine clock speed
    • Random number generator
    • Display Cog stats
    • Cycle display ASCII characters
    Tiny Games
    http://www.atariarchives.org/basicgames/
    http://www.atariarchives.org/basicgames/showpage.php?page=57
    http://www.atariarchives.org/basicgames/showpage.php?page=101
    http://www.atariarchives.org/basicgames/showpage.php?page=171
    http://www.atariarchives.org/basicgames/showpage.php?page=40
    http://www.atariarchives.org/basicgames/showpage.php?page=167
    • Game of Life
    • Tiny AI
    • Tiny Pong
    • Dice
    • Tic tac toe
    • Checkers
    • 3D Plot
    Benchmarks
    • Time counting from 1 to n
    • Time to display ascii hello n times
    • Time for a small but popular benchmark
    Demo
    • Hello World
    • Clever little display demo
    Language
    • Tiny BASIC in one cog
    • Call some simple PASM program
    • Other tiny languages in one cog
  • RinksCustomsRinksCustoms Posts: 531
    edited 2010-08-30 09:10
    While i'm not rying to thwart your efforts with this and if you can get it to work in unisonit would be pretty cool concept. I think for such a machine though the time spent in making it as well as the money spent in parts will be largely fruitless unless a clever way to divide up massive ammounts of calculation data, or data to be proccessed. It would be cool to see a similar to Ubuntu 10.4 run on this with multiple cogs devoted solely to the task of video generation. The achillies heel of this concept is two fold, parallel software specifically written to disect large data proccessing into small chunks for each cog involved to proccess its own chunk, the second part of this achillies heel is the data bus and its architecture.

    For example, a 32 bit system bus with 16 2 to 1 mux/buffers and system addressing so that when DDR is used, you could theoretically load a single long into each cog in about 26 clocks by OR'ing upper/lower 16bit of each long on the bus through 16 pins on each prop conneced through the mux. Something like:
    dat
    example only! i dont know exact & complete PASM example for this.
    ...
            repeat 10                         'shift in 10 longs 2 bytes at a time
              repeat 2
    {4clk}        mov   data[x], ina[D15..D0] 'upper 16 bits into data[x]
    {4clk}        shl   data[x], 16           'shift data[x] left 16 bits
    {4clk}        mov   outa[mux_sw], %1      'switch the external mux to lower half of 32 bit bus
    {4clk}        or    data[x], ina[D15..D0] 'OR lower 16 bits of 32 bit bus into data[x]
              ++data[x]                       'increment data[x] array
    ...
    
    So in something like 20-26 clocks you can load/send a long using an external 2 to 1 line mux and a 32bit bus. Say it took 26 clocks to load 1 long, 128 longs per cog x 4 cogs prop = 166.4uS to load/send 512 longs per prop. 166.4uS = 6.01KHz bus freq to load one prop with 2KB of data to proccess. Using the same 32 bit bus with one 32 bit data buffer/latch and 2 octal 2 to 1 muxes per propeller -where each prop uses 16 I/O for data lines-, you can then implement the DDR technique on the 32 bit bus, interleave loading 2 cogs (1 ea per prop, per bus clock). The QDR technique need only 1 additional clock line attatched to all propeller's C & D (ie, 10 ea. Prop computing group A,B,C,D) and can use the same 32 bit bus, the drawback here lies within the increased addressing logic complexity and bus bandwidth frequency (since the data lines change @ 4x the clock 1 freq in a QDR setup).
    Again, your bandwidth is limited to two things in either a DDR/QDR bus system, I/O's and pin + stray capacitances which limit speed on the data lines.

    In any case, it would be cool to see the full potential of 320 cogs parallel proccessing anything. But forgive me for being skeptical about this tower working as intended. I am very curious about the final bus architecture..
  • K2K2 Posts: 693
    edited 2010-08-30 10:13
    "For which of you, intending to build a tower, sitteth not down first, and counteth the I/O, whether he have sufficient to finish it?"

    (With apologies to the Big Guy.)
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-30 18:15
    RinksCustoms wrote: In any case, it would be cool to see the full potential of 320 cogs parallel proccessing.. I am very curious about the final bus architecture..
    Hi RinksCustoms! Hey, lots of good (and very technical) ideas in your post for the prop tower. Thanks! You've given me some good ideas about Ubuntu or similar.

    320 cogs can go a long way and maybe the "full potential" will not be realized in my lifetime - as the machine could serve a lot of purposes to a lot of people. My ambitions may be much more simple. It is currently working as intended for learning, and developing various parallel algorithms. You know it was recycled from at least 14 Propeller projects before it - this may be recycled too, for a larger project.

    The final bus? It may not have a "final" bus. The idea here is a learning experience of trying out different hardware and learning from those choices. I have noted some of the connections in these large machines may take considerable work to implement, even over a lifetime, as in the case when the wires multiply by connection from processor to processor in higher ordered Hypercubes. My projects are considerably shorter, and simpler.

    So are you working on any tiny short simple sweet spin programs for the cause? :)

    Humanoido
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-30 18:26
    K2 wrote: »
    "For which of you, intending to build a tower, sitteth not down first, and counteth the I/O, whether he have sufficient to finish it?" (With apologies to the Big Guy.)
    ROTFLOL!!! I agree with the big guy, that if you take on a project of great magnitude, you'll need some quiet time to design it, put it all together and operate it.. You want to volunteer a tiny program? I only need 10,000 people to volunteer one tiny program, or one person with 10,000 programs. :)

    Humanoido
  • potatoheadpotatohead Posts: 10,261
    edited 2010-08-30 18:42
    Or perhaps a few thousand instances of a few tiny programs.

    One thing I thought of is sound. It's not to difficult to wire all the props up to a common set of sound outputs.

    Maybe perform some classical music?

    Use the Sidcog a whole bunch of times.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-30 19:36
    potatohead wrote: »
    Or perhaps a few thousand instances of a few tiny programs. One thing I thought of is sound. It's not to difficult to wire all the props up to a common set of sound outputs. Maybe perform some classical music? Use the Sidcog a whole bunch of times.
    The HIVE project has blogged a singular instance of a Sidcog emulating some Commodore 64 sounds.

    http://translate.google.com/translate?hl=en&sl=de&u=http://hive-project.de/content/1759&ei=kmV8TNyCL4SovQONzeHBAg&sa=X&oi=translate&ct=result&resnum=8&ved=0CD8Q7gEwBw&prev=/search%3Fq%3Dsidcog%26hl%3Den

    The BASIC Stamp Supercomputer has an app for creating a Jacob's Ladder of sound, with a peizo speaker on each processor board. This could create ten part sound in real time.

    http://forums.parallax.com/showthread.php?t=116129&highlight=handbook+basic+stamp+supercomputing

    This project would be amazing on the Propeller chip, synthesizing an entire orchestra. You could have 320 instruments simultaneously playing and output through the headphone jack to an amp. Or.. I wonder what that would sound like with 320 peizo speakers? :)

    Actually, I was just asking for some simple short peizo speaker code in spin.

    Humanoido

    EDIT: If I recall, there's an app for the prop to beep and no need for a peizo speaker.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2010-08-31 09:16
    Humanoido wrote: »
    EDIT: If I recall, there's an app for the prop to beep and no need for a peizo speaker.

    Theres objects that do PWM in NCO mode for note playing giving more depth than just beeping, cant recall if they're in the obex or the hydra cd, hmm...

    But to answer your earlier querry, i cant think of a usefull object that i could write to benifit your cause.. i'm focused right now on car security system based on RFID. And i beleive the bus architecture will singl handedly determine how fast this tower can actually compute, its the spinal cord of your computer.
Sign In or Register to comment.