• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Blogs
  2. Breakfast Bytes
  3. Open-Source Silicon
Paul McLellan
Paul McLellan

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
security
open source silicon
root of trust
bunnie huang
open source hardware
open source
Breakfast Bytes

Open-Source Silicon

25 May 2017 • 12 minute read

 breakfast bytes logo
the hardware hackerAt the RISC-V workshop in Shanghai, the keynote on the second day was by Bunnie Huang. His new book, The Hardware Hacker: Adventures in Making and Breaking Hardware, has just been published. There is more about him on his Wikipedia page.

Everyone knows about open software. Bunnie is the expert on open hardware. But he is also getting into open silicon, which he maintains is coming faster than anyone expects and will be a paradigm shift for the open hardware community.

The Novena Laptop

He is also the guy behind the Novena open-source laptop. This is a laptop where every component can be modified by the user. It is completely designed for people who really care about the fact that they can inspect the internals of everything, read any source code. It has some odd features like two Ethernet ports, onboard FPGA, and a separate video interface card so you can pick what you want to use.

The obvious choice for the processor would be an Intel x86, but they can accept firmware updates that cannot be inspected by the user. Instead, it is based on a Freescale ARM processor that doesn't contain any updatable code. All the peripherals such as WiFi and disk drives were selected because the firmware was accessible to the user. More details on how the hardware and software was selected are in an IEEE Spectrum article on the Novena, A Laptop With No Secrets.

novena laptop

The whole thing was crowdsourced (see the picture above). Bunnie said he never intended to create a company, it was more a proof of concept. But it did prove that there is a market for people who will pay $2K for a medium-performance laptop with weird specs provided it is completely open.

What Is Open Hardware?

When Bunnie says it was "open hardware", he means that they shared the 3D designs for injection moulding, the circuit boards, editable version of the schematic. Open hardware means that anyone can use the plans and compete with you as a supplier.

But there are a number of problems. Some people don't consider hardware open if it uses a component only available from a single source. He had an "open hardware" board for GPS that had dozens of components, a publicly available schematic, but basically in the center is a chip that implements the GPS. Of course that chip, like most chips, is not open at all.

But there is a another problem more closely related to the EDA industry. Since there is an almost cult-like commitment to openness, the purists don't consider hardware to be open unless it can be completely designed on open-source software. "So if I give you a file that requires a $100,000 Cadence tool or even a $5,000 Altium tool, that is not truly open."

Open Silicon

Bunnie says that open silicon is a massive paradigm shift for open hardware. Silicon is inherently less open to inspection, and, of course, you can't just decide to swap out the DDR interface you don't like for one you do, in the way you can with software or, with a bit more difficulty, open hardware at the PCB level.

30 monthsThe thing that Bunnie maintains is changing things is the slowdown of Moore's Law. He actually means Dennard scaling, since he is most interested in the fact that single-thread performance of a microprocessor has been flat for 10 years. This means two things. One is that you can design in an old process and still get the same performance as a leading-edge process. Secondly, the dynamic where "you design a project and by the time you are finished you might as well throw it away because a faster one has already come along." This has been a big problem for making architectural improvements because, basically, "why bother. But now you have more time to refine your ideas without a 99¢ solution coming along and blowing you out of the water." For example, the Novena laptop took three years to design and get into production, but in the meantime, processors hadn't really got any faster so it wasn't obsolete like a similar project would have been if started in, say, 2000.

The result of this is that you can take a lot longer to develop a project on silicon and don't need to use a leading-edge process for most things. You will still end up with something state of the art. Well, of course, that assumes you don't want a design that uses all the gates that only come with more advanced nodes.

open source siliconBunnie clearly knows quite a lot about semiconductor design. He points out that most of the open-hardware people and all of the open-software people haven't a clue. At one end, they have no idea what is in a chip and might be shocked if they knew about things like pre-boot microcode. They might have heard of a foundry and but have no idea what a PDK is. Does "open silicon" mean you have to have open PDKs (good luck with that)? When only open-source tools are allowed, what about the code that runs in the stepper?

That last one is amusing since I can't think of any way that the code in the stepper could affect the functionality of the die being printed. Well, apart from the most likely effect of trying to change that code, namely that the stepper kills every die which is what a mathematician might call a trivial case of affecting the functionality. But, as Bunnie says, at a Linux conference, people know so little about these sorts of things that "their heads will explode when they find out."

How Do You Know Your IP Is Good?

Another claim to fame for Bunnie was when he discovered a $12 fully-functional "Gongkai" cellphone in Shenzhen. He dug into how this could be possible, and discovered an underground of exchanged datasheets, grey markets in components and so on. He wrote this up in Why It's Sometimes Easier to Innovate in China Than in the US, which I remember reading when it came out a couple of years ago. In the US, where you have to do things legally, you won't get a full datasheet from a chip supplier without signing an NDA and it could take weeks to get samples. Meanwhile, in southern China they can design and manufacture small volumes of something like a cellphone in 28 days, perhaps the turnround to getting that NDA in place. Of course, this is also partially because the suppliers are geared up to larger customers and don't really have any interest in dealing with customers who only want to build a few thousand devices. But Bunnie has seen how effective it is when anyone can get their hands on the data that they need (technically illegally, of course), and get the components, and just build whatever they want. He calls this the "dark IP network in China, the grey zone between the chip industry and what we need to get work done."

