RISC processor implementation using Bluespec part 1 - final presentation

23
RISC PROCESSOR IMPLEMENTATION USING BLUESPEC PART 1 - FINAL PRESENTATION Performed By: Yahel Ben-Avraham and Yaron Rimmer Instructor: Mony Orbach Bi-semesterial, 2012 - 2013 17/10/201 3

description

17/10/2013. Performed By: Yahel Ben- Avraham and Yaron Rimmer Instructor: Mony Orbach Bi- semesterial , 2012 - 2013. RISC processor implementation using Bluespec part 1 - final presentation. Project goals. Goal: Implementing and analyzing RISC Processor using Bluespec Part A: - PowerPoint PPT Presentation

Transcript of RISC processor implementation using Bluespec part 1 - final presentation

Page 1: RISC processor implementation using Bluespec part 1 - final presentation

RISC PROCESSOR IMPLEMENTATION USING BLUESPEC

PART 1 - FINAL PRESENTATION

Performed By: Yahel Ben-Avraham and Yaron Rimmer

Instructor: Mony Orbach

Bi-semesterial, 2012 - 2013

17/10/2013

Page 2: RISC processor implementation using Bluespec part 1 - final presentation

Project goals

Goal: Implementing and analyzing RISC Processor using Bluespec

Part A:Studying the working environment, BSV

language and the basic processor implementation.

Implementing a simple RISC processor.Run a simple test bench on the FPGA system.

Page 3: RISC processor implementation using Bluespec part 1 - final presentation

Pipeline Datapath 5-stage pipeline

Pipe stages: Fetch, Decode, Execute, Memory, WriteBack

Each stage implemented as a “black box” within a separate rule.

For now, not including Data forwarding, Hazard detection.

?

Page 4: RISC processor implementation using Bluespec part 1 - final presentation

The Pipeline

WB

Instruction memory

Register file

Memory

MEMEXEDECFETCH

FETCH2DEC DEC2EXE EXE2MEM MEM2WB

Passing structs through FIFOs

Page 5: RISC processor implementation using Bluespec part 1 - final presentation

BSV ImplementationWrapper.bsv

Defines.bsv

Datapath.bsv

Fetch.bsv Decode.bsv Execute.bsv

Memory.bsv Writeback.bsv

Page 6: RISC processor implementation using Bluespec part 1 - final presentation

Fetch

Tag the instruction’s metadata (PC, cycle) Fetch the requested instruction from the

instruction memory Update next PC

Page 7: RISC processor implementation using Bluespec part 1 - final presentation

Decode

Fully parse the received instruction Pre-fetch data from registers potentially in use

Page 8: RISC processor implementation using Bluespec part 1 - final presentation

Execute

According to the instruction’s opcode:ALU instruction: compute the resultMemory instruction: calculate memory address to

read / write toBranch instruction: check if branch is taken and

update branch resolution and target address

Page 9: RISC processor implementation using Bluespec part 1 - final presentation

Memory

According to the instruction’s opcode:StoreLoadOtherwise, pass the incoming data

Currently implemented as Register file, to be replaced by BRAM

Page 10: RISC processor implementation using Bluespec part 1 - final presentation

Writeback

Save needed data to the register fileRegister 0 – read only

Page 11: RISC processor implementation using Bluespec part 1 - final presentation

The Pipeline

WB

Instruction memory

Register file

Memory

MEMEXEDECFETCH

FETCH2DEC DEC2EXE EXE2MEM MEM2WB

Page 12: RISC processor implementation using Bluespec part 1 - final presentation

Jumps and Branches

The first 6 bits of the instruction are checked in the Fetch stage.If Jump – next PC is immediately updated

with the rest of the instruction bits.If Branch – insert 3 NOPs to the pipeline

and wait for branch resolution from the Execute stage.

Implemented easily with Bluespec!

Page 13: RISC processor implementation using Bluespec part 1 - final presentation

Functionality tests

Memory Jump Branch (taken) Branch (not taken) (ALU functions)

Page 14: RISC processor implementation using Bluespec part 1 - final presentation

Examples: Memory

Yaron
סכמת בלוקים של חיבורי חומרה וממשק, עם פירוט על הפלטפורמה של דני ושי. אפשר לפצל לשני שקפים
Page 15: RISC processor implementation using Bluespec part 1 - final presentation

Examples: Jump

Yaron
סכמת בלוקים של חיבורי חומרה וממשק, עם פירוט על הפלטפורמה של דני ושי. אפשר לפצל לשני שקפים
Page 16: RISC processor implementation using Bluespec part 1 - final presentation

Examples – Branch (taken)

Yaron
סכמת בלוקים של חיבורי חומרה וממשק, עם פירוט על הפלטפורמה של דני ושי. אפשר לפצל לשני שקפים
Page 17: RISC processor implementation using Bluespec part 1 - final presentation

Examples: Branch (not taken)

Yaron
סכמת בלוקים של חיבורי חומרה וממשק, עם פירוט על הפלטפורמה של דני ושי. אפשר לפצל לשני שקפים
Page 18: RISC processor implementation using Bluespec part 1 - final presentation

The working environment

Using a platform by Shai Shachrur and Danni Hofshi.Allowing us to focus on the processor.

The platform enables:Synthesis of design to FPGA.Cycle level control using COP.Reading and writing to memories.Performance counters.

Yaron
סכמת בלוקים של חיבורי חומרה וממשק, עם פירוט על הפלטפורמה של דני ושי. אפשר לפצל לשני שקפים
Page 19: RISC processor implementation using Bluespec part 1 - final presentation

The platform

Page 20: RISC processor implementation using Bluespec part 1 - final presentation

System layers

Page 21: RISC processor implementation using Bluespec part 1 - final presentation

Project progress overview

Studying the working environment, BSV language and the basic processor implementation.

Implementing the presented pipelined MIPS processor.

Run a simple test bench on the FPGA system.

Started planning part 2 implementations.

Up next…

Page 22: RISC processor implementation using Bluespec part 1 - final presentation

Up Next• Branch prediction, Hazard detection and Data

forwarding

• Wider instruction set

• Implement memories as BRAM (split pipeline stages)

• Running on FPGA

• Performance counters and assessments

Page 23: RISC processor implementation using Bluespec part 1 - final presentation

QUESTIONS?