GithubHelp home page GithubHelp logo

verilog-65c02-fsm's Introduction

verilog-65C02-fsm

A verilog model of the 65C02 CPU. The code is rewritten from scratch.

  • Assumes synchronous memory
  • Uses finite state machine rather than microcode for control
  • Designed for simplicity, size and speed
  • Reduced cycle count eliminates all unnecessary cycles

Design goals

The main design goal is to provide an easy understand implementation that has good performance

Code

Code is far from complete. Right now it's in a 'proof of concept' stage where the address generation and ALU are done in a quick and dirty fashion to test some new ideas. Once I'm happy with the overall design, I can do some optimizations.

  • cpu.v module is the top level.

Code has been tested with Verilator.

Status

  • All CMOS/NMOS 6502 instructions added (except for NOPs as undefined, Rockwell/WDC extensions)
  • Model passes Klaus Dormann's test suite for 6502 (with BCD disabled)
  • BCD not yet supported
  • SYNC, RST supported
  • IRQ, RDY, NMI not yet supported

Cycle counts

For purpose of minimizing design and performance improvement, I did not keep the original cycle count. All of the so-called dead cycles have been removed.

Instruction type Cycles
Implied PHx/PLx 2
RTS 4
RTI 5
BRK 7
Other implied 1
JMP Absolute 3
JMP (Indirect) 5
JSR Absolute 5
branch 2
Immediate 2
Zero page 3
Zero page, X 3
Zero page, Y 3
Absolute 4
Absolute, X 4
Absolute, Y 4
(Zero page) 5
(Zero page), Y 5
(Zero page, X) 5

Add 1 cycle for any read-modify-write. There is no extra cycle for taken branches, page overflows, or for X/Y offset calculations.

Have fun.

verilog-65c02-fsm's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.