RISC-V: How much is open source? Featuring the new ESP32-C3

RISC-V: How much is open source? Featuring the new ESP32-C3

Show Video

when i got these new risc-5 esp32 boards in my mail i asked myself is this new technology really revolutionary as written everywhere what are the advantages for a typical maker time for a closer look but pay attention it will be a rough ride and not for the faint-hearted because we will talk about stacks ip ecosystems and a lot about standardization if you hang on till the end you should have enough knowledge to impress your boss but maybe you will not be happy crazy youtubers here is the guy with the swiss accent with a new episode and fresh ideas around sensors and microcontrollers remember if you subscribe you will always sit in the first row a remark to begin with i will shamelessly simplify things or as i call it distill unimportant from essential things you can add things in the comments if you feel i exaggerated in this video we will cover what is risk 5 and why was it created why is arm not involved but very important why is standardization good to get flexibility what is the impact of risk 5 on us makers how much of risk 5 is open source what is the role of fpgas in this topic where does the new esp32 c3 module fit let's start with what is risc-5 according to wikipedia risc-5 is an open standard instruction set architecture based on established risk principles unlike most other isa designs the risk 5 isa is provided under open source licenses that do not require fees to use sounds cool open source and no fees who does not love these words so it's worthwhile to start digging into the topic let's start the digging with the word risk reduced instruction set computers its rivals are sisk complex instruction set computers simply say it cisc chips have very powerful instructions implemented in hardware the compilers can use these instructions and so have less work the earlier computers like the intel x86 were sisk then came risc which implemented only basic instructions in hardware the compilers had to take over a lot of work to assemble the complex commands using hardware's basic instructions obviously the code became longer back then memory was already cheaper and because risk was much faster than sisk the technology gained acceptance the simple risk chips had much higher clock speeds and the compilers had optimization possibilities to increase speed even further in the 1990s all workstations and high-end computers used risk but the sisk processors survived because they borrowed some concepts from risk and risk processors became more complex a typical example for risk is the arm instruction set where each generation added more instructions we will cover arm later it's crucial for risk 5. today the most important sys processors still are based on intel's x86 architecture and are produced by intel and amd they are pretty fast too and now we have to go back to the last century back then risk was an excellent way to attack microsoft and intel's dominance using risk and unix ibm hp sun and others tried to create their chips they could not break the monopoly of the x86 architecture because they hated each other too much and were not able to cooperate also linux as a more unified unix operating system was not invented or adopted yet chips are not everything as we saw we need operating systems to run applications which finally will be used by the users on smartphones or pcs and the processor architectures are implemented on silicon chips the result is several layers of different technologies each level depends on the level below and interfaces connect two levels i call this drawing the technology stack we will later place companies on this stack let's start with the user interface because the user and the application developers are not the same a user interface must be defined today only a few user interfaces survived which has a lot of advantages for us users the next level is the operating systems like android windows linux and ios i include the compilers or tool chains also in this area the applications run on these operating systems again we need an interface definition to make sure that applications flawlessly run on all computers using a particular operating system this interface uses application programming interfaces or apis here windows was the first operating system that had the power to force many application developers to rewrite their applications if they wanted to survive this made it possible that today everybody can use computers why before windows every hardware supplier had its own stack and because no standard api interface existed application developers had to decide which stack they wanted to support with their applications because of this fragmentation their markets were limited the number of applications sold small and the prices therefore high the users had a lot of incompatible applications in their lab or factory young people cannot imagine how miserable life was back then did i say standard yes i said it but who wants to be standardized and follow strict rules only one smartphone to choose no max only pcs everybody has to wear the same trousers no not jeans we do this voluntarily standards are the contrary of flexibility and restrict our freedom right right on our level if we open our point of view and include the level below us things change standardization on the lower level becomes the basis for flexibility on the higher level using linux for example we get the flexibility to choose whatever application we want to use another example standardized network interfaces enable our smartphones to work everywhere in the world the elders still remember when us phones did not work in the rest of the world and vice versa because of different network standards you can extend these examples to ship containers or traffic what would happen if everybody insisted on the flexibility to use the side of the road they like most or if half of the cars had the acceleration and the brake pedals switched like this bentley from 1928 brian johnson the front man of ac dc still drives one i assume he changed the configuration to the current standard otherwise he probably would be dead by now only because the user interface of cars is more or less standardized we get the flexibility to rent a car everywhere in the world we swiss just have to pay a little bit more attention if we go to the uk or ireland and a few other countries because we drive on the right side they must drive on the wrong side of the road as we saw with the bentley it's often far less critical which standard is chosen more important is that a standard is defined unless you are an engineer we are famous for starting nearly religious wars about such things the learning is if we want flexibility on one level we have to standardize the level below if you keep one thing this is it and you can stop if you do not want to know what this insight has to do with risk 5 or did you already find out of course the upper level could be built to support different standards on a lower level unfortunately this creates a lot of complexity and costs as an example all companies have to offer an app for android and ios let's continue with our stack the next level is vital for risk 5. it is the level of chip architectures on this level we find all risk isas like power pc or mips and we find the arm and intel isas did you ever ask yourself why windows only run on intel compatible chips because it uses the standard isa published by intel and amd all other chips have other isas and microsoft until recently only supported intel's isa linux on the other hand runs on several isas so they solve the problem and of course are much better than windows right a little bit you still have to compile your operating system and all your applications for the isa of choice they are not compatible per se if we search for debian on docker hub we find a different version for each isa by the way arm needs two different versions unfortunately again we must make a detour to understand why arm is so successful this time into strategies of companies each company buys stuff from suppliers adds some value sometimes partners with other companies and sell their products to their customers competitors try to do the same but take business away from our company partners usually are on a similar level they either work with the same customers or buy the same technology often partnerships are created by smaller companies to compete with a much larger competitor companies like to buy standardized products why purchased products usually are one level below and standardized products often are called commodities because they are interchangeable using commodities has a lot of advantages for companies the first is that they can get lower prices because their suppliers all sell comparable products and have to compete on price and they do not depend on one supplier alone which increases flexibility companies do not like monopolist suppliers at all let's apply this fact to our chip architectures ibm hp and other assemblers had to purchase chips you can imagine how much their purchases liked intel and amd with a considerable market share in the pc and the server business they dictated the rules therefore both companies tried to do a backward integration and started to produce their own chips to become less dependent on intel because both were fierce competitors and proud companies they were not able to partner they also did not find many customers because all smaller companies on the same level feared them and instead bought from intel or amd these two companies were suppliers and not competitors for them in early 1990 a small uk company called arm collaborated with apple and created a risk isa including intellectual property or ip on how to implement the transistors on silicon arm never manufactured chips and sold its ip to small companies that could not spend the money to build their own isa until recently we had intel and amd for pc chips ibm hp and sun all with their own isas and a few small players that based their chips on arm architecture and we had a few independent companies like pick or atmel which produced small chips for specialized applications and now we are on the lowest level the fabs who manufacture the chips according to the customer's blueprints global foundries or tsmc are examples of companies focused on this level because arm did not sell chips they were seen as partners to the chip sellers and because all had intel and amd as common enemy arm was very successful and today has an 80 market share in the iot area of course it helped that intel focused on the more profitable pc and server business the market of small chips back then was not interesting for the big guys the interface to the silicon level is called rtl or register transfer level information and describes how to build the chip in silicon here by the way you find verilog and vhdl languages which are also used to program fpgas for small series we can use fpgas instead of plain silicon this fact often is used to test new designs before a lot of money is handed to the fabs in conjunctions with risk 5 this fact is fascinating for us another part of the ip is how to do verification this is the task to verify that the newly built silicon chip complies with the defined isa specification you can imagine that this is not an easy task with complex processors spectre and meltdown come into memory where errors were found on the silicon level after millions of chips were sold together with many other tools like compilers these verification suites are called the ecosystem of an isa you even could count all the trained design engineers and fanboys of a particular isa in according to linus torvald the inventor of linux the ecosystem is the most critical component of an isa but where fits risk 5. on this side we have intel and amd and here we have arm both with high market share in their respective markets they need an additional competitor like a hole in their head and as we saw before they have absolutely no need for open source they want to protect their monopolies as long as possible so who is interested in risk five if not the guys with the most know-how the next level of companies as we saw before is very much interested that a standardized isa emerges because it would standardize the level below them and increase their flexibility it would also give them bargaining power and cost reduction the same applied to linux where big companies like sap invested a lot of money into linux they were positioned on the application layer and wanted a commodity operating system because it made their lives easier and their pockets fuller they even made most of the linux extensions they developed open source like that linux became a reliable operating system very quickly also for commercial applications we already saw some open isas in the early 2000s which were not successful my theory is that race 5's timing is perfect because all the supporters have a common enemy arm like arm in the 1990s against intel and amd risk 5 is now the movement against arm this is why i think it will be successful one company however is absent if you google stm and risk 5 you find no hits stm is one of the more significant arm customers and maybe they sleep the same deep and cozy sleep as intel in the 1990s where they made a ton of money and underrated arm as the new kit on the block this is my view on the history and the current situation but is this or does it contain a grain of truth let's check and look at the list of supporters of the last risc-v event usually following the flow of money helps to understand on this slide we see kalista redmond the ceo of the risc-5 foundation the foundation recently moved to switzerland by the way and here is a list of the sponsors of the event the most interesting is the no show nvidia one of the founding members and a big fan of risk five as we see on this slide from 2017 in the meantime they purchased arm and seem no more too much interested in supporting risk five the purchase of arm by the way is a classical backward integration where a company buys its strategic supplier which sometimes pisses its partner off we will see how intel and company will react to this purchase prominent supporters of the event were western digital seagate huawei and microchip the arduino chips manufacturer these companies have in common that they are all customers of arm and they do not like their monopoly then we see sci-5 and andes both sell ip around risc-5 yes they sell something which obviously is not open source lauterbach and other companies sell tools into the risc-5 market yes they sell it and it's not open source so what is truly open source around risk five for the moment only the isa definition for these four cores and some extensions for different purposes like f and d which provide floating point operations these scores and extensions enable companies to build custom-made microprocessors they even are allowed to extend these extractions with their own ones extension g by the way is a general purpose isa and include these extensions we also find a list of open source cores as we will later see how can we order our custom-made risk 5 chip just go to the sci-fi homepage and start to design your own desired chip hit enter and you will get the specification for your chip and a big invoice then you can contact the fab and order the chips they will tell you that the minimum order size is a few thousand chips and their offer is even more expensive millions of dollars seem to be the dimensions these companies calculate so probably not for the average maker so let's stick with the esp32 c3 a less expensive possibility to play with risk five its core complies with rv 32 i m c now we know what it means it is a 32-bit processor with extensions for integer multiplication and divisions and the extension for compressed instructions which increases execution speed it has no floating point operations on silicon the chip contains lots of peripherals like wi-fi and bluetooth in addition to the risc-5 core and a big part is cryptographic hardware acceleration the chip's target market is a secure wi-fi or bluetooth connection for iot devices the same purpose as the esp8266 had when it came to market so it is the replacement of the esp8266 not of the esp32 with this drawing we can assess the current risk 5 and amount of open source the risc-v foundation defines only the isa of this core the ip on how to manufacture the core is not open source and probably had to be purchased by espressif and all peripherals are closed source 2 and their ip either belongs to espressif or another specialized company also all the tools had to be purchased by espressif so the open source part of the c3 is tiny disappointing for me i had hoped for more because all the hype around risk 5 i expected a much bigger footprint of open source but there is hope geron elias sprite tm created the batch for the last hackaday event based on an open source core and he added some open source peripherals and burned them into an fpga so his chip was entirely open source extremely cool maybe you watch his super conference speech if you stick a few minutes with him you will discover that he is also a funny presenter we will see if western digital or seagate or others will donate parts of their work to the foundation like many companies did with linux then risk 5 would fast gain traction but are the risk 5 chips at least faster no they use the same manufacturing technology as arm processors and are not faster or better the only difference is standardization with the advantages we discussed earlier the chance we makers will see anything of that is small at least for the next years maybe truly open source risk 5 will play a role for us in fpgas if they become cheaper and maybe we will create such a project once on this channel what do you think the proof of what i just said can be seen in the appearance of the raspberry pi pico it contains standard arm cores and no risk five and what about the esp32 c3 if it gets firmware that makes it easy for us to connect to wi-fi or bluetooth safely i'm sure i will use such a module together with another chip maybe a pie pico or an stm32 arduino for example adds a standard esp32 to their board with a pi pico chip maybe it will be replaced by a c3 module in the future if it's less expensive conclusions creating a standard isa like risk 5 is a good idea not new but the timing might be right this time because the play is called everybody against arm risk 5 is mainly a topic for chip manufacturers and large chip users it has not a lot of implications on the end user at least not for the next years only a minimal part of risk 5 chips is open source most of the design and the tools used to build it are ip of companies and have to be purchased as makers we could use risk 5 technology to create our microcontroller in an fpga the esp32-c3 is a replacement for the esp8266 because of its limitations the chip will have a limited value for the maker i assume we will stick with the esp sx line where we get lots of pins wi-fi and bluetooth and lots of peripherals that was all for today as always you find the links in the description i hope this video was useful or at least interesting for you if true please consider supporting the channel to secure its future existence thank you bye

2021-02-17 10:12

Show Video

Other news