Openpiton+Ariane: the RISC-V Hardware Research Platform

Openpiton+Ariane: the RISC-V Hardware Research Platform

OpenPiton+Ariane: The RISC-V Hardware Research Platform Princeton University and ETH Zürich http://openpiton.orG http://pulp-platform.orG Simulating OpenPiton RTL 2 Anatomy of a Simulation • Simulation model – DesiGn under test (DUT) RTL – Top-level test bench – Simulator compiler arGuments • VeriloG macros, include directories, monitor params, etc. • Test stimuli – Assembly tests – C tests – Source/sink bit vectors • Based on infrastructure from Christopher Batten’s Group at Cornell 3 OpenPiton Simulation Models 4 Simulation Scripts/Tools • sims – piton/tools/src/sims/sims,2.0 – Adapted from OpenSPARC T1 – Build individual simulation models and run test stimuli – ReGressions • Single simulation model – Supports Synopsys VCS, Mentor ModelSim, and Verilator • contint – piton/tools/src/contint/contint,1.0 – Calls sims – Continuous inteGration bundles • Multiple simulation models – Currently only supports SLURM job scheduler and Synopsys VCS 5 Simulator Choice • Synopsys VCS, Mentor ModelSim, and Verilator are all supported – SPARC only: Cadence Incisive and Icarus VeriloG • Commands shown are for Verilator • For VCS, replace vlt with vcs • For ModelSim, replace vlt with msm 6 BuildinG a Simulation Model • Required sims arguments -sys=<simulation model> -vlt_build • Other useful arguments -vlt_build_args=<verilator arguments> -debug_all (for VCS) 7 Simulation Model Build Outputs • stdout and sims.log • build/<simulation_model>/<build_id>/ -build_id=<name> • Default is rel-0.1 8 Example: The manycore Model • sims -sys=manycore -vlt_build -ariane – sims.log: check for build errors • Check for SIGDIE – build/manycore/rel-0.1/ 9 Hands-on: The manycore Model • cd $PITON_ROOT • source piton/ariane_setup.sh • cd $PITON_ROOT/build • sims -sys=manycore -vlt_build –ariane • Check Outputs – sims.log: check for build errors – build/manycore/rel-0.1/obj_dir/Vcmp_top 10 RunninG a Simulation • Required sims arGuments -sys=<simulation model> -vlt_run <test stimuli> • Varies by simulation model type (assembly file, source/sink prefix) • Other useful arGuments -build_id=<name> -gui (for VCS, ModelSim) • Requires –debug_all during build 11 Simulation Outputs • Depends on test type • stdout and sims.log – PASS (HIT GOOD TRAP) • Test binary (diag.exe) • Memory imaGe (mem.image) • Symbol table (symbol.tbl) • Performance loG (perf.log) • Status log (status.log) 12 Example: C ProGram Simulation • sims -sys=manycore -vlt_run -ariane hello_world.c – RISC-V assembly tests have the same syntax, but end with .S or.riscv 13 Hands-on: C ProGram Simulation • cd $PITON_ROOT/build • sims -sys=manycore -vlt_run -ariane hello_world.c –rtl_timeout=1000000 • Check fake_uart.log for output 14 Example output 15 DebuGGinG Simulations • Monitors (manycore) – Non-synthesizeable VeriloG modules – Instantiated in top-level test bench – X-module references DUT siGnals • Print useful output • Check properties – BuildinG with the followinG flaG reduces verbosity • -config_rtl=MINIMAL_MONITORING • Tools for parsing simulation output – pc_grep <log>, reg_grep <log>, etc. 16 DebuGGinG Simulations 17 DebuGGinG Simulations with VCS & DVE • Waveforms - DVE – Build with -debug_all – Run with –gui • Example: – sims -sys=manycore -ariane -vcs_build –debug_all – sims -sys=manycore -ariane -vcs_run hello_world.c -gui 18 DebuGGinG Simulations 19 DebuGGinG Simulations 20 DebuGGinG Simulations with MSM • Waveforms – Run with –gui –log_all • Example: – sims -sys=manycore -ariane -msm_build – sims -sys=manycore -ariane -msm_run hello_world.c –gui –log_all 21 DebuGGinG Simulations 22 DebuGGinG Simulations 23 Exploring the assembly test suite • piton/verif/diag/assembly/ • DiaGlists (piton/verif/diag/*.diaglist) – Groups of assembly tests and assembly test declarations – Assembly test declaration label testfile.s <sims arguments> – Assembly Group definitions <groupname sys=mymodel sims args> test1 test1.s </groupname> – Groups can be nested 24 Diaglists 25 Common Test Flags • -rtl_timeout= – Number of cycles sims will wait before timinG out the test • -sim_run_args= – ArGuments (e.G. plusarGs) to VeriloG simulator • -midas_args= – ArGuments to SPARC assembler, midas – Thread count, thread stride, and more • -finish_mask= – Mask specifyinG threads to wait for 26 Example: Precompiled RISC-V Assembly Tests and Benchmarks • Assembly tests (e.G. rv64ui-p-addi.S): • sims -sys=manycore -vlt_run -ariane rv64ui-p-addi.S -precompiled -rtl_timeout=1000000 • Benchmarks (e.G. dhrystone.riscv): • sims -sys=manycore -vlt_run -ariane dhrystone.riscv -precompiled -rtl_timeout=1000000 27 RunninG a Regression • Groups of tests as defined in diaGlists • Tests utilize the same simulation model – One build, multiple test runs • sims -sim_type=vlt –group=<regression name> – Simulation model specified by group declaration – -sim_type=vlt replaces -vlt_build and –vlt_run 29 RunninG a Regression • Example: • sims -sim_type=vlt -group=ariane_tile1_asm_tests_p • sims -sim_type=vlt -group=ariane_tile1_asm_tests_v • sims -sim_type=vlt -group=ariane_tile1_amo_tests_p • sims -sim_type=vlt -group=ariane_tile1_amo_tests_v • sims -sim_type=vlt -group=ariane_tile1_benchmarks • sims -sim_type=vlt -group=ariane_tile1_simple • sims -sim_type=vlt -group=ariane_tile16_simple 30 ReGression Outputs • Simulation model will be built as usual in build/<simulation_model>/<build_id>/ • Tests run sequentially – Test results stored in build/<date>_<id> • Check results – regreport <test results directory> 31 ReGression Outputs 32 Continuous InteGration Bundles • Infrastructure for larGe scale continuous integration testinG • Supports multiple different simulation models • Specified by XML files 33 Continuous InteGration Bundles <bundles> <bundle_name> <asm_test name=“asm_test_name”> <sys>sim_model</sys> <asm_diag_name>test.s</asm_diag_name> </asm_test> <asm_regress name=“regress_name”> <sys>sim_model</sys> <group>regression name</group> </asm_regress> <include>sub-bundle name</include> . </bundle_name> </bundles> 34 Continuous InteGration Bundles 35 RunninG a contint Bundle • contint – continuous inteGration tool – Currently requires SLURM job scheduler • contint --bundle=<bundle name> • Example: – contint --bundle=git_push 36 contint Bundle Outputs • All simulation models will be built and simulations submitted to scheduler • Results will be aGGreGated and printed to stdout • Individual simulation results located in – build/contint_<bundle_name>_<date>_<id> • Re-process results – contint --bundle=<bundle name> --check_results --contint_dir=<results directory> • Example: – contint --bundle=git_push --check_results -- contint_dir=$PWD/contint_git_push_2016_6_19_0 37 contint Bundle Outputs 38 contint Bundle Outputs 39.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    38 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us