Skip to content

Commit ef1e125

Browse files
Lingrui98claude
andauthored
support ChampSim and CBP2025 trace simulation (#649)
* cpu-o3: Add trace-driven simulation infrastructure Implements comprehensive trace replay capability for performance modeling: - TraceInstruction unified representation for O3CPU consumption - ChampSimTraceReader for binary trace parsing - Abstract TraceReader base class with factory pattern - Fetch stage integration for optional trace mode - Complete testing and configuration infrastructure - Documentation and example scripts Supports ChampSim traces with CBP2025 framework ready. Maintains full O3CPU pipeline timing while sourcing from traces. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * cpu-o3: Core trace infrastructure improvements This commit implements four major improvements to the trace infrastructure based on TRACE_REVIEW.md analysis: 1. Fix TraceInstruction metadata storage crash issue - Modified traceInstMap to use shared_ptr approach - Replaced direct TraceInstruction storage with shared_ptr to avoid copy constructor crashes during hash table operations - Added proper memory management for trace instruction metadata 2. Implement branch target support in TraceInstruction - Added setBranchTarget/getBranchTarget methods - Enhanced TraceInstruction with comprehensive branch target handling - Enables proper branch prediction validation against trace ground truth 3. Implement real BP training hooks in feedTraceBranchToBP() - Added comprehensive BP training for both regular and decoupled BPs - Implemented feedTraceToDecoupledBTB() with full FSQ integration - Proper RISC-V PCState handling: target_pc->as<RiscvISA::PCState>().set() - Enhanced branch predictor learning from trace execution patterns 4. Add configurable address mapping (hash vs linear) - Enhanced ChampSimTraceReader constructor with mapping parameters - Implemented mapAddressHash() and mapAddressLinear() methods - Added BaseO3CPU.py parameters: traceAddrMapMode, traceAddrBase, etc. - Enables flexible address translation strategies for different workloads These improvements provide production-ready trace simulation with enhanced branch predictor integration and robust error handling. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: I31ceb1b8aa89fad1dbb43be0a91a0ae654decb56 Co-Authored-By: Claude <noreply@anthropic.com> * cpu-o3: Pipeline trace mode compatibility fixes This commit implements essential compatibility fixes across all O3 pipeline stages to properly handle trace-driven simulation patterns: 1. Commit Stage (commit.cc) - Modified noSquashFromTC assertion to allow trace mode exceptions - Trace instructions may have different squash patterns than normal execution 2. Issue Queue (issue_queue.cc) - Relaxed bypass network restriction for trace mode - Fixed "dst[sn:X] is not load" assertion that was failing with trace patterns - Trace mode has different instruction sequencing requirements 3. Memory Dependency Unit (mem_dep_unit.cc) - Fixed hash table assertion during squash operations in trace mode - Added trace mode exception to handle temporary dependency inconsistencies - Trace instruction lifecycle differs from normal execution patterns 4. Reorder Buffer (rob.cc) - Fixed "isInROB()" assertion failure for head instruction reads - Added trace mode exception for instruction state tracking inconsistencies - Handles trace-specific instruction lifecycle patterns 5. Load/Store Queue (lsq.cc) - Enhanced for trace mode memory operation handling - Proper integration with trace memory address mapping system These fixes ensure stable trace execution across all major O3 pipeline components by handling the unique execution patterns of trace-driven simulation while maintaining normal mode functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: I7fe2684de6409463e0486c2c106ba055c8803f18 Co-Authored-By: Claude <noreply@anthropic.com> * cpu-o3: CPU-level trace mode integration This commit implements core CPU-level support for trace-driven simulation with enhanced instruction handling and tracing capabilities: 1. CPU Core Integration (cpu.cc, cpu.hh) - Added isTraceMode() method for pipeline components to detect trace execution - Enhanced CPU initialization and configuration for trace simulation - Integrated trace mode detection throughout CPU lifecycle management - Added support for trace-specific CPU behavior modifications 2. Dynamic Instruction Enhancement (dyn_inst.cc) - Enhanced XsDynInstMeta handling for trace instructions - Improved instruction metadata management for trace execution patterns - Added trace-specific instruction lifecycle support - Better integration with trace instruction conversion pipeline These changes provide the foundational CPU-level infrastructure needed for trace-driven simulation, enabling pipeline components to adapt their behavior appropriately when running in trace mode versus normal execution. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: I29af19465dcdd5e9748a23b70848f46a8ca91db2 Co-Authored-By: Claude <noreply@anthropic.com> * cpu: Branch predictor trace mode integration This commit implements branch predictor support for trace-driven simulation with enhanced training and validation capabilities: 1. Branch Predictor Unit (bpred_unit.cc) - Enhanced BP unit for trace mode integration - Added support for trace-driven branch prediction validation - Improved branch prediction accuracy analysis in trace mode - Integration with trace branch outcome ground truth data 2. Decoupled Branch Predictor (decoupled_bpred.cc) - Enhanced decoupled BP architecture for trace simulation - Added support for FetchStreamQueue integration with trace data - Improved training mechanisms for trace-driven BP learning - Better integration with trace branch target information These changes enable sophisticated branch prediction research using real application traces, providing accurate BP training and validation capabilities for trace-driven simulation. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: I10bc3daa634d90d1abd85ced88e52904e6dec825 Co-Authored-By: Claude <noreply@anthropic.com> * cpu-o3: Enhanced trace reader infrastructure This commit implements enhanced trace reader infrastructure with support for multiple trace formats and advanced features: 1. Enhanced TraceReader Base Class (TraceReader.cc, TraceReader.hh) - Added checkpoint and rollback support for misprediction recovery - Enhanced TraceReader with statistics::Group inheritance for proper stats - Improved buffer management and instruction tracking capabilities - Added comprehensive trace reader factory methods for format selection 2. CBP2025 Trace Format Support (CBP2025TraceReader.hh) - Added framework for Championship Branch Prediction 2025 traces - Implemented multi-piece instruction support for complex trace formats - Enhanced instruction parsing for advanced branch prediction research - Added support for detailed branch prediction validation metrics 3. Updated Documentation (README.md) - Enhanced trace infrastructure documentation - Added usage examples for different trace formats - Documented configuration options and parameters - Provided troubleshooting guides for trace simulation These enhancements provide a robust foundation for trace-driven simulation research with support for multiple academic and commercial trace formats. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: Ia9513a9c0924e267694fd86f920f1acf00999bd0 Co-Authored-By: Claude <noreply@anthropic.com> * configs: Comprehensive trace simulation configuration system This commit implements a complete configuration system for trace-driven simulation with support for both Full System and Syscall Emulation modes: 1. Enhanced XiangShan Configuration (xiangshan.py) - Added comprehensive trace mode support in Full System configuration - Integrated trace file validation and error handling - Added configurable trace parameters: format, max instructions, BP options - Enhanced difftest integration with intelligent trace mode detection - Proper checkpoint vs trace mode selection logic - Added memory range configuration for trace address mapping 2. Dedicated Trace Configuration (xiangshan_trace.py) - Specialized configuration for Syscall Emulation trace simulation - Streamlined parameters for research and development use - Optimized for fast trace simulation without full system overhead - Comprehensive command-line argument processing for trace options - Built-in validation and error checking for trace file access Key Features: - Automatic trace format detection and reader selection - Configurable address mapping strategies (hash vs linear) - Decoupled branch predictor integration with trace mode - Flexible simulation parameters for different research needs - Production-ready error handling and validation - Support for compressed trace files (.gz) This provides researchers with both comprehensive system-level simulation (FS mode) and fast targeted simulation (SE mode) capabilities. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: Ibb057687f1514ad7404bbec0a16404d4ec80ea96 Co-Authored-By: Claude <noreply@anthropic.com> * mem: Memory system configuration for trace simulation This commit implements memory system configuration enhancements to support trace-driven simulation with proper DRAM controller integration: 1. DRAMsim3 Configuration (DRAMsim3.py) - Fixed configuration file path for XiangShan-specific DRAM parameters - Updated reference to correct INI file: xiangshan_DDR4_8Gb_x8_2400_2ch.ini - Proper integration with trace mode memory access patterns - Enhanced memory timing parameters for trace simulation accuracy Key Features: - Corrected DRAM configuration file references - Optimized memory parameters for trace workload characteristics - Better integration with trace address mapping system - Proper memory timing simulation for research accuracy This ensures that trace-driven simulations use appropriate memory system modeling that matches the XiangShan processor's memory hierarchy design. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: I780a037943c964edae8d0bfc4adb0ffd07c4635d Co-Authored-By: Claude <noreply@anthropic.com> * cpu: temp commit * configs: consolidate trace runs under xiangshan.py Change-Id: Ia8e855b48002f458a1a2934bf612109138213686 * cpu-o3: roll back trace-only pipeline relaxations Change-Id: I61908233a3fc76ecbf79a8ad3da8e38e8b96346e * cpu-o3/trace: on-demand consumption in fetch; no fetch-side BP training; bind branch truth via DynInst - Add DynInst trace branch truth getters/setters used by EXE redirect - Feed single instruction from trace before decode; stop icache-time bulk injection - Keep BP training to normal commit path Build: RISCV gem5.opt compiles * cpu-o3/trace: restore normal-path behavior in DynInst mem ops - Remove trace-mode address overrides and fallbacks in initiateMemRead/writeMem/initiateMemMgmtCmd - Keep trace semantics driven by fetch/DynInst metadata; memory ops follow normal pipeline Build: RISCV gem5.opt compiles with -j256 * cpu-o3/trace: centralize trace init in Fetch; remove CPU-level traceReader wiring - Restore non-fetch components to normal path; Fetch owns traceMode init - Build: RISCV gem5.opt compiles with -j256 * cpu: trace-mode BP reset; npc override; commit PC diff - Prime decoupled BP via resetPC at trace start - Override DynInst npc before mispredict check in trace-mode - Per-thread traceCommitIndex and macro-inst boundary advancement - Compare commit PC against trace metadata; panic on mismatch - Override load request address and completed data with trace values - Fix include ordering to satisfy style checker Change-Id: I5645083a47bcadd0b9db5241805888773d2e7b0f * cpu: commit uses trace index; add read-only trace PC API - Fetch: add getTracePCByIndex(index) using checkpoint/seek/restore - CPU: expose getTracePCByIndex to commit - Commit: use per-thread traceCommitIndex to read expected PC; fallback to metadata Change-Id: Icce93cfb9ba82ee90b3ffd43a5b8f5f949b31cc1 * cpu: fix build for trace index/read-only PC API - Fetch::findTraceIndexForSeqNum is const to satisfy CPU const call - Fetch::getTracePCByIndex definition moved inside namespaces - Build verified: scons -j50 --gold-linker build/RISCV/gem5.opt Change-Id: I96caac9ecd7d2f4b04fe8ac8c026a73b20d3b60e * util: exec dump_champsim_trace; add offline usage docs - Set executable bit for util/dump_champsim_trace.py - Document offline ChampSim trace dump usage and options in TRACE_USAGE.md Change-Id: I24cf3943493b5cfbfa15cee465d3fec69a31d3ad * cpu,cpu-o3: wrong-path via BPU stream; add BP validation trigger - Follow BPU stream for wrong-path; inject NOPs; no local squash - Compare next_pc vs trace; activate wrong-path/stall; feed ground truth to BP - Wire params: mispredict_penalty, enable_wrongpath, use_traceinst, bp_validation Change-Id: I9da3d69503702358ff0a410cce0b4f58c968f686 * cpu-o3,util: better ChampSim branch types; richer dumper - Classify direct/indirect/call/ret/cond via special regs - Dumper: ABI reg names, compact mem, richer JSON Change-Id: Ie8fa2415ebab80cb7dafe2e059585759c8056c81 * util,configs,misc: add Recycle Bin SOP and enforcement hook - Add AGENTS.md with recycle bin SOP - Pre-commit hook to forbid direct deletions; prefer .recycle_bin/ - Update .gitignore for common outputs Change-Id: I824602c2e46fce2181cf5ebd649625c28823107f * cpu,cpu-o3: align exe redirect to trace nextPC in trace mode - In trace mode, set inst->pcState().npc to trace-nextPC before mispredict check Change-Id: I76717db0c9c9546a853625a4e424de2672017239 * cpu: add trace diagnostics and persist checkpoint pending - Add TraceReader::dumpInstrBuffer() and hook dumps before/after all instrBuffer mutations (push/pop/reset/restore) - Add detailed diagnostics for seek fast-forward and checkpoint pending state - Extend TraceCheckpoint to persist pending instruction (hasPending + pending) - Restore pending on checkpoint restore to prevent seqNum gaps across restore/seek/reset boundaries No functional changes outside trace-mode reader; normal mode unaffected. Change-Id: I4510d657dd940d1d637716b7a7f4df921448a5a5 * ext: add DRAMSim3 XiangShan configs Change-Id: I68e4b4ec8e708dd950b91d71f0209e12b676458e * cpu: enhance trace-mode fetch diagnostics and checks - Wrap long DPRINTF strings to satisfy style - Keep strict built-vs-expected stream checks and trace-mode logs consolidated No functional change beyond logging formatting. Change-Id: I3782744640544ea316852ea997985f644646d055 * cpu: commit-stage diagnostics and minor cleanups - Wrap long DPRINTF strings to satisfy style - Consolidate diagnostics in commit stage No functional change beyond logging/formatting. Change-Id: I8179ab7f499dddc813e761620bae5868c6e51ef6 * cpu,cpu-o3: soft-seek; align PC; avoid hard seek - TraceReader: add softSeekToInstruction with history window replay and buffered drop-ahead; align semantics to seekToInstruction(N) so next getNextInstruction() returns N+1 (fix off-by-one). - TraceReader: track history window and expose resetHistory(); update getNextInstruction() to serve from replay window first. - Fetch: on-demand decode feeds expected-stream head and aligns built PC to expected PC to prevent mismatch panics. - Fetch: rollbackTraceReader() now uses softSeekToInstruction(). - Commit: prefer metadata for expected PC, fallback to index lookup; avoids per-diff checkpoint/seek where possible. Rationale: - Avoid frequent hard seek/restore on squash by reusing already-read trace instructions (perf). Align index semantics (N → N+1) to match ChampSim seek behavior (correctness). Reduce hot-path overhead for commit diffs (perf). Risk/Notes: - HISTORY_CAPACITY=4096 as conservative default; can be tuned. - Fallback to hard seek remains for far jumps beyond history/buffer. Change-Id: Ibbc286fe2ff23134c36de25ac8ea6b1caab184ca * util: dump_champsim_trace.py add .xz support (lzma or xz pipe) Change-Id: I21517575f1b8ae9c9542b727a5a1c67dd1eb550e * cpu: docs update for .xz support in trace usage/readme Change-Id: I904c831ce003a6c7f54fa39842b3b715e85950c7 * cpu-o3: trace: add .xz support and correct stream readiness Change-Id: I94ad1f9106f1014b97a5c431fe6e730d15d4fcbd * configs: align trace mapping window to physical memory size Change-Id: Ifd201cccd5ffbbc879fa02b8ed7e4164d66d2873 * cpu: Fix PCState construction and store-data uop PC init - dyn_inst.hh: branchTarget() returns TheISA::PCState for trace targets to avoid abstract PCStateBase construction - dyn_inst.cc: propagate pc/pred/tid/thread to store-data uop to prevent null PC crashes in IEW Change-Id: Idaa1b92f26251245c890a3676785fb91c46f776d * cpu: Use TheISA::PageBytes to keep linear mapping across pages Replace host PAGE_SIZE with TheISA::PageBytes in ChampSimTraceReader to preserve linear mapping across page boundaries and avoid discontinuities. Add arch/riscv/page_size.hh include. Change-Id: I38e2ca4c2d287a20e7ae34f489d80e4663ff3046 * cpu: Decode-side trace nextPC override for direct control In trace mode, when decoding direct control (taken), override the target npc with the trace-provided next PC to avoid RISC-V JAL 20-bit immediate range issues and keep decode classification aligned with trace ground truth. Adds DPRINTF for observability. Change-Id: Ia2566e330a3319fad03554a27c9cea55c85b2ca3 * cpu: Trace-mode fetch robustness and metadata management - Refine Fetch::doSquash wrong-path handling and trace rollback, avoiding panic when squashInst is null and only rolling back the trace reader for true boundary mispredictions. - Bind per-instruction trace metadata and seqNum-to-traceIndex mappings using the trace instruction seqNum, with DPRINTF for observability. - Fix RISC-V MachInst encoding for trace-mode call/return/indirect control so that link/target registers follow the intended strategy. - Introduce sliding-window cleanup for traceInstMap/seqNumToTraceIndex based on the oldest in-flight seqNum and a guard distance, and add statistics to track metadata stores and cleanups. - Tighten validateBPPrediction logic and DPRINTF to clearly distinguish predicted vs trace-taken behaviour and (optionally) target PC. Change-Id: I11abf0c393a66d6048c369df5d97bad279c1b3ce * cpu,configs: Default trace address mapping to linear Switch the BaseO3CPU traceAddrMapMode default from "hash" to "linear" for trace-driven runs, and explicitly set traceAddrMapMode="linear" in xiangshan.py when aligning the trace mapping window to physical memory. This keeps the per-CPU configuration consistent with the linear address-mapping strategy used by the ChampSim trace reader and improves locality for trace-mode experiments. Change-Id: I100d2b05de99d77b1235d20e44f9fcd009549167 * util: Add gem5 debug log event extractor Introduce util/extract_gem5_events.py to extract key events from gem5 debug logs after a given tick. The script supports configurable regex patterns and toggles for buildInst (Instruction PC.*created), squash (Squashing, setting PC to), commit (Committing instruction with PC), and wrong-path enter/exit (Enter wrong-path mode / In wrong-path, detected squash from). A --debug flag prints a summary and per-event counts to stderr for quick diagnostics. Change-Id: I3b9a59ecc7a3cb51d92869cdf8a821e1e6df01c5 * cpu: handle non-branch and cond trap control flow Change-Id: If2a10c0778c20fcafb006d36b7ab46e16b65ee1d * cpu: refine trace wrong-path and cond-trap behavior Improve O3 trace-mode behavior for wrong-path execution and trace-driven cond-traps:\n- Enter wrong-path when a non-branch is predicted taken in trace+decoupled frontend, letting decode/commit squash redirect correctly.\n- Prioritize trace ctrlFlowChange handling before branch BP validation, using trace ctrlFlowTarget as the wrong-path correct PC.\n- Add DynInst trace ctrl-flow-change metadata and skip decode-side direct-control target validation for trace-marked ctrl-flow-change instructions.\n- Handle trap squashes in wrong-path mode via PC matching against traceWrongPathCorrectPC without rolling back the trace reader, since wrong-path instructions never advance the trace stream.\n- Keep non-trace and non-decoupled frontends unchanged. Change-Id: I9b113258d3e4f8b5bc41363a541f50aa0fac3058 * util: add ChampSim trace tooling and docs Add a dedicated util/trace/ namespace for ChampSim trace tooling:\n- Move dump_champsim_trace.py under util/trace/ and keep its API for trace decoding and JSON/text output.\n- Add check_champsim_nonbranch_cf.py to detect non-branch control-flow changes in ChampSim traces.\n- Add count_champsim_trace_insts.py to count trace records (instructions) across .bin/.gz/.xz formats.\n- Add align_trace_bind_events.py to align BUILD/BIND events parsed from extract_gem5_events.py output.\n- Update TRACE_USAGE.md and docs/trace_tools.md to point to the new util/trace paths and describe typical trace debug workflows. Change-Id: I32a04140c650dd6f89215fb4ceb54254aeafce2f * util: add trace-ChampSim batch helpers Add XiangShan trace-mode batch scripts without modifying the shared parallel_sim.sh driver:\n- Add util/xs_scripts/trace/run_trace_champsim.sh for running a single ChampSim trace in trace mode.\n- Add util/xs_scripts/trace/parallel_trace_sim.sh as a trace-only parallel driver that honors XSGEM5_WORK_ROOT, supports gz/zstd/xz suffixes, and maps per-workload warmup/sample fields to XS_* env vars.\n- Add util/xs_scripts/trace/count_traces_from_list.sh to batch-count trace instruction records across a workload list.\n- Add util/xs_scripts/trace/extract_panic_events.sh and report_pc_mismatch_bind.sh to extract and align PC mismatch panics with trace metadata.\n- Add generic helpers under util/xs_scripts/ (check_parallel_runs.sh, collect_parallel_errors.sh, extract_debug_events.sh, gen_champsim_workloads.sh, rerun_aborted_with_debug.sh) and Champsim trace lists for XS trace experiments. Change-Id: Ie9a19bcbb04edc4b751beea4b9fbd490b25715b8 * cpu: handle end-of-trace commit and BP updates Add trace end-of-stream metadata so that the last trace-driven instruction can be recognized at commit time and terminate the simulation cleanly in trace mode. Unify decoupled frontend branch predictor updates (including trace mode) by using fetchBuffer start PC as the predictor input and dropping the old supplyFTQWithTraceTargets() path; keep non-decoupled and non-trace behavior unchanged. Change-Id: Id47608bfe140766abe436299dd51f67fb3dec30e * util: fix trace run scripts and docs Fix trace-only run scripts after moving them under util/xs_scripts/trace/: adjust common.sh to derive gem5_home correctly for scripts in util/xs_scripts/ and util/xs_scripts/trace/, update run_trace_champsim.sh to source ../common.sh, and refresh docs/trace_tools.md to reference the new trace script paths and the actual warmup/sample mapping implemented in parallel_trace_sim.sh. Change-Id: I76ffbb0cf70e694a12fe593dc4de11775edff02e * cpu: avoid RA patterns in trace mapping Change-Id: I2ceadcb3ab00c5d5c6b7d867958af2c0f6a96316 * util: update trace helpers and distributed rerun Change-Id: I0457a6b7760322789e536f18f8efbd0ad2a9be85 * cpu,util,doc: update trace tooling docs and scripts Change-Id: I65b951c2edcf7000f2c2964f69f6484fa96fa366 * cpu: keep trace mapped addresses unaligned Change-Id: I2b678dfd46b4b5553cb9861a52c504ac94dfdf04 * cpu: harden trace wrong-path handling and inst sizing Change-Id: Ia01c2c4bce82cc63fdaa9af71eae6919a1316dfa * util: add trace rerun helper and parsing fixes Change-Id: I02dc98e3727115d5bb1441e7de082d55bf61f483 * cpu: align cbp trace ctrl-flow handling with champsim Change-Id: I9be141cdc37b4c5c14f79f3348ad109d23c0fc2b * cpu: normalize cbp trace register deps for call-indirect Change-Id: Ie717a48743e3907356a7e01208f3cea37ba73954 * cpu: map cbp call-indirect x5 source to x0 Change-Id: I9de052fe8ed6d8c6682e2f8a47700b623f98184a * cpu: remap cbp call-indirect x5 source to neutral gpr Change-Id: I7a85448025c90ee6ca6b6c9da328bcf3ef3f2c3b * cpu: treat cbp branch target mismatch as ctrl-flow trap Change-Id: Ib800f8c21e1be1da7846c8504aac1edb6c850f2c * cpu: redirect cbp taken-branch ctrlflow to observed next pc Change-Id: I61aaa96e3a752be61bd2c77fbf0b0442dc8ac21c * cpu: avoid panic on compressed trace encode by clamping or nop Change-Id: Ifb78eaea7e23d6c082e725fb2e6186e384e19381 * cpu: allow trace call hints to override compressed call decode Change-Id: Ia6bbbb39b2c2a145ef77d16bed9e8734e94b2539 * cpu: route trace ctrl-flow change via fault Change-Id: I12d43e73a10018dfe0c958ad314913d6cee61f19 * cpu: route trace ctrl-flow change via fault Change-Id: I54f17421ea240a646552fe4c0728b2ce9855d408 * cpu,cpu-o3: harden trace ctrl-flow handling Propagate trace ctrl-flow faults through commit to fetch so trap squashes roll back the trace reader past the faulting inst and mark when the head should be skipped. Track seqNums to notify fetch and clear the pending flag after squash. Seed committed stream/target defaults and treat compressed FP trace insts as c.nop to avoid unintended mem side effects; tidy ctrl-flow change tagging in the CBP trace reader. Change-Id: I54868ba3b77bcac693be2b44b5666af1b09c5dac * util: add trace len/reg anomaly scan Add --analyze-len-reg to dump_champsim_trace.py for ChampSim/CBP traces to flag unusual instruction length deltas or compressed-2B with multiple src regs, and a batch helper to run it over trace roots and emit per-trace reports. Change-Id: I903ca30e127107943f5c62472ac494cf1a44f25f * cpu-o3: fix trace stats parent and gzip warnings Change-Id: Icc6e1d021ff43da4ecb03989f5c17baed6d17f47 * util: move deprecated trace_example to recycle bin Change-Id: Ie381780a59567d0b50de8646d8a76144e17c7577 * util: allow uncompressed champsim traces in parallel runner Change-Id: Ic6e27c1087c103a50639696072f10e6c5022690e * cpu-o3: remove trace-side BP training hooks in fetch Change-Id: Id2928cd005c3f49d238c5fb86fbfd3209be09486 * cpu-o3: extract trace init into helper Change-Id: I5e6d69d25e0d85fd5228fb27ce79b3e6fdf49215 * cpu: refactor trace on-demand supply Extract helper for trace fetch supply, add panic guard when traceMode lacks reader, and drop dead wrong-path injection in non-trace path. Change-Id: I67a17dea991ee97ff206cbef356747336abc1b55 * cpu: factor trace squash handling Extract handleTraceSquash helper to centralize trace rollback/metadata cleanup logic and leave doSquash simpler. Change-Id: I4c589257c93f322d87b8ca68ac21390a93095562 * cpu: unify trace wrong-path entry helper Add enterTraceWrongPath helper to centralize wrong-path state updates/logging and reuse it across trap, branch-mismatch, and non-branch-predicted paths. Change-Id: I2b88eeeccc82d8f67b7d45594929c65d39314ac9 * cpu: restore dumpInsts definition Change-Id: I69f8d206ee130f8f3e20276f0c6a41f5d43b5739 * cpu: add trace wrong-path exit helper Introduce exitTraceWrongPath and reuse it in handleTraceSquash to centralize wrong-path state reset/logging. Change-Id: Ifdbe8038209a563e55f0e597bb51d23a4951751a * cpu: factor trace metadata binding and stream check Extract bindTraceMetadata and validateAndConsumeTraceStream to reduce inlined trace logic in processSingleInstruction while preserving behavior. Change-Id: I2a6fac6660509a3ebfba2572fe8d7eeb590e6c0a * cpu: move wrong-path exit after rollback seq exitTraceWrongPath was clearing traceWrongPathBranchSeqNum before it was used to set trace_rb_seqnum in non-inst squash paths; move the exit call after the assignment to preserve the boundary info. Change-Id: Ib89214b639cfdce045390d21ca16bd6e766233d9 * cpu: factor trace wrong-path entry and validation helpers Extract maybeEnterTraceCtrlFlowWrongPath and handleTraceBPValidation plus reuse metadata binding/stream check to reduce inline trace logic in processSingleInstruction. Change-Id: I64e6f6f5f279e0ab9990042402babefc7f961fbf * mem: restore xs-dev behavior for cache/page_table Change-Id: Ib4c4b82b44af40095da78a2a0bf0420c5cb62b33 * mem: align page_table with xs-dev Change-Id: I784b83f8e7edaaa20d37153254da43715003f5d2 * mem: sync page_table.cc with xs-dev Change-Id: I4455d54a0c8eb89c5a40807498f662c7a3f674a6 * cpu: share trace stream helper Change-Id: Ib5672d65c7ab04532ea878edfb56c643989482af * cpu: share trace reader helpers Change-Id: I0b09f1ca580ed0b080e503bfd2a442d7d55a9e24 * cpu: dedupe trace checkpoints Change-Id: I7bf0fc9b2631c81bd961e95a906b9ecbaf83d29a * cpu: share trace reader pending buffering Change-Id: I203a3763fb9962090773b7928f36e8829e28fa6b * cpu: share trace reader reset state Change-Id: Ia92d5d42c8a464bc030a52596eef19d60c39cf7f * cpu: centralize trace reader history reset Change-Id: Ie341424e5d03a709966c9300833d913b273f4008 * cpu: share trace reader stream open and validation Change-Id: Ie08c50ea0398c1b7d7af76fb2564714db99c03d8 * cpu: share trace reader checkpoint restore Change-Id: I17ad783eb6bde3c136d09056c2daf3a150ce3a67 * cpu: refresh trace docs Change-Id: I3aebe0f73c841d342e0a7a1c2bd60a64203b0d57 * util: balance distributed trace scheduling Change-Id: I0a57968f7c5ff8d6ff09b9d35a27651bd0ff1d44 * doc: reorganize some trace docs Change-Id: Ic03daf325ed3854b93068f5fce3d73ee76249aff * configs,cpu-o3: align trace readers, tools and recycle bin Change-Id: Ie64e3856b41e3f177e5da6efbde1ea3fc2b5362a * cpu: align ChampSimTraceReader tests Change-Id: I2001cf2a4c012ba00a366371d952da7620b5b4f8 * cpu-o3: Extract TraceFetch Move trace-driven fetch logic out of Fetch and remove obsolete disabled code block. Change-Id: I47efb3f8ca0a31cb270a68d329c4b894da503873 * cpu-o3: Extract trace-mode logic from Commit Why: - Keep Commit mainline focused; isolate trace-mode behavior. What: - Move trace-mode helpers and CommitTrace logging into src/cpu/o3/trace/CommitTrace.cc. - Keep commit.cc as thin delegation points. Verification: - Trace regression (short list, warmup/sample=50000): baseline vs refactor has no diffs in committedInsts/ipc/simTicks/finalTick. Change-Id: I171967b1ec503094722659a289db35f81c93b49d * cpu,util: Drop non-trace formatting diffs Restore a few unrelated files to match origin/xs-dev exactly, so PR #649 doesn't include style-only noise unrelated to trace functionality. * cpu,configs: Add trace timing-PTW with static SV39 page table Add an opt-in timing translation mode for trace-driven simulation. - Keep default trace behavior unchanged (functional MMU). - When enabled, install PRV=S and SATP(SV39) and build an identity-mapped static page table covering the trace address window. - Reserve a physical region for page tables and shrink the trace mapping window to avoid aliasing into PT pages. - Document the page table construction and how PTW traffic is triggered. Change-Id: Ib982eb43bfe43dde0e6d281237a10d7307b86371 * cpu,configs: Address trace-mode review comments Change-Id: I195ebbf73df0bb50b533b8d1c1467626349957d5 * cpu-o3,configs: Harden trace mode robustness $- Validate --trace-file before assigning to CPU\n- Honor traceCheckpointInterval (0 disables)\n- Fix rollback softSeekToInstruction off-by-one\n- Bounds-check timing-PTW page table region\n- Replace popen() decompressor with fork/exec\n- Fail-fast on TraceReader buffer overflow\n\nNote: ruff-related BaseO3CPU.py import nit is intentionally not addressed. Change-Id: I4efc4136316db0c546c9f247bc3255acc25b4a3a --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent af41044 commit ef1e125

58 files changed

Lines changed: 11358 additions & 98 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

configs/common/Options.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3838

3939
import argparse
40+
import sys
4041

4142
import m5
4243
from m5.defines import buildEnv
@@ -672,3 +673,49 @@ def addXiangshanFSOptions(parser):
672673
action="store",
673674
default=None,
674675
help="The shared lib file used to do difftest")
676+
677+
def addXiangshanTraceOptions(parser):
678+
# Add trace-specific arguments for trace-driven simulation
679+
parser.add_argument('--enable-trace-mode', action='store_true',
680+
help='Enable trace-driven simulation mode (alternative to checkpoints)')
681+
parser.add_argument('--trace-timing-ptw', action='store_true',
682+
help='In trace mode, use timing TLB/PTW (static page table; default: off)')
683+
parser.add_argument('--trace-ptw-reserved-bytes', type=int,
684+
default=64 * 1024 * 1024,
685+
help='Bytes reserved at top of trace-mapped memory for page tables (default: 64MiB)')
686+
parser.add_argument('--trace-ptw-page-size', type=str, default='4k',
687+
choices=['4k', '2m'],
688+
help='Synthetic mapping page size for trace timing PTW (default: 4k)')
689+
parser.add_argument('--trace-file', type=str,
690+
help='Path to the trace file (required for trace mode)')
691+
parser.add_argument('--trace-format', type=str, default='champsim',
692+
choices=['champsim', 'cbp2025'],
693+
help='Trace format (default: champsim)')
694+
# Use the common --maxinsts option provided by common Options; no trace-specific max
695+
696+
# Decoupled branch predictor options for trace mode
697+
parser.add_argument('--trace-enable-decoupled-bp', action='store_true',
698+
help='Enable decoupled branch predictor in trace mode')
699+
parser.add_argument('--trace-checkpoint-interval', type=int, default=64,
700+
help='Checkpoint interval for trace rollback (default: 64)')
701+
parser.add_argument('--trace-disable-bp-validation', action='store_true',
702+
help='Disable branch predictor validation against trace')
703+
parser.add_argument('--trace-mispredict-penalty', type=int, default=8,
704+
help='Cycles to penalize on mispredict (default: 8)')
705+
parser.add_argument('--trace-disable-wrongpath', action='store_true',
706+
help='Disable explicit wrong-path injection (use stall model)')
707+
parser.add_argument('--trace-wrongpath-use-traceinst', action='store_true',
708+
help='Wrong-path injection uses trace instructions with checkpoint/restore (default: NOPs)')
709+
710+
# NOTE: This heuristic relies on using real sys.argv with argparse. If a
711+
# custom args list is passed to parse_args, the caller should adjust
712+
# generic-rv-cpt's required flag explicitly instead of relying on this.
713+
# Check for trace mode before parsing to make generic-rv-cpt conditional.
714+
if '--enable-trace-mode' in sys.argv:
715+
# In trace mode, make generic-rv-cpt optional by providing a dummy value.
716+
# Find the generic-rv-cpt action and remove its required flag.
717+
for action in parser._actions:
718+
if action.dest == 'generic_rv_cpt':
719+
action.required = False
720+
action.default = "trace_mode_dummy"
721+
break

