RISC-V new results! openKylin community completes support for RV64G architecture

After the openKylin community and Deepin Intelligence jointly released the world's first RISC-V laptop DC-ROMA equipped with the openKylin 1.0 operating system by default, recently, in conjunction with Suzhou Ruixin Company, the openKylin platform was officially deployed to support the RV64G architecture . The subsequent RV64G is Compression instruction set enthusiasts can develop, compile and deploy their own code through the community platform.

RISC-V is a free instruction set. Hardware manufacturers can expand independently based on standards recognized by international foundations. Currently, many manufacturers on the market produce products based on RV64GC, but there are also manufacturers who produce products based on RV64G. In order to cooperate with domestic manufacturers In response to market demand, the openKylin community took the lead in launching support for the RV64G architecture.

 

1. Introduction to RV64G architecture

Compared with RV64GC (the more familiar riscv64), which is currently more widely used in embedded small devices, RV64G focuses more on general computing scenario functions, servers or desktop systems. in:

  • “RV” stands for RISC-V;
  • "64" means that the supported instructions are 64-bit (in fact, the cross-compiler may use 32-bit instructions to reduce the length of the generated target code when generating code), and the address length and register length are both 64 bits;
  • "G" stands for General Computing Platform. In fact, "G" is equivalent to "IMAFD", where "I" represents integer (Integer) calculation instructions, integer loads, integer stores, and control flow (such as branch jumps) instructions. These instructions can be used in any RISC-V implementation. are required; "M" stands for Multiply, that is, the platform supports multiplication and division operations; "A" stands for Atomic extension, which supports atomic read, modify, and atomic write operations on registers. These operations are Very useful in multi-core designs; "F" stands for single-precision floating-point (Float) operation support, and "D" stands for double-precision floating-point (Double) operation support.

The main difference between RV64G and RV64GC is the inclusion of the compressed instruction set (C instruction set). RV64GC adds a C instruction set based on RV64G. These instructions are used to reduce the instruction length and reduce the code footprint. RV64G does not include these compression instructions, so RV64G applications can run on RV64GC hardware, but not vice versa.

In comparison, RV64GC has higher code density than RV64G, the program has a smaller footprint, and can use memory space more efficiently. These characteristics make the RV64GC instructions more advantageous in embedded applications; on the other hand, the hardware of RV64G The implementation may be simpler than RV64GC. Simplified instruction decoding logic can be used to make it easier to predict instruction prefetch modes, reduce the number of memory accesses, increase instruction execution speed, and reduce power consumption. Designers can better optimize high-performance computing.

 

2. Development process

1. Basic tool chain transformation, compilation and verification.

The first stage involves adapting basic compilation tools, including modification and compilation of gcc, glibc, and binutils source code packages, and technical research to adapt to the new RV64G architecture. Run the newly compiled gcc version, check the relevant output parameters, and confirm that ---with-arch=rv64imafd means the modification is successful.

2. Compilation of stage0/bootstroop stage related packages.

Based on the basic compilation tool chain completed in the first stage, the compilation work of related packages in the bootstroo stage is started. Including the compilation work of apt, dpkg, llvm, python3, perl, cmake, make, openmpi, netplan.io, openssl, meson and other software packages.

3. Initial compilation of upper-layer application packages.

After completing the software package compilation work in the first two steps, you need to further expand the number of software packages. Compile more upper-layer application packages layer by layer through scripts in the local compilation environment. At the same time, it is verified that there is no problem in mixed compilation using RV64GC related dependency packages and existing RV64G packages.

4. Choort platform compilation environment debugging and production.

Use the new RV64G architecture software package that has been recompiled to build the chroot basic environment of the OKBS platform. During the debugging process, we encountered many problems related to architecture symbols and required multiple reconstruction tests. During the process, we constantly tried to modify the chroot system files. Until the binary file in rv64g.deb format can be compiled normally. The completed chroot address is:

http://api.build.openkylin.top/devel/openkylin/yangtze/rv64g

5. New deployment of platform architecture and construction of compiler.

In order to distinguish it from the existing RV64GC architecture, configuration data related to the RV64G architecture is added to the OKBS system. Using the previously compiled software package based on the new architecture, create a new source.list source as a dependency source for the compilation environment.

6. Initial compilation environment debugging.

In the early stage of launch, problems such as the integration of the new architecture chroot and the OKBS system and compilation dependence on source RV64G architecture modifications were solved.

 

3. Advantages of RV64G architecture support

1. Support code source compilation for RV64G architecture , that is, the code is submitted once . Binary packages for the five architectures of AMD64, I386, ARM64, RV64GC, and RV64G can be compiled from the same source on the OKBS platform. There is no need to maintain a separate set of RV64G software sources and code warehouses, improving the efficiency of RV64G architecture code development and maintenance.

 

2. Support the same-origin release of the RV64G architecture software warehouse , effectively improving the management, maintenance and upgrade efficiency of the RV64G architecture software warehouse.

 

 

3. Mirror production and version release are unified and standardized . Image production and version release management can be handled in the same process as other architectures, and the RV64G architecture version construction specifications are unified.

 

4. Solve the problem of name conflict with the RV64GC architecture , and now it can be compatible with the compilation of the two instruction set architectures of the RISCV-V specification.

5. The compiler can support both RV64GC and RV64G architectures , effectively improving compiler resource utilization.

 

 

In the future, Suzhou Ruixin will continue to join hands with the openKylin community to establish the RV64G SIG group, increase resource investment, solve problems encountered during the software package compilation process, and complete the architecture image production, hardware adaptation, software source management and ecological demand software Independent construction, etc., to further integrate desktop and server systems based on RV64G architecture. Interested partners are welcome to join us and create together!

Guess you like

Origin www.oschina.net/news/272960