Skip to content

Playing around with a DIY CPU architecture, no hardware yet.

Notifications You must be signed in to change notification settings

bluecube/pickle_risc

Repository files navigation

Pickle RISC 16bit CPU

... so I would like to build a computer, this time a little closer to "from scratch".

Goals

  • Fun!
  • Aiming for a poorly defined balance between "easy to build" and "not too slow"
  • Can run a multitasking OS
  • Serve web site about itself (like Magic-1 does)
    • SLIP over UART?
    • W5500 module?
  • Serial console interface
    • No graphics output
  • Run at ~2MHz clock
    • 4MHz as a stretch goal :)
  • Most instruction single cycle

State

  • Instruction set
    • Needs expanding into microcode
    • Needs to be tweaked according to what's needed in SW, limitations in HW design
  • HW design
    • Slightly more than a fuzzy idea of how stuff should should go together
    • (OUTDATED) The block diagram shows most of the general idea
    • There is a design document that contains some (incomplete) information
  • SW
    • Skeleton of a toolchain written in Rust (toolchain-rs/)
      • Non-functioning assembler
      • Start of an emulator
        • Emulation works per instruction, but behavior is built up from microcode at compile time.
    • Lisp interpreter is planned as a shell
      • Probably loosely based on Make a Lisp
      • Compiler as a stretch goal

Next steps

This is the high level to do list, roughly in the order of decreasing priorities. Long term plans (and hopes and dreams) go to the notes directory.

  • Figure out details of microcode
  • Write microcode for instructions
  • Finalize assembler
  • Emulator
  • Some kind of integration tests for emulator <-> assembler
  • Lisp interpreter
  • Figure out ALU design
  • Figure out MMU design
  • Figure out interrupt handling
    • Rough idea and the instructions needed to support it is already done
  • Start building the hardware in some kind of HDL

Links

Inspiration

Instruction set

  • ARM Thumb Instruction set
  • AVR instruction set

Peripherials

The rest

About

Playing around with a DIY CPU architecture, no hardware yet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published