Design of a 8-bit RISC Micro controller Core By Ayush Mittal(200105011) Rakesh Kumar Sahoo(200105059) Under Guidance of Dr. M.B.Srinivas.

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

ARITHMETIC LOGIC SHIFT UNIT
1 Chapter Five The Processor: Datapath and Control.
CSE378 Multicycle impl,.1 Drawbacks of single cycle implementation All instructions take the same time although –some instructions are longer than others;
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Levels in Processor Design
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Processor: Datapath and Control
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
CDA 3101 Fall 2013 Introduction to Computer Organization
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
LECTURE 6 Multi-Cycle Datapath and Control. SINGLE-CYCLE IMPLEMENTATION As we’ve seen, single-cycle implementation, although easy to implement, could.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Design a MIPS Processor (II)
Multi-Cycle Datapath and Control
CS161 – Design and Architecture of Computer Systems
IT 251 Computer Organization and Architecture
/ Computer Architecture and Design
Systems Architecture I
Multi-Cycle CPU.
Extensions to the Multicycle CPU
Decode and Operand Read
Instruction Format MIPS Instruction Set.
Single Cycle Processor
D.4 Finite State Diagram for the Multi-cycle processor
Multi-Cycle CPU.
CS/COE0447 Computer Organization & Assembly Language
The Processor and Machine Language
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
Computer Organization “Central” Processing Unit (CPU)
The Multicycle Implementation
MIPS Processor.
Drawbacks of single cycle implementation
Levels in Processor Design
Rocky K. C. Chang 6 November 2017
The Multicycle Implementation
Systems Architecture I
The Processor Lecture 3.2: Building a Datapath with Control
Vishwani D. Agrawal James J. Danaher Professor
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Control Unit (single cycle implementation)
Instruction Format MIPS Instruction Set.
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Chapter Four The Processor: Datapath and Control
Control Unit for Multiple Cycle Implementation
5.5 A Multicycle Implementation
Processor Design Datapath and Design.
Systems Architecture I
Control Unit for Multiple Cycle Implementation
FloorPlan for Multicycle MIPS
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
MIPS Processor.
Processor: Datapath and Control
Chapter 4 The Von Neumann Model
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Design of a 8-bit RISC Micro controller Core By Ayush Mittal( ) Rakesh Kumar Sahoo( ) Under Guidance of Dr. M.B.Srinivas

Project Goal A 8-bit RISC micro controller to meet the requirements of low cost embedded Applications is designed.This particular micro controller core has been designed with 256 word of program memory and 128 bytes of data memory.Each instruction word is of size 14 bits.

Where to start? Shall I start ALU ? or Control Unit ? or Program counter ? Lets start from the scratch…………………

Brief overview: First step towards designing a microprocessor is selecting the instruction set. one can select his own instruction set or can use already existing instruction set. We have chosen PIC micro controller ISA. Next step in design process is dividing the instruction set into different categories such as 1.register type 2.branch type 3.jump type in our case we have only 2 type of instruction: register type and jump type. Next step is to draw the block diagram of the processor with all the components.

Once block diagram is ready,all we need is to design the individual components in the following sequence 1.ALU 2.Program memory and Data memory 3.control Unit Finally the tristate registers and MUX’s and DMUX’s.

Instruction format :

Instruction set: Type of Instruction: Register type- –In this type of instruction the operation of the processor is between registers. –As in the RISC core the instruction contains the immediate data. So an immediate operand instruction can also be considered to be a register type instruction with data in instruction register. –Also here we have all the data stored into program memory so memory access instructions can be considered as register type.

Jump type –There is only one instruction in this category – GOTO instruction. –This instruction is used to branch to any location unconditionally.

Block Diagram:

Division of design: The design is divided into following components for modularity and finally all the components are combined. 1. PC (program counter) 2. Program memory 3. Instruction register 4. File Register 5. ALU 6. Control unit 7. ALU control unit 8. Status Register 9. 2to1 MUX (8 bit wide) 10. Tristate register We will discuss design of each individual component and then combine all the components to reach at final design.