configs/common/xiangshan.py

Lines changed: 221 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import os
23
import sys
34

45
import m5
@@ -58,16 +59,50 @@ class XiangshanECore2Read(XiangshanCore):
5859
numPhysRMiscRegs = 40
5960
scheduler = ECore2ReadScheduler()
6061

61-
import argparse
62-
import os
62+
addToPath('../')
6363

64-
import m5
65-
from m5.defines import buildEnv
66-
from m5.objects import *
67-
from m5.util import addToPath, fatal, warn
68-
from m5.util.fdthelper import *
64+
def _trace_timing_ptw_settings(args: argparse.Namespace):
65+
enabled = bool(getattr(args, 'trace_timing_ptw', False))
66+
if not enabled:
67+
return False, 0, 0
6968

70-
addToPath('../')
69+
reserved_bytes = int(getattr(args, 'trace_ptw_reserved_bytes', 64 * 1024 * 1024))
70+
if reserved_bytes <= 0:
71+
fatal(f"--trace-ptw-reserved-bytes must be > 0 (got {reserved_bytes})")
72+
73+
page_size = getattr(args, 'trace_ptw_page_size', '4k')
74+
if page_size == '4k':
75+
leaf_page_size = 4 * 1024
76+
elif page_size == '2m':
77+
leaf_page_size = 2 * 1024 * 1024
78+
else:
79+
fatal(f"Unsupported --trace-ptw-page-size: {page_size}")
80+
81+
return True, reserved_bytes, leaf_page_size
82+
83+
84+
def _apply_trace_timing_ptw_cpu_params(args: argparse.Namespace, cpus, *, shrink_window: bool = True):
85+
enabled, reserved_bytes, leaf_page_size = _trace_timing_ptw_settings(args)
86+
if not enabled:
87+
return
88+
89+
for cpu in cpus:
90+
cpu.traceTimingPTW = True
91+
cpu.tracePTReservedBytes = reserved_bytes
92+
cpu.tracePTLeafPageSize = leaf_page_size
93+
94+
if not shrink_window:
95+
return
96+
97+
for cpu in cpus:
98+
if int(cpu.traceAddrSize) <= reserved_bytes:
99+
fatal(
100+
"Trace timing PTW requires traceAddrSize > reserved bytes "
101+
f"(traceAddrSize=0x{int(cpu.traceAddrSize):x}, "
102+
f"reserved=0x{reserved_bytes:x})."
103+
)
104+
105+
cpu.traceAddrSize = int(cpu.traceAddrSize) - reserved_bytes
71106

