Giter Club home page Giter Club logo

cpu-arm's Introduction

CPU-ARM

Design, implementation and simulation of a complete ARM based CPU.

About ARM

An ARM processor is one of a family of CPUs based on the RISC (reduced instruction set computer) architecture developed by Advanced RISC Machines (ARM). ARM makes 32-bit and 64-bit RISC multi-core processors. Click here for more.

We divide this making of CPU processor based on ARM instruction set architecture into 2 parts.

Design and Implementation

VHDL files and their usage

Register File

A register file is an array of processor registers in a central processing unit (CPU). Such RAMs are distinguished by having dedicated read and write ports, whereas ordinary multiported SRAMs will usually read and write through the same ports.

We will here implement register file as shown -

register file

  • rd_addr1 and rd_addr2 are signals as STD_LOGIC_VECTOR of 4 bits, containing the register address in reg-file. The data that will get fetched at these 2 addresses will get out from rd_data1 and rd_data2 respectively, which are 32 bits STD_LOGIC_VECTOR.

  • wr_addr is the signal which will contain the address of the register in which we shall be writing the correspoding data from the wr_data signal.

  • wr_data is the signal with the data input which shall be written in the register with the address as wr_addr.

  • Reg write is also needed, whose high state will convey the meaning that their is a need to write in regsiter. We will be implementing it will control signal RW.

Shifter

A shifter will shift the input 32-bit data value by a given amount and depending on the input type as Left shift, right shift unsigned, signed right shift and rotation characterised in ARM as LSL, RSL, ASL and ROR respectively.

Shifter

We will be making 5 different shifting entities which will be shifting the bits through a different amount, which will be 1 bits, 2 bits, 4 bits, 8 bits and 16 bits. For e.g. if we have to shift the 32-bit data input by 25 amount, our shifter architecture will shift it as 1+8+16, where 2 bits and 4 bits will not shift the input.

shift-entities

ALU(Arithmetical and logical unit)

An arithmetic logic unit (ALU) is a combinational digital electronic circuit that performs arithmetic and bitwise operations on integer binary numbers.

Our implementation of ALU will be as follows -

ALU

  • a and b are 32-bit input STD_LOGIC_VECTOR, the data on which we will operate.
  • carry as STD_LOGIC and opcode as 4-bit STD_LOGIC_VECTOR are rest inputs.
  • result is the answer of the operation and Flags will be the 4-flags; Zero-flag, Negative-flag, Carry-flag and Overflow flag.

Multiplier

Multiplier takes 2 32-bit data values and perform the multiplication operation on it and then output the last 32 bits of resulting vector(the resulting vector could be upto 64-bits).

Multiplier

Temporary Memory

It can store upto 1024 STD_LOGIC_VECTOR of 32-bit data values.

Datapath

cpu-arm's People

Contributors

techcentaur avatar

Watchers

James Cloos 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.