Discussions About an Opensource Cell Phone SoC

I just spent over an hour in a deep discussion with a chat bot, about a possible cell phone SoC chip (System on Chip). One thing I really like about the AI is that it’s always fully capable of carrying on a discussion that can go as deep technically as you’re capable of comprehending and articulating yourself. It’s an expert at everything. At work, when I discuss my work on new silicon chip development with my colleagues, after several years, it’s almost like you learn another language that few people outside of work would fully understand. So I was able to ask some pretty good questions to the AI about this topic, from some position of personal experience. I was surprised that with the right information, what the AI is capable if doing.

It looks like any competitive cell phone system on chip (SoC), should be manufactured on (ideally) a 2nm silicon fabrication process. This is currently at the bleeding edge of what only a few of the world’s top chip manufacturers are even capable of doing. I had thought previously that perhaps the 180nm process might be small enough. The AI said that 4nm or even 9nm might be an acceptable compromise. But that battery life of the phone may be noticeably lower in those cases. I didn’t know that cell phones used such high scale integration chips until this point.

This discussion then led to my telling the AI that the chip will have to host only software and firmware that is Free Software Foundation compliant. That’s where the ARM64 discussion ended. There shouldn’t be any significant licensing issues attached to the final SoC if RISC V architecture is used. But some of the ARM64 firmware has to remain secret. So ARM64 isn’t a good choice. RISC V development is still in its early stages. But it’ the best choice in this case. Third party software and firmware providers will always want secracy.

To keep everything free of license encumbrances that would otherwise keep the code secret, anything with firmware running (all modems, GPS, CPU, etc) on an open-source SoC has to be either developed from scratch, or taken from the company’s own intellectual property. That’ll cost a lot.

Since the AI knows what required features and modules have to be on an average 5G cell phone SoC, I didn’t have any questions for the AI about the SoC until the AI and I started talking about how much everything would likely cost. The cost estimates for development of a 5G cell phone SoC blew me away. I had no idea previously, just how much it costs to release a new silicon chip 5G cellular modem to the market. And I see a lot about silicon chip development costs at work all the time. When I started breaking everything down and started asking “how much would it cost to develop and release (just this, just that, etc)”, things really get expensive very quickly, with everything seeming relatively a small cost when compared to the cost of developing a new opensource-compatible 5G modem.

A 5G cell phone chip just as a stand alone product would cost between $1-2 Billion to develop up to the release of just the cell phone modem in to the market by itself. For a company that already has the IP and experience releasing similar product modules for the wifi, GPS, usb, etc…, the cost to release the full SoC increases only marginally higher, after the cellular modem costs of $1-2 Billion are counted. For an incumbent silicon manufacturer who has to develop the whole SoC from scratch, the expected cost would be around $4 Billion to $5 Billion. When you want open-source compatability, you have to start from scratch or sometimes give away the secrets to your existing products.

So, depending on what you have to offer going into the project, if you haven’t already developed your own 5G modem on a silicon chip, plan to spend between $1-5 Billion on the development of your own open-source compatible cell phone SoC. And all of these estimates are based on the assumption that a fully qualified company is doing the development work.

Based on my knowledge and experience and what the AI said, these numbers appear to be very credible and at best, the development work would take several years to complete. I wish the outlook were better. With a good SoC, the Librem 5 could be very thin and light weight, it could allow for several more hours in-between charging cycles. It could provide fierce competition with Samsung and LG.

Yeah, it costs about $500 million more to develop a 3nm FinFET chip than a 28nm planar chip. This is one of the reasons why Linux phones historically had a hard time competing with Android phones. Mobile SoC’s are insanely complex, and very competitive, so not the best place to start if starting from scratch. It is more realistic to start with a processor for a desktop in my opinion.

Purism said in its July newsletter that it was pre-approved to get $50 million from the US CHIPS Act to make a Librem Core-V processor based on RISC-V architecture, but I assume they are targeting the PC and not a mobile phone.