72107

73108
def config_xiangshan_inputs(args: argparse.Namespace, sys):
@@ -209,13 +244,55 @@ def build_xiangshan_system(args):
209244
ruby = False
210245
if hasattr(args, 'ruby') and args.ruby:
211246
ruby = True
247+
248+
# Create system using FS mode with trace-specific memory configuration
212249
test_sys = makeBareMetalXiangshanSystem('timing', SysConfig(mem=args.mem_size), None, np=np, ruby=ruby)
250+
251+
# CRITICAL FIX: Configure trace-specific memory ranges and functional TLB for trace mode
252+
if hasattr(args, 'enable_trace_mode') and args.enable_trace_mode:
253+
if bool(getattr(args, 'trace_timing_ptw', False)):
254+
print("Trace mode: Using FS mode with timing MMU (timing-PTW enabled)")
255+
else:
256+
print("Trace mode: Using FS mode with functional TLB to bypass MMU translation issues")
257+
print("Trace mode: Configuring expanded memory ranges for trace address mapping")
258+
# Force functional TLB to bypass complex MMU translation
259+
args.functional_tlb = True
260+
else:
261+
print("Checkpoint mode: Using standard FS mode with normal MMU translation")
213262
test_sys.num_cpus = np
214263

215264
test_sys.xiangshan_system = True
265+
# args.enable_difftest should be normalized by xiangshan_system_init().
216266
test_sys.enable_difftest = args.enable_difftest
217267

