The first generation of RISC-V toolchain by Terapines Technology have emerged, including RISC-V elf/linux toolchains, newlib, glibc and c++ libraries, high performance libml DSP library, zdb(debugger), zemu(simulator), zchecker for ISO 26262 MISRA C, etc. We will go through the detailed test report to demonstrate how advantage our RISC-V is against open source toolchains.
The first generation of Terapines ‘s RISC-V Toolchain has been greatly optimized in code size and code performance, as code size is the most concern in MCU Market.
1.DSP library
CMSIS DSP library of ARM is widely used in the industry, but some algorithms in the CMSIS DSP library have great room for improvement. Terapines now provide the libml DSP library (algorithm version), which fulfills the code size of transformation class 90% to 50% smaller as well as much less error than that of the CMSIS DSP library while outperforming the CMSIS DSP library.





2. zcc C/C++ Compiler
The coremark compiled by zcc scores 3.78 on the N300 development board of Nuclei System Technology, which is 64% higher than the llvm 11.0 and 11.4% higher than the RISC-V gcc 11.1.



The embench-IoT test results show that zcc is on average about 33% code size smaller than gcc 11.1 with comparable performance. And its advantage is even more obvious in the polybench tests, with code size about 38% smaller than gcc 11.1 on average. All these test data were obtained under consistent objective conditions: both gcc and zcc used the standard version of the newlib nano library with Os and LTO optimizations enabled, and the test target was RV32IMAC.


The automatic vectorization of zcc for RVV is also progressing quite well, with a preview release expected in Q1 2022.The following figure shows the comparison of code performance of EPI (European Supercomputing Center compiler project) and zcc, please refer to the article “RISC-V Vector auto-vectorization and implementation in llvm《RISC-V Vector自动向量化及llvm当中的实现》” for the detailed comparison.

In addition to the achievement above, Terapines will release a compiler with complete RVV auto-vectorization support, and a libml DSP library optimized for RISC-V P extensions in the next version, which will have a very significant code size and performance improvement over the algorithmic version.
3.Debugger and Simulator
Zstudio has perfectly integrated zdb and zemu, the following figure shows an example of debugging RISC-V program using zdb connected to zemu. In addition to functional simulation for ISA at the ISS level, zemu also supports fast modeling and simulation at the SoC level, as well as near cycle accurate simulation.

4.zchecker for ISO 26262
ISO26262 is an international standard for functional safety of electrical and electronic systems that are installed in serial production road vehicles (excluding mopeds). In addition to the hardware design and manufacturing engineering, the ISO26262 also define the standard of the applications executed on the chip.
The first version of zchecker, the automotive functional safety inspection tool, released by Terapines, includes 143 safety rules of MSRA C 2012, as well as the 23 new safety rules in MISRA C 2012 amendment 1 and 2. MISRA C++ 202x safety specifications will be supported in later versions.


5.Other features
Besides supporting syntax highlighting for various programming languages, IntelliSense code completion, git version control, disassembly, control flow graph analysis, FlameGraph for performance analysis, etc., zstudio IDE also supports rich VS Code plugins.


6.The future is promising
We are in the process of deploying a cloud-based IDE SaaS platform, which is expected to be launched in the spring of 2022 and will be free and open to all universities and non-commercial users at that time. Also, zstudio for Mac OS will be available this spring.
