This VS Code extension provides a comprehensive user interface and commands for working with the RV64I toolchain, including setup, building, simulation, and regression testing of RV64I projects using CMake and CTest.
Features
Setup Wizard (UI): Interactive webview panel for detecting and installing required toolchain components.
Automated Setup: Command-line based setup for headless environments.
Configure and Build All: Configure project with CMake (MinGW Makefiles on Windows) and build all targets.
Build Target (Compile Only): Compile and elaborate a specific target without running simulation (sim_${target}).
Run Simulation Console: Execute simulation in console mode for automatic testing (run_${target}).
Run Simulation GUI: Launch interactive simulation with waveforms (run_${target}_gui).
Run Specific Test: Execute targeted regression tests using CTest (ctest -R ${target} -V).
Run All Library Tests: Run the complete library test suite (ctest -L lib).
Run Tests in Parallel: Execute tests with parallel processing for faster regression (ctest -j7).
Tool Detection: Automatically detect installed tools and report missing ones.
Path Configuration: Manually set paths for toolchain executables.
Requirements
This extension requires the following tools to be installed:
CMake: For building projects (version 3.10 or higher recommended).
RISC-V GCC Toolchain: Specifically riscv64-unknown-elf-gcc for compiling RV64I code.
Xilinx Simulator (xsim): For simulating compiled binaries (requires Vivado environment).
Git: For cloning repositories during setup (optional but recommended).
The extension includes an automated setup wizard that can detect and install missing tools. On Windows, it supports automatic installation of MinGW-w64 and other components.
Installation
Install the extension from the VS Code marketplace or by packaging it with vsce package.
Open your RV64I project workspace in VS Code.
Usage
Initial Setup
Open the Command Palette (Ctrl+Shift+P) and run RV64I: Setup Extension Wizard(UI) to launch the interactive setup panel.
Alternatively, run RV64I: Setup Wizard for a command-line based setup.
Building and Simulation
Configure and Build All: Run RV64I: Configure and Build All to set up the project and compile all targets.
Build Specific Target: With a relevant file open (e.g., fifo_tb.sv), run RV64I: Build Target (Compile Only) to compile just that target.
Run Console Simulation: Run RV64I: Run Simulation Console for automatic execution in terminal.
Run GUI Simulation: Run RV64I: Run Simulation GUI for interactive simulation with waveforms.
Regression Testing
Specific Test: With a test file open, run RV64I: Run Specific Test to execute that particular test with verbose output.
Library Tests: Run RV64I: Run All Library Tests to execute the entire library test suite.
Parallel Tests: Run RV64I: Run Tests in Parallel to execute all tests concurrently for faster results.
Project Structure
Ensure your project has a CMakeLists.txt file configured for RV64I builds. The extension automatically extracts target names from the base filename of the currently open file (e.g., instr06addi from instr06addi.sv).
Extension Settings
This extension does not contribute any VS Code settings at this time.
Known Issues
Simulation requires proper setup of Xilinx Vivado environment and licensing.
Path detection may not work on all systems; manual configuration is available through the setup wizard.
CTest commands require the project to be configured and built first.
Release Notes
0.0.1
Initial release with basic toolchain commands and setup wizard.
Added comprehensive CMake-based build and simulation commands.
Integrated CTest support for regression testing.
Updated command interface for improved usability.
License
This project is licensed under the MIT License.
See the LICENSE file for details.