One of the major challenges is that everything has become a patent minefield (especially GPU’s, WiFi and cellular modems), so if you produce a free/open source SoC where everyone can see how you implemented it, you become a target for patent lawsuits. Big companies have accumulated enough patents and have deep enough pockets so they can countersue any competitor which sues them, because it is impossible to design an SoC without violating hundreds of patents. Because every company is violating its competitor’s patents, the patent lawsuits can be settled by cross licensing their patents, so everyone can get back to business. The problem is that this system restricts new competitors from entering the market, because the incumbents can sue them out of existence. Just one patent lawsuit could destroy a small company.

@lkcl at libreSOC has an interesting idea to get around this mess, by designing a processing core that was based on 1960’s ideas, so it avoids the patents. He want to implement a combined CPU, GPU and VPU that executes on that core with a Python hardware description language. Because it has scalable vectors, it can do both CPU and GPU tasks, and it should be much easier to implement in Python than a normal hardware description language.

I know that Purism gave @lkcl a small amount of funding many years ago, and I hope that libreSOC can eventually get the funding to turn this into real hardware. I don’t know if this can be implemented in an FPGA or they will have to build prototypes at an ancient process node (180 - 90 nm) for several years to develop this, but it certainly won’t have great performance, because I doubt that it will be commercialized at anything better than a 28nm node in order to minimize the costs.

@lkcl decided to switch from RISC-V to Power ISA, because RISC-V has placed a lot of restrictions and arguably isn’t a free/open ISA. This means that libreSOC will have more work replicating things that RISC-V already has. For example, libreSOC proposed that scalable vectors be added to the Power ISA, which is something that RISC-V ratified as a standard in November 2021. The big problem that I see is that the libreSOC project can’t as easily take existing RISC-V pieces and use them in the SoC. They basically have to implement everything themselves, which makes me skeptical that the project will ever be completed.

We will see what Purism does with its Core-V SoC project, but I worry that the company is overreaching by trying to undertake such a major project. My hope is that they just take one of the existing free 64 bit RISC-V CPU designs and negotiate with other companies to be able to use their designs (GPU, VPU, RAM controller, USB controller, power management etc.) with 100% FOSS or offload those functions to separate chips. $50 million isn’t much money, so Purism can’t afford to spend years on experimental designs and needs to focus on what can be done with quickly with limited resources.

this is one of the responsibilities of a Foundation in charge of an ISA.

  • IBM has been collecting them for decades and has priority over Intel and AMD, keeping them at bay

  • MIPS sold their patent portfolio and likely had to shut down their Open Programme because of it

  • RISC-V has had behind-the-scenes lawsuits due to the Foundation’s member-inbound portfolio not having priority. very embarrassing

  • IBM POWER ISA is therefore the only properly-protected Licensable ISA

Start to see why I selected it?

"Simple-V is a Vector extension

no it isn’t. no Vector Extension in the world has 24 MILLION instructions. Simple-V is a (Trademarked) PREFIXING SUBSYSTEM that utilises a Scalar RISC ISA as a primitive. It is similar conceptually to Sanskrit’s Prefix-Root-Suffix and consequently as a RISC-UNIFORM Subsystem on top of a RISC-UNIFORM Scalar ISA it pisses all over every Vector ISA in the world without breaking the gate budget that blew up AVX 512 (look up Tom Forsyth’s fascinating talk on how the distance cross-chip forced uncomfortable instruction-duplication decisions)

yes the budgets today are nuts, unfortunately as the transistors get smaller the drive capability gets less, 50% of a 28nm ASIC is already repeater-line-drivers. going simpler is absolutely essential to making progress, as the early CPU designers were under huge power constraint pressure and therefore act as historical role models: how and why did their CPUs succeed?

Intel X86S was supposed to be that reduction: they got no takers and shut the programme down. which is a pity and a lost opportunity.