218-
config_xiangshan_inputs(args, test_sys)
268+
# Configure XiangShan inputs - skip checkpoint loading in trace mode
269+
if hasattr(args, 'enable_trace_mode') and args.enable_trace_mode:
270+
args.difftest_ref_so = None
271+
272+
# Trace mode FS configuration with functional TLB.
273+
# We run without a bootloader but must still set the bootloader
274+
# parameter explicitly, since RiscvBareMetal.bootloader has no
275+
# default. An empty string is treated as "no bootloader" and we
276+
# reuse the xiangshan_cpt flag to take the no-bootloader path in
277+
# the BareMetal workload implementation.
278+
test_sys.workload.bootloader = ''
279+
test_sys.workload.xiangshan_cpt = True # Reuse GCPT path to skip bootloader
280+
test_sys.restore_from_gcpt = False # Disable GCPT restoration
281+
print("Trace mode: Running without bootloader (no GCPT)")
282+
283+
# Configure DRAMsim3 if needed for memory controller
284+
if args.mem_type == 'DRAMsim3' and args.dramsim3_ini is None:
285+
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
286+
args.dramsim3_ini = os.path.join(root_dir,
287+
'ext/dramsim3/xiangshan_configs/xiangshan_DDR4_8Gb_x8_3200_2ch.ini')
288+
289+
if bool(getattr(args, 'trace_timing_ptw', False)):
290+
print("Trace mode: Timing MMU will be applied for timing-PTW")
291+
else:
292+
print("Trace mode: FS mode with functional TLB configured to bypass MMU translation issues")
293+
else:
294+
# Standard checkpoint-based configuration
295+
config_xiangshan_inputs(args, test_sys)
219296

