Cs 152b final report
Sponsored Links
This presentation is the property of its rightful owner.
1 / 14

CS 152b Final Report PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

CS 152b Final Report. Group 6. Background.

Download Presentation

CS 152b Final Report

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Cs 152b final report

CS 152b Final Report

Group 6



Our goal was to design and implement a functional 16-bit RISC processor using the Xilinx software. The constrains on our chip design was that it must be able to run on a Xess board and must adhere to the standards specified by our primary customer Young Cho Enterprises out of UCLA.

Group 6 staff

The R2-Yu2 processor

  • Randy Grant – Technical lead

  • Robert Johnson – VHDL master

  • Anthony (moo) Yu – Datapath guru

  • George Yu – Software designer

Instruction set architecture

Instruction Set Architecture

  • R-Type Instructions

  • No Op Instruction

  • I-Type Instructions

  • J-Type Instructions



Instruction Read

Instruction Decode



Register Write Back

Instruction cache

Instruction Cache

  • 32 Word Direct Mapped Cache

  • Instructions are read-only, so no write-back or write-through schemes are needed

  • Multiplexor selects proper cache entry for controller

  • Implemented in structural and behavioral VHDL

  • Each cache entry has 1 bit valid flag, 11 bits tag, 16 bits data

  • Cache Controller processes hits and misses

  • Demuxliplexor sets write signal for each cache entry (Max one bit high)

  • 28 bit registers store cache entries

Instruction cache1

Instruction Cache

  • Cache integration with datapath

  • Memory accesses and cache lookups done in parallel

On a hit, the next instruction comes from the cache

On a miss, the next instruction comes from memory and is also pulled into the cache

Given more time, we would further modify the integration of the cache with the datapath to increase the benefit of the cache addition

Instruction cache2

Instruction Cache

Stalling the Pipeline

  • Hold the PC value by feeding a zero increment       

  • Allow any JMP or BEQ instructions to alter it-send NOPs through the pipeline

  • Resume normal execution once hit goes high

Typical compiler

Typical Compiler

  • ScannerTakes in input file and tokenizes the input

  • Parser Transforms token stream into a grammatical phrases

  • Code Generation Creates assembly code from the grammar

  • Linker Turns the assembly code into the native bit code of the computer

Our compiler solution

Our Compiler Solution

  • Implemented a stack for embedded structures

  • Combined parsing and scanning into a single array of struct (tokenlist), which stored all the tokens

Implementing a stack

Implementing a Stack

Initial state of the memory

Push register

sw r1, 51(r0)

sw r2, 52(r0)

sw r3, 53(r0)

sw r4, 54(r0)

sw r5, 55(r0)

sw r6, 56(r0)

sw r7, 57(r0)

Heapstart = Heapstart + 7

Pop Register

lw r7, 57(r0)

lw r6, 56(r0)

lw r5, 55(r0)

lw r4, 54(r0)

lw r3, 53(r0)

lw r2, 52(r0)

lw r1, 51(r0)

Heapstart = Heapstart - 7

Our compiler design

Our Compiler Design

L6: lw r7, 57(r0)

lw r6, 56(r0)

lw r5, 55(r0)

lw r2, 52(r0)

lw r1, 51(r0)

beq r2, r1, L7

add r1, r1, r3

jmp L3

L7: hlt

lw r7, 72(r0) L5: lw r7, 65(r0)

lw r6, 71(r0) lw r6, 64(r0)

lw r5, 70(r0) lw r5, 63(r0)

lw r4, 69(r0) lw r4, 62(r0)

lw r3, 68(r0) lw r3, 61(r0)

lw r2, 67(r0) lw r2, 60(r0)

lw r1, 66(r0) lw r1, 59(r0)

beq r2, r1, L6jmp L4

add r1, r1, r3

L3: sw r1, 51(r0)

sw r2, 52(r0)

sw r3, 53(r0)

sw r4, 54(r0)

sw r5, 55(r0)

sw r6, 56(r0)

sw r7, 57(r0)

L4: sw r1, 59(r0)

sw r2, 60(r0)

sw r3, 61(r0)

sw r4, 62(r0)

sw r5, 63(r0)

sw r6, 64(r0)

sw r7, 65(r0)

sw r1, 66(r0)

sw r2, 67(r0)

sw r3, 68(r0)

sw r4, 69(r0)

sw r5, 70(r0)

sw r6, 71(r0)

sw r7, 72(r0)

lw r4, 51(r0)

add r1, r0, r4

addi r2, r0, 49

addi r3, r0, 1

lw r5, 0(r3)

lw r6, 0(r4)

slt r7, r6, r5

beq r7, r0, L5

sw r5, 50(r0)

add r5, r6, r0

sw r5, 0(r3)

lw r6, 50(r0)

sw r6, 0(r4)

addi r1, r0, 0

addi r2, r0, 48

addi r3, r0, 1



In Conclusion the Group 6 16-bit RISC Processor Meets and Exceeds Design Requirements!



  • Cache ReferenceComputer Organization & Design The Hardware/Software Interface by Patterson & Hennessy

  • VHDL Referencehttp://www.ee.ucla.edu/~young/csm152b/vhdl_comp.pdf

  • Compiler Referencehttp://cs.wisc.edu/~bodik/cs536/Notes/1.Overview.html

Thank you

Thank You

  • For viewing this presentation you qualify for Group 6’s special offer

  • For a limited time only you can get a copy of the Group 6 processor schematic for only $999.95



  • Login