no: the big problem is that RISC-V is ****. look up adrian_b’s assessment on reddit where he makes it quite clear that his experience in assembler optimisation means that when he sees 3x more instructions being generated, he knows it’s game over alreasy when he’s used to tuning 5-10% better performance for customers.

spending vast amounts of money on a chip that’s going to have 25% of commercial alternative performance is… why??

everybody who invests heavily in RISC-V eventually learns this. it’s the companies that need an optimisation edge over an alternative design that end up backing out fastest. small designs (DDR bootstrap processors) where speed or firmware size is not as critical a factor as “convenience” or “licensing cost ARM cough” tend to stick with it.

look up the Xian-Tue 900 adding 50 percent extra rogue instructions to RISC-V to get par performance with ARM64.

bottom line, architecturally RISC-V is known world-wide for being appallingly badly designed, and is fundamentally unfixable. there’s simply not enough encoding space left and you’re left with an unauthorized fork that has to dance with Trademark Law if you were to try.

no it doesn’t. you don’t go from an ISA that has 96 scalar instructions to one that has 350: if that was the other way round then what you say would make sense. Power ISA was picked precisely because its pedigree stems right the way back to IBM 360, and it retains architectural influence that makes it astonishingly powerful.

example

IBM POWER systems can handle cache coherence and SMP spinlocking across thousands to tens of thousands of CPUs.

they put THAT level of thought into its fundamental architecture because their customers are Banks that have to e.g. handle the world’s VISA transaction fraud detection in real-time.

there are many more examples and RISC-V falls flat on every single one of them.

Of course, there are many different opinions and I respect all of them. My opinion is that in such a fast-paced, quickly growing business, that you need either the latest or close to Iatest technology, just to be in the game. If you use a sixty year old CPU design, then you’re stuck with either an 8-bit or 16-bit, single threaded Von Neuman architecture. It’ll be easy to fabricate on 90nm or 180nm because there is not much there to begin with, at least by today’s standards. Imagine a Librem 5 with a bigger battery, a black and white display or 16 color display, and only a text editor interface (no graphics).

The problem with developing a phone SoC on an FPGA is that there are analog peripherals that can’t be built or tested on a gate array. You can build the digital part on an FPGA. But FPGAs are extremely expensive for the number of gates it’ll require to build all of the digital circuitry on for a smart phone SoC when going into volume production. You can build and validate the digital circuitry on an FPGA and then use the proven HDL code used to design the digital circuitry, to make fabrication masks for a custom digital silicon device. I’ve actually validated those types of physical digital circuits myself. The amazing part is that you can go from HDL (hardware description language) code, directly to masks, to device fabrication, and it always works correctly in silicon the first time if it passed simulation testing before before you generated the electronic mask files. If it runs correctly in HDL code, the silicon device always works correctly when you fabricate it on a reliable process. But you have to build, validate, test, and integrate the analog peripherals into that same digital device. Custom analog circuit modules require a different development path. But you still have to integrate them into the digital device and test them there. Unlike just a CPU core, the SOC has to have both digital and analog modules that work together in the same device.

Unlike an established hardware description language, if you can find a software language such as Python or other other software to build your digital circuitry in, you’ll still have to build tools to create masks and also to test those modules that you create, in that language. It could become a life long process, just to build the tools you need. Then you could become another Verilog type of business yourself. Anything can be done if you have the time and resources.

The biggest problem is found in the vastness and scale of what needs to be done. Let’s say that you are a carpenter. After years in the trades you know how to build houses. You know how to use hammers, saws, how to cut and install pipes, how to install electrical wiring, roofing, and every other part of the house. It takes several years to learn all of this. Then someone comes along and says “I want you to build me a 100 story office building”. Suddenly you know almost nothing about what is required. Where do you even begin? Well, Donald Trump built at least one sky scraper. But he never did learn how to frame a building himself, nor how to install plumbing and electrical panels, etc.., himself. It takes a different person with different skills, just to understand the scope of the work and to figure out where to start. In a skyscraper, you can’t just take some hammers, nails, wood, pipes, etc, and start building that skyscraper yourself, figuring out how to solve the technical challenges as you go. Even if that method would work, you still need a very large army of people to do all of the work. This is where we are at now with an open-source SoC. I started this discussion thread because whether its easy or not, and even if the job is impossible for most of us, we need to figure out how it might be done, if you’re the right person. Hopefully, someone can find this discussion and say to themselves “hey, I know how that might be done”, or “I could do that”. After all, no one held Donald Trump’s hand and mentored him on how to build sky scrapers. But I doubt that he ever spent even a day learning how to do the construction work himself. Then again, he did learn how to find those people and put them to work.

