230 likes | 462 Views
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:
E N D
17/10/2013 Performed By: Yahel Ben-Avraham and YaronRimmer Instructor: MonyOrbach Bi-semesterial,2012 - 2013 RISC processor implementation using Bluespecpart 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.
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. ?
The Pipeline Passing structs through FIFOs FETCH2DEC MEM2WB EXE2MEM DEC2EXE Memory FETCH EXE DEC MEM WB Instruction memory Register file
BSV Implementation Wrapper.bsv Defines.bsv Datapath.bsv Fetch.bsv Decode.bsv Execute.bsv Memory.bsv Writeback.bsv
Fetch • Tag the instruction’s metadata (PC, cycle) • Fetch the requested instruction from the instruction memory • Update next PC
Decode • Fully parse the received instruction • Pre-fetch data from registers potentially in use
Execute • According to the instruction’s opcode: • ALU instruction: compute the result • Memory instruction: calculate memory address to read / write to • Branch instruction: check if branch is taken and update branch resolution and target address
Memory • According to the instruction’s opcode: • Store • Load • Otherwise, pass the incoming data • Currently implemented as Register file, to be replaced by BRAM
Writeback • Save needed data to the register file • Register 0 – read only
The Pipeline FETCH2DEC MEM2WB EXE2MEM DEC2EXE Memory FETCH EXE DEC MEM WB Instruction memory Register file
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!
Functionality tests • Memory • Jump • Branch (taken) • Branch (not taken) • (ALU functions)
The working environment • Using a platform by ShaiShachrur 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.
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…