Coder Social home page Coder Social logo

pipelined_processor's Introduction

Pipelined-Processor


About

Segzzee is a Simulation of a 64 bit 5-staged Pipelined Microprocessor.

Contents :

  • Processor Simmulator written in Verilog
  • Assembler written in C++

Specifications:

  • Instruction Size : 16 bits
  • Register size : 64 bits
  • Address size : 8 bits

What can it compute ?

It's a learning Project whose main aim is to execute basic programs like Basic mathematical operations, Factorial, Finding Prime Number, Fibonacci, n to the power m etc.

ISA

  • We have designed our own Simplified Instruction set.

Folder Structure

  • Assembler Machine Code : Contains Sample code that can be executed on the processor
  • Assembler : Contains the C++ code of Assembler to convert the Assembly code to machine code which can be simulated by the Processor
  • TestBenches : Contains the Testbenches for all the units of the processor.
  • Processor : Contains the Main Processor written in verilog.

Instruction Fetch Unit :

  • Contains the Instruction Memory.
  • Its function is to fetch the binary instruction (16 bits) from the instruction memory one after another.

Operand Fetch Unit :

Register File:

  • Contains the 16 registers of the processor
  • Register 1 to 15 are General Purpose register and Register 16 is the flag Register
  • It servers the purpose to read data from the register and write data back to the register at runtime.

Control Unit :

  • Its function is to generate the Control signal needed in the processor

Execution unit :

  • Responsible for all the main calculations such as calculations involving operands and calculating new address after branch instruction.

Memory access Unit :

  • Contains the Data Memory.
  • Its function is to handle Load Store operations by communicating with the Data memory.

Register Writeback Unit :

  • Its function is to write the necessary data to the specified register of the Register file.

How To use :

  • Run the following commands
  • git clone https://github.com/Segzzee/Pipelined-Processor.git
  • This will clone the repo
  • Make a txt file and write the assembly code.
  • Paste the Path of the .txt file in the assembler and run the assembler this will generate a machine code (instructions) to be executed by the processor
  • Install Icarus Verilog and Verilog HDL extension in VS Code and run the testbench.v file and your output will be executed.
  • The output of the memory can be seen in the Data Memory.txt

Some Examples in gtkwave form :

Factorial of 19 :

  • Value stored in Register 3

Screenshot (315)

  • Factorial(19)= 1B02B9306890000 (in Hexadecimal) = 121645100408832000 (in Decimal)
  • NOTE: In this 5-staged Pipelined Microprocessor we can accurately calculate upto 19 Factorial.

Fibonacii of 19 :

  • Value stored in Register 3

Screenshot (317)

  • Fibonacii of 19 = A18 (in Hexadecimal) = 2584 (in Decimal)

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.