This is fantastic. I hadn’t considered that IBM would have an interest in protecting anyone who uses the Power ISA, but it makes sense.

From my limited knowledge (this is way outside my expertise), I think you have a lot of good ideas that deserve funding. As always, the problem is getting funding and then doing all the work to turn good ideas into reality.

There is more than one way to skin a cat. My commentary is more about what path Purism should pursue, rather than what libreSOC should do. Purism needs to focus on what is achievable in a reasonable time frame with a certain amount of funding.

Alibaba added a bunch of extra instructions to their XuanTie C9x0 chips to match the functionality of ARM. Their implementation was poor, as this review of the C910 points out:

Yet I also feel the things C910 does well are overshadowed by executing poorly on the basics. The core’s out-of-order engine is poorly balanced, with inadequate capacity in critical structures like the schedulers and register files in relation to its ROB capacity. CPU performance is often limited by memory access performance, and C910’s cache subsystem is exceptionally weak. The cluster’s shared L2 is both slow and small, and the C910 cores have no mid-level cache to insulate L1 misses from that L2. DRAM bandwidth is also lackluster.

After reading the debate between adrian_b and others on Hacker News, I think both sides have some valid arguments. RISC-V’s compression and fusion have to be included in the comparison with ARM64.

that’s down to Hugh Blemings, Mendy, Paul Mackerras, Anton Blanchard and others who stayed together as a research team from eek 25 years ago?, ended up working for IBM Research and about… 15 years ago suggested the OPF get its act together. sorting out the legal issues and ensuring documentation including the 1,300 page architectural reference manual plus other supporting documentation is properly in sync including Trademark Licensing, was overtaken by the RISC-V Foundation’s fragile and rushed (by relative standards) work

Alibaba added a bunch of extra instructions to their XuanTie C9x0 chips to match the functionality of ARM

then that’s even more impressive!

If you use a sixty year old CPU design,

that’s why i used 60-year-old design principles :slight_smile:

you’ll still have to build tools to create masks

that’s why getting into a pre-existing toolchain as quickly as possible is so crucial. which is why nmigen™ lands immediately on verilog as its output.

RISC-V’s compression and fusion

don’t help with the number of instructions required. if you believe that more multi-issue would help there, look at the hell that Intel has gotten into. they need a BYTE LEVEL decoder that takes three clock cycles to decode instructions!

Purism needs to focus on what is achievable in a reasonable time frame with a certain amount of funding.

i’m more than happy to do the SimpleV ServiceMark licensing to them that they’d need to transform RISC-V into something useable, if they ask.

btw your AI missed J-Core :grin: Renesas SH-2. used on most of the world’s calculators (Casio) for the past… 30 years, and sold… half a billion games consoles. completely hidden. supported by gcc and has a linux port. and is being forgotten, tragically. it’s so superior and efficient that it was what ARM licensed for thumb instructions.

Anything can be done if you have the time and resources

rate of achievement is a product of resources and efficiency. this is what everyone has forgotten. itvwas well-known in the late 80s and early 90s that the best assembler programmers in the world came from Russia. why? because of the Berlin Wall. constraints push creativity. look at programmers today who think interpreted languages are the only option and the exclusive option, not even realising that the interpreter is written in c. that answer masks a different kind of efficiency: language effectiveness. there’s a fully-functioning JSONRPC server in python in 20 lines. 50 if you want error reporting.