220297
# Set the cache line size for the entire system
221298
test_sys.cache_line_size = args.cacheline_size
@@ -238,12 +315,19 @@ def build_xiangshan_system(args):
238315
# For now, assign all the CPUs to the same clock domain
239316
test_sys.cpu = [TestCPUClass(clk_domain=test_sys.cpu_clk_domain, cpu_id=i)
240317
for i in range(np)]
318+
# Configure MMU for trace-aware FS mode
241319
for cpu in test_sys.cpu:
242320
cpu.mmu.pma_checker = PMAChecker(
243321
uncacheable=[AddrRange(0, size=0x80000000)])
244322
cpu.mmu.functional = args.functional_tlb
245323
cpu.mmu.enable_sv48 = args.open_sv48
246324

325+
if hasattr(args, 'enable_trace_mode') and args.enable_trace_mode:
326+
timing_ptw = bool(getattr(args, 'trace_timing_ptw', False))
327+
cpu.mmu.functional = not timing_ptw
328+
mode_str = "timing" if timing_ptw else "functional"
329+
print(f"Trace mode: CPU {cpu.cpu_id} configured with {mode_str} translation")
330+
247331
# configure BP
248332
args.enable_loop_predictor = True
249333
if args.enable_riscv_vector:
@@ -296,6 +380,62 @@ def build_xiangshan_system(args):
296380

