Skip to content

[WIP] Implement 5-stage pipelined CPU simulator#12

Merged
orgito1015 merged 1 commit into
mainfrom
copilot/add-5-stage-pipelined-cpu
Feb 16, 2026
Merged

[WIP] Implement 5-stage pipelined CPU simulator#12
orgito1015 merged 1 commit into
mainfrom
copilot/add-5-stage-pipelined-cpu

Conversation

Copilot AI commented Feb 16, 2026

Copy link
Copy Markdown
  • Create directory structure (kernel/cpu/, benchmarks/)
  • Implement 5-stage pipelined CPU (pipeline.c/h)
    • Define PipelineStage struct
    • Implement clock cycle simulation
    • Add hazard detection
    • Track cycles and instructions
  • Implement single-cycle CPU (single_cycle.c/h)
    • One instruction per cycle model
    • Same interface as pipeline
  • Implement direct-mapped cache (cache.c/h in memory/)
    • 256 lines, 32 bytes per block
    • Hit/miss detection
    • Address parsing (tag, index, offset)
  • Implement memory bus simulation (bus.c/h in memory/)
    • 64-bit width, 800 MHz
    • Memory access timing
  • Implement performance counters (performance.c/h in kernel/cpu/)
    • CPI, MIPS calculation
    • Cache statistics
  • Create benchmark (pipeline_vs_single.c in benchmarks/)
    • Execute 20,000 instructions
    • Compare performance
  • Update Makefile to build new modules
  • Test build and verify functionality
  • Run code review and security checks

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@orgito1015 orgito1015 marked this pull request as ready for review February 16, 2026 21:54
@orgito1015 orgito1015 merged commit 6bc4912 into main Feb 16, 2026
1 check failed
Copilot AI requested a review from orgito1015 February 16, 2026 21:55
Copilot stopped work on behalf of orgito1015 due to an error February 16, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants