This document describes the comprehensive configuration testing framework for the Vigna RISC-V processor.
The Vigna processor supports multiple RISC-V configurations with different optional extensions. The testing framework validates all supported configurations to ensure robust operation across different use cases.
- RV32I: Base integer instruction set (32-bit)
- RV32E: Embedded base with reduced register file (16 registers)
- RV32IM: Base + M extension (multiply/divide)
- RV32IC: Base + C extension (compressed instructions)
- RV32IMC: Base + M + C extensions
- RV32IM+Zicsr: Base + M + Zicsr extensions (CSR support)
- RV32IMC+Zicsr: Full featured (all extensions)
make test_rv32i # Test base RV32I
make test_rv32im # Test with multiply/divide
make test_rv32ic # Test with compressed instructions
make test_rv32imc # Test with multiply + compressed
make test_rv32e # Test embedded configuration
make test_rv32im_zicsr # Test with multiply + CSR
make test_rv32imc_zicsr # Test full featuredmake test_all_configs # Run all configuration testsmake syntax_all_configs # Check syntax for all configurationsThe repository includes dedicated configuration files for each variant:
vigna_conf.vh- Default configuration (RV32IM+Zicsr)vigna_conf_rv32i.vh- Base onlyvigna_conf_rv32im.vh- Base + multiplyvigna_conf_rv32ic.vh- Base + compressedvigna_conf_rv32imc.vh- Base + multiply + compressedvigna_conf_rv32e.vh- Embedded basevigna_conf_rv32im_zicsr.vh- Base + multiply + CSRvigna_conf_rv32imc_zicsr.vh- Full featuredvigna_conf_c_test.vh- C extension testing configuration
C program tests can be run with different configurations:
make program_test_rv32im_zicsr # Test C programs with multiply + CSR
make program_test_rv32imc_zicsr # Test C programs with full featuresEach configuration test reports:
- Number of tests passed/failed
- Total test count
- Configuration-specific test results
- Cycle counts for performance analysis
The CI/CD pipeline automatically tests all configurations:
- Syntax validation for all configurations
- Functional testing for each configuration
- Program testing when cross-compiler is available
- Validates multiplication and division operations
- Tests signed/unsigned variants
- Verifies remainder operations
- Tests 16-bit compressed instruction execution
- Validates compression/decompression logic
- Ensures proper PC alignment
- Tests CSR read/write operations
- Validates privilege levels
- Tests CSR instruction variants (CSRRW, CSRRS, CSRRC, etc.)
- Validates reduced register file operation
- Tests with only x0-x15 registers available
- Ensures proper instruction encoding
Different configurations have different performance characteristics:
- RV32E: Smallest area, reduced register pressure
- RV32IC: Improved code density with compressed instructions
- RV32IM: Better performance for arithmetic-intensive code
- Full featured: Maximum functionality at cost of area
If a configuration test fails:
- Check the specific configuration defines being used
- Verify the processor core supports the extension
- Review the test expectations for configuration-specific behavior
- Use waveform analysis for detailed debugging
To add a new configuration:
- Create a new configuration file
vigna_conf_newconfig.vh - Add build targets in the Makefile
- Add test targets with appropriate defines
- Update the CI/CD pipeline
- Document the new configuration
This framework ensures the Vigna processor works correctly across all supported RISC-V configurations and use cases.