Git Product home page Git Product logo

fdt16's Introduction

FDT-16 Processor

This repository contains the source code for the FDT-16 processor. The processor is implemented in Verilog and includes a variety of modules, an assembler written in Python, and a suite of tests.

Available Verilog Modules

  • ALU
  • Flags Register
  • Accumulator Register
  • Control Unit (To be implemented)
  • Data Memory
  • Stack Pointer
  • Instruction Memory
  • Instruction Decoder
  • Sign Extend
  • CPU (topmodule)
  • Multiplexers
  • Program Counter
  • Registers
  • Decoder (to pick working register)

Running Tests

Before running the tests, make sure you have icarus-verilog installed and set in your PATH as iverilog(on Mac you sometimes have to do it manually). To run all tests, navigate to the cpu/src/tests directory and run the run_all.sh script:

cd cpu/src/tests
bash run_all.sh

To run an individual test, use the run_<testname>.sh script, replacing <testname> with the name of the test you want to run:

bash run_<testname>.sh

Assembler

The assembler is located in the cpu/src/Assembler directory. To run the assembler, use the assembler.py script with the input and output file names as arguments:

python3 assembler.py input_file output_file

The assembler can handle comments(//).

Here is some sample code:

MOV X, #16
ADD X, #8
MOV X, A
MOV Y, #3
INC X
JMP 34 	// jump somewhere
LSR X
RET 
CMP Y, #3 
BRZ 5

Hardware Schematic

A detailed hardware schematic of the processor can be found here.

fdt16's People

Contributors

stefanfaur avatar fernandofrinca avatar adel0s avatar

Stargazers

 avatar

Watchers

 avatar

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.