297381
for cpu in test_sys.cpu:
298382
cpu.store_prefetch_train = not args.kmh_align
383+
384+
# Configure trace mode if enabled
385+
if hasattr(args, 'enable_trace_mode') and args.enable_trace_mode:
386+
if not getattr(args, 'trace_file', None):
387+
fatal("--trace-file is required when --enable-trace-mode is set")
388+
print(f"Configuring CPUs for trace mode...")
389+
for cpu in test_sys.cpu:
390+
# Enable trace mode
391+
cpu.enableTraceMode = True
392+
cpu.traceFile = args.trace_file
393+
cpu.traceFormat = args.trace_format
394+
# Unify with normal mode option: use --maxinsts
395+
cpu.max_insts_any_thread = args.maxinsts
396+
397+
# Trace address mapping: Map to existing physical memory range
398+
# System physical memory starts at 0x80000000, so map trace addresses there
399+
cpu.traceAddrBase = 0x80000000 # Start of physical memory
400+
cpu.traceAddrSize = 0x40000000 # 1GB window within physical memory
401+
402+
# Disable strict memory ordering for trace mode compatibility
403+
# Trace instructions may not follow strict ordering requirements
404+
cpu.needsTSO = False
405+
406+
# Trace mispredict modeling controls
407+
cpu.traceMispredictPenalty = args.trace_mispredict_penalty
408+
cpu.traceEnableWrongPath = (not args.trace_disable_wrongpath)
409+
if hasattr(args, 'trace_wrongpath_use_traceinst') and args.trace_wrongpath_use_traceinst:
410+
cpu.traceWrongPathUseTraceInst = True
411+
412+
# Note: Difftest configured at system level, not CPU level
413+
414+
# Configure trace-specific parameters
415+
if hasattr(args, 'trace_enable_decoupled_bp') and args.trace_enable_decoupled_bp:
416+
cpu.enableDecoupledBPInTrace = True
417+
else:
418+
cpu.enableDecoupledBPInTrace = False
419+
420+
cpu.traceCheckpointInterval = (args.trace_checkpoint_interval
421+
if hasattr(args, 'trace_checkpoint_interval')
422+
else 64)
423+
cpu.traceBPValidation = not (hasattr(args, 'trace_disable_bp_validation')
424+
and args.trace_disable_bp_validation)
425+
426+
_apply_trace_timing_ptw_cpu_params(args, test_sys.cpu, shrink_window=False)
427+
428+
print(f" Trace file: {args.trace_file}")
429+
print(f" Trace format: {args.trace_format}")
430+
print(f" Max instructions: {args.maxinsts}")
431+
print(f" Decoupled BP: {hasattr(args, 'trace_enable_decoupled_bp') and args.trace_enable_decoupled_bp}")
432+
if bool(getattr(args, 'trace_timing_ptw', False)):
433+
print(
434+
" Timing PTW: enabled "
435+
f"(ptw_page_size={getattr(args, 'trace_ptw_page_size', '4k')}, "
436+
f"reserved_bytes=0x{int(getattr(args, 'trace_ptw_reserved_bytes', 0)):x})"
437+
)
438+
299439
# ruby will overwrite the store_prefetch_train
300440
if ruby:
301441
test_sys._dma_ports = []
@@ -323,6 +463,38 @@ def build_xiangshan_system(args):
323463
# Ruby D-cache does not support store prefetch yet
324464
cpu.store_prefetch_train = False
325465

