At Last! Faster OpenSCAD Rendering Is On The Horizon

Known as “The Programmers Solid 3D CAD Modeller”, OpenSCAD is used by many people for whom writing code comes more naturally than learning a fiddly user interface. It’s a very capable piece of software, but regular users will tell you that it can be rather slow when it comes to rendering your work. We’re very pleased to see that a fix for this has been produced courtesy of [@ochafik], can now be found as an experimental feature in nightly builds, and will in due course no doubt find its way to official releases.

Despite a modern computer invariably having a multi-core architecture, it might surprise you to find that OpenSCAD wasn’t able to take advantage of this previously. The above-linked thread spans over a decade of experimenting and contains some fascinating discussions if you’re prepared to wade through it, and culminates a few weeks ago in the announcement of the new feature giving access to multiple CPUs. We don’t have it yet, but it’s great to know it’s in the works and we’re looking forward to render time involving considerably less of a wait.

So many OpenSCAD projects have passed through these pages over the years, it’s safe to say that it has a significant user base among Hackaday readers. It’s still something an AI hasn’t mastered yet though.

Thanks [pca006132] for the tip.

Fork And Run: The Definitive Guide To Getting Started With Multiprocessing

Since the early 2000s, the CPU industry has shifted from raw clock speed to core counts. Pat Gelsinger famously took the stage in 2002 and gave the talk the industry needed, stating processors needed specialty silicon or multiple cores to reduce power requirements and spread heat. A few years later, the Core series was introduced with two or four-core configurations to compete with the AMD Athlon 64 x2.

Nowadays, we’re seeing heterogeneous chip designs with big and little cores, chiplets, and other crazy fabrication techniques that are fundamentally the same concept: spread the thermal load across multiple pieces of silicon. This writer is willing to put good money into betting that you’ll see consumer desktop machines with 32 physical cores in less than five years. It might be hard to believe, but a 2013 Intel Haswell i7 came with just four cores compared to the twenty you’ll get in an i7 today. Even an ESP32 has two cores with support in FreeRTOS for pinning tasks to different cores. With so many cores, how to even write software for that? What’s the difference between processes and threads? How does this all work in straight vanilla C98?

Continue reading “Fork And Run: The Definitive Guide To Getting Started With Multiprocessing”

Parallax Update Hack Chat

Join us on Wednesday, August 28th at noon Pacific for the Parallax Update Hack Chat with Chip and Ken Gracey!

For a lot of us, our first exposure to the world of microcontrollers was through the offerings of Parallax, Inc. Perhaps you were interested in doing something small and light, and hoping to leverage your programming skills from an IBM-PC or an Apple ][, you chanced upon the magic of the BASIC Stamp. Or maybe you had a teacher who built a robotics class around a Boe-Bot, or you joined a FIRST Robotics team that used some Parallax sensors.

Whatever your relationship with Parallax products is, there’s no doubting that they were at the forefront of the hobbyist microcontroller revolution. Nor can you doubt that Parallax is about a lot more than BASIC Stamps these days. Its popular multicore Propeller chip has been gaining a passionate following since its 2006 introduction and has found its way into tons of projects, many of which we’ve featured on Hackaday. And now, its long-awaited successor, the Propeller 2, is almost ready to hit the market.

The Gracey brothers have been the men behind Parallax from the beginning, with Chip designing all the products and Ken running the business. They’ll be joining us on the Hack Chat to catch us up on everything new at Parallax, and to give us the lowdown on the P2. Be sure to stop be with your Parallax questions, or just to say hi.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, August 28 at 12:00 PM Pacific time. If time zones have got you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

1000 CPUs On A Chip

Often, CPUs that work together operate on SIMD (Single Instruction Multiple Data) or MISD (Multiple Instruction Single Data), part of Flynn’s taxonomy. For example, your video card probably has the ability to apply a single operation (an instruction) to lots of pixels simultaneously (multiple data). Researchers at the University of California–Davis recently constructed a single chip with 1,000 independently programmable processors onboard. The device is energy efficient and can compute up to 1.78 trillion instructions per second.

The KiloCore chip (not to be confused with the 2006 Rapport chip of the same name) has 621 million transistors and uses special techniques to be energy efficient, an important design feature when dealing with so many CPUs. Each processor operates at 1.78 GHz or less and can shut itself down when not needed. The team reports that even when computing 115 billion instructions per second, the device only consumes about 700 milliwatts.

Unlike some multicore designs that use a shared memory area to communicate between processors, the KiloCore allows processors to directly communicate. If you are just a diehard Arduino user, maybe you could scale up this design. Or, if you want to make use of the unused power in your video card under Linux, you can always try to bring KGPU up to date.

Hackaday 10th Anniversary: Jon McPhalen And The Propeller

[Jon] came out to our 10th anniversary mini-con to talk about the Propeller, and judging from his short introduction, his hacker cred is through the roof. He has a page on IMDb, and his first computer was a COSMAC. Around 1993, he heard of a small company introducing the BASIC Stamp, and like us with most new technology was incredulous this device could perform as advertised. He tried it, though, and for a few years after that, he was programming the BASIC Stamp every single day.

Having a lot of blinky light project under his belt, [Jon] was always struggling with interrupts, figuring out a way to blink an LED exactly when he wanted it to blink. A lot has changed over at Parallax since 1993, and now they’re spending time with the Propeller, an 8-core microcontroller where interrupts are a thing of the past. He showed off a huge, 10-foot tall bear from League of Legends, all controlled with a single Propeller, using 1000 LEDs to look like fire and flames.

[Jon] shared the architecture of the Propeller, and the inside of this tiny plastic-encapsulated piece of silicon is wild; it’s eight 32-bit microcontrollers, all sharing some ROM and RAM, controlled by something called a Cog that gives each micro access to the address, data, and IO pins.

When the Propeller was first released, there were a few questions of how the chip would be programmed. C isn’t great for multicore work, so Parallax came up with a language called Spin. It’s written for multicore microcontrollers, and from [Jon]’s little session in demo hell, it’s not that much harder to pick up than Python. Remember that hour or two where you learned the syntax of Python? Yeah, learning Spin isn’t a huge time investment.

Even though you can program the Propeller in C and C++, there’s a reason for Spin being the official language of the Propeller. It isn’t even that hard, and if you want to dip your toes in multicore microcontroller programming, the Propeller is the way to do it. It’s an open source chip as well so you can give it a try with an FPGA board.

16 Core Computer Made Of ATMegas

Your desktop has two, four, or even eight cores, but when’s the last time you’ve seen a multicore homebrew computer? [Jack] did just that, constructing the DUO Mega, a 16 core computer out of a handful of ATMega microcontrollers.

From [Jack]’s description, there are 15 ‘worker’ cores, each with their own 16MHz crystal and connection to an 8-bit data bus. When the machine is turned on, the  single ‘manager’ core – also an ATMega328 – polls all the workers and loads a program written in a custom bytecode onto each core. The cores themselves have access to a shared pool of RAM (32k), a bit of Flash, a VGA out port, and an Ethernet controller attached to the the master core.

Since [Jack]’s DUO Mega computer has multiple cores, it excels at multitasking. In the video below, you can see the computer moving between a calculator app, a weird Tetris-like game, and a notepad app. The 16 cores in the DUO Mega also makes difficult calculations a lot faster; he can generate Mandelbrot patterns faster than any 8-bit microcontroller can alone, and also generates prime numbers at a good click.

Continue reading “16 Core Computer Made Of ATMegas”