How linjiaty/pathfinder works
Pathfinder turns execution traces into learned prefetch predictions, then uses ChampSim to measure their effects and produce results. The Python command layer coordinates model training/generation and simulation; the model delegates its spiking-neural-network work to Pathfinder logic built on BindsNET. ChampSim supplies the processor, cache, and memory-simulation runtime. The README also describes IPC and LLC prefetch metrics. Several BindsNET and simulator links below are supported only by the SOURCE INDEX; unsampled implementation details and the README-mentioned run script are not assumed.
Main entry points: pathfinder_pcpage_functions.py Pathfinder SNN logic · network.py Network runtime · ml_prefetch_sim.py CLI orchestration · main.cc Simulation entry
Components 23
Pathfinder workflow
- Execution traces
- CLI orchestration
ChampSim/ml_prefetch_sim.py - Prefetch predictions
Prediction learning
- Prefetch model
ChampSim/model.py - Pathfinder SNN logic
ChampSim/pathfinder_pcpage_functions.py - SNN models
ChampSim/bindsnet/bindsnet/models/models.py - Network runtime
ChampSim/bindsnet/bindsnet/network/network.py - Neuron nodes
ChampSim/bindsnet/bindsnet/network/nodes.py - Network topology
ChampSim/bindsnet/bindsnet/network/topology.py - Learning rules
ChampSim/bindsnet/bindsnet/learning/learning.py - State monitors
ChampSim/bindsnet/bindsnet/network/monitors.py - Input encoding
ChampSim/bindsnet/bindsnet/encoding/encodings.py
ChampSim runtime
- Simulation entry
ChampSim/src/main.cc - Out-of-order CPU
ChampSim/src/ooo_cpu.cc - Cache simulation
ChampSim/src/cache.cc - Cache structures
ChampSim/inc/cache.h - KPCP prefetch logic
ChampSim/inc/kpcp.h - Cache replacement
ChampSim/replacement/base_replacement.cc - DRAM controller
ChampSim/src/dram_controller.cc - DRAM interface
ChampSim/inc/dram_controller.h
Analysis
- Simulation metrics
- Result processing
ChampSim/get_stats.py
Other components
- Experimenter
Connections 23
- Experimenter → CLI orchestration: runs commands
ChampSim/ml_prefetch_sim.py - Execution traces → CLI orchestration: supplies trace
- CLI orchestration → Prefetch model: invokes model
ChampSim/ml_prefetch_sim.py - Prefetch model → Pathfinder SNN logic: delegates prediction
ChampSim/model.py - Pathfinder SNN logic → SNN models: constructs model
ChampSim/pathfinder_pcpage_functions.py - Pathfinder SNN logic → State monitors: records state
ChampSim/pathfinder_pcpage_functions.py - Pathfinder SNN logic → Input encoding: uses encoding
ChampSim/pathfinder_pcpage_functions.py - SNN models → Network runtime: builds network
- Network runtime → Neuron nodes: runs nodes
- Network runtime → Network topology: uses topology
- Network runtime → Learning rules: applies learning
- Prefetch model → Prefetch predictions: generates predictions
ChampSim/model.py - CLI orchestration → Simulation entry: runs simulator
- Prefetch predictions → Simulation entry: provides prefetches
- Simulation entry → Out-of-order CPU: schedules execution
ChampSim/src/main.cc - Out-of-order CPU → Cache simulation: accesses caches
- Cache simulation → Cache structures: uses cache structures
ChampSim/src/cache.cc - KPCP prefetch logic → Cache structures: uses cache interface
ChampSim/inc/kpcp.h - Cache simulation → Cache replacement: uses replacement
- Out-of-order CPU → DRAM controller: issues memory requests
- DRAM controller → DRAM interface: implements interface
ChampSim/src/dram_controller.cc - Simulation entry → Simulation metrics: reports metrics
- Simulation metrics → Result processing: processes results