Giter Club home page Giter Club logo

pipelined-riscv-processor-with-full-hazard-handling's Introduction

Pipelined-RISCV-processor-with-full-hazard-handling

In this project, I implemented a 32-bit pipelined microarchitecture RISC-V processor based on Harvard Architecture with full hazard handling. In the pipelined microarchitecture, I design it by subdividing the single-cycle processor into five pipeline stages. Thus, five instructions can execute simultaneously, one in each stage. In other words, instruction fetch, instruction decode, execute, write back, and program counter update occurs within a single clock cycle.Because each stage has only one-fifth of the entire logic, the clock frequency is approximately five times faster. So, ideally, the latency of each instruction is unchanged, but the throughput is five times better.

The Hazard Unit computes control signals for the forwarding multiplexers to choose operands from the register file or from the results in the Memory or Writeback stage (ALUResultM or ResultW). The Hazard Unit should forward from a stage if that stage will write a destination register and the destination register matches the source register. However, x0 is hardwired to 0 and should never be forwarded. If both the Memory and Writeback stages contain matching destination registers, then the Memory stage should have priority because it contains the more recently executed instruction. In summary, the function of the forwarding logic for SrcAE (ForwardAE) is given on the next page. The forwarding logic for SrcBE (ForwardBE) is identical except that it checks Rs2E instead of Rs1E Complete single-cycle RISC-V processor. implementation.

Pipelined processor with full hazard handling image

in this Project, I ran three projects to test it: 1st program: simple counter program counts from 0 to 255. 2nd program: the Fibonacci series numbers. 3rd program: the factorial of 8.

simulation result of 1st program(simple program counter) image

simulation result of 2nd program(the Fibonacci series numbers) image

simulation result of 3rd program(the factorial of 8) image

top level view using Quartus Prime Lite Edition image image image

pipelined-riscv-processor-with-full-hazard-handling's People

Contributors

ayaahmed20018414 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.