466+
# Align trace address mapping window to physical memory size (Ruby path)
467+
if hasattr(args, 'enable_trace_mode') and args.enable_trace_mode:
468+
aligned_base = None
469+
aligned_total = None
470+
try:
471+
base = int(test_sys.mem_ranges[0].start)
472+
total = 0
473+
for r in test_sys.mem_ranges:
474+
total += int(r.size())
475+
for cpu in test_sys.cpu:
476+
cpu.traceAddrBase = base
477+
cpu.traceAddrSize = total
478+
cpu.traceAddrMapMode = "linear"
479+
aligned_base = base
480+
aligned_total = total
481+
except Exception as e:
482+
print(f"Warning: failed to align trace mapping to mem (Ruby path): {e}")
483+
_apply_trace_timing_ptw_cpu_params(args, test_sys.cpu)
484+
if aligned_base is not None:
485+
final_size = int(test_sys.cpu[0].traceAddrSize)
486+
reserved_bytes = int(getattr(args, 'trace_ptw_reserved_bytes', 0))
487+
if bool(getattr(args, 'trace_timing_ptw', False)):
488+
print(
489+
f"Trace mode: Align trace mapping to mem: base=0x{aligned_base:x}, "
490+
f"size=0x{final_size:x} (reserved=0x{reserved_bytes:x})"
491+
)
492+
else:
493+
print(
494+
f"Trace mode: Align trace mapping to mem: base=0x{aligned_base:x}, "
495+
f"size=0x{aligned_total:x}"
496+
)
497+
326498
else:
327499
if args.caches or args.l2cache:
328500
# By default the IOCache runs at the system clock
@@ -354,6 +526,37 @@ def build_xiangshan_system(args):
354526

