coreblocks 0.2026.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- coreblocks-0.2026.7.3/.gitattributes +8 -0
- coreblocks-0.2026.7.3/.github/workflows/benchmark.yml +287 -0
- coreblocks-0.2026.7.3/.github/workflows/deploy_gh_pages.yml +48 -0
- coreblocks-0.2026.7.3/.github/workflows/main.yml +327 -0
- coreblocks-0.2026.7.3/.github/workflows/publish-to-pypi.yml +189 -0
- coreblocks-0.2026.7.3/.github/workflows/publish_comment.yml +35 -0
- coreblocks-0.2026.7.3/.gitignore +63 -0
- coreblocks-0.2026.7.3/.gitmodules +10 -0
- coreblocks-0.2026.7.3/.pre-commit-config.yaml +35 -0
- coreblocks-0.2026.7.3/LICENSE +23 -0
- coreblocks-0.2026.7.3/PKG-INFO +45 -0
- coreblocks-0.2026.7.3/README.md +70 -0
- coreblocks-0.2026.7.3/ci/build_docs.sh +17 -0
- coreblocks-0.2026.7.3/ci/print_benchmark_summary.py +52 -0
- coreblocks-0.2026.7.3/ci/push_docs.sh +40 -0
- coreblocks-0.2026.7.3/ci/push_gh_pages.sh +40 -0
- coreblocks-0.2026.7.3/constants/__init__.py +0 -0
- coreblocks-0.2026.7.3/constants/benchmark_information.py +13 -0
- coreblocks-0.2026.7.3/constants/ecp5_pinout.py +17 -0
- coreblocks-0.2026.7.3/constants/ecp5_platforms.py +89 -0
- coreblocks-0.2026.7.3/coreblocks/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/arch/__init__.py +4 -0
- coreblocks-0.2026.7.3/coreblocks/arch/csr_address.py +588 -0
- coreblocks-0.2026.7.3/coreblocks/arch/isa.py +286 -0
- coreblocks-0.2026.7.3/coreblocks/arch/isa_consts.py +319 -0
- coreblocks-0.2026.7.3/coreblocks/arch/optypes.py +204 -0
- coreblocks-0.2026.7.3/coreblocks/backend/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/backend/announcement.py +61 -0
- coreblocks-0.2026.7.3/coreblocks/backend/retirement.py +358 -0
- coreblocks-0.2026.7.3/coreblocks/cache/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/cache/icache.py +364 -0
- coreblocks-0.2026.7.3/coreblocks/cache/iface.py +42 -0
- coreblocks-0.2026.7.3/coreblocks/cache/refiller.py +107 -0
- coreblocks-0.2026.7.3/coreblocks/core.py +245 -0
- coreblocks-0.2026.7.3/coreblocks/core_structs/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/core_structs/crat.py +493 -0
- coreblocks-0.2026.7.3/coreblocks/core_structs/rat.py +57 -0
- coreblocks-0.2026.7.3/coreblocks/core_structs/rf.py +132 -0
- coreblocks-0.2026.7.3/coreblocks/core_structs/rob.py +187 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/__init__.py +1 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/bpu/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/bpu/bpu.py +48 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/decoder/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/decoder/decode_stage.py +154 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/decoder/instr_decoder.py +357 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/decoder/instr_description.py +230 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/decoder/rvc.py +375 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/fetch/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/fetch/fetch.py +685 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/fetch_addr_unit.py +73 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/frontend.py +172 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/frontend_params.py +26 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/ftq.py +242 -0
- coreblocks-0.2026.7.3/coreblocks/frontend/stall_controller.py +113 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/csr/csr_protocol.py +18 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/csr/csr_unit.py +281 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/alu.py +269 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/common/__init__.py +5 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/common/fifo_rs.py +42 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/common/fu_decoder.py +107 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/common/func_base.py +52 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/common/rs.py +189 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/common/rs_func_block.py +135 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/div_unit.py +132 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/division/common.py +15 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/division/long_division.py +206 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/exception.py +108 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/close_path.py +180 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/far_path.py +323 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/float_to_int.py +214 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_add_sub.py +287 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_class.py +114 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_common.py +169 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_comp.py +134 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_error_module.py +178 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_mul.py +263 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_qsf.py +122 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_rounding_module.py +117 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/fpu_sign_injection.py +88 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/int_to_float.py +132 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/lza.py +105 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/otfc.py +126 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/fpu/qsf_tables.py +21 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/jumpbranch.py +259 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/lsu/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/lsu/dummyLsu.py +214 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/lsu/lsu_atomic_wrapper.py +225 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/lsu/lsu_requester.py +184 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/lsu/pma.py +74 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/mul_unit.py +210 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/priv.py +288 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/shift_unit.py +108 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/unsigned_multiplication/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/unsigned_multiplication/common.py +73 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/unsigned_multiplication/fast_recursive.py +134 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/unsigned_multiplication/pipelined.py +145 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/unsigned_multiplication/sequence.py +154 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/unsigned_multiplication/shift.py +45 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/zbc.py +233 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/zbkx.py +85 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/fu/zbs.py +116 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/instruction_metrics.py +37 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/interface/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/interface/func_blocks_unifier.py +34 -0
- coreblocks-0.2026.7.3/coreblocks/func_blocks/interface/func_protocols.py +21 -0
- coreblocks-0.2026.7.3/coreblocks/gen_verilog.py +165 -0
- coreblocks-0.2026.7.3/coreblocks/interface/keys.py +168 -0
- coreblocks-0.2026.7.3/coreblocks/interface/layouts.py +954 -0
- coreblocks-0.2026.7.3/coreblocks/interface/views.py +65 -0
- coreblocks-0.2026.7.3/coreblocks/params/__init__.py +5 -0
- coreblocks-0.2026.7.3/coreblocks/params/configurations.py +133 -0
- coreblocks-0.2026.7.3/coreblocks/params/core_configuration.py +223 -0
- coreblocks-0.2026.7.3/coreblocks/params/fu_params.py +128 -0
- coreblocks-0.2026.7.3/coreblocks/params/genparams.py +175 -0
- coreblocks-0.2026.7.3/coreblocks/params/icache_params.py +59 -0
- coreblocks-0.2026.7.3/coreblocks/params/instr.py +250 -0
- coreblocks-0.2026.7.3/coreblocks/params/vmem_params.py +100 -0
- coreblocks-0.2026.7.3/coreblocks/peripherals/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/peripherals/axi_lite.py +339 -0
- coreblocks-0.2026.7.3/coreblocks/peripherals/bus_adapter.py +279 -0
- coreblocks-0.2026.7.3/coreblocks/peripherals/wishbone.py +533 -0
- coreblocks-0.2026.7.3/coreblocks/priv/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/aliased.py +101 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/csr_instances.py +596 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/csr_register.py +286 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/double_counter.py +78 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/double_shadow.py +100 -0
- coreblocks-0.2026.7.3/coreblocks/priv/csr/shadow.py +141 -0
- coreblocks-0.2026.7.3/coreblocks/priv/pmp.py +124 -0
- coreblocks-0.2026.7.3/coreblocks/priv/traps/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/priv/traps/exception.py +135 -0
- coreblocks-0.2026.7.3/coreblocks/priv/traps/instr_counter.py +51 -0
- coreblocks-0.2026.7.3/coreblocks/priv/traps/interrupt_controller.py +402 -0
- coreblocks-0.2026.7.3/coreblocks/priv/vmem/__init__.py +2 -0
- coreblocks-0.2026.7.3/coreblocks/priv/vmem/iface.py +15 -0
- coreblocks-0.2026.7.3/coreblocks/priv/vmem/tlb.py +658 -0
- coreblocks-0.2026.7.3/coreblocks/priv/vmem/translation.py +224 -0
- coreblocks-0.2026.7.3/coreblocks/priv/vmem/walker.py +273 -0
- coreblocks-0.2026.7.3/coreblocks/scheduler/__init__.py +0 -0
- coreblocks-0.2026.7.3/coreblocks/scheduler/scheduler.py +593 -0
- coreblocks-0.2026.7.3/coreblocks/scheduler/wakeup_select.py +62 -0
- coreblocks-0.2026.7.3/coreblocks/socks/clint.py +76 -0
- coreblocks-0.2026.7.3/coreblocks/socks/peripheral.py +68 -0
- coreblocks-0.2026.7.3/coreblocks/socks/plic.py +188 -0
- coreblocks-0.2026.7.3/coreblocks/socks/socks.py +100 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/PKG-INFO +45 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/SOURCES.txt +319 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/dependency_links.txt +1 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/entry_points.txt +2 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/requires.txt +28 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/scm_file_list.json +315 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/scm_version.json +8 -0
- coreblocks-0.2026.7.3/coreblocks.egg-info/top_level.txt +1 -0
- coreblocks-0.2026.7.3/docker/AmaranthSynthECP5.Dockerfile +35 -0
- coreblocks-0.2026.7.3/docker/Verilator.Dockerfile +22 -0
- coreblocks-0.2026.7.3/docker/riscv-toolchain.Dockerfile +41 -0
- coreblocks-0.2026.7.3/docs/api.md +5 -0
- coreblocks-0.2026.7.3/docs/assumptions.md +7 -0
- coreblocks-0.2026.7.3/docs/components/icache.md +24 -0
- coreblocks-0.2026.7.3/docs/conf.py +114 -0
- coreblocks-0.2026.7.3/docs/current-graph.md +12 -0
- coreblocks-0.2026.7.3/docs/development-environment.md +141 -0
- coreblocks-0.2026.7.3/docs/home.md +28 -0
- coreblocks-0.2026.7.3/docs/images/logo-banner.svg +79 -0
- coreblocks-0.2026.7.3/docs/images/logo.svg +79 -0
- coreblocks-0.2026.7.3/docs/images/ngi0-commons.svg +14 -0
- coreblocks-0.2026.7.3/docs/images/nlnet.svg +1 -0
- coreblocks-0.2026.7.3/docs/index.md +18 -0
- coreblocks-0.2026.7.3/docs/miscellany/exceptions-summary.md +153 -0
- coreblocks-0.2026.7.3/docs/problem-checklist.md +15 -0
- coreblocks-0.2026.7.3/docs/scheduler/overview.md +46 -0
- coreblocks-0.2026.7.3/docs/synthesis/synthesis.md +239 -0
- coreblocks-0.2026.7.3/docs/wiki_exclude +3 -0
- coreblocks-0.2026.7.3/pyproject.toml +109 -0
- coreblocks-0.2026.7.3/scripts/build_docs.sh +63 -0
- coreblocks-0.2026.7.3/scripts/core_graph.py +40 -0
- coreblocks-0.2026.7.3/scripts/lint.sh +75 -0
- coreblocks-0.2026.7.3/scripts/parse_benchmark_info.py +91 -0
- coreblocks-0.2026.7.3/scripts/run_benchmarks.py +213 -0
- coreblocks-0.2026.7.3/scripts/run_tests.py +76 -0
- coreblocks-0.2026.7.3/scripts/synthesize.py +241 -0
- coreblocks-0.2026.7.3/scripts/tprof.py +84 -0
- coreblocks-0.2026.7.3/setup.cfg +4 -0
- coreblocks-0.2026.7.3/test/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/asm/csr.asm +9 -0
- coreblocks-0.2026.7.3/test/asm/csr_mmode.asm +33 -0
- coreblocks-0.2026.7.3/test/asm/exception.asm +8 -0
- coreblocks-0.2026.7.3/test/asm/exception_handler.asm +53 -0
- coreblocks-0.2026.7.3/test/asm/exception_mem.asm +17 -0
- coreblocks-0.2026.7.3/test/asm/fibonacci.asm +11 -0
- coreblocks-0.2026.7.3/test/asm/fibonacci_mem.asm +29 -0
- coreblocks-0.2026.7.3/test/asm/init_regs.s +41 -0
- coreblocks-0.2026.7.3/test/asm/interrupt.asm +106 -0
- coreblocks-0.2026.7.3/test/asm/interrupt_vectored.asm +138 -0
- coreblocks-0.2026.7.3/test/asm/link.ld +17 -0
- coreblocks-0.2026.7.3/test/asm/mtval.asm +106 -0
- coreblocks-0.2026.7.3/test/asm/plic.asm +222 -0
- coreblocks-0.2026.7.3/test/asm/pmp_fetch.asm +36 -0
- coreblocks-0.2026.7.3/test/asm/pmp_lsu.asm +38 -0
- coreblocks-0.2026.7.3/test/asm/smode_exception.asm +84 -0
- coreblocks-0.2026.7.3/test/asm/smode_interrupt.asm +79 -0
- coreblocks-0.2026.7.3/test/asm/socks_clint.asm +122 -0
- coreblocks-0.2026.7.3/test/asm/sv32_translation.asm +96 -0
- coreblocks-0.2026.7.3/test/asm/user_mode.asm +158 -0
- coreblocks-0.2026.7.3/test/asm/wfi_int.asm +34 -0
- coreblocks-0.2026.7.3/test/asm/wfi_no_int.asm +5 -0
- coreblocks-0.2026.7.3/test/asm/wfi_no_mie.asm +29 -0
- coreblocks-0.2026.7.3/test/backend/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/backend/test_announcement.py +57 -0
- coreblocks-0.2026.7.3/test/backend/test_retirement.py +211 -0
- coreblocks-0.2026.7.3/test/cache/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/cache/test_icache.py +759 -0
- coreblocks-0.2026.7.3/test/common/test_isa.py +177 -0
- coreblocks-0.2026.7.3/test/conftest.py +115 -0
- coreblocks-0.2026.7.3/test/core_structs/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/core_structs/test_rat.py +106 -0
- coreblocks-0.2026.7.3/test/core_structs/test_reorder_buffer.py +165 -0
- coreblocks-0.2026.7.3/test/core_structs/test_rf.py +100 -0
- coreblocks-0.2026.7.3/test/external/embench/Makefile +17 -0
- coreblocks-0.2026.7.3/test/external/embench/board_config/coreblocks-sim/board.cfg +5 -0
- coreblocks-0.2026.7.3/test/external/embench/board_config/coreblocks-sim/boardsupport.c +33 -0
- coreblocks-0.2026.7.3/test/external/embench/board_config/coreblocks-sim/crt0.S +102 -0
- coreblocks-0.2026.7.3/test/external/embench/common/link.ld +64 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/Makefile +45 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/coreblocks/coreblocks-full/coreblocks.yaml +242 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/coreblocks/coreblocks-full/link.ld +15 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/coreblocks/coreblocks-full/rvmodel_macros.h +120 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/coreblocks/coreblocks-full/sail.json +724 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/coreblocks/coreblocks-full/test_config.yaml +8 -0
- coreblocks-0.2026.7.3/test/external/riscv-arch-test/coreblocks/coreblocks-full/test_config_clang.yaml +7 -0
- coreblocks-0.2026.7.3/test/external/riscv-tests/Makefile +45 -0
- coreblocks-0.2026.7.3/test/external/riscv-tests/environment/custom/link.ld +26 -0
- coreblocks-0.2026.7.3/test/external/riscv-tests/environment/custom/riscv_test.h +245 -0
- coreblocks-0.2026.7.3/test/frontend/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/frontend/test_decode_stage.py +71 -0
- coreblocks-0.2026.7.3/test/frontend/test_fetch.py +942 -0
- coreblocks-0.2026.7.3/test/frontend/test_ftq.py +193 -0
- coreblocks-0.2026.7.3/test/frontend/test_instr_decoder.py +445 -0
- coreblocks-0.2026.7.3/test/frontend/test_rvc.py +391 -0
- coreblocks-0.2026.7.3/test/func_blocks/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/func_blocks/csr/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/func_blocks/csr/test_csr.py +511 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/common/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/common/test_rs.py +156 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/add_sub_test_cases.py +91 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/fpu_test_common.py +106 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/mul_test_cases.py +76 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_add_sub.py +161 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_close_path.py +177 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_far_path.py +1264 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_float_to_int.py +151 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_fpu_classification.py +76 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_fpu_comp.py +119 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_fpu_error.py +325 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_fpu_mul.py +98 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_fpu_rounding.py +278 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_int_to_float.py +66 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_lza.py +88 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_otfc.py +53 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_qsf.py +37 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/fpu/test_sign_injection.py +92 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/functional_common.py +211 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_alu.py +140 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_div_unit.py +62 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_exception_unit.py +49 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_fu_decoder.py +141 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_jb_unit.py +190 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_mul_unit.py +63 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_pipelined_mul_unit.py +83 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_shift_unit.py +47 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_unsigned_mul_unit.py +85 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_zbc.py +71 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_zbkx.py +38 -0
- coreblocks-0.2026.7.3/test/func_blocks/fu/test_zbs.py +40 -0
- coreblocks-0.2026.7.3/test/func_blocks/lsu/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/func_blocks/lsu/test_dummylsu.py +496 -0
- coreblocks-0.2026.7.3/test/func_blocks/lsu/test_lsu_atomic_wrapper.py +226 -0
- coreblocks-0.2026.7.3/test/func_blocks/lsu/test_pma.py +150 -0
- coreblocks-0.2026.7.3/test/func_blocks/lsu/test_pmp.py +420 -0
- coreblocks-0.2026.7.3/test/params/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/params/test_configurations.py +61 -0
- coreblocks-0.2026.7.3/test/params/test_dependentcache.py +49 -0
- coreblocks-0.2026.7.3/test/params/test_instr.py +63 -0
- coreblocks-0.2026.7.3/test/peripherals/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/peripherals/bus_mock.py +41 -0
- coreblocks-0.2026.7.3/test/peripherals/test_axi_lite.py +255 -0
- coreblocks-0.2026.7.3/test/peripherals/test_wishbone.py +383 -0
- coreblocks-0.2026.7.3/test/priv/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/priv/traps/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/priv/traps/test_exception.py +80 -0
- coreblocks-0.2026.7.3/test/priv/traps/test_interrupt_controller.py +124 -0
- coreblocks-0.2026.7.3/test/priv/vmem/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/priv/vmem/test_tlb.py +474 -0
- coreblocks-0.2026.7.3/test/priv/vmem/test_walker.py +312 -0
- coreblocks-0.2026.7.3/test/regression/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/regression/benchmark.py +111 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/arch_elf_entrypoint.py +18 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/arch_test.Makefile +25 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/benchmark.Makefile +26 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/benchmark_entrypoint.py +15 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/cocotb-config +21 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/test.Makefile +26 -0
- coreblocks-0.2026.7.3/test/regression/cocotb/test_entrypoint.py +21 -0
- coreblocks-0.2026.7.3/test/regression/cocotb.py +301 -0
- coreblocks-0.2026.7.3/test/regression/common.py +33 -0
- coreblocks-0.2026.7.3/test/regression/conftest.py +92 -0
- coreblocks-0.2026.7.3/test/regression/memory.py +217 -0
- coreblocks-0.2026.7.3/test/regression/pysim.py +203 -0
- coreblocks-0.2026.7.3/test/regression/test_arch_regression.py +317 -0
- coreblocks-0.2026.7.3/test/regression/test_regression.py +150 -0
- coreblocks-0.2026.7.3/test/scheduler/__init__.py +0 -0
- coreblocks-0.2026.7.3/test/scheduler/test_checkpointing.py +268 -0
- coreblocks-0.2026.7.3/test/scheduler/test_rs_selection.py +177 -0
- coreblocks-0.2026.7.3/test/scheduler/test_scheduler.py +404 -0
- coreblocks-0.2026.7.3/test/scheduler/test_wakeup_select.py +92 -0
- coreblocks-0.2026.7.3/test/test_core.py +447 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
name: Core Benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [ synchronize, labeled ]
|
|
9
|
+
branches:
|
|
10
|
+
- master
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
synthesis:
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
config: [basic, full]
|
|
18
|
+
name: Run synthesis benchmarks
|
|
19
|
+
if: >
|
|
20
|
+
github.ref == 'refs/heads/master' ||
|
|
21
|
+
(
|
|
22
|
+
github.event_name == 'pull_request' &&
|
|
23
|
+
(
|
|
24
|
+
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'benchmark')) ||
|
|
25
|
+
(github.event.action == 'labeled' && github.event.label.name == 'benchmark')
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
runs-on: ubuntu-24.04
|
|
29
|
+
timeout-minutes: 45
|
|
30
|
+
container: ghcr.io/kuznia-rdzeni/amaranth-synth:ecp5-2025.01.31
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v6
|
|
33
|
+
|
|
34
|
+
- name: Set ownership (Github Actions workaround)
|
|
35
|
+
run: |
|
|
36
|
+
# https://github.com/actions/runner/issues/2033
|
|
37
|
+
chown -R $(id -u):$(id -g) $PWD
|
|
38
|
+
|
|
39
|
+
- name: Set up Python
|
|
40
|
+
uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: '3.13'
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: |
|
|
46
|
+
python3 -m venv venv
|
|
47
|
+
. venv/bin/activate
|
|
48
|
+
python3 -m pip install --upgrade pip
|
|
49
|
+
python3 -m pip install ".[dev]"
|
|
50
|
+
|
|
51
|
+
- name: Synthesize
|
|
52
|
+
run: |
|
|
53
|
+
. venv/bin/activate
|
|
54
|
+
PYTHONHASHSEED=0 ./scripts/synthesize.py --verbose --strip-debug --config ${{ matrix.config }}
|
|
55
|
+
|
|
56
|
+
- name: Print synthesis information
|
|
57
|
+
run: cat ./build/top.tim
|
|
58
|
+
|
|
59
|
+
- name: Collect Benchmark information
|
|
60
|
+
run: |
|
|
61
|
+
. venv/bin/activate
|
|
62
|
+
./scripts/parse_benchmark_info.py -o synth-benchmark-${{ matrix.config }}.json
|
|
63
|
+
cat ./synth-benchmark-${{ matrix.config }}.json
|
|
64
|
+
|
|
65
|
+
- uses: actions/upload-artifact@v7
|
|
66
|
+
with:
|
|
67
|
+
name: synth_benchmark_results-${{ matrix.config }}
|
|
68
|
+
path: synth-benchmark-${{ matrix.config }}.json
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
build-perf-benchmarks:
|
|
72
|
+
name: Build performance benchmarks
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
if: >
|
|
75
|
+
github.ref == 'refs/heads/master' ||
|
|
76
|
+
(
|
|
77
|
+
github.event_name == 'pull_request' &&
|
|
78
|
+
(
|
|
79
|
+
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'benchmark')) ||
|
|
80
|
+
(github.event.action == 'labeled' && github.event.label.name == 'benchmark')
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2024.12.07
|
|
84
|
+
steps:
|
|
85
|
+
- name: Checkout
|
|
86
|
+
uses: actions/checkout@v6
|
|
87
|
+
with:
|
|
88
|
+
submodules: recursive
|
|
89
|
+
|
|
90
|
+
- name: Build embench
|
|
91
|
+
run: cd test/external/embench && make
|
|
92
|
+
|
|
93
|
+
- uses: actions/upload-artifact@v7
|
|
94
|
+
with:
|
|
95
|
+
name: "embench"
|
|
96
|
+
path: |
|
|
97
|
+
test/external/embench/build
|
|
98
|
+
|
|
99
|
+
run-perf-benchmarks:
|
|
100
|
+
name: Run performance benchmarks
|
|
101
|
+
runs-on: ubuntu-22.04 # older version for compatibility with Docker image
|
|
102
|
+
timeout-minutes: 60
|
|
103
|
+
container: ghcr.io/kuznia-rdzeni/verilator:v5.032-2026.04.15
|
|
104
|
+
needs: build-perf-benchmarks
|
|
105
|
+
steps:
|
|
106
|
+
- name: Checkout
|
|
107
|
+
uses: actions/checkout@v6
|
|
108
|
+
|
|
109
|
+
- name: Set ownership (Github Actions workaround)
|
|
110
|
+
run: |
|
|
111
|
+
# https://github.com/actions/runner/issues/2033
|
|
112
|
+
chown -R $(id -u):$(id -g) $PWD
|
|
113
|
+
|
|
114
|
+
- name: Set up Python
|
|
115
|
+
uses: actions/setup-python@v5
|
|
116
|
+
with:
|
|
117
|
+
python-version: '3.13'
|
|
118
|
+
|
|
119
|
+
- name: Install dependencies
|
|
120
|
+
run: |
|
|
121
|
+
python3 -m venv venv
|
|
122
|
+
. venv/bin/activate
|
|
123
|
+
python3 -m pip install --upgrade pip
|
|
124
|
+
python3 -m pip install ".[dev]"
|
|
125
|
+
|
|
126
|
+
- name: Generate Verilog
|
|
127
|
+
run: |
|
|
128
|
+
. venv/bin/activate
|
|
129
|
+
PYTHONHASHSEED=0 TRANSACTRON_VERBOSE=1 python3 -m coreblocks.gen_verilog --verbose --config full
|
|
130
|
+
|
|
131
|
+
- uses: actions/download-artifact@v8
|
|
132
|
+
with:
|
|
133
|
+
name: "embench"
|
|
134
|
+
path: test/external/embench/build
|
|
135
|
+
|
|
136
|
+
- name: Run benchmarks
|
|
137
|
+
run: |
|
|
138
|
+
. venv/bin/activate
|
|
139
|
+
scripts/run_benchmarks.py -o perf_benchmark.json --summary perf.md
|
|
140
|
+
cat perf.md >> $GITHUB_STEP_SUMMARY
|
|
141
|
+
|
|
142
|
+
- uses: actions/upload-artifact@v7
|
|
143
|
+
with:
|
|
144
|
+
name: perf_benchmark_results
|
|
145
|
+
path: perf_benchmark.json
|
|
146
|
+
|
|
147
|
+
pr-summary:
|
|
148
|
+
name: Create benchmark summary for a pull request
|
|
149
|
+
if: ${{ github.event_name == 'pull_request' }}
|
|
150
|
+
runs-on: ubuntu-latest
|
|
151
|
+
timeout-minutes: 5
|
|
152
|
+
needs: [run-perf-benchmarks, synthesis]
|
|
153
|
+
steps:
|
|
154
|
+
- name: Checkout
|
|
155
|
+
uses: actions/checkout@v6
|
|
156
|
+
|
|
157
|
+
- name: Set ownership (Github Actions workaround)
|
|
158
|
+
run: |
|
|
159
|
+
# https://github.com/actions/runner/issues/2033
|
|
160
|
+
chown -R $(id -u):$(id -g) $PWD
|
|
161
|
+
|
|
162
|
+
- name: Set up Python
|
|
163
|
+
uses: actions/setup-python@v5
|
|
164
|
+
with:
|
|
165
|
+
python-version: '3.13'
|
|
166
|
+
|
|
167
|
+
- name: Install dependencies
|
|
168
|
+
run: |
|
|
169
|
+
python3 -m venv venv
|
|
170
|
+
. venv/bin/activate
|
|
171
|
+
python3 -m pip install --upgrade pip
|
|
172
|
+
python3 -m pip install ".[dev]"
|
|
173
|
+
|
|
174
|
+
- name: Get baseline benchmarks results
|
|
175
|
+
uses: actions/cache@v4
|
|
176
|
+
env:
|
|
177
|
+
cache-name: benchmark-results
|
|
178
|
+
with:
|
|
179
|
+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.event.pull_request.base.sha }}
|
|
180
|
+
path: |
|
|
181
|
+
perf_benchmark.json
|
|
182
|
+
synth-benchmark-basic.json
|
|
183
|
+
synth-benchmark-full.json
|
|
184
|
+
|
|
185
|
+
- uses: actions/download-artifact@v8
|
|
186
|
+
with:
|
|
187
|
+
name: perf_benchmark_results
|
|
188
|
+
path: artifacts
|
|
189
|
+
- uses: actions/download-artifact@v8
|
|
190
|
+
with:
|
|
191
|
+
name: synth_benchmark_results-basic
|
|
192
|
+
path: artifacts
|
|
193
|
+
- uses: actions/download-artifact@v8
|
|
194
|
+
with:
|
|
195
|
+
name: synth_benchmark_results-full
|
|
196
|
+
path: artifacts
|
|
197
|
+
|
|
198
|
+
- name: Save PR number
|
|
199
|
+
run: |
|
|
200
|
+
mkdir -p ./summary
|
|
201
|
+
echo ${{ github.event.number }} > ./summary/pr_number
|
|
202
|
+
|
|
203
|
+
- name: Create comment
|
|
204
|
+
id: createComment
|
|
205
|
+
run: |
|
|
206
|
+
. venv/bin/activate
|
|
207
|
+
{
|
|
208
|
+
echo "## Benchmarks summary"
|
|
209
|
+
echo "### Performance benchmarks"
|
|
210
|
+
ci/print_benchmark_summary.py --precision 3 artifacts/perf_benchmark.json perf_benchmark.json
|
|
211
|
+
echo
|
|
212
|
+
echo "You can view all the metrics [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})."
|
|
213
|
+
echo "### Synthesis benchmarks (basic)"
|
|
214
|
+
ci/print_benchmark_summary.py --precision 0 artifacts/synth-benchmark-basic.json synth-benchmark-basic.json
|
|
215
|
+
echo
|
|
216
|
+
echo "### Synthesis benchmarks (full)"
|
|
217
|
+
ci/print_benchmark_summary.py --precision 0 artifacts/synth-benchmark-full.json synth-benchmark-full.json
|
|
218
|
+
echo
|
|
219
|
+
} >> summary/comment.md
|
|
220
|
+
|
|
221
|
+
- uses: actions/upload-artifact@v4
|
|
222
|
+
with:
|
|
223
|
+
name: benchmark-summary
|
|
224
|
+
path: summary
|
|
225
|
+
|
|
226
|
+
publish-benchmarks:
|
|
227
|
+
name: Publish benchmarks
|
|
228
|
+
if: github.ref == 'refs/heads/master'
|
|
229
|
+
runs-on: ubuntu-latest
|
|
230
|
+
timeout-minutes: 5
|
|
231
|
+
needs: [run-perf-benchmarks, synthesis]
|
|
232
|
+
steps:
|
|
233
|
+
- uses: actions/checkout@v6
|
|
234
|
+
|
|
235
|
+
- uses: actions/download-artifact@v8
|
|
236
|
+
with:
|
|
237
|
+
name: perf_benchmark_results
|
|
238
|
+
path: .
|
|
239
|
+
- uses: actions/download-artifact@v8
|
|
240
|
+
with:
|
|
241
|
+
name: synth_benchmark_results-basic
|
|
242
|
+
path: .
|
|
243
|
+
- uses: actions/download-artifact@v8
|
|
244
|
+
with:
|
|
245
|
+
name: synth_benchmark_results-full
|
|
246
|
+
path: .
|
|
247
|
+
|
|
248
|
+
- name: Put results in a cache
|
|
249
|
+
uses: actions/cache@v4
|
|
250
|
+
env:
|
|
251
|
+
cache-name: benchmark-results
|
|
252
|
+
with:
|
|
253
|
+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.sha }}
|
|
254
|
+
path: |
|
|
255
|
+
perf_benchmark.json
|
|
256
|
+
synth-benchmark-basic.json
|
|
257
|
+
synth-benchmark-full.json
|
|
258
|
+
|
|
259
|
+
- name: Store benchmark result (IPC)
|
|
260
|
+
uses: benchmark-action/github-action-benchmark@v1
|
|
261
|
+
with:
|
|
262
|
+
name: Performance (IPC)
|
|
263
|
+
tool: 'customBiggerIsBetter'
|
|
264
|
+
output-file-path: './perf_benchmark.json'
|
|
265
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
266
|
+
auto-push: true
|
|
267
|
+
benchmark-data-dir-path: "dev/benchmark"
|
|
268
|
+
|
|
269
|
+
- name: Store synthesis benchmark result (basic)
|
|
270
|
+
uses: benchmark-action/github-action-benchmark@v1
|
|
271
|
+
with:
|
|
272
|
+
name: Fmax and LCs (basic)
|
|
273
|
+
tool: 'customBiggerIsBetter'
|
|
274
|
+
output-file-path: './synth-benchmark-basic.json'
|
|
275
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
276
|
+
auto-push: true
|
|
277
|
+
benchmark-data-dir-path: "dev/benchmark"
|
|
278
|
+
|
|
279
|
+
- name: Store synthesis benchmark result (full)
|
|
280
|
+
uses: benchmark-action/github-action-benchmark@v1
|
|
281
|
+
with:
|
|
282
|
+
name: Fmax and LCs (full)
|
|
283
|
+
tool: 'customBiggerIsBetter'
|
|
284
|
+
output-file-path: './synth-benchmark-full.json'
|
|
285
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
286
|
+
auto-push: true
|
|
287
|
+
benchmark-data-dir-path: "dev/benchmark"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Build docs and trigger gh-pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "master"
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- "master"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
push_gh-pages:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 5
|
|
16
|
+
env:
|
|
17
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
+
GH_MAIL: ${{github.event.pusher.email}}
|
|
19
|
+
GH_NAME: ${{github.event.pusher.name}}
|
|
20
|
+
DOCS_DIR: "docs"
|
|
21
|
+
BUILD_DIR: "build"
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout
|
|
24
|
+
uses: actions/checkout@v6
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.13"
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
python3 -m venv venv
|
|
34
|
+
. venv/bin/activate
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
python -m pip install ".[dev]"
|
|
37
|
+
|
|
38
|
+
- name: Build documentation
|
|
39
|
+
run: |
|
|
40
|
+
. venv/bin/activate
|
|
41
|
+
./ci/build_docs.sh
|
|
42
|
+
|
|
43
|
+
- name: Push documentation
|
|
44
|
+
# Deploy documentation only when on master
|
|
45
|
+
if: github.ref == 'refs/heads/master'
|
|
46
|
+
run: |
|
|
47
|
+
. venv/bin/activate
|
|
48
|
+
./ci/push_gh_pages.sh
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
- 'feature/**'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- master
|
|
11
|
+
- 'feature/**'
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build-core:
|
|
16
|
+
name: Synthesize full core
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 5
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v6
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.13'
|
|
27
|
+
|
|
28
|
+
- name: Install Coreblocks dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python3 -m venv venv
|
|
31
|
+
. venv/bin/activate
|
|
32
|
+
python3 -m pip install --upgrade pip
|
|
33
|
+
python3 -m pip install .
|
|
34
|
+
|
|
35
|
+
- name: Generate Verilog
|
|
36
|
+
run: |
|
|
37
|
+
. venv/bin/activate
|
|
38
|
+
PYTHONHASHSEED=0 TRANSACTRON_VERBOSE=1 python3 -m coreblocks.gen_verilog --verbose --config full
|
|
39
|
+
|
|
40
|
+
- uses: actions/upload-artifact@v7
|
|
41
|
+
with:
|
|
42
|
+
name: "verilog-full-core"
|
|
43
|
+
path: |
|
|
44
|
+
core.v
|
|
45
|
+
core.v.json
|
|
46
|
+
|
|
47
|
+
build-regression-tests:
|
|
48
|
+
name: Build regression tests (riscv-tests)
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2024.12.07
|
|
51
|
+
timeout-minutes: 10
|
|
52
|
+
steps:
|
|
53
|
+
- name: Checkout
|
|
54
|
+
uses: actions/checkout@v6
|
|
55
|
+
|
|
56
|
+
- name: Get submodules HEAD hash
|
|
57
|
+
run: |
|
|
58
|
+
git config --global --add safe.directory /__w/coreblocks/coreblocks
|
|
59
|
+
git submodule > .gitmodules-hash
|
|
60
|
+
|
|
61
|
+
- name: Cache regression-tests
|
|
62
|
+
id: cache-regression
|
|
63
|
+
uses: actions/cache@v4
|
|
64
|
+
env:
|
|
65
|
+
cache-name: cache-regression-tests
|
|
66
|
+
with:
|
|
67
|
+
path: test/external/riscv-tests/test-*
|
|
68
|
+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(
|
|
69
|
+
'**/test/external/riscv-tests/environment/custom/**',
|
|
70
|
+
'**/test/external/riscv-tests/Makefile',
|
|
71
|
+
'**/.gitmodules-hash',
|
|
72
|
+
'**/docker/riscv-toolchain.Dockerfile',
|
|
73
|
+
'**/.github/workflows/main.yml'
|
|
74
|
+
) }}
|
|
75
|
+
lookup-only: true
|
|
76
|
+
|
|
77
|
+
- if: ${{ steps.cache-regression.outputs.cache-hit != 'true' }}
|
|
78
|
+
name: Checkout with submodules
|
|
79
|
+
uses: actions/checkout@v6
|
|
80
|
+
with:
|
|
81
|
+
submodules: recursive
|
|
82
|
+
|
|
83
|
+
- if: ${{ steps.cache-regression.outputs.cache-hit != 'true' }}
|
|
84
|
+
run: cd test/external/riscv-tests && make
|
|
85
|
+
|
|
86
|
+
- if: ${{ steps.cache-regression.outputs.cache-hit != 'true' }}
|
|
87
|
+
name: Upload riscv-tests
|
|
88
|
+
uses: actions/upload-artifact@v7
|
|
89
|
+
with:
|
|
90
|
+
path: test/external/riscv-tests
|
|
91
|
+
|
|
92
|
+
run-regression-tests:
|
|
93
|
+
name: Run regression tests (riscv-tests)
|
|
94
|
+
runs-on: ubuntu-22.04 # older version for compatibility with Docker image
|
|
95
|
+
timeout-minutes: 60
|
|
96
|
+
container: ghcr.io/kuznia-rdzeni/verilator:v5.008-2023.11.19_v
|
|
97
|
+
needs: [ build-regression-tests, build-core ]
|
|
98
|
+
steps:
|
|
99
|
+
- name: Checkout
|
|
100
|
+
uses: actions/checkout@v6
|
|
101
|
+
|
|
102
|
+
- name: Get submodules HEAD hash
|
|
103
|
+
run: |
|
|
104
|
+
git config --global --add safe.directory /__w/coreblocks/coreblocks
|
|
105
|
+
git submodule > .gitmodules-hash
|
|
106
|
+
|
|
107
|
+
- name: Set up Python
|
|
108
|
+
uses: actions/setup-python@v5
|
|
109
|
+
with:
|
|
110
|
+
python-version: '3.13'
|
|
111
|
+
|
|
112
|
+
- name: Install dependencies
|
|
113
|
+
run: |
|
|
114
|
+
python3 -m venv venv
|
|
115
|
+
. venv/bin/activate
|
|
116
|
+
python3 -m pip install --upgrade pip
|
|
117
|
+
python3 -m pip install ".[dev]"
|
|
118
|
+
|
|
119
|
+
- uses: actions/download-artifact@v8
|
|
120
|
+
name: Download full verilog core
|
|
121
|
+
with:
|
|
122
|
+
name: "verilog-full-core"
|
|
123
|
+
path: .
|
|
124
|
+
|
|
125
|
+
- uses: actions/cache@v4
|
|
126
|
+
name: Download tests from cache
|
|
127
|
+
env:
|
|
128
|
+
cache-name: cache-regression-tests
|
|
129
|
+
with:
|
|
130
|
+
path: test/external/riscv-tests/test-*
|
|
131
|
+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(
|
|
132
|
+
'**/test/external/riscv-tests/environment/custom/**',
|
|
133
|
+
'**/test/external/riscv-tests/Makefile',
|
|
134
|
+
'**/.gitmodules-hash',
|
|
135
|
+
'**/docker/riscv-toolchain.Dockerfile',
|
|
136
|
+
'**/.github/workflows/main.yml'
|
|
137
|
+
) }}
|
|
138
|
+
fail-on-cache-miss: true
|
|
139
|
+
|
|
140
|
+
- name: Run tests
|
|
141
|
+
run: |
|
|
142
|
+
. venv/bin/activate
|
|
143
|
+
scripts/run_tests.py -a regression -v
|
|
144
|
+
|
|
145
|
+
- name: Check regression with pysim
|
|
146
|
+
run: |
|
|
147
|
+
. venv/bin/activate
|
|
148
|
+
./scripts/run_tests.py -c 1 -a -b pysim regression
|
|
149
|
+
|
|
150
|
+
build-arch-regression-tests:
|
|
151
|
+
name: Build arch regression tests (riscv-arch-test)
|
|
152
|
+
runs-on: ubuntu-latest
|
|
153
|
+
container:
|
|
154
|
+
image: ghcr.io/riscv/act4-build:sha-cb452225bcac086030f4bf6f3565298abe45401c
|
|
155
|
+
options: --user root
|
|
156
|
+
timeout-minutes: 20
|
|
157
|
+
steps:
|
|
158
|
+
- name: Add required tools for github CI
|
|
159
|
+
run: |
|
|
160
|
+
apt-get update
|
|
161
|
+
apt-get install -y git tar gzip curl ca-certificates build-essential libgmp-dev
|
|
162
|
+
|
|
163
|
+
- name: Checkout
|
|
164
|
+
uses: actions/checkout@v6
|
|
165
|
+
|
|
166
|
+
- name: Get submodules HEAD hash
|
|
167
|
+
working-directory: .
|
|
168
|
+
run: |
|
|
169
|
+
git config --global --add safe.directory /__w/coreblocks/coreblocks
|
|
170
|
+
git submodule > .gitmodules-hash
|
|
171
|
+
|
|
172
|
+
- name: Cache arch regression tests
|
|
173
|
+
id: cache-arch-regression-tests
|
|
174
|
+
uses: actions/cache@v4
|
|
175
|
+
env:
|
|
176
|
+
cache-name: cache-arch-regression-tests
|
|
177
|
+
with:
|
|
178
|
+
path: |
|
|
179
|
+
test/external/riscv-arch-test/elfs/**/*.elf
|
|
180
|
+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(
|
|
181
|
+
'**/test/external/riscv-arch-test/Makefile',
|
|
182
|
+
'**/test/external/riscv-arch-test/coreblocks/**',
|
|
183
|
+
'**/.gitmodules-hash',
|
|
184
|
+
'**/.github/workflows/main.yml'
|
|
185
|
+
) }}
|
|
186
|
+
|
|
187
|
+
- if: ${{ steps.cache-arch-regression-tests.outputs.cache-hit != 'true' }}
|
|
188
|
+
name: Checkout with submodules
|
|
189
|
+
uses: actions/checkout@v6
|
|
190
|
+
with:
|
|
191
|
+
submodules: recursive
|
|
192
|
+
|
|
193
|
+
- if: ${{ steps.cache-arch-regression-tests.outputs.cache-hit != 'true' }}
|
|
194
|
+
name: Trust riscv-arch-test with mise
|
|
195
|
+
run: mise trust test/external/riscv-arch-test/.mise.toml
|
|
196
|
+
|
|
197
|
+
- if: ${{ steps.cache-arch-regression-tests.outputs.cache-hit != 'true' }}
|
|
198
|
+
name: Build arch regression tests
|
|
199
|
+
run: make -C test/external/riscv-arch-test -j $(nproc)
|
|
200
|
+
|
|
201
|
+
- name: Upload riscv-arch-test tests
|
|
202
|
+
uses: actions/upload-artifact@v7
|
|
203
|
+
with:
|
|
204
|
+
name: "riscv-arch-test-elfs"
|
|
205
|
+
path: test/external/riscv-arch-test/elfs
|
|
206
|
+
|
|
207
|
+
run-arch-regression-tests:
|
|
208
|
+
strategy:
|
|
209
|
+
fail-fast: false
|
|
210
|
+
matrix:
|
|
211
|
+
config: [cocotb, pysim]
|
|
212
|
+
name: Run arch regression tests (riscv-arch-test)
|
|
213
|
+
runs-on: ubuntu-22.04 # older version for compatibility with Docker image
|
|
214
|
+
container: ghcr.io/kuznia-rdzeni/verilator:v5.008-2023.11.19_v
|
|
215
|
+
timeout-minutes: 180
|
|
216
|
+
needs: [ build-arch-regression-tests ]
|
|
217
|
+
steps:
|
|
218
|
+
- name: Checkout
|
|
219
|
+
uses: actions/checkout@v6
|
|
220
|
+
|
|
221
|
+
- name: Get submodules HEAD hash
|
|
222
|
+
working-directory: .
|
|
223
|
+
run: |
|
|
224
|
+
git config --global --add safe.directory /__w/coreblocks/coreblocks
|
|
225
|
+
git submodule > .gitmodules-hash
|
|
226
|
+
|
|
227
|
+
- name: Restore arch regression tests cache
|
|
228
|
+
uses: actions/cache@v4
|
|
229
|
+
env:
|
|
230
|
+
cache-name: cache-arch-regression-tests
|
|
231
|
+
with:
|
|
232
|
+
path: |
|
|
233
|
+
test/external/riscv-arch-test/elfs/**/*.elf
|
|
234
|
+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(
|
|
235
|
+
'**/test/external/riscv-arch-test/Makefile',
|
|
236
|
+
'**/test/external/riscv-arch-test/coreblocks/**',
|
|
237
|
+
'**/.gitmodules-hash',
|
|
238
|
+
'**/.github/workflows/main.yml'
|
|
239
|
+
) }}
|
|
240
|
+
fail-on-cache-miss: true
|
|
241
|
+
|
|
242
|
+
- name: Set up Python
|
|
243
|
+
uses: actions/setup-python@v5
|
|
244
|
+
with:
|
|
245
|
+
python-version: '3.13'
|
|
246
|
+
|
|
247
|
+
- name: Install dependencies
|
|
248
|
+
run: |
|
|
249
|
+
python3 -m venv venv
|
|
250
|
+
. venv/bin/activate
|
|
251
|
+
python3 -m pip install --upgrade pip
|
|
252
|
+
python3 -m pip install ".[dev]"
|
|
253
|
+
|
|
254
|
+
- name: Run arch regression tests
|
|
255
|
+
run: |
|
|
256
|
+
. venv/bin/activate
|
|
257
|
+
if [ "${{ matrix.config }}" = "cocotb" ]; then
|
|
258
|
+
./scripts/run_tests.py --arch-tests -v -b cocotb regression
|
|
259
|
+
else
|
|
260
|
+
./scripts/run_tests.py --arch-tests -v -b pysim -c 1 -j 0 'regression.*not'
|
|
261
|
+
fi
|
|
262
|
+
|
|
263
|
+
unit-test:
|
|
264
|
+
name: Run unit tests
|
|
265
|
+
runs-on: ubuntu-latest
|
|
266
|
+
timeout-minutes: 150
|
|
267
|
+
steps:
|
|
268
|
+
- name: Checkout
|
|
269
|
+
uses: actions/checkout@v6
|
|
270
|
+
|
|
271
|
+
- name: Set up Python
|
|
272
|
+
uses: actions/setup-python@v5
|
|
273
|
+
with:
|
|
274
|
+
python-version: '3.13'
|
|
275
|
+
cache: 'pip'
|
|
276
|
+
cache-dependency-path: |
|
|
277
|
+
pyproject.toml
|
|
278
|
+
|
|
279
|
+
- name: Install dependencies
|
|
280
|
+
run: |
|
|
281
|
+
python -m pip install --upgrade pip
|
|
282
|
+
pip3 install ".[dev]"
|
|
283
|
+
sudo apt-get install -y binutils-riscv64-unknown-elf
|
|
284
|
+
|
|
285
|
+
- name: Run tests
|
|
286
|
+
run: ./scripts/run_tests.py -v
|
|
287
|
+
|
|
288
|
+
- name: Check traces and profiles
|
|
289
|
+
run: ./scripts/run_tests.py -t -p -c 1 TestCore
|
|
290
|
+
|
|
291
|
+
- name: Check listing tests
|
|
292
|
+
run: ./scripts/run_tests.py -l
|
|
293
|
+
|
|
294
|
+
lint:
|
|
295
|
+
name: Check code formatting and typing
|
|
296
|
+
runs-on: ubuntu-latest
|
|
297
|
+
timeout-minutes: 5
|
|
298
|
+
steps:
|
|
299
|
+
- name: Checkout
|
|
300
|
+
uses: actions/checkout@v6
|
|
301
|
+
|
|
302
|
+
- name: Set up Python
|
|
303
|
+
uses: actions/setup-python@v5
|
|
304
|
+
with:
|
|
305
|
+
python-version: '3.13'
|
|
306
|
+
cache: 'pip'
|
|
307
|
+
cache-dependency-path: |
|
|
308
|
+
pyproject.toml
|
|
309
|
+
|
|
310
|
+
- name: Install dependencies
|
|
311
|
+
run: |
|
|
312
|
+
python -m pip install --upgrade pip
|
|
313
|
+
pip3 install ".[dev]"
|
|
314
|
+
|
|
315
|
+
- name: Check format
|
|
316
|
+
run: ./scripts/lint.sh check_format
|
|
317
|
+
|
|
318
|
+
- name: Check types
|
|
319
|
+
run: ./scripts/lint.sh check_types
|
|
320
|
+
|
|
321
|
+
- name: Check line endings
|
|
322
|
+
run: |
|
|
323
|
+
git add --renormalize .
|
|
324
|
+
git diff --cached --exit-code
|
|
325
|
+
|
|
326
|
+
- name: Check pre-commit hooks
|
|
327
|
+
run: pre-commit run --all-files --show-diff-on-failure
|