Spike, a RISC-V ISA Simulator
This report presents the forensic synthetic code analysis of riscv-software-src/riscv-isa-sim, a C project with 3,209 GitHub stars. SynthScan v2.0 examined 67,623 lines of code across 1960 source files, recording 357 pattern matches distributed across 3 syntactic categories. The overall adjusted score of 4.1 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 357 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | customext/dummy_rocc_test.c | 1 | // The following is a RISC-V program to test the functionality of the | COMMENT |
| LOW | softfloat/specialize.h | 61 | #define i8_fromPosOverflow 0x7F | COMMENT |
| LOW | softfloat/primitiveTypes.h | 61 | #ifdef LITTLEENDIAN | COMMENT |
| LOW | softfloat/primitiveTypes.h | 81 | #define indexMultiwordLoBut( total, n ) (n) | COMMENT |
| LOW | softfloat/softfloat.h | 41 | | header, "softfloat.h", be created that folds in "softfloat_types.h" and that | COMMENT |
| LOW | softfloat/platform.h | 41 | #define LITTLEENDIAN 1 | COMMENT |
| LOW | fdt/libfdt_env.h | 1 | /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ | COMMENT |
| LOW | fdt/fdt.h | 61 | #define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(fdt32_t)) | COMMENT |
| LOW | fesvr/htif.h | 1 | // See LICENSE for license details. | COMMENT |
| LOW | fesvr/context.h | 1 | #ifndef _HTIF_CONTEXT_H | COMMENT |
| LOW | fesvr/elf.h | 1 | // See LICENSE for details. | COMMENT |
| LOW | fesvr/tsi.h | 1 | #ifndef __SAI_H | COMMENT |
| LOW | fesvr/dtm.h | 1 | #ifndef _ROCKET_DTM_H | COMMENT |
| LOW | scripts/vcs-version.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/vcs-version.sh | 21 | # where X is the major release, Y is the minor release, Z is the number | COMMENT |
| LOW | arch_test_target/spike/model_test.h | 41 | //RVTEST_IO_WRITE_STR | COMMENT |
| LOW | riscv/zvkned_ext_macros.h | 1 | // Helper macros to help implement instructions defined as part of | COMMENT |
| LOW | riscv/zvkned_ext_macros.h | 201 | (STATE)[ 3] = (STATE)[ 7]; \ | COMMENT |
| LOW | riscv/devices.h | 1 | #ifndef _RISCV_DEVICES_H | COMMENT |
| LOW | riscv/vector_unit.h | 121 | if (is_write) | COMMENT |
| LOW | riscv/v_ext_macros.h | 2361 | #define ZVT_CHECK_ALIGN_RD require_align(insn.rd(), P.VU.vflmul) | COMMENT |
| LOW | riscv/imsic.h | 1 | // See LICENSE for license details. | COMMENT |
| LOW | riscv/entropy_source.h | 21 | static const uint32_t OPST_ES16 = 0x2 << 30; | COMMENT |
| LOW | riscv/decode_macros.h | 1 | // See LICENSE for license details. | COMMENT |
| LOW | riscv/decode_macros.h | 61 | } | COMMENT |
| LOW | riscv/decode_macros.h | 81 | #define RVC_FRS2S READ_FREG(insn.rvc_rs2s()) | COMMENT |
| LOW | riscv/decode_macros.h | 101 | // Zilsd macros | COMMENT |
| LOW | riscv/decode_macros.h | 121 | #define FRS1_D READ_FREG_D(insn.rs1()) | COMMENT |
| LOW | riscv/decode_macros.h | 161 | COMMENT | |
| LOW | riscv/decode_macros.h | 321 | /* permissions check occurs in get_csr */ \ | COMMENT |
| LOW | riscv/decode_macros.h | 341 | COMMENT | |
| LOW | riscv/processor.h | 1 | // See LICENSE for license details. | COMMENT |
| LOW | riscv/zvksh_ext_macros.h | 1 | // Helper macros and functions to help implement instructions defined as part of | COMMENT |
| LOW | riscv/zvksh_ext_macros.h | 41 | #define T2 0x7A879D8A | COMMENT |
| LOW | riscv/debug_rom_defines.h | 1 | // See LICENSE file for license details. | COMMENT |
| LOW | riscv/encoding.h | 21 | #define MSTATUS_UIE _RISCV_UL(0x00000001) | COMMENT |
| LOW | riscv/encoding.h | 41 | #define MSTATUS_SDT _RISCV_UL(0x01000000) | COMMENT |
| LOW | riscv/encoding.h | 61 | #define SSTATUS_SIE _RISCV_UL(0x00000002) | COMMENT |
| LOW | riscv/encoding.h | 81 | #define HSTATUS_SPVP _RISCV_UL(0x00000100) | COMMENT |
| LOW | riscv/encoding.h | 101 | #define DCSR_CETRIG (1<<19) | COMMENT |
| LOW | riscv/encoding.h | 121 | #define DCSR_CAUSE_DEBUGINT 3 | COMMENT |
| LOW | riscv/encoding.h | 141 | #define MCONTROL_U (1<<3) | COMMENT |
| LOW | riscv/encoding.h | 161 | COMMENT | |
| LOW | riscv/encoding.h | 181 | #define MIP_HS_MASK (MIP_VS_MASK | MIP_SGEIP) | COMMENT |
| LOW | riscv/encoding.h | 201 | #define MENVCFG_CBIE _RISCV_UL(0x00000030) | COMMENT |
| LOW | riscv/encoding.h | 221 | #define MSTATEEN0_PRIV114 _RISCV_ULL(0x0080000000000000) | COMMENT |
| LOW | riscv/encoding.h | 241 | #define MHPMEVENT_VSINH _RISCV_ULL(0x0800000000000000) | COMMENT |
| LOW | riscv/encoding.h | 261 | COMMENT | |
| LOW | riscv/encoding.h | 281 | COMMENT | |
| LOW | riscv/encoding.h | 301 | #define SISELECT_IMSIC _RISCV_UL(0x70) | COMMENT |
| LOW | riscv/encoding.h | 321 | #define HSTATEEN0H_AIA _RISCV_UL(0x08000000) | COMMENT |
| LOW | riscv/encoding.h | 341 | #define MSECCFG_RLB _RISCV_UL(0x00000004) | COMMENT |
| LOW | riscv/encoding.h | 361 | #define PRV_S 1 | COMMENT |
| LOW | riscv/encoding.h | 381 | #define HGATP32_VMID _RISCV_UL(0x1FC00000) | COMMENT |
| LOW | riscv/encoding.h | 401 | COMMENT | |
| LOW | riscv/encoding.h | 421 | #define MCTRCTL_TRETINH _RISCV_ULL(0x0000000800000000) | COMMENT |
| LOW | riscv/encoding.h | 441 | #define SCTRCTL_INTRINH _RISCV_ULL(0x0000000400000000) | COMMENT |
| LOW | riscv/encoding.h | 461 | #define VSCTRCTL_INTRINH _RISCV_ULL(0x0000000400000000) | COMMENT |
| LOW | riscv/encoding.h | 481 | COMMENT | |
| LOW | riscv/encoding.h | 501 | #define IRQ_S_EXT 9 | COMMENT |
| 288 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/vcs-version.sh | 2 | #========================================================================= | COMMENT |
| MEDIUM | scripts/vcs-version.sh | 4 | #========================================================================= | COMMENT |
| MEDIUM | scripts/vcs-version.sh | 48 | #------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/vcs-version.sh | 50 | #------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/vcs-version.sh | 66 | #------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/vcs-version.sh | 68 | #------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/vcs-version.sh | 84 | #------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/vcs-version.sh | 86 | #------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | scripts/vcs-version.sh | 85 | # Create the version string | COMMENT |