All Projects → wel97459 → FPGACosmacELF

wel97459 / FPGACosmacELF

Licence: GPL-3.0 license
A re-creation of a Cosmac ELF computer, Coded in SpinalHDL

Programming Languages

VHDL
269 projects
scala
5932 projects
C++
36643 projects - #6 most used programming language
assembly
5116 projects
CMake
9771 projects

Projects that are alternatives of or similar to FPGACosmacELF

Forth Cpu
A Forth CPU and System on a Chip, based on the J1, written in VHDL
Stars: ✭ 244 (+687.1%)
Mutual labels:  cpu, fpga, processor
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (+241.94%)
Mutual labels:  cpu, fpga, processor
Darkriscv
opensouce RISC-V cpu core implemented in Verilog from scratch in one night!
Stars: ✭ 1,062 (+3325.81%)
Mutual labels:  cpu, fpga, processor
J1sc
A reimplementation of a tiny stack CPU
Stars: ✭ 64 (+106.45%)
Mutual labels:  cpu, fpga
Corefreq
CoreFreq is a CPU monitoring software designed for the 64-bits Processors.
Stars: ✭ 1,026 (+3209.68%)
Mutual labels:  cpu, processor
Vexriscv
A FPGA friendly 32 bit RISC-V CPU implementation
Stars: ✭ 1,041 (+3258.06%)
Mutual labels:  cpu, fpga
Tenyr
Simple, orthogonal 32-bit computer architecture and environment
Stars: ✭ 24 (-22.58%)
Mutual labels:  cpu, fpga
Pcm
Processor Counter Monitor
Stars: ✭ 1,240 (+3900%)
Mutual labels:  cpu, processor
Cva6
The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
Stars: ✭ 1,144 (+3590.32%)
Mutual labels:  cpu, fpga
kianRiscV
KianRISC-V! No RISC-V, no fun! RISC-V CPU with strong design rules and unittested! CPU you can trust! kianv rv32im risc-v a hdmi soc with harris computer architecture in verilog: multicycle, singlecycle and 5-stage pipelining Processor. Multicycle Soc with firmware that runs raytracer, mandelbrot, 3d hdmi gfx, dma controller, etc.....
Stars: ✭ 167 (+438.71%)
Mutual labels:  cpu, fpga
Biriscv
32-bit Superscalar RISC-V CPU
Stars: ✭ 208 (+570.97%)
Mutual labels:  cpu, fpga
Hrm Cpu
Human Resource Machine - CPU Design #HRM
Stars: ✭ 43 (+38.71%)
Mutual labels:  cpu, fpga
Mips Cpu
A MIPS CPU implemented in Verilog
Stars: ✭ 38 (+22.58%)
Mutual labels:  cpu, fpga
SpinalDev
Docker Development Environment for SpinalHDL
Stars: ✭ 17 (-45.16%)
Mutual labels:  fpga, spinalhdl
Lxp32 Cpu
A lightweight, open source and FPGA-friendly 32-bit CPU core based on an original instruction set
Stars: ✭ 27 (-12.9%)
Mutual labels:  cpu, fpga
Ustc Rvsoc
FPGA-based RISC-V CPU+SoC.
Stars: ✭ 77 (+148.39%)
Mutual labels:  cpu, fpga
Nontrivial Mips
NonTrivial-MIPS is a synthesizable superscalar MIPS processor with branch prediction and FPU support, and it is capable of booting linux.
Stars: ✭ 417 (+1245.16%)
Mutual labels:  cpu, fpga
Zipcpu
A small, light weight, RISC CPU soft core
Stars: ✭ 640 (+1964.52%)
Mutual labels:  cpu, fpga
Riscboy
Portable games console, designed from scratch: CPU, graphics, PCB, and the kitchen sink
Stars: ✭ 103 (+232.26%)
Mutual labels:  cpu, fpga
mrisc32
MRSIC32 ISA documentation and development
Stars: ✭ 87 (+180.65%)
Mutual labels:  cpu, risc

FPGA Cosmac ELF

This is a re-creation of a Cosmac ELF computer, Coded in SpinalHDL.

The goal of this project is to end up with a cycle-accurate 1802 processor that can be used in FPGA designs easily. When I start the project I was new to SpinalHDL but I had attempted in the past to write the same processor in VHDL. However, language complexity and the sheer amount of code and time needed to write and debug that project ended the work on it.

To make verification of the CPU easier, I made the simulation capable of reading the Emma debug trace log format. The theory is that the CPU should follow that same path as the debug log from Emma.
If the Address or D register doesn't match the one in the log, then there is an issue and it will halt the simulation at that point. Using GTKWave you can view the output of the simulation and debug the issue.

The test program included uses the Floating Point Subroutines by Paul Wasserman. I copied the subroutine listings by hand into a hex editor and checked them by overlaying an image of the hex code I copied, with the scanned images. Included is a copy of the scans, and a copy of the binary file for the subroutines. Along with the assemble code I wrote to test the CPU.

If you would like to learn more about the 1802 processor here's a video about the designer Joseph Weisbecker, For information about the Cosmac Elf computer there's the wiki page.

Way build an RCA1802 processor

Josh Bensadon had a goal when designing computers and that was they had to be fun. The computer that led to the development of 1802 processor was called FRED.


The assembly language for the 1802 process is easy to understand, and the data flow of the cpu is easy to follow.


Using SpinalHDL made this project fun to work on. The Verilog code generated by SpinalHDL for just the CPU is 1500 lines, and cpu1802.scala file is 700 lines. I highly suggest installing and playing with SpinalHDL, it very powerful and the code is maintainable and reusable, and just works without the headaches.

Features:

  • Able to load programs over the serial interface while in load mode. Bytes sent to the serial interface are loaded into ram using the DMA IN function.
  • While in run and single step mode you can read the RX Serial data with INP N1 and check if it has data with BN2
  • Interrupts are generated when the serial RX has data in its FIFO, and also when you press the write button. You can check the button state with BN4.
  • Processor can send serial data with opcode OUT 1 and can check if the serial FIFO is full with opcode BN1

How to set up your project:

  1. You will need to have SpinalHDL setup and working on your system to generate the HDL code.
  2. For simulation, you will need to have Verilator setup.
  3. In your FPGA project, you will need to generate a PPL with a clock out of 8mhz to have the serial baud rate be 115200
  4. You will also need to generate a block ram.
  5. You may have to edit the BlackBoxes for the PLL and Ram to match your targets.
  • or you can just generate the CPU core by itself to get the HDL/Verilog.
  • or copy the cpu1802.scala file to your own SpinalHDL project.

Pictures

alt text

alt text

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].