6502 Akira Baruah Chaiwen Chou Phil Schiffrin Sean Liu Our Goals - - PowerPoint PPT Presentation

6502
SMART_READER_LITE
LIVE PREVIEW

6502 Akira Baruah Chaiwen Chou Phil Schiffrin Sean Liu Our Goals - - PowerPoint PPT Presentation

6502 Akira Baruah Chaiwen Chou Phil Schiffrin Sean Liu Our Goals Initially set out to emulate the NES Implement the 6502 in SystemVerilog Synthesize the processor onto the FPGA Create software to interface with the processor


slide-1
SLIDE 1

Akira Baruah Chaiwen Chou Phil Schiffrin Sean Liu

6502

slide-2
SLIDE 2

Our Goals

  • Initially set out to emulate the NES
  • Implement the 6502 in SystemVerilog
  • Synthesize the processor onto the FPGA
  • Create software to interface with the processor
  • Load programs into memory and read output of the

processor in a user program

slide-3
SLIDE 3

High Level design

CPU - Contains control signals, registers, and wires ALU - Computes all arithmetic operations for CPU Memory - Basic read/write functionality

slide-4
SLIDE 4

Original block diagram

Main changes:

  • Single clock
  • Control logic: Mealy finite

state machine

slide-5
SLIDE 5

Architecture

Control signals Combinational/sequential blocks

slide-6
SLIDE 6

Addressing Modes

slide-7
SLIDE 7
slide-8
SLIDE 8

nes_ctrl cpu memory sockit_test soc_system

d_out d_in

user-level program

mem_in mem_out

binary

Top-Level Module

slide-9
SLIDE 9
  • Attempted kernel module for interfacing with hardware
  • Hacky solution that worked for us: mmap to “/dev/mem”
  • Created user-space program that writes into NES memory

the contents of a binary file containing instructions for the processor

  • 16 bits - top 8 bits for our own “opcodes”, bottom 8 for

data

Quartus, Qsys, and the Software Interface

slide-10
SLIDE 10

Work FLow

slide-11
SLIDE 11

Lessons Learned

  • Time management and planning is key
  • Look for help early
  • FPGA Board is very delicate
  • Testing takes more time than you expect