Registers and Memory: Instruction Register –It’s a 14 bit register which takes input from program memory. –It gives 6 bit op-code to control register. –It gives 7 bit address of file register. –It gives 8 bits immediate literal for GOTO instr. File Register Program memory –It’s a 256 x 14 bit memory. –It has 8 bit address bus. –It’s a 128 x 8 bit register array. –It has 7 bit address bus. –It is one of the input’s of ALU. W-register –It’s a 8 bit tri-state register. –It is used to store the output of ALU operation.

Status Register –It’s a 3 bit register used to store status of ALU operations like Carry(C), Auxiliary Carry(AC) & Zero(Z). –It is controlled by signal called PSW write. Program Counter –It is a 8 bit register it contains the address of next instruction in the Program Memory. –It is incremented by 1 after every instruction.

Design of ALU: This is a 8- bit ALU which performs the following operations - ADD, SUBTRACT, OR, XOR, AND, INCREMENT, DECREMENT, etc. ALU uses flag register(f – reg.) and working register(w – reg.) for its input and output. It is a purely combinational circuit. The inputs are multiplexed and one mux selects between B- reg. and PC. The other mux selects between W- reg. and immediate byte. The output is de-multiplexed between File Register and W- reg. or the output is multiplexed separately with Instruction Memory to store next value of PC.

B- reg. I/p W- reg. I/p ALU mode To PC File reg. or W-reg. I/P & O/P Connection to ALU:

Design of control unit: Control unit is a sequential state machine. In our design control unit completes one instruction in 4 clock cycles (except for jump instruction). These 4 steps are 1.instruction fetch step 2.instruction decode and register fetch step 3.execution and branch completion step 4.result store step.

pcwrite instrwr regwrit memread ipsel pcwrite alusrca alusrcb aluop dbit pswwrite wregsel pcsrc opcode Control unit block Diagram:

Reset Memread= 0 Alusrca=0 Alusrcb=1 Pcsrc=1 Pcwrite=1 Aluop=10 resetstart STATE DIAGRAM:

Instruction fetch Memread=1 Alusrca=0 Alusrcb=1 Pcsrc=1 Pcwrite=1 Aluop=10 Instr_decode0 Pcsrc=0 Pcwrite=1 Aluop=00 Instr_dec ode1 Ipsel=0 Aluop=00 Instr_de c_goto Ipsel=0 Aluop=0 0 s tart M SB=11 MSB=00/ 01 MSB=10 Start Instruction execute0 Instruction execute1

Alusrca= 1 Alusrcb= 0 Aluop=01 Instr_storew1 Wregsel=1 Aluop=00 Instr_storef1 Regwrite=1 Wregsel=0 Aluop=00 Dbit=0 Dbit=1 start

Instructio n store w0 Wregsel= 1 Aluop=00 Instruction store f0 Wregsel=0 Regwrite=1 Aluop=00 Instruction execute0 Dbit=0 Dbit=1 start

1.instruction fetch step: IR= program_memory [PC]; PC=PC+1; During this clock cycle the instruction pointed by program counter is brought to instruction register. Also program counter is incremented by 1 so that it can point to next instruction to be fetched. 2.instruction decode and register fetch step: B= file_register [f]; The values read from register file may be needed at later stages, so we read it from register file and store it in the temporary register B for later use.

3.execution and branch completion step: arithmetic and logical operation: ALU_OUT= A op W; Branch operation: If (A=W) PC=ALU_OUT; Jump operation: PC=ADDR; 4.Result store Step: file_register [f]= ALU_OUT

ALU Control:  It is a combinational unit that takes 5-bit input from instruction memory and a control input from control input.  It decodes the instruction from instruction memory and sends a 4 bit code to ALU for the type of operation it has to perform.  It is controlled by signal ‘aluop’ so that it gives instruction code to ALU only when ALU operation is required.

Limitations: There is no pipeline designed in the present design. Though it is based on the ISA of PIC micro controller all the instructions are not taken into consideration.In order to avoid complexity CALL instruction and the inbuilt timer and A/D converter is not designed in the present design.

Future advancement: 1.Pipeline can be implemented into the processor. 2.We can implement the other instructions like(CALL and RETURN). 3.Sorting algorithm can be hardwared into the processor for sorting the data stored in the file registers so that we can avoid delay involved in sorting through software.

References: 1.Computer Organisation and Design By David A. Patterson & John L. Hennessy 2. VHDL By Dougles L. Perry 3.VHDL By Skahill Web reference: