For more information on core architecture, see SCR1 External Architecture Specification.
For more information on project usage, see SCR1 User Manual.
Folder | Description |
---|---|
dependencies | Dependent submodules |
├─ riscv-tests | Common source files for RISC-V ISA tests |
├─ riscv-compliance | Common source files for RISC-V Compliance tests |
└─ coremark | Common source files for EEMBC's CoreMark® benchmark |
docs | SCR1 documentation |
├─ scr1_eas.pdf | SCR1 External Architecture Specification |
└─ scr1_um.pdf | SCR1 User Manual |
sim | Tests and scripts for simulation |
├─ tests/common | Common source files for tests |
├─ tests/riscv_isa | RISC-V ISA tests platform specific source files |
├─ tests/riscv_compliance | RISC-V Compliance platform specific source files |
├─ tests/benchmarks/dhrystone21 | Dhrystone 2.1 benchmark source files |
├─ tests/benchmarks/coremark | EEMBC's CoreMark® benchmark platform specific source files |
├─ tests/isr_sample | Sample program “Interrupt Service Routine” |
├─ tests/hello | Sample program “Hello” |
└─ verilator_wrap | Wrappers for Verilator simulation |
src | SCR1 RTL source and testbench files |
├─ includes | Header files |
├─ core | Core top source files |
├─ top | Cluster source files |
└─ tb | Testbench files |
SCR1 source file lists of SCR1 can be found in ./src:
Library with header files to include is ./src/includes/
The project contains testbenches, test sources and scripts to quickly start the SCR1 simulation. Before starting the simulation, make sure you have:
GCC toolchain and make-scripts are supported by most popular Linux-like operating systems.
To run from Windows you can use an additional compatibility layer, such as WSL or Cygwin.
RISC-V GCC toolchain is required to compile the software. You can use pre-built binaries or build the toolchain from scratch.
Pre-built RISC-V GCC toolchain with support for all SCR1 architectural configurations is available for download from http://syntacore.com/page/products/sw-tools.
<GCC_INSTALL_PATH>
.<GCC_INSTALL_PATH>/bin
folder to the $PATH environment variable:export PATH=<GCC_INSTALL_PATH>/bin:$PATH
You can build the RISC-V GCC toolchain from sources, stored in official repo https://github.com/riscv/riscv-gnu-toolchain
Instructions on how to prepare and build the toolchain can be found on https://github.com/riscv/riscv-gnu-toolchain/blob/master/README.md
We recommend using the multilib compiler. Please note that RV32IC, RV32E, RV32EM, RV32EMC, RV32EC architectural configurations are not included in the compiler by default. If you plan to use them, you will need to include the appropriate libraries by yourself before building.
After the building, be sure to add the <GCC_INSTALL_PATH>/bin
folder to the $PATH environment variable
Currently supported simulators:
Please note that RTL simulator executables should be in your $PATH variable.
The simulation package includes the following tests:
After the main SCR1 repository has been cloned execute the following command:
git submodule update --init --recursive
This command will initialized submodules with test sources.
To build RTL, compile and run tests from the repo root folder you have to call Makefile. By default, you may simply call Makefile without any parameters:
make
In this case simulation will run on Verilator with following parameters: CFG=MAX BUS=AHB TRACE=0 TARGETS="hello isr_sample riscv_isa riscv_compliance dhrystone21 coremark"
.
Makefile supports:
run_<SIMULATOR> = <run_vcs, run_modelsim, run_ncsim, run_verilator, run_verilator_wf>
BUS = <AHB, AXI>
,CFG = <MAX, BASE, MIN, CUSTOM>
,ARCH = <IMC, IC, IM, I, EMC, EM, EC, E>, VECT_IRQ = <0, 1>, IPIC = <0, 1>, TCM = <0, 1>
TARGETS = <hello, isr_sample, riscv_isa, riscv_compliance, dhrystone21, coremark>
TRACE = <0, 1>
SIM_BUILD_OPTS
.Examples:
make run_verilator_wf CFG=MAX BUS=AXI TARGETS="riscv_isa riscv_compliance" TRACE=1 make run_vcs CFG=BASE BUS=AHB TARGETS="dhrystone21 coremark" SIM_BUILD_OPTS="-gui" make run_modelsim CFG=CUSTOM BUS=AXI ARCH=I VECT_IRQ=1 IPIC=1 TCM=0 TARGETS=isr_sample
Build and run parameters can be configured in the ./Makefile
.
After all the tests have finished, the results can be found in build/<SIM_CFG>/test_results.txt
.
IMPORTANT: To ensure correct rebuild, please clean build directory between simulation runs:
make clean
Please refer to the “Simulation environment” chapter of the SCR1 User Manual for more information on setting up a simulation run.
FPGA-based SDKs are available at the https://github.com/syntacore/scr1-sdk.
Repo contains:
Report an issue: https://github.com/syntacore/scr1/issues
Ask a question: scr1@syntacore.com