355527
MemConfig.config_mem(args, test_sys)
356528

529+
# Align trace address mapping window to physical memory size (classic cache path)
530+
if hasattr(args, 'enable_trace_mode') and args.enable_trace_mode:
531+
aligned_base = None
532+
aligned_total = None
533+
try:
534+
base = int(test_sys.mem_ranges[0].start)
535+
total = 0
536+
for r in test_sys.mem_ranges:
537+
total += int(r.size())
538+
for cpu in test_sys.cpu:
539+
cpu.traceAddrBase = base
540+
cpu.traceAddrSize = total
541+
aligned_base = base
542+
aligned_total = total
543+
except Exception as e:
544+
print(f"Warning: failed to align trace mapping to mem: {e}")
545+
_apply_trace_timing_ptw_cpu_params(args, test_sys.cpu)
546+
if aligned_base is not None:
547+
final_size = int(test_sys.cpu[0].traceAddrSize)
548+
reserved_bytes = int(getattr(args, 'trace_ptw_reserved_bytes', 0))
549+
if bool(getattr(args, 'trace_timing_ptw', False)):
550+
print(
551+
f"Trace mode: Align trace mapping to mem: base=0x{aligned_base:x}, "
552+
f"size=0x{final_size:x} (reserved=0x{reserved_bytes:x})"
553+
)
554+
else:
555+
print(
556+
f"Trace mode: Align trace mapping to mem: base=0x{aligned_base:x}, "
557+
f"size=0x{aligned_total:x}"
558+
)
559+
357560
if args.mmc_img:
358561
for mmc, cpu in zip(test_sys.mmcs, test_sys.cpu):
359562
mmc.cpt_bin_path = args.mmc_cptbin
@@ -495,6 +698,8 @@ def xiangshan_system_init():
495698
parser = argparse.ArgumentParser()
496699
Options.addCommonOptions(parser, configure_xiangshan=True)
497700
Options.addXiangshanFSOptions(parser)
701+
Options.addXiangshanTraceOptions(parser)
702+
498703
# Add the ruby specific and protocol specific args
499704
if '--ruby' in sys.argv:
500705
Ruby.define_options(parser)
@@ -504,7 +709,12 @@ def xiangshan_system_init():
504709
TestMemClass = Simulation.setMemClass(args)
505710

506711
args.xiangshan_system = True
507-
args.enable_difftest = True
712+
# Only enable difftest if not in trace mode - trace mode doesn't need reference model verification
713+
if not (hasattr(args, 'enable_trace_mode') and args.enable_trace_mode):
714+
args.enable_difftest = True
715+
else:
716+
args.enable_difftest = False
717+
print("Trace mode: Difftest disabled for trace execution")
508718
args.enable_riscv_vector = True
509719

510-
return args
720+
return args

0 commit comments

Comments
 (0)