Having seen what is a potential better future than the world of NDAs and attention-limited salespeople, he has seen a future. How would something similar work for semiconductor designs and IP?

A good first question is, why you would care? But people do. It is a minority market and they really care about it deeply. They hate the fact that as you work your way to the stack in a typical laptop, you start with very open stuff like network protocols, and you are fine down to the BIOS, but right at the bottom is the root of trust to the Intel CPU that is still closed. The vendors don't want to share that information. Actually, if I understand it properly, the vendors can't share that information and still have the root of trust security stack work. If you tell everyone the secret keys so that they can check that they are correctly implemented in the silicon, one thing they cease to be is secret.

There are genuine worries at certain levels about whether things like the Intel management engine is secure. It is a bit clickbaity, but you can find stories that it is an NSA backdoor, or that three-letter agencies have forced Intel to put backdoors in their server chips. Before you dismiss it out of hand, I saw Wally Rhines, the CEO of Mentor, give a keynote at DVCon a year or two ago when he was discussing how we are so focused on checking that a chip does what it is meant to that we don't have time to check that it doesn't do things that it is not meant to. When he met with senior people in security agencies and asked them if they were worried about some enemy inserting Trojan code in IP blocks or chips, they just laughed. Wally took this to mean that they assumed the enemies were doing that since they were doing it themselves.

Bunnie didn't mention it, but if you have enough software background to read a little C, and you want to scare yourself as to how hard it is to be certain that code does what you want, then read Ken Thompson's acceptance speech for the Turing award Reflections on Trusting Trust. In the EDA world, the equivalent would be to recognize the RTL from, say, a processor and add extra gates. Note that the source RTL would still be perfect. Of course, the synthesis tool would contain code to insert the Trojan, but Thompson's speech shows how to get the code in there without it even appearing in the source. This is really hard stuff.

limits of transparency in siliconBunnie actually did an experiment to try and build a small 8- or 16-bit processor only using open-source tools and IP, then fab it in MOSIS at 0.18um or 0.35um. There would be a totally inspectable trust root using a scanning electron microscope (SEM). Actually, I think he was assuming that he could see the blown fuses in an OTP but regularly anti-fuse is used (which damages the gate oxide), which is immune to visual inspection. The project foundered on the fact that there is no open-source flash memory IP, which rather defeats the idea of trust when you can't even check the code is correctly stored.

How Do You Check an IP-Based SoC?

Software is not at all like hardware in terms of the development barriers. A new process, and the information about it captured in the PDK, are measured in billions of dollars for leading-edge process nodes. IP licenses are very lucrative, with license fees in the hundreds of thousands and significant royalties for successful designs. The software guys don't understand how it can work so well in their world but be impossible in the semiconductor world.

Ideas that Bunnie has come up with, that taken together he thinks could allow someone to verify a chip design has not been compromised:

  • Set up triggers on buses and other interfaces to trap certain transactions
  • Use BIST to monitor IP blocks such as memories
  • Full mask inspection is impossible due to encrypted PDKs, maybe you can do on metal2 or metal3 up, where there is less secret sauce and it doesn't reveal details of the standard cell libraries

Conclusion

I don't see that this is viable. Semiconductor manufacturing is inherently a mass-production process and so it is not possible to design and manufacture special chips with all the extra circuitry for the open-source silicon people. It seems unlikely that the mainline chips would be built this way. It might be possible in something like 0.18um since there is a lot less on the chip. But using an SEM to inspect a modern chip is a non-starter, not because of resolution, but the visual field is so small a part of the chip. I have heard looking for defects in a modern chip described as like "looking for all the golf balls in California."

A modern chip is so complex and the IP comes from such a diverse array of sources, that I don't think it is possible to be absolutely certain that the design has not been compromised in any way, when you start to worry about things at the level of all the design tools having been changed, or the compilers used to compile the design tools, and so on. I think that a company that designed, say, a WiFi IP block might have a chance at doing extensive checking, but a company that merely uses the block would be clueless. The block would be so complex that understanding how it worked in enough detail would be equivalent to designing it from scratch.

However, one area that it might be worth a huge investment that could have real value to the end user would be to have a way for the user of chips to validate that the root of trust has been correctly implemented, and perhaps even be able to check this every time the chip is powered up or every second or something (like the self-tests that automotive chips run). Some users would pay a premium for this. The cost in bad publicity when those guys took control of a journalist's Jeep is high. (See my post Automotive Security: A Hacker's Eye View for more details.)

In the general-purpose case, the economics are horrible. It might be possible to rig a laptop like the Novena with open-source silicon, since the performance constraints are undemanding, and the physical constraints are manageable. The idea that you could build a smartphone this way, with an integrated application processor, GPS, WiFi, Bluetooth, low-power-MP3-decode, voice recognition assist, multiple radios, LTE modem, and more is just beyond credibility. It is on the limit of what the most skilled design teams can pull together and get working, and beyond the capability of more average groups.

I'm afraid open-source silicon, in the open-source software sense, is just not workable. Even designing a non-open-source chip with open-source tools is probably unworkable for a large digital design (analog is often largely done by hand, so may be more tractable).