assignement -3 (1)

Upload: shanka-udugampola

Post on 02-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 assignement -3 (1)

    1/4

    EECS 31L Assignment 3 Summer 2014

    University of California Irvine

    1

    Submission notes

    In this assignment you finish the project of this course.

    Each files that you upload should be with this format :

    assignmentX_uci_id _exerciseX_fileDescrition.vhd,o

    fileDescrition helps the grader to figure out the goal of file.

    o UCI_ID is not your student number, it is the part of your uci email before the @.

    Your explanation and report of the project part can be uploaded as a single PDF file with the

    following format

    assignmentX_uci_id_report.pdf

    Project: (35 points)

    The goal of this experiment is to implement a simple version of processor we call it as 31L processor. The

    instruction format of this processor is as shown in figure1.

    OP rs rd function rt imm

    1 bit 6 bits 6 bits 4 bits 6 bits 9 bits

    Figure 1. Instruction format (op-code of 31L)

    31L processor supports two types of instructions including R-type (OP=0) and I-type instructions

    (OP=1). R-type is a register-based instruction and I-type is an immediate-based instruction. In R-type

    instructions the instruction is composed of three operands, two source registers, and one destinationregister. In immediate-based type, one of the sources is a 15 bit immediate value. Here is an example of

    R-type and I-type version of ADD instruction.

    ADD RS, RD, RT // R_TYPE: rd rs + rt

    ADDI RS, RD, IMM // I_TYPE: rd rs + immediate

    In the R-type instructions rs and rt in the op-code specify the address of the source registers while rdcontains the address of the output register and the last 9 bits of op-code (imm) are dont care. On the other

    hand, in the I-type instructions only one source register is needed and the value of the second input

  • 8/10/2019 assignement -3 (1)

    2/4

    EECS 31L Assignment 3 Summer 2014

    University of California Irvine

    2

    This simple processor has a simple instruction set including the following commands:

    Instruction Description Function code Comments

    NOP nothing 0000

    ADD/ADDI rdrs + rt / rdrs + immediate 0001

    SUB/SUBI rdrs - rt / rdrs - immediate 0010

    COMP/COMPI rs COMP rt / rs COMP immediate 0011SLT/SLTI Set rd if rs < rt / Set rd if rs