Code

RISC-V: What is this architecture and why did Google choose it for Android?

RISC-V: What is this architecture and why did Google choose it for Android?

Learning Python programming: from beginner to professional Creating an impressive portfolio: 4 exciting projects Interacting with a teacher: live communication for better knowledge acquisition

Learn more

At the beginning of this year, at the RISC-V Summit conference Google representatives have expressed interest in this architecture. Previously, the company had remained silent on this issue for a long time and did not share information about its activities in this area. Let's consider how this may affect the development of Android and what goals Google is pursuing in this context.

"How will this affect the market?" is a new column in which we analyze how various events affect the markets and the daily lives of ordinary developers.

What is RISC-V

RISC-V is an open-source processor architecture and instruction set. Any organization can take advantage of this technology without any cost, similar to Linux or the Apache web server. The name RISC-V indicates that it is based on the RISC (reduced instruction set computer) concept, which involves using advanced instructions to improve processor efficiency.

The term "reduced" is often perceived as meaning a small number of instructions, but in fact it reflects both the size of the instructions and the time required to execute them, including the memory access time for the basic cycle. In addition, each instruction has a fixed length. The family of processors with RISC architecture includes such models as RISC-V, PowerPC, ARM, and others.

There is an alternative approach to the architecture of computing systems known as CISC (complex instruction set computer), which is used, in particular, in processors from Intel and AMD. Within this architecture, instructions can have different lengths, and the instructions themselves are capable of performing quite complex operations. Although modern Intel processors have features of a RISC architecture in their hardware implementation, they still operate on a CISC basis, which implies that all CISC instructions are pre-translated into RISC instructions before their execution.

The RISC-V architecture is gaining popularity among developers of smartwatches and various devices, as well as in the field of microcontrollers. Support for this architecture is present in the Linux kernel, as well as, for example, in Haiku. The development of RISC-V is carried out within the framework of the Linux Foundation initiatives, which contributes to its further progress.

We ported the Haiku operating system to the RISC-V architecture, choosing it over ARM. The reasons for this choice were quite simple: I was put off by the complexities associated with the interrupt system in ARM, the multiple processor operating modes, and the convoluted organization of the MMU. The Haiku porting process was heavily inspired by the xv6 project, which is an implementation of classic Unix by Dennis Ritchie and Brian Kernighan for RISC-V. I used TinyEMU as an emulator for RISC-V, although there are many other options for this architecture.

As for the interaction of RISC-V with Android, it represents significant advantages for our project. As soon as Android devices with the RISC-V architecture appear on the market, we will be able to run Haiku on tablets and smartphones.

Ilya Chugin, the developer of the RISC-V port for Haiku, is known online under the nickname x512.

Background

In October 2022, engineers from China announced the start of development of a version of Android based on the RISC-V architecture. This decision was a response to the increasing US sanctions, which limited access to technologies for the production of alternative microprocessors. In this situation, the open RISC-V architecture quickly gained popularity and interest.

Since Android was the only major mobile operating system available, engineers in China decided to adapt it to the RISC-V architecture. Google likely accommodatingly shared some proprietary aspects of the low-level elements of its mobile operating system.

Commits from Chinese developers, with Alibaba Group being particularly prominent, played a key role in the creation of the new RISC-V Android repository on GitHub.

Currently, Android is compatible with ARM, MIPS, and x86 architectures. However, RISC-V support is not yet available. The emulator promises to implement this support soon, and Google representatives say that Android Runtime integration with RISC-V is expected in the first quarter of 2023.

Today, the ARM architecture occupies a leading position in the world of technology. Apple's M1 processor caused a real sensation in the IT sector. Serious competition has erupted around ARM. NVIDIA attempted to acquire ARM for $40 billion, but other companies opposed it and the deal was declared invalid, leading to NVIDIA's withdrawal. This is not surprising, since if the deal were to be successful, NVIDIA would not only strengthen its position in the graphics chip market but also gain control over one of the leading microprocessor architectures. This could lead to the company being able to limit Intel and AMD's access to this technology, effectively becoming a monopoly in this field.

More and more countries are showing interest in the RISC-V architecture, and the number of devices supporting these processors continues to grow. However, at the moment, there are no high-performance processors capable of competing at the level of smartphones, servers, or personal computers. The only example is a laptop released in China, but its characteristics leave much to be desired. Nevertheless, processors based on the RISC-V architecture are already demonstrating high efficiency in areas such as the Internet of Things and smartwatches. This suggests that we can expect the emergence of more powerful solutions based on this platform in the future.

