The MetaWare Development Toolkit

The well-known MetaWare Development Toolkit (MWDT) has expanded its supported cores to ensure the generation of highly efficient code for the new RISC-V ARC-V family of processors.

The MetaWare Development Toolkit includes a variety of tools that facilitate software development — LLVM-based compiler, linker, LLDB-based debugger (lldbac), processor simulator, and so on.

Getting the MetaWare Development Toolkit

The Synopsys Eval Portal (https://eval.synopsys.com/) allows you to request an evaluation license for Synopsys software products. MetaWare Development Toolkit is the one relevant for ARC-V processors. Follow these steps:

  1. Log in to the portal (or register for an account).

  2. Complete an Evaluation Request Form for your chosen software product(s).

  3. Submit your shopping cart to complete your evaluation request. Receive email confirmation with a 30-day evaluation key.

  4. Download the software and begin your evaluation.

  5. Email-based support is available by writing to mwdt-eval-support@synopsys.com.

MetaWare Development Toolkit W-2024.12

It is extremely important to rebuild the C/C++ runtime library before benchmarking for performance. The default library build is configured for size and performs well for size but extremely poorly for performance. For example, Dhrystone runs 25% worse with the default library than a library built with optimization option -O2. Also, the default library does not use every hardware extension that your processor is configured with. Hardware extensions (such as the M extension that includes a multiplier/divider) can have an enormous effect on performance.

Example of rebuilding and using the C/C++ runtime library:

% buildlib mylib -bd /tmp -j22 -tcf=/path/to/arc.tcf -O2
% ccac -O2 hello.c -Hlib=/tmp/mylib -tcf=/path/to/arc.tcf

Explanation:

  • buildlib (documented in the Linker and Utilities User’s Guide) is the tool that knows how to build C/C++ runtime libraries.

  • The mylib argument is a name (choose anything you like) for your library.

  • The -bd /tmp option tells buildlib to build the library in the /tmp/mylib directory (it concatenates your library name with the directory name to create the path to your library).

  • The -j22 option allows 22 concurrent processes to run and build your library faster.

  • For benchmarking, be sure to use an optimization level like -O2 (or -O, or -O1).

  • When you build your program with ccac, use -Hlib to tell the compiler where to find your optimized library (in this case -Hlib=/tmp/mylib tells the compiler that the library is in /tmp/mylib/).

New Features and Enhancements for RISC-V Based ARC-V Processors

Compiler:

  • Added a dedicated MetaWare Compiler User Guide For ARC-V™ Processors.

  • Added option Added option -tcf_tmp_dir to specify a directory in which TCF-related temp files are placed with deterministic names, for the benefit of compilation-caching tools such as Ccache.

Debugger:

  • Added a Physical Memory Protection (PMP) window that shows PMP configuration registers for controlling access to memory regions.

  • Added a Performance Counters window (aka RISC-V HPM - Hardware Performance Monitor), to display countable hardware events.

  • Added a Zephyr RTOS-awareness window for monitoring thread status and parameters (name, state, priority, and so on).

MetaWare Development Toolkit V-2024.06

New Features and Enhancements for RISC-V Based ARC-V Processors

  • C++20 support: The MetaWare compiler follows Clang 17.0.6 in terms of C++20 support. The C++20library is supported except for features related to threads, and those that require corresponding features in the C library added since C11.

  • The printf() floating-point handling has been enabled on RPX (64-bit ARC-V processors).

  • Added options -msave-restore and -mno_save-restore to enable and disable use of library calls for register save and restore for ARC-V processors. For details, see the MetaWare CCAC Programmer’s Guide.

  • Added -Zno_* versions to negate specification of the ARC-V extension options. For details, see the MetaWare CCAC Programmer’s Guide.

  • The deprecated VectorC intrinsics with deprecated in their names have been removed from arc_vector.h.

  • Picolib is now the default runtime library for ARC-V processors.

MetaWare Development Toolkit V-2024.03

New Features and Enhancements for RISC-V Based ARC-V Processors

  • Optimized performance on ARC-V targets.

  • Added support for the RISC-V deviation specification (in particular, the long double type is 64 bits, not 128 bits).

  • Added TCF support for ARC-V targets.

  • Improved the performance of linker relaxation for ARC-V targets.

  • Added the -Zicbop and -Zicboz options to enable the cache-block instructions for ARC-V targets.

  • Added driver option -Hlibc=lib for ARC-V processors to select between the Picolib C runtime library (-Hlibc=pico) and the default MetaWare C runtime library (-Hlibc=mw). Note that this option also switches the default include paths. The current Picolib C version is 1.8.6.

  • Added a run-lldbac debugger script for ARC-V targets so that you can run a GUI or command-line session using the same set of command-line options.

  • Added more semihosting calls for ARC-V targets (note that the HEAPINFO and EXIT_EXTENDED semihosting calls are still not supported).

MetaWare Development Toolkit V-2023.12

The V-2023.12 version of the MetaWare Development Toolkit introduces experimental support for the ARC-V RMX processor series based on the RISC-V instruction-set architecture.

More information about this family can be found on the Synopsys website: Power-Efficient RISC-V Processors for Embedded Applications.

New Features and Enhancements

Support for RISC-V Based ARC-V RMX Processors

  • Experimental support is added for the RISC-V Based ARC-V processors.

  • Added support for the following RISC-V extensions: Zi, Zm, Za, Zc, Zba, Zbb, Zbc, Zbs, Zfinx, Zdinx, Zicsr, Zifencei, Zihintpause and Zicbom.

  • Added support for the following code-size reduction extensions: Zca, Zcb, Zcf, Zcd and Zcmp.

  • Added support for basic debugging in lldbac (command-line mode) and in Visual Studio Code (GUI mode).

Note

As this is the first release of the MetaWare Development Toolkit with ARC-V support, some functionality might have issues, some processor features might not yet be fully supported, and performance might be lower than expected performance of the final product.

Tools Limitations

Limitations of the experimental debugger support for ARC-V targets:

  • The experimental debugger invoked with lldbac or lldbac-dap supports only ARC-V targets.

  • Only the GDB RSP and RASCAL target connection protocols are supported. The MCD protocol is not supported. JTAG connections can only be established using an external GDB server.

  • Only the following semihosting operations are supported: WRITE, READ, OPEN, CLOSE, ISTTY, FLEN, GETCMDLINE, EXIT.

  • By default, the windows defined by the MetaWare debugger VS Code extension are not synchronized automatically with the selected stack frame. To enable stack-frame synchronization, add any expression to the Watch window in the Run and Debug tab and keep the Watch window open.

  • Instruction (address) profiling is only supported in the GUI, not in command-line mode.

  • The GUI does not open the Disassembly window automatically when debugger cannot find the source file. Open the Disassembly window manually in this case.