Code Monkey home page Code Monkey logo

cpu_risc's Introduction

cpu_risc

Verilog implementation of 16-bit RISC Processor with 4-stage pipeline

Architecture

block diagram

Pipeline Register Format

pipe format

Pipeline Control Logic

• Data hazard detection is done through exir, and idir instruction registers present in write-back Pipe and execute Pipe respectively.
• Control hazard detection is done through idir, and ifir instruction registers present in execute Pipe and decode Pipe respectively and through zero signal from the comparator.
• Data forwarding is done by checking values in exir, and idir instruction registers.
• In the case of data hazard (RAW) arising from 2 ADD/AND instructions the processor does not need to stall or hold any instruction & this case is handled through data forwarding in the controller unit.
• In the case of RAW hazard arising from a BEQ instruction following an R-type instruction (ADD/AND), one bubble is inserted in the execute Pipe and a corresponding hold is enforced in PC register & decode Pipe.
• In the case of a control hazard arising from BEQ instruction, one bubble is inserted in the decode Pipe.
• In the case when both control and data hazard occur in conjunction, data hazard is handled in the present clock cycle & control hazard is handled in the next clock cycle.

cpu_risc's People

Contributors

sarthi92 avatar

Stargazers

 avatar

Watchers

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