Today, Europe actively supports the RISC-V architecture. In the past, Russia also had powerful lobbying groups that sought to "bury" processors like Elbrus and Baikal, as well as other domestic developments. These groups insisted that RISC-V be recognized as the "only true" architecture, emphasizing the need to invest exclusively in it. The roots of these lobbyists go back to companies like Intel, Samsung, and IBM—representatives of the very same monopolistic group that failed to establish direct competition with ARM. It should be noted that it was these same companies that once prevented NVIDIA from acquiring ARM, using their connections to block the deal. The reason for this was the fear that ARM would end up under the control of a single company, which would give it a significant advantage over its competitors in the market.

Therefore, adding RISC-V processor support to Android is a reasonable move and a clear way to mitigate risks: if someone does acquire ARM, Google will still have an alternative to switch to.

In my opinion, there is nothing negative about increasing the number of diverse architectures. However, it is worth noting that Android remains a closed operating system at the hardware level, and this is unlikely to change, even given the advent of the open RISC-V architecture. Through its licensing system, Google retains control over smartphone manufacturers and is unlikely to weaken this control. For example, if Chinese companies continue to develop their own open version of the ARM architecture, they will face difficulties in providing full-fledged Android support for all devices using their processors in the global market.

Maxim Gorshenin is a blogger who actively promotes Russian microelectronics.

What will this affect?

Many experts are pessimistic about the prospects for implementing RISC-V in Android, believing that it is unlikely to lead to significant changes. At best, it could lead to a slight increase in battery life and some improvement in camera functionality. However, to date, the quality of RISC-V integration into processors has not reached such heights as to become a catalyst for serious innovations in mobile technology.

I believe that nothing will fundamentally change for either software developers or end users. Google has recently been at odds with ARM, and is seeking to free itself from dependence on external manufacturers. However, at its core, it is still a RISC architecture, similar to that used by ARM (known as Advanced RISC Machines). The interesting aspect is that this could be a step toward the adoption of Chromebooks based on RISC processors.

Therefore, the changes to the operating system code will mainly affect low-level calls made by Android developers themselves, which are then hidden behind interface APIs available to mobile programmers. Overall, this seems like a perfectly reasonable and practical move on Google's part. In my opinion, there are no serious intentions here.

However, it should be noted that Google is a major player in the market, and therefore all participants who have invested in the development of the RISC-V platform, including open-source projects, will appear more significant. For example, this applies to projects like "Baikaly."

Alexey Gladkov is the creator of a channel dedicated to mobile development.

Current achievements in the development of chips based on the RISC-V architecture also raise questions. Currently, the most productive models, which, moreover, are not produced in large volumes, are comparable in their parameters to older processors from well-known manufacturers. For example, the JH7110 chip can be compared to the system-on-chip used in the Samsung Galaxy S3, which was released in 2012 (although the JH7110 supports 64-bit architecture), while the TH1520 resembles the SoC from the Galaxy S7, released in 2016.

RISC-V technology has great potential, but at the moment I don’t see any reason for its widespread adoption in the mobile space. It’s unclear whether this is due to the fact that Android doesn’t support RISC-V, or whether manufacturers simply don’t show much interest in this direction. However, adding RISC-V support will open up opportunities for developing devices based on this architecture that are compatible with Android and may facilitate the release of a new Android NDK.

It’s unclear whether this will motivate manufacturers to start releasing RISC-V-based devices. However, such a move could facilitate the transition to RISC-V for companies in Russia and China, which currently lack access to ARM technology.

Qualcomm chips are currently very popular because they are built on the proven ARM architecture, for which numerous software solutions have been developed. For example, Apple actively uses ARM in its devices. At the same time, I have not encountered any successful processors based on RISC-V. Moreover, major tech companies have not yet announced the creation of processors based on this architecture. Perhaps some of them are already developing them, but in small volumes. However, until a well-known brand begins installing RISC-V chips in their smartphones, all this will remain only at the software support level, without having a significant impact on the market.

Currently, the RISC-V architecture does not have any clear advantages, except that it is open and available for free licensing. Unlike ARM, RISC-V does not require any payments for use. This architecture allows for free changes and modifications thanks to its license. However, in terms of performance or other significant factors that could motivate the transition from ARM to RISC-V, the open architecture does not yet offer anything noteworthy. Nevertheless, if competitive chips are developed based on RISC-V, they could gain significant popularity.

