The good news: there are short and long-term actions you and your hardware and software teams can take to help mitigate the ongoing effects of the global semiconductor (chip) shortage.
The bad news: the semiconductor shortage won’t be over by the end of 2021.
As Pat Gelsinger, CEO of Intel, recently explained:
“[While] the industry has taken steps to address near term constraints it could still take a couple of years for the ecosystem to address shortages of foundry capacity, substrates and components.”
Our blog post looks at how the chip shortage started and what you can do to lessen its impact on your business.
How did we end up with a semiconductor shortage?
If you’re wondering just how this shortage came about, the truth is there isn’t any single cause.
Semiconductors are a critical component in building electronic components, and demand is currently bigger than the supply available. For example, microcontrollers use semiconductors, and microcontrollers are at the heart of embedded systems (from washing machines to cars).
The current shortage has had and continues to have a massive impact across numerous sectors, and it’s happening because of several events.
The COVID-19 pandemic
At first, some factories paused production due to stay-at-home orders in their respective countries. Once open again, a surge in demand for laptops and other technology that enabled working from home, along with domestic appliances, saw semiconductor plants jump to meet pressure from consumer appliance and device manufacturers. At the same time, it was difficult for them to change to meet this production demand quickly.
Meanwhile, manufacturers such as automotive companies had switched production plans due to the pandemic, anticipating a drop in orders. What they weren’t expecting was how quickly sales would bounce back in the last quarter of 2020. But when they went to put semiconductor orders in to meet demand, they found that:
“[Chipmakers] already had a significant backlog of orders from other companies.”
Source: Global X Team
The lingering aftereffects of geopolitical tensions
During 2019, the US-China trade war led to extreme uncertainty for Chinese tech firms that worried they might lose access to chips made with US technology (along with other components). In anticipation of this, Chinese technology companies stockpiled chips.
In the case of Huawei, apparently, they sought to accumulate a year’s worth of components. In theory, this was to buy the company time as they shifted their supply chain to handle the effect of a worst-case scenario from the trade war.
Foundries to manufacture semiconductors are in short supply as well
There aren’t many semiconductor fabrication plants (“fab” or foundry as the industry often calls these factories), which is a big part of the problem.
It’s worth noting that globally, semiconductor production happens mainly in East Asia, with two-thirds of production happening there. While the US is responsible for 47% of semiconductor sales due to being home to the world’s leading chip designers, it only accounted for 11% of production in 2019.
Most chip designers don’t have their own fabrication plants and instead rely on outsourcing production to plants in other countries. These are “fabless” chip designers.
Increasing the number of plants globally is no easy matter either. It’s expensive and takes time. As explained by McKinsey:
“It takes about 12 to 24 months to build a shell of a fab and install the required tools, plus another 12 to 18 months to ramp up to full capacity.”
Governments are looking to help support the industry to address the lack of fab sites, but again, any help will still take time to have an effect.
Recent natural disasters and fires have affected key manufacturing sites
If not having enough plants globally to meet supply wasn’t enough, in the past year, plants from the US and East Asia have faced a host of disasters:
- The blizzards in Texas over February 2021 shutdown production at plants owned by Samsung, NXP and others.
- A fire stopped production at a Renesas factory in Ibaraki Prefecture, Japan, but production will hopefully return to capacity in July.
- An ongoing drought in Taiwan is also at risk of threatening the production capabilities of plants located there.
Here’s what can you do in the meantime to combat the effects of the semiconductor shortage.
Short-term action: Switch to a different microcontroller and migrate device software
There are other microcontrollers out there beyond the ones your products are currently using. We’re talking about microcontrollers that are a part of the same family, from the same manufacturer, and potentially have wider availability. These might have a bit more memory and so on and initially wouldn’t have been considered by your hardware experts because of cost.
Migrating to a different microcontroller means a series of steps that look like this:
- Hardware and software experts find a viable microcontroller alternative.
- Hardware experts check that the microcontroller is “pin compatible” with your existing PCBs (some redesign may be necessary).
- The software engineering team migrate the code to the new controller choice.
- Software testers complete “regression testing” of the software on the new controller to ensure that all features are working as intended.
- The software engineering team fixes any issues detected during regression testing.
- Further testing ensures the software is now working as intended (fixes and more testing as needed).
- Software is signed off and ready for release on the product.
But again, this is a short-term fix.
The speed and effectiveness of migrating to a different microcontroller will depend on your device software’s overall portability.
(Note that if you do switch to a different chip, more work will need to be done to migrate “low-level code” than other elements of software, with some code possibly needing to be rewritten, however, investing in the steps in the next section will help with this.)
Long-term actions: Ensure your software has a high level of portability
Enhancing device code portability means investing in software quality and enabling technical practices that ensure high-quality, portable code that’s ready to move when component shortages happen.
Make your code portable: Invest in “conceptual integrity”
In our Lean-Agile series, we looked at software quality and the importance of conceptual integrity. Conceptual integrity asks you to look beyond the surface level or “perceived integrity” of software (the things users experience). With conceptual integrity, the focus is on the level of code that software engineers and testers experience.
The dichotomy here looks like this:
Investing in conceptual integrity means that code is:
- Habitable—easy to work with.
- Maintainable—easy to update and fix.
- Scalable—easy to add new features to and evolve the product.
If you’d like to understand the interplay between software quality, perceived and conceptual integrity, do check out our in-depth blog on software quality.
Make your code portable: Switch to using Test-Driven Development
Test-Driven Development (TDD) is a test-first approach to software development. Here, “unit tests” are written before code and then developers write code to pass these tests. Either software engineers or testers can write unit tests, but at Bluefruit, we have our software developers write unit tests.
How does Test-Driven Development help with portability? TDD:
- Ensures that engineers are writing code that meets the actual requirements of the project.
- Means that all code used is required, helping the software be “cleaner” and more efficient.
- Guarantees code is well structured and cohesive due to the thought process involved in writing unit tests while enabling focused testing.
- Cuts down on time spent bug hunting because it’s easy to trace bugs back to the code it came from.
- Makes it easier to bring in developers onto an existing project, reducing the time spent getting them up to speed with the codebase.
- Reduces by 40% to 90% the overall occurrence of defects in code, compared to projects not using TDD.
TDD reduces the risk of software migrations. Having all the above means that software teams can easily check to see where it’s working and handle any issues that appear when migrating to a different microcontroller.
And while there is an upfront investment in project time involved with TDD, Bluefruit Software and all our clients find that the above benefits outweigh those costs in the long-term because it leads to less waste and higher-quality, portable software.
Make your code portable: Use automated testing to speed up testing
Test automation for embedded systems means that you can reduce the time spent testing software and hardware.
Practices like Behaviour-Driven Development (BDD) see software features tied to human-readable specifications. In automated testing, you can use “BDD feature files” to test software and hardware through automated test rigs to ensure both software and hardware work as intended.
In doing this, your software testers can more efficiently work through product testing to ensure that a software migration works as intended and free up software testers to do more vital exploratory and usability testing that’s impractical to automate.
Commit to quality and ensure you have portable embedded software
We hope that despite the long-term nature of the semiconductor shortage, you can see a way to mitigate many of its effects and improve your product’s resilience to events like this.
Bluefruit Software’s engineers are available to talk over any software needs you may have regarding the shortage and make your software more portable.
Did you know that we have a monthly newsletter?
If you’d like insights into software development, Lean-Agile practices, advances in technology and more to your inbox once a month—sign up today!Find out more