Pico Cray – Small scale distributed computing.
The Pico Cray is a cluster of 8 Picos and a controller Pico. All Picos are related in parallel by an I2C bus. The controller is designated by one GPIO being held low, the processor Pico’s addresses are allotted robotically. The Controller Pico has a 320x240px show related by SPI and a few buttons. As the entire Picos run the identical software program updating the cluster is straightforward.
At present the cluster is programmed to run a Mandelbrot program. With every processor Pico calculating 120 factors earlier than returning them to the Controller.
The case of the cluster is constructed to imitate a traditional Cray1 Supercomputer. Together with a padded seating space and the controller housed in a console desk (though to not scale with the cluster)
Constructing the case.
The case was made type a mixture of clear and purple/black acrylic to imitate the unique Cray1 design. To comply with with this type the seating across the central column was padded with foam.
To maintain every little thing collectively, every acrylic piece was tabbed, and the underside ring was additionally held collectively by being glued to a cardboard ring, this meant that I solely wanted 3 fingers, out of the accessible 2, to attempt to get all of it to affix while the glue dried.
The console was manufactured in the identical manner, items of black and purple acrylic with tabbed had been glues collectively to carry the show, a row of buttons and the controller Pico.
PCB
The PCB for the Processors is constructed to carry the 8 Pico PCB’s in an octagon, In such a manner that the entire Pico’s could be powered by the USB connector. The I2C bus and the “assert” line is prolonged across the Pico’s with various daughter PCB’s soldered collectively at a jaunty angle.
The Base PCB is definitely an 8 port hub, however as a result of points with Linus/Home windows and the Pico’s USB connection, it was discovered unworkable to make use of the hub for programming.
Mandelbrot
The check program for the distributed pc makes use of the Mandelbrot fractal for its check. This was chosen as its well-known, straightforward to implement and provides a recognisable output. Additionally by its cartesian coordinate construction and as every level is stateless, very straightforward to separate into various discrete calculations. At present 120 factors are calculated by every processor at a time in what Ive known as “A Lump”]
Software program
Testing the software program was performed with a strip of vero standing in for the PCB, this enabled fast reprogramming and the power to see the USB serial on three processors and the controller abruptly.
You can too see the termination resistors on one Pico, these had been later modified to 2x 4K at every finish of the I2C bus.
The Picos within the cluster are known as Processors and Controller. The Controller is designated by GPIO22 being pulled low.
On turning on a Processor, it is going to wait a random period of time, and if the assert line isn’t already excessive, it is going to set assert excessive, and pay attention on 0x17 on the I2C bus. If the assert line is already excessive, the processor will wait a random period of time
The Controller will see the assert bus excessive and know {that a} processor is ready to be added, It can ship a free I2C tackle to that processor. (not one of the others are listening)
On Receiving the I2C tackle the Processor will change its I2C tackle to the one given, set its state to READY and relinquish the Assert line.
As soon as there’s a minimum of one Processor within the READY the controller will ship a activity, at present that is an XY coordinate and a step worth ( 3 doubles) for the Mandelbrot calculation. The Lump dimension is at present compiled in as 120 calculations. A observe of which processor and which X & Y coordinate it was despatched can also be saved. The Controller finishes by setting the processors BUSY flag.
The Processor will proceed allocating duties till there aren’t any free Processors.
When the Processor has accomplished its activity, it units its DONE flag.
The Controller continues to scan every processor for its standing, If it sees a DONE flag it is going to obtain the outcomes, at present 120 unsigned chars representing the iterations of the Mandelbrot calculation.
A palette is utilized to those values with a glance up desk to present a full 16 bits of color that’s then despatched to the show as half a line (a full line is 240 pixels)
Detailed Software program data could be discovered at
https://github.com/ExtremeElectronics/PicoCray