Kirill Rozov is the creator of both a Telegram channel and a YouTube channel called Android Broadcast.

Nevertheless, there are techno-optimists who predict interesting consequences of RISC-V's adoption in the Android ecosystem, although this is unlikely to happen anytime soon.

The RISC-V architecture offers significantly more options for customization, scalability, and expansion thanks to its open source nature, which contrasts with ARM and x86 architectures. The integration of RISC-V into the Android operating system could have a number of significant implications for mobile development:

  • The simplified architecture, compared to traditional chips, will significantly extend the battery life of mobile devices and improve their performance. This, in turn, will lead to an increase in key metrics such as MAU and DAU, which will be beneficial for all Android app developers.
  • Mobile app developers will have greater control over both the hardware and software of their devices. This, in turn, will pave the way for the creation of more original and effective mobile apps. For example, we can expect the emergence of apps compatible with VR headsets that will feature motion tracking. The low power consumption of RISC-V processors will make it possible to develop headsets that are comfortable to wear for long periods without the risk of overheating.
  • The open-source architecture will form the basis for a collaborative mobile app development environment, enabling small digital companies to compete with major market players.

Alexey Lachevsky is the CEO of the Trinity Monsters digital agency.

Conclusion

What is the bottom line of all this:

  • Google's initiative appears to be a well-thought-out and well-founded move in the competitive context, as well as a strategic one that allows it to maintain a significant advantage.
  • Nothing will likely change in the near future—except that companies that have invested in the RISC-V architecture will be able to attract more funding and grants. This is because, thanks to Google's initiative, RISC-V is beginning to be perceived as a much more promising and less fringe technology.
  • Mobile developers are unlikely to face any significant changes in the future. All hardware-related aspects remain closed to them on the Google side, and interaction with the hardware is carried out exclusively through the API.

Read also:

  • Google plans to introduce its competitor to ChatGPT, which will be called Bard.
  • At 22, getting a job at one of the Big Four companies may seem like a daunting task, but the story of Artem, a data scientist, serves as an excellent example. He will share his experience and the steps that helped him achieve this goal.

    From the very beginning of his career, Artem showed an interest in data analysis and programming. He studied diligently, gaining knowledge both at university and on his own, studying various online courses and literature on his specialty. This desire to learn became the foundation of his professional growth.

    During his studies, Artem actively participated in competitions and hackathons, which allowed him not only to apply his skills in practice but also to make useful contacts in the field. These events helped him build an impressive portfolio, which later played a key role in his job search.

    After graduating, Artyom wasted no time in seeking internships at large companies. He understood that the experience gained in entry-level positions was crucial for further career advancement. His diligence and persistence paid off: he landed an internship at a well-known firm, where he was able to demonstrate his data science skills.

    The internship allowed Artyom not only to develop his technical skills but also to become familiar with the corporate culture and the specifics of teamwork. He actively sought out opportunities to improve his skills and never passed up the chance to learn from more experienced colleagues.

    Soon, thanks to his achievements and recommendations, Artyom received a permanent offer from a Big Four company. His story is a shining example of how determination, continuous self-improvement, and active participation in the professional community can lead to career success.

  • Creating your own app for the Android platform is a fascinating and educational process that you can undertake independently. To successfully implement your idea, it's worth following a specific plan.

    First, you need to define the concept of your app. Think about what problem it should solve or what value it should bring to users. After that, you should make a list of the features you want to include and think through the interface.

    The next step is choosing development tools. In most cases, developers choose Android Studio—the official integrated development environment (IDE) from Google. It provides all the necessary resources for creating apps, including an emulator for testing and various libraries.

    Learning the programming language required for development is also important. The most popular language for Android is Java, although Kotlin is increasingly used due to its modern features and conciseness.

    Once you've mastered the basics and set up the environment, you can move on to coding. Start with the simplest features, gradually adding new elements. Don't forget to test the app on different devices to ensure it works correctly.

    Once the app is ready, it's time to prepare it for publication. To do this, you need to register in the Google Play Console, create descriptions, upload icons and screenshots, and then submit your application for review.

    Thus, creating an Android application on your own takes time and effort, but with due persistence and a desire to learn, you can quite cope